{"submission_id":0,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if x <= seq[i]:\n return i\n return len(seq)","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if x <= elem:\n return i\n\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":2,"func_code":"def search(x, seq):\n output = 0\n while output < len(seq):\n if x > seq[output]:\n output += 1\n else:\n break\n return output\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":3,"func_code":"def search(x, seq):\n seq = list(seq)\n if seq == []: return 0\n else:\n for i in range(len(seq)):\n if x <= seq[i]:\n return i\n else: continue\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":4,"func_code":"def search(x, seq):\n index = 0\n for i in range(0,len(seq)):\n if x > seq[i]:\n index = i + 1\n return index\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":5,"func_code":"def search(x, seq):\n index = 0\n for i in range(0,len(seq)):\n if x > seq[i]:\n index = i + 1\n return index\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":6,"func_code":"def search(x, seq):\n output = 0\n while output < len(seq):\n if x > seq[output]:\n output += 1\n else:\n break\n return output\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":7,"func_code":"def search(x, seq):\n for i, e in enumerate(seq):\n if x <= e:\n return i\n return len(seq)\n\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":8,"func_code":"def search(x, seq):\n for i, e in enumerate(seq):\n if x <= e:\n return i\n return len(seq)\n\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":9,"func_code":"def search(x, seq):\n brokeloop=False\n if len(seq)==0:\n return 0\n for i, elem in enumerate(seq):\n if elem>=x:\n brokeloop=True\n break\n if brokeloop==True:\n return i\n else:\n return i+1\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":10,"func_code":"def search(x, seq):\n position = 0\n for i, elem in enumerate(seq):\n if x <= elem:\n position = i\n return position\n else:\n position = i + 1\n return position\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":11,"func_code":"def search(x, seq):\n for i, e in enumerate(seq):\n if x <= e:\n return i\n return len(seq)\n\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":12,"func_code":"def search(x, seq):\n for i,e in enumerate(seq):\n if x <= e:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":13,"func_code":"def search(x, seq):\n for i,e in enumerate(seq):\n if x <= e:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":14,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if x <= seq[i]:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":15,"func_code":"def search(x, seq):\n y = len(seq)\n if y == 0 or x < seq[0]:\n return 0\n else:\n for i in range(y-1):\n if x > seq[i] and x <= seq[i+1]:\n return i + 1\n return y\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":16,"func_code":"def search(x, seq):\n if seq==() or seq==[]:\n return 0\n for a,b in enumerate(seq):\n if x<=b:\n return a\n for i in seq:\n if x>i:\n return a+1\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":17,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if x <= seq[i]:\n return i\n return len(seq) \n \n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":18,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if x <= seq[i]:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":19,"func_code":"def search(x, seq):\n counter = 0\n while counter < len(seq):\n if x <= seq[counter]:\n return counter\n counter += 1\n return counter\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":20,"func_code":"def search(x, seq):\n for index, value in enumerate(seq):\n if x <= value:\n return index\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":21,"func_code":"def search(x, seq):\n seq = list(seq)\n if seq == []: return 0\n else:\n for i in range(len(seq)):\n if x <= seq[i]:\n return i\n else: continue\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":22,"func_code":"def search(x, seq):\n position = 0\n for i, elem in enumerate(seq):\n if x <= elem:\n position = i\n return position\n else:\n position = i + 1\n return position\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":23,"func_code":"def search(x, seq):\n i = -1\n for i in range(len(seq)):\n if x <= seq[i]:\n return i\n return i + 1\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":24,"func_code":"def search(x, seq):\n i = -1\n for i in range(len(seq)):\n if x <= seq[i]:\n return i\n return i + 1\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":25,"func_code":"def search(x, seq):\n count=0\n for i in seq:\n if x<=i:\n return count\n else:\n count+=1\n return count\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":26,"func_code":"def search(x, seq):\n for i, elem in enumerate (seq):\n if x <= elem:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":27,"func_code":"def search(x, seq):\n for i,ele in enumerate(seq):\n if x<=ele: #if x is less\/equal to the specific element in the list\n return i #return the index to be inserted in\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":28,"func_code":"def search(x, seq):\n counter = 0\n for i in seq:\n if x > i:\n counter = counter + 1\n return counter\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":29,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if elem == x:\n return i\n elif x > elem:\n continue\n elif x < elem:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":30,"func_code":"def search(x, seq):\n if seq == () or seq == []:\n return 0\n elif x <= seq[0]:\n return 0\n elif x > seq[-1]:\n return len(seq)\n else:\n seq_enum = [i for i in enumerate(seq)]\n for j in range(len(seq_enum) - 1):\n if x >= seq_enum[j][1] and x <= seq_enum[j+1][1]:\n return j+1\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":31,"func_code":"def search(x, seq):\n for i,ele in enumerate(seq):\n if x<=ele:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":32,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if seq[i]>=x:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":33,"func_code":"def search(x, seq):\n if seq == () or seq == []:\n return 0\n elif x < seq[0]:\n return 0\n elif x > seq[-1]:\n return len(seq)\n else:\n seq_enum = [i for i in enumerate(seq)]\n for j in range(len(seq_enum) - 1):\n if x >= seq_enum[j][1] and x <= seq_enum[j+1][1]:\n return j+1\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":34,"func_code":"def search(x, seq):\n new = list(enumerate(seq))\n for n in new:\n if x <= n[1]:\n return n[0]\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":35,"func_code":"def search(x, seq):\n if not seq:\n return 0\n elif x <= seq[0]:\n return 0\n else:\n for i in range(len(seq)-1):\n if seq[i] < x <= seq[i+1]:\n return i+1\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":36,"func_code":"def search(x, seq):\n n=[]\n seq = list(seq)\n a= seq.copy()\n d = 0 \n if seq == []:\n return 0\n for i in a:\n if i= x:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":40,"func_code":"def search(x, seq):\n counter = 0\n while counter < len(seq):\n if x <= seq[counter]:\n return counter\n counter += 1\n return counter\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":41,"func_code":"def search(x, seq):\n counter = 0\n while counter < len(seq):\n if x <= seq[counter]:\n return counter\n counter += 1\n return counter\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":42,"func_code":"def search(x, seq):\n listseq=list(seq)\n n=len(seq)\n \n for i in listseq:\n if x<=i:\n return listseq.index(i)\n return n\n\n ","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":43,"func_code":"\ndef search(x, seq):\n n=len(seq)\n count=0\n for i in range(n):\n if seq[i] seq[-1]:\n return len(seq)\n else:\n seq_enum = [i for i in enumerate(seq)]\n for j in range(len(seq_enum) - 1):\n if x >= seq_enum[j][1] and x <= seq_enum[j+1][1]:\n return j+1\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":49,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if x <= seq[i]:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":50,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if x <= seq[i]:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":51,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if x <= seq[i]:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":52,"func_code":"def search(x, seq):\n if seq == () or seq == []:\n return 0\n elif x < seq[0]:\n return 0\n elif x > seq[-1]:\n return len(seq)\n for i, elem in enumerate(seq):\n if x <= elem:\n return i \n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":53,"func_code":"def search(x, seq):\n index_for_x = 0\n for index, element in enumerate(seq) :\n if element < x:\n index_for_x+=1\n else:\n break\n return index_for_x\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":54,"func_code":"def search(x, seq):\n\tseq=list(seq)\n\tif seq==[]:\n\t\treturn 0\n\telse:\n\t\tfor i in seq:\n\t\t\tif x<=i:\n\t\t\t\tnum=seq.index(i)\n\t\t\t\tbreak\n\t\t\telse:\n\t\t\t\tnum=len(seq)\n\treturn num\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":55,"func_code":"def search(x, seq):\n y = 0\n for z in seq:\n if x > z:\n y += 1\n return y\n\n \n \n\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":56,"func_code":"def search(x, seq):\n if len(seq)==0:\n return 0\n for i in range(0,len(seq)):\n if xseq[len(seq)-1]:\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":57,"func_code":"def search(x, seq):\n for j, elem in enumerate(seq):\n if x<= elem:\n return j\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":58,"func_code":"def search(x, seq):\n lst = list(seq)\n if lst == []:\n lst.append(x)\n else:\n for i in range(len(lst)):\n if x < lst[i]:\n lst.insert(i,x)\n else:\n lst.insert(len(lst),x)\n for i in range(len(lst)):\n if lst[i] == x:\n return i\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":59,"func_code":"def search(x, seq):\n counter=0\n for i in seq:\n if x<= i:\n return counter\n counter+=1\n return counter\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":60,"func_code":"def search(x, seq):\n if seq == () or seq == []:\n return 0\n else:\n for i, elem in enumerate(seq):\n if x <= elem:\n return i\n elif x > seq[-1]:\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":61,"func_code":"def search(x, seq):\n position=0\n for i in range(len(seq)):\n if x>seq[i]:\n position+=1\n else:\n return position\n return position \n \n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":62,"func_code":"def search(x, seq):\n if len(seq) == 0:\n return 0\n else:\n for i in range(len(seq)-1):\n if x > seq[i] and x <= seq[i+1]:\n return i+1\n if x < seq[0]:\n return 0\n elif x > seq[len(seq)-1]:\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":63,"func_code":"def search(x, seq):\n length = len(seq)\n if length == 0: return 0\n elif length == 1: return 0 if x < seq[0] else 1\n else:\n for i in range(length):\n if x <= seq[i]: return i\n return length # x is larger than everything in seq, so x goes to the end\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":64,"func_code":"def search(x, seq):\n if len(seq) == 0:\n return 0\n elif x < int(seq[0]):\n return 0\n elif x > int(seq[len(seq)-1]):\n return len(seq)\n else:\n for i in range(len(seq)):\n if x > seq[i] and x <= seq[i+1]:\n return i+1\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":65,"func_code":"def search(x, seq):\n if len(seq) == 0: #if there is nothing in the sequence, put it as the first part of the column\n return 0\n else:\n for i in range(len(seq)):\n if x > seq[-1]: #if the digit x is greater than the greatest number in the sequence, return the number of elements in the sequence\n return len(seq)\n elif x <= seq[i]: #to return the number when x is smaller of equals to the i in the loop\n return i\n else:\n continue #goes into a loop until it finds the number that matches the previous answer.\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":66,"func_code":"def search(x, seq):\n position=0\n for i in range(len(seq)):\n if x>seq[i]:\n position+=1\n else:\n return position\n return position \n \n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":67,"func_code":"def search(x, seq):\n if len(seq) == 0:\n return 0\n else:\n for i,elem in enumerate(seq):\n if x > elem:\n continue\n return i\n return i+1\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":68,"func_code":"def search(x, seq):\n position = 0\n for i in range(len(seq)):\n if x > seq[i]:\n position = position+1\n \n return position\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":69,"func_code":"def search(x, seq):\n a = len(seq)\n if a == 0:\n return 0\n if a !=0 and x < seq[0]:\n return 0\n elif a!= 0 and x > seq[-1]:\n return a\n else:\n for i in range(a):\n if x == seq[i]:\n return i\n elif x < seq[i]:\n return i\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":70,"func_code":"def search(x, seq):\n a = len(seq)\n if a == 0:\n return 0\n if a !=0 and x < seq[0]:\n return 0\n elif a != 0 and x > seq[-1]:\n return a\n else:\n for i in range(a):\n if x == seq[i]:\n return i\n elif x < seq[i]:\n return i\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":71,"func_code":"def search(x, seq):\n i=0\n while iseq[counter]:\n\t\t\tcounter+=1\n\t\t\tcontinue\n\t\tbreak\n\treturn counter\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":74,"func_code":"def search(x, seq):\n counter = 0\n for elem in seq:\n if x > elem:\n counter += 1\n else:\n break\n return counter\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":75,"func_code":"def search(x, seq):\n if len(seq)==0:\n return 0\n a = list(enumerate(seq))\n for item in a:\n if x <= item[1]:\n return item[0]\n if x > seq[-1]:\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":76,"func_code":"def search(value, seq):\n\tfor i in range(len(seq)):\n\t\tif value <= seq[i]:\n\t\t\treturn i\n\t\telse:\n\t\t\tcontinue\n\treturn len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":77,"func_code":"def search(x, seq):\n if seq == () or seq == []:\n return 0\n else:\n for i, elem in enumerate(seq):\n if x <= elem:\n return i\n elif x > seq[-1]:\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":78,"func_code":"def search(x, seq):\n for i,ele in enumerate(seq):\n if x<=ele: #if x is less\/equal to the specific element in the list\n return i #return the index to be inserted in\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":79,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if x <= elem:\n return i\n return len(seq) \n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":80,"func_code":"def search(x, seq):\n if seq == ():\n return 0\n elif seq == []:\n return 0\n else:\n next\n for i, elem in enumerate(seq):\n if x <= elem:\n return i\n elif x > max(seq):\n return len(seq)\n \n \n \n \n ","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":81,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if x <= elem:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":82,"func_code":"def search(x, seq):\n #Takes in a value x and a sorted sequence seq, and returns the\n #position that x should go to such that the sequence remains sorted \n i =0 \n for p in seq:\n if x <= p:\n return i\n i += 1\n return len(seq)\n \n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":83,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if x <= elem:\n return i\n return len(seq) \n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":84,"func_code":"def search(x, seq):\n holder=0\n for value in seq:\n if x>value:\n holder+=1\n return holder\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":85,"func_code":"\ndef search(x, seq):\n new_seq=list(seq)\n new_seq.append(x)\n sort=[]\n while new_seq:\n smallest=new_seq[0]\n for element in new_seq:\n if elementvalue:\n holder+=1\n return holder\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":87,"func_code":"def search(x, seq):\n if len(seq)==0:\n return 0\n if x < seq[0]:\n return 0\n elif x > seq[len(seq)-1]:\n return len(seq)\n else:\n for i in range(len(seq)):\n if x > seq[i] and x <= seq[i+1]:\n return i+1\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":88,"func_code":"\ndef search(x, seq):\n new_seq=list(seq)\n new_seq.append(x)\n sort=[]\n while new_seq:\n smallest=new_seq[0]\n for element in new_seq:\n if elementseq[len(seq)-1]:\n return len(seq)\n elif seq[i] <= x and x<= seq[i+1]:\n return i+1\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":93,"func_code":"\ndef search(x, seq):\n if seq == () or seq == []:\n return 0\n else:\n for i in range(0,len(seq)):\n if i == 0 and xseq[len(seq)-1]:\n return len(seq)\n elif seq[i] <= x and x<= seq[i+1]:\n return i+1\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":94,"func_code":"def search(x, seq):\n total = seq\n counter = 0\n while counter != len(seq):\n if x <= total[counter]:\n break\n else:\n counter += 1\n return counter\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":95,"func_code":"def search(x, seq):\n counter=0\n for i in seq:\n if x<=i:\n return counter\n else:\n counter=counter+1\n return counter\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":96,"func_code":"def search(x, seq):\n if type(seq) == list:\n a = seq.copy()\n a.append(x)\n a.sort()\n for i, elem in enumerate(a):\n if elem == x:\n return i\n else:\n temp_list = list(seq)\n temp_list.append(x,)\n temp_list.sort()\n for i, elem in enumerate(temp_list):\n if elem == x:\n return i\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":97,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if x <= seq[i]:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":98,"func_code":"def search(x, seq):\n for i,ele in enumerate(seq):\n if x<=ele: #if x is less\/equal to the specific element in the list\n return i #return the index to be inserted in\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":99,"func_code":"def search(x, seq):\n if len(seq) == 0:\n return 0\n else:\n for i, elem in enumerate(seq):\n if i == 0 and x < elem:\n return 0\n elif x <= elem:\n return i\n elif i == len(seq) - 1:\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":100,"func_code":"def search(x, seq):\n if seq == () or seq == []:\n return 0\n else:\n count = 0\n for i in range (0, len(seq)):\n if seq[i] >= x:\n return i\n elif seq[-1] < x:\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":101,"func_code":"def search(x, seq):\n if len(seq) == 0:\n return False\n else: \n for i in range(len(seq)):\n if x < seq[i]:\n return i\n elif seq[i] == seq[-1] and seq[i] z:\n y += 1\n return y\n\n \n \n\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":103,"func_code":"def search(x, seq):\n if len(seq) == 0 or x <= seq[0]:\n return 0\n elif x > seq[len(seq) - 1]:\n return len(seq)\n else:\n for i in range(len(seq)):\n if x <= seq[i]:\n return i\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":104,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if x <= seq[i]:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":105,"func_code":"def search(x, seq):\n for k in range(len(seq)): \n if x <= seq[k]:\n return k\n elif x > seq[k]:\n continue\n return len(seq) # if bigger than the last element \n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":106,"func_code":"def search(x, seq):\n y = 0\n for z in seq:\n if x > z:\n y += 1\n return y\n\n \n \n\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":107,"func_code":"def search(x, seq):\n if seq == () or seq == []:\n return 0\n elif seq[-1] < x:\n return len(seq)\n newseq = list(seq)\n sortlist = []\n while x not in sortlist and newseq:\n start = newseq[0]\n if x <= start:\n sortlist.append(x)\n else:\n sortlist.append(start)\n newseq.pop(0)\n sortlist.extend(newseq)\n for pos, elem in enumerate(sortlist):\n if elem == x:\n return pos\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":108,"func_code":"def search(x, seq):\n for i, val in enumerate(seq):\n if x <= val:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":109,"func_code":"def search(x, seq):\n if seq == () or seq == []:\n return 0\n elif seq[-1] < x:\n return len(seq)\n newseq = list(seq)\n sortlist = []\n while x not in sortlist and newseq:\n start = newseq[0]\n if x <= start:\n sortlist.append(x)\n else:\n sortlist.append(start)\n newseq.pop(0)\n sortlist.extend(newseq)\n for pos, elem in enumerate(sortlist):\n if elem == x:\n return pos\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":110,"func_code":"def search(x, seq):\n if seq == () or seq == []:\n return 0\n elif x < seq[0]:\n return 0\n elif x > seq[-1]:\n return len(seq)\n for i, elem in enumerate(seq):\n if x <= elem:\n return i \n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":111,"func_code":"def search(x, seq):\n listseq=list(seq)\n n=len(seq)\n \n for i in listseq:\n if x<=i:\n return listseq.index(i)\n return n\n\n ","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":112,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if seq[i] >= x:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":113,"func_code":"def search(x, seq):\n for pos,ele in enumerate(seq):\n if ele >= x:\n return pos\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":114,"func_code":"def search(x, seq):\n if seq == () or seq == []:\n return 0\n elif x <= seq[0]:\n return 0\n elif x > seq[-1]:\n return len(seq)\n else:\n seq_enum = [i for i in enumerate(seq)]\n for j in range(len(seq_enum) - 1):\n if x >= seq_enum[j][1] and x <= seq_enum[j+1][1]:\n return j+1\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":115,"func_code":"def search(x, seq):\n if len(seq)==0:\n return 0\n a = list(enumerate(seq))\n for item in a:\n if x <= item[1]:\n return item[0]\n if x > seq[-1]:\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":116,"func_code":"def search(x, seq):\n if len(seq) == 0:\n return 0\n elif x < seq[0]:\n return 0\n elif x > seq[len(seq)-1]:\n return len(seq)\n counter = 0\n for i in seq:\n counter = counter + 1\n if x > seq[counter]:\n continue\n elif x <= seq[counter]:\n return counter\n\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":117,"func_code":"def search(x, seq):\n if seq == () or seq == []:\n return 0\n elif x > seq[-1]:\n return len(seq)\n else:\n for num in range(len(seq)):\n if x > seq[num]:\n continue\n elif x <= seq[num]:\n return num \n return 0\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":118,"func_code":"def search(x, seq):\n if len(seq) == 0:\n return 0\n elif x < seq[0]:\n return 0\n elif x > seq[len(seq)-1]:\n return len(seq)\n counter = 0\n for i in seq:\n counter = counter + 1\n if x > seq[counter]:\n continue\n elif x <= seq[counter]:\n return counter\n\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":119,"func_code":"def search(x, seq):\n counter=0\n for i in seq:\n if x<= i:\n return counter\n counter+=1\n return counter\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":120,"func_code":"\ndef search(x, seq):\n for i in range(len(seq)):\n if x<=seq[i]:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":121,"func_code":"\ndef search(x, seq):\n for i in range(len(seq)):\n if x<=seq[i]:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":122,"func_code":"def search(x, seq):\n if len(seq)==0:\n return 0\n elif xseq[-1]:\n return len(seq)\n else:\n for i in range(len(seq)):\n if x>seq[i] and x seq[-1]:\n return len(seq)\n else:\n for num in range(len(seq)):\n if x > seq[num]:\n continue\n elif x <= seq[num]:\n return num \n return 0\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":125,"func_code":"def search(x, seq):\n if len(seq) == 0:\n return 0\n else:\n for i in seq:\n if x <= i:\n return seq.index(i)\n elif x > max(seq):\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":126,"func_code":"def search(x, seq):\n\n count = 0\n\n for i in seq:\n if x > i:\n count += 1 \n return count\n \n \n return\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":127,"func_code":"def search(x, seq):\n k = 0\n for i in range(len(seq)):\n if x <= seq[i]:\n break\n k = i + 1\n return k\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":128,"func_code":"def search(x, seq):\n pos = 0\n for i in range(len(seq)):\n if x <= seq[i]:\n pos = i\n return pos\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":129,"func_code":"def search(x, seq):\n if len(seq) == 0:\n return 0\n else:\n for i in seq:\n if x <= i:\n return seq.index(i)\n elif x > max(seq):\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":130,"func_code":"def search(x,seq):\n counter = 0\n for i in seq:\n if i < x:\n counter = counter + 1\n return counter\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":131,"func_code":"def search(x, seq):\n for i, y in enumerate(seq):\n if x <= y:\n return i\n if seq == [] or seq == (): \n return 0\n else:\n return 1+i\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":132,"func_code":"def search(x, seq):\n if seq == () or seq == []:\n return 0\n else:\n for i in range (len(seq)):\n if x < seq[i]:\n return i\n elif x ==seq[i]:\n return i\n else:\n continue\n return i + 1\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":133,"func_code":"def search(x, seq):\n for i, y in enumerate(seq):\n if x <= y:\n return i\n if seq == [] or seq == (): \n return 0\n else:\n return 1+i\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":134,"func_code":"def search(x, seq):\n for i, y in enumerate(seq):\n if x <= y:\n return i\n if seq == [] or seq == (): \n return 0\n else:\n return 1+i\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":135,"func_code":"def search(x, seq):\n if seq == ():\n return 0\n elif seq == []:\n return 0\n for i, elem in enumerate(seq):\n if x == elem:\n return i\n elif x < elem:\n return i\n elif x > seq[-1]:\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":136,"func_code":"def search(x, seq):\n if seq == ():\n return 0\n elif seq == []:\n return 0\n for i, elem in enumerate(seq):\n if x == elem:\n return i\n elif x < elem:\n return i\n elif x > seq[-1]:\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":137,"func_code":"def search(x, seq):\n lst = []\n for i, elem in enumerate(seq):\n lst.append((i, elem))\n for i in lst:\n if x <= i[1]:\n return i[0]\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":138,"func_code":"def search(x, seq):\n if len(seq)==0:\n return 0\n for i in range(0,len(seq)):\n if xseq[len(seq)-1]:\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":139,"func_code":"def search(x, seq):\n counter=0\n while counter=x:\n return counter\n counter+=1\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":140,"func_code":"def search(x, seq):\n if len(seq)==0:\n return 0\n for i in range(len(seq)):\n if x<= seq[i]:\n a=i\n break\n elif x> seq[len(seq)-1]:\n a=len(seq)\n return a\n \n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":141,"func_code":"def search(x, seq):\n seq_len = len(seq)\n for i in range(seq_len):\n if x <= seq[i]: return i\n return seq_len\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":142,"func_code":"def search(x, seq):\n seq_len = len(seq)\n for i in range(seq_len):\n if x <= seq[i]: return i\n return seq_len\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":143,"func_code":"def search(x, seq):\n if seq==[]or seq==():\n return 0\n for count, ele in enumerate(seq):\n if x<=ele:\n return count\n for ele in seq:\n if x>ele:\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":144,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if x<=seq[i]:\n return i\n return len(seq) #if x is larger then all element in seq\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":145,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if x<=seq[i]:\n return i\n return len(seq) #if x is larger then all element in seq\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":146,"func_code":"def search(x, seq):\n if len(seq)==0:\n return 0\n for i in range(len(seq)):\n if seq[i]>=x:\n break\n elif seq[-1]seq[i]:\n position+=1\n return position\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":150,"func_code":"def search(x, seq):\n pos=0\n for i in seq:\n if x<=i:\n pos=seq.index(i)\n return pos\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":151,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if x<=seq[i]:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":152,"func_code":"def search(x, seq):\n result = 0\n counter = 0\n while counter < len(seq):\n temp = seq[counter]\n if x <= temp:\n return counter\n counter = counter + 1\n if counter == 0 and len(seq)!= 0:\n return len(seq)\n return counter\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":153,"func_code":"def search(x, seq):\n result = 0\n counter = 0\n while counter < len(seq):\n temp = seq[counter]\n if x <= temp:\n return counter\n counter = counter + 1\n if counter == 0 and len(seq)!= 0:\n return len(seq)\n return counter\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":154,"func_code":"def search(x, seq):\n y = 0\n for z in seq:\n if x > z:\n y += 1\n return y\n\n \n \n\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":155,"func_code":"def search(x, seq):\n enumerated_list =()\n res= 0\n for i, elem in enumerate(seq):\n enumerated_list = enumerated_list + ((i,elem),)\n\n for number in enumerated_list:\n if x <= number[1]:\n res = number[0]\n break\n else:\n res = len(seq)\n return res\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":156,"func_code":"def search(x, seq):\n if len(seq)==0:\n return 0\n for i in range(len(seq)):\n if x<=seq[i]:break\n if i==len(seq)-1: i+=1\n return i\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":157,"func_code":"def search(x, seq):\n pos = 0\n for i in range(len(seq)):\n if x <= seq[i]:\n pos = i\n return pos\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":158,"func_code":"def search(x,seq): \n if not seq:\n return 0\n for i,elem in enumerate(seq):\n if elem>=x:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":159,"func_code":"def search(x, seq):\n for i, ele in enumerate(seq):\n if x <= ele:\n return i \n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":160,"func_code":"def search(x, seq):\n for i, ele in enumerate(seq):\n if x <= ele:\n return i \n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":161,"func_code":"def search(x, seq):\n for i in range(len(seq)-1):\n if seq[i] < x <= seq[i+1]:\n return i+1\n elif x <= seq[0]:\n return 0\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":162,"func_code":"def search(x, seq):\n length = len(seq)\n if length == 0: return 0\n elif length == 1: return 0 if x < seq[0] else 1\n else:\n for i in range(length):\n if x <= seq[i]: return i\n return length # x is larger than everything in seq, so x goes to the end\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":163,"func_code":"def search(x,seq): \n if not seq:\n return 0\n for i,elem in enumerate(seq):\n if elem>=x:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":164,"func_code":"def search(x, seq):\n pos = len(seq)\n for i, elem in enumerate(seq):\n if x <= elem:\n pos = i\n break\n return pos\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":165,"func_code":"def search(x, seq):\n for k in range(len(seq)): \n if x <= seq[k]:\n return k\n elif x > seq[k]:\n continue\n return len(seq) # if bigger than the last element \n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":166,"func_code":"def search(x, seq):\n for i in range (len(seq)):\n if x <= seq[i]:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":167,"func_code":"def search(x, seq):\n pos = len(seq)\n for i, elem in enumerate(seq):\n if x <= elem:\n pos = i\n break\n return pos\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":168,"func_code":"def search(x,seq):\n\tposition = tuple(enumerate(seq))\n\tif len(seq) == 0:\n\t\treturn 0\n\telse:\n\t\tfor i in position :\n\t\t\tif x <= i[1]:\n\t\t\t\treturn i[0]\n\t\treturn len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":169,"func_code":"def search(x, seq):\n if seq==[]or seq==():\n return 0\n for count, ele in enumerate(seq):\n if x<=ele:\n return count\n for ele in seq:\n if x>ele:\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":170,"func_code":"def search(x, seq):\n if seq == () or seq == []:\n return 0\n for i in range (0, len(seq)):\n if x <= seq[i]:\n pos = i\n return pos\n if x > seq[len(seq)-1]:\n return len(seq)\n \n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":171,"func_code":"def search(x, seq):\n counter = 0\n for i in seq:\n if x > i:\n counter += 1\n continue\n else:\n break\n\n\n return counter\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":172,"func_code":"def search(x, seq):\n pos=0\n for i in seq:\n if x<=i:\n pos=seq.index(i)\n return pos\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":173,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if elem>=x:\n return i\n else:\n continue\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":174,"func_code":"def search(x, seq):\n k = 0\n for i in range(len(seq)):\n if x <= seq[i]:\n break\n k = i + 1\n return k\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":175,"func_code":"def search(x, seq):\n counter = 0\n for i in seq:\n if x > i:\n counter += 1\n continue\n else:\n break\n\n\n return counter\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":176,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if x <= elem:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":177,"func_code":"def search(x, seq):\n if seq == [] or seq == ():\n return 0\n else:\n for a in range(1,len(seq)):\n if seq[a] == x:\n return a\n elif seq[a-1] < x < seq[a]:\n return a\n else:\n if x > seq[-1]:\n return len(seq)\n elif x < seq[0]:\n return 0\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":178,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if x <= elem:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":179,"func_code":"def search(x, seq):\n counter = 0\n for i in seq:\n if x>i:\n counter +=1 #all the element that is the smaller than x\n return counter\n \n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":180,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if x <= seq[i]:\n return i\n return len(seq) \n \n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":181,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if x <= elem:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":182,"func_code":"def search(x, seq):\n if type(seq) == tuple:\n lst = list(seq)\n else:\n lst = seq\n\n counter = 0\n for i in lst:\n if x <= i:\n continue\n else:\n counter += 1\n return counter\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":183,"func_code":"def search(x, seq):\n for index, value in enumerate(seq):\n if x <= value:\n return index\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":184,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n\t if seq[i] < x <= seq[i + 1]:\n return i + 1\n\t elif x > seq[-1]:\n \t\treturn len(seq)\n return 0\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":185,"func_code":"def search(x, seq):\n if seq==() or seq==[]:\n return 0\n else:\n for i in range(len(seq)):\n if x<=seq[i]:\n return i\n return i+1\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":186,"func_code":"def search(x, seq):\n if seq==() or seq==[]:\n return 0\n else:\n for i in range(len(seq)):\n if x<=seq[i]:\n return i\n return i+1\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":187,"func_code":"def search(x, seq):\n if len(seq) ==1:\n if x < seq[0]:\n return 0\n else:\n return 1\n for i in range(len(seq)):\n if i == 0:\n if x < seq[0]:\n return 0\n if x == seq[i]:\n return i\n if seq[i-1] < x < seq[i]:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":188,"func_code":"def search(x, seq):\n if len(seq) == 0:\n return 0\n elif x < seq[0]:\n return 0\n elif x > seq[-1]:\n return len(seq)\n else:\n for i in seq:\n if x > i:\n continue\n else:\n return seq.index(i)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":189,"func_code":"def search(x, seq):\n if not seq:\n return 0\n if x <= seq[0]:\n return 0\n for i in range(len(seq)-1):\n if seq[i] <= x <= seq[i+1]:\n return i + 1\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":190,"func_code":"def search(x, seq):\n if not seq:\n return 0\n if x <= seq[0]:\n return 0\n for i in range(len(seq)-1):\n if seq[i] <= x <= seq[i+1]:\n return i + 1\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":191,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if x <= seq[i]:\n return i\n return len(seq) \n \n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":192,"func_code":"def search(x, seq):\n i=0\n while i i:\n counter = counter + 1\n return counter\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":196,"func_code":"def search(x, seq):\n position=enumerate(seq)\n if len(seq)==0:\n return 0\n elif x>seq[-1]:\n return len(seq)\n else: \n for i in seq:\n if x<=i:\n for index in position:\n if index[1]==i:\n return index[0]\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":197,"func_code":"def search(x, seq):\n if seq==() or seq==[] or x<=seq[0]:\n return 0\n elif x>seq[-1]:\n return len(seq)\n else:\n for i,elem in enumerate(seq):\n if x>elem and x<=seq[i+1]:\n return i+1\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":198,"func_code":"def search(x, seq):\n if seq == () or seq == []:\n return 0\n else:\n count = 0\n for i in range (0, len(seq)):\n if seq[i] >= x:\n return i\n elif seq[-1] < x:\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":199,"func_code":"def search(x, seq):\n if seq==() or seq==[] or x<=seq[0]:\n return 0\n elif x>seq[-1]:\n return len(seq)\n else:\n for i,elem in enumerate(seq):\n if x>elem and x<=seq[i+1]:\n return i+1\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":200,"func_code":"def search(x, seq):\n i=0\n while i= x:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":202,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if x <= seq[i]:\n return i\n else:\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":203,"func_code":"def search(x, seq):\n if seq == () or seq == []:\n return 0\n else:\n for i in range (len(seq)):\n if x < seq[i]:\n return i\n elif x ==seq[i]:\n return i\n else:\n continue\n return i + 1\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":204,"func_code":"def search(x, seq):\n if not seq:\n return 0\n if x <= seq[0]:\n return 0\n for i in range(len(seq)-1):\n if seq[i] <= x <= seq[i+1]:\n return i + 1\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":205,"func_code":"def search(x, seq):\n for i in range(0,len(seq)):\n if seq[i] >= x:\n return max(i, 0)\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":206,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if elem>=x:\n return i\n else:\n continue\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":207,"func_code":"def search(x, seq):\n new_seq=[]\n position=0\n for i in range(len(seq)):\n if x>seq[i]:\n position+=1\n return position\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":208,"func_code":"def search(x, seq):\n for i in range(0,len(seq)):\n if seq[i] >= x:\n return max(i, 0)\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":209,"func_code":"def search(x, seq):\n position = 0\n for i in range(len(seq)):\n if x > seq[i]:\n position = position+1\n \n return position\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":210,"func_code":"def search(x, seq):\n if len(seq) == 0:\n return 0\n elif x < seq[0]:\n return 0\n elif x > seq[-1]:\n return len(seq)\n else:\n for i in seq:\n if x <= i:\n return seq.index(i)\n return None\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":211,"func_code":"def search(x, seq):\n if len(seq) == 0:\n return 0\n elif x < seq[0]:\n return 0\n elif x > seq[-1]:\n return len(seq)\n else:\n for i, elem in enumerate(seq):\n if x <= elem:\n return i\n return None\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":212,"func_code":"def search(x, seq):\n if len(seq) == 0:\n return 0\n else:\n for i, elem in enumerate(seq):\n if x <= elem:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":213,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if x <= elem:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":214,"func_code":"def search(x, seq):\n a = 0\n for i,j in enumerate(seq):\n if x > j and i < len(seq)-1:\n continue\n elif x <= j:\n a = i\n break\n else:\n a = len(seq)\n return a\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":215,"func_code":"def search(x, seq):\n a = 0\n for i,j in enumerate(seq):\n if x > j and i < len(seq)-1:\n continue\n elif x <= j:\n a = i\n break\n else:\n a = len(seq)\n return a\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":216,"func_code":"def search(x, seq):\n if seq == () or seq == [] or x <= seq[0]:\n return 0\n elif x > seq[-1]:\n return len(seq)\n else:\n for i,j in enumerate(seq[:len(seq)-1]):\n if x > j and x <= seq[i+1]:\n return i+1\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":217,"func_code":"def search(x, seq):\n position = 0\n for i in range(len(seq)):\n if x <= seq[i]:\n position = i\n break\n else:\n position = len(seq)\n return position\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":218,"func_code":"def search(x, seq):\n position = 0\n for i in range(len(seq)):\n if x <= seq[i]:\n position = i\n break\n else:\n position = len(seq)\n return position\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":219,"func_code":"def search(x, seq):\n lst = list(seq)\n lst.append(x)\n sort = []\n while lst:\n smallest = lst[0]\n for ele in lst:\n if ele < smallest:\n smallest = ele\n lst.remove(smallest)\n sort.append(smallest)\n for i in range(len(sort)):\n if sort[i] ==x:\n return i\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":220,"func_code":"def search(x, seq):\n if seq == () or seq == [] or x <= seq[0]:\n return 0\n elif x > seq[-1]:\n return len(seq)\n else:\n for i,j in enumerate(seq[:len(seq)-1]):\n if x > j and x <= seq[i+1]:\n return i+1\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":221,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if seq[i]>=x:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":222,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if x <= elem:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":223,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if x <= elem:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":224,"func_code":"def search(x, seq):\n if len(seq) == 0:\n return 0\n elif x > seq[len(seq)-1]:\n return len(seq)\n elif x < seq[0]:\n return 0\n else:\n for i in seq:\n if x > i:\n continue\n else:\n return seq.index(i) \n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":225,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if elem >= x: \n return i #return the position of elem\n return len(seq) #if x > the largest value of seq, return the last position (len(seq))\n \n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":226,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if x <= seq[i]:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":227,"func_code":"def search(x, seq):\n counter = 0\n for i in seq:\n if i< x:\n counter += 1\n elif i == x or i>x:\n break\n return counter\n\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":228,"func_code":"def search(x, seq): #seq is sorted\n pos = 0\n for i in range(len(seq)):\n elem = seq[i]\n if x <= elem:\n pos = i\n break\n else:\n pos += 1\n return pos\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":229,"func_code":"def search(x, seq):\n a = list(enumerate(seq))\n if seq == () or seq == []:\n return 0\n seq = list(seq)\n i = 0\n while i < len(seq):\n if x < seq[i] and i == 0:\n return 0\n elif x <= a[i][1] and x >= a[i-1][1]:\n return a[i][0]\n elif x > a[len(seq)-1][1]:\n return len(seq)\n else:\n i = i + 1\n \n \n return seq\n \n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":230,"func_code":"def search(x, seq):\n value = 0\n for i in range(0, len(seq)):\n if (x > seq[i]):\n value += 1\n elif (x <= seq[i]):\n break\n return value\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":231,"func_code":"def search(x, seq):\n if len(seq) == 0:\n return 0\n else:\n for i in range(len(seq)):\n if x <= seq[i] and i == 0:\n return 0\n elif seq[i-1] < x <= seq[i]:\n return i\n elif x > seq[i] and i == len(seq)-1:\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":232,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if x <= seq[i]:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":233,"func_code":"def search(x, seq):\n if not seq:\n return 0\n elif x <= seq[0]:\n return 0\n else:\n for i in range(len(seq)-1):\n if seq[i] < x <= seq[i+1]:\n return i+1\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":234,"func_code":"def search(x, seq):\n if len(seq) == 0:\n return 0\n else:\n for i in range(len(seq)):\n if x <= seq[i] and i == 0:\n return 0\n elif seq[i-1] < x <= seq[i]:\n return i\n elif x > seq[i] and i == len(seq)-1:\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":235,"func_code":"def search(x, seq):\n position = 0\n\n for i,e in enumerate(seq):\n if x > e:\n position = i+1\n\n return position\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":236,"func_code":"def search(x, seq):\n position = 0\n\n for i,e in enumerate(seq):\n if x > e:\n position = i+1\n\n return position\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":237,"func_code":"def search(x, seq):\n if len(seq) == 0: #if there is nothing in the sequence, put it as the first part of the column\n return 0\n else:\n for i in range(len(seq)):\n if x > seq[-1]: #if the digit x is greater than the greatest number in the sequence, return the number of elements in the sequence\n return len(seq)\n elif x <= seq[i]: #to return the number when x is smaller of equals to the i in the loop\n return i\n else:\n continue #goes into a loop until it finds the number that matches the previous answer.\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":238,"func_code":"def search(x, seq):\n if seq==[] or seq== ():\n return 0\n else:\n for i, elem in enumerate(seq):\n if elem>=x:\n return i\n else:\n return (i+1)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":239,"func_code":"def search(x, seq):\n counter = 0\n result = 0\n while counter < len(seq):\n if x < min(seq):\n result = 0\n break\n elif x > max(seq):\n result = len(seq)\n break\n elif x <= seq[counter]:\n result = counter\n break\n counter += 1\n return result\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":240,"func_code":"def search(x, seq):\n counter = 0\n result = 0\n while counter < len(seq):\n if x < min(seq):\n result = 0\n break\n elif x > max(seq):\n result = len(seq)\n break\n elif x <= seq[counter]:\n result = counter\n break\n counter += 1\n return result\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":241,"func_code":"def search(x, seq):\n for position in range(len(seq)):\n if x < seq[position] or x == seq[position]:\n return position\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":242,"func_code":"def search(x, seq):\n total = seq\n counter = 0\n while counter != len(seq):\n if x <= total[counter]:\n break\n else:\n counter += 1\n return counter\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":243,"func_code":"def search(x, seq):\n for i, element in enumerate(seq):\n if x <= element:\n return i\n else:\n continue\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":244,"func_code":"def search(x, seq):\n brokeloop=False\n if len(seq)==0:\n return 0\n for i, elem in enumerate(seq):\n if elem>=x:\n brokeloop=True\n break\n if brokeloop==True:\n return i\n else:\n return i+1\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":245,"func_code":"def search(x, seq):\n brokeloop=False\n if len(seq)==0:\n return 0\n for i, elem in enumerate(seq):\n if elem>=x:\n brokeloop=True\n break\n if brokeloop==True:\n return i\n else:\n return i+1\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":246,"func_code":"def search(x, seq):\n for index in range(len(seq)):\n if x<= seq[index]:\n return index\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":247,"func_code":"def search(x, seq):\n for index in range(len(seq)):\n if x<= seq[index]:\n return index\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":248,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if x <= seq[i]:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":249,"func_code":"def search(x, seq):\n if seq == () or seq == []:\n return 0\n elif x < seq[0]:\n return 0\n elif x > seq[-1]:\n return len(seq)\n for i in range(len(seq)):\n if x == seq[i]:\n return i\n elif x > seq[i-1] and x < seq[i]:\n return i\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":250,"func_code":"def search(x, seq):\n a = 0\n for ele in seq:\n if ele < x:\n a +=1\n return a\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":251,"func_code":"def search(x, seq):\n a = 0\n for ele in seq:\n if ele < x:\n a +=1\n return a\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":252,"func_code":"def search(x, seq):\n counter = 0\n for i in seq:\n if i< x:\n counter += 1\n elif i == x or i>x:\n break\n return counter\n\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":253,"func_code":"def search(x, seq):\n for j, elem in enumerate(seq):\n if x<= elem:\n return j\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":254,"func_code":"def search(x, seq):\n position = 0\n for ele in seq:\n if x > ele:\n position = position + 1\n return position\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":255,"func_code":"def search(x, seq):\n if seq == ():\n return 0\n elif seq == []:\n return 0\n else:\n for i, elem in enumerate(seq):\n if x > seq[-1]:\n return len(seq)\n elif x > elem:\n continue\n else:\n return i\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":256,"func_code":"def search(x, seq):\n for i, elem in enumerate (seq):\n if x <= elem:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":257,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if x <= seq[i]:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":258,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if x <= elem:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":259,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if x <= elem:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":260,"func_code":"def search(x,seq):\n if len(seq) == 0:\n return 0\n else:\n for i in range(len(seq)):\n if x > max(seq):\n return len(seq)\n elif x > seq[i]:\n continue\n elif x <= seq[i]:\n break\n return i\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":261,"func_code":"def search(x, seq):\n counter = 0\n for a in seq:\n if x > a:\n counter = counter + 1\n return counter\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":262,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if seq[i] >= x:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":263,"func_code":"def search(x, seq):\n for i in range (len(seq)):\n if x <= seq[i]:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":264,"func_code":"def search(x, seq):\n count = 0\n for i in seq:\n if x > i:\n count = count + 1\n else:\n break\n return count\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":265,"func_code":"def search(x, seq):\n count = 0\n for i in seq:\n if x > i:\n count = count + 1\n else:\n break\n return count\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":266,"func_code":"def search(x, seq):\n output = 0\n for j in seq:\n if x>j:\n output +=1\n return output\n\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":267,"func_code":"def search(x, seq):\n output = 0\n for j in seq:\n if x>j:\n output +=1\n return output\n\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":268,"func_code":"def search(x, seq):\n if len(seq) == 0:\n return 0\n else:\n for i,elem in enumerate(seq):\n if x > elem:\n continue\n return i\n return i+1\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":269,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if elem < x:\n continue\n elif elem == x:\n return i \n elif elem > x:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":270,"func_code":"def search(x, seq):\n seq = list(seq)\n for i, elem in enumerate(seq):\n if elem < x:\n continue\n elif elem == x:\n return i \n elif elem > x:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":271,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if elem < x:\n continue\n elif elem == x:\n return i \n elif elem > x:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":272,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if seq[i] >= x:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":273,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if seq[i] >= x:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":274,"func_code":"def search(x, seq):\n counter = 0\n for value in seq:\n if x > value:\n counter = counter + 1\n else:\n break\n return counter\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":275,"func_code":"def search(x, seq):\n counter = 0\n for value in seq:\n if x > value:\n counter = counter + 1\n else:\n break\n return counter\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":276,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if elem < x:\n continue\n elif elem == x:\n return i \n elif elem > x:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":277,"func_code":"def search(x, seq):\n result = 0\n for i in range(len(seq)):\n if x > seq[i]:\n result += 1\n return result\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":278,"func_code":"def search(x, seq):\n n=[]\n seq = list(seq)\n a= seq.copy()\n d = 0 \n if seq == []:\n return 0\n for i in a:\n if i=x:\n return counter\n counter+=1\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":284,"func_code":"def search(x, seq):\n for i,elem in enumerate(seq):\n if x<=elem:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":285,"func_code":"def search(x, seq):\n for i, element in enumerate(seq):\n if x <= element:\n return i\n else:\n continue\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":286,"func_code":"def search(x, seq):\n a = 0\n for i in range(len(seq)):\n if x <= seq[i]:\n a = i\n break\n else:\n a = len(seq)\n return a\n \n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":287,"func_code":"def search(x, seq):\n enumerated_list=enumerate(seq)\n for i,elem in enumerated_list:\n if x<=elem:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":288,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if x <= seq[i]:\n return seq.index(seq[i])\n elif seq[-1] < x:\n return seq.index(seq[-1])+1\n return 0\n\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":289,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if x <= seq[i]:\n return seq.index(seq[i])\n elif seq[-1] < x:\n return seq.index(seq[-1])+1\n return 0\n\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":290,"func_code":"def search(x, seq):\n for i, j in enumerate(seq):\n if x <= j:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":291,"func_code":"def search(x, seq):\n for i in enumerate(seq):\n if x <= i[1]:\n return i[0]\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":292,"func_code":"def search(x, seq):\n a = len(seq)\n for i, elem in enumerate(seq):\n if x <= elem:\n return i\n return a\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":293,"func_code":"def search(x, seq):\n r=0\n for i in seq:\n if x>i:\n r+=1\n return r\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":294,"func_code":"def search(x, seq):\n r=0\n for i in seq:\n if x>i:\n r+=1\n return r\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":295,"func_code":"def search(x, seq):\n count = 0\n if seq == () or seq == []:\n return 0\n else:\n if x <= seq[0]:\n return 0\n elif x > seq[len(seq)-1]:\n return len(seq)\n else:\n while x > seq[count]:\n count += 1\n return count\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":296,"func_code":"def search(x, seq):\n count = 0\n if seq == () or seq == []:\n return 0\n else:\n if x <= seq[0]:\n return 0\n elif x > seq[len(seq)-1]:\n return len(seq)\n else:\n while x > seq[count]:\n count += 1\n return count\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":297,"func_code":"def search(x, seq):\n## n = 0\n for num in seq:\n if x>num:\n n +=1\n else:\n return n\n return n\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":298,"func_code":"def search(x, seq):\n## n = 0\n for num in seq:\n if x>num:\n n +=1\n else:\n return n\n return n\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":299,"func_code":"def search(x, seq):\n## n = 0\n for num in seq:\n if x>num:\n n +=1\n else:\n return n\n return n\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":300,"func_code":"def search(x, seq):\n if len(seq)==0:\n return 0\n for i, elem in enumerate(seq):\n if x<=elem:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":301,"func_code":"def search(x, seq):\n if list(seq) == []:\n return 0\n else:\n for element in seq:\n if x <= element:\n return list(seq).index(element)\n elif x == max(seq):\n return list(seq).index(max(seq))\n elif x >= max(seq):\n return (list(seq).index(max(seq)))+1\n \n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":302,"func_code":"def search(x, seq):\n if seq==() or seq==[]:\n return 0\n for a,b in enumerate(seq):\n if x<=b:\n return a\n for i in seq:\n if x>i:\n return a+1\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":303,"func_code":"def search(x, seq):\n n = len(seq)\n if n == 0:\n return 0\n else:\n for counter in range(n):\n if x > seq[n-1]:\n result = n\n break\n elif seq[counter] >= x:\n result = counter\n break\n else:\n continue\n return result\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":304,"func_code":"def search(x, seq):\n if len(seq) == 0:\n return 0\n for i, elem in enumerate(seq):\n if x <= elem:\n return i\n if i == (len(seq)-1):\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":305,"func_code":"def search(x, seq):\n if len(seq)==0:\n return 0\n for i in range(len(seq)):\n if x<=seq[i]:break\n if i==len(seq)-1: i+=1\n return i\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":306,"func_code":"def search(x, seq):\n if len(seq)==0:\n return 0\n for i in range(len(seq)):\n if x<=seq[i]:break\n if i==len(seq)-1: i+=1\n return i\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":307,"func_code":"def search(x, seq):\n if len(seq)==0:\n return 0\n for i, elem in enumerate(seq):\n if x<=elem:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":308,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if elem>=x:\n return i\n else:\n continue\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":309,"func_code":"def search(x, seq):\n result = 0\n for i in range(len(seq)):\n if x > seq[i]:\n result += 1\n return result\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":310,"func_code":"def search(x, seq):\n i = 0\n for element in seq:\n if x > element:\n i = i + 1\n return i\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":311,"func_code":"def search(x, seq):\n i = 0\n for element in seq:\n if x > element:\n i = i + 1\n return i\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":312,"func_code":"def search(x, seq):\n if seq == ():\n return 0\n elif seq == []:\n return 0\n else:\n for i, elem in enumerate(seq):\n if x > seq[-1]:\n return len(seq)\n elif x > elem:\n continue\n else:\n return i\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":313,"func_code":"def search(x, seq):\n return\ndef search(x, seq):\n if list(seq) == []:\n return 0\n else:\n for element in seq:\n if x <= element:\n return list(seq).index(element)\n elif x > max(seq):\n return (list(seq).index(max(seq)))+1\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":314,"func_code":"def search(x, seq):\n count=0\n while countseq[count]:\n count+=1\n continue\n else:\n return count\n return len(seq)\n \n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":315,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if (x<=elem):\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":316,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if elem == x:\n return i\n elif x > elem:\n continue\n elif x < elem:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":317,"func_code":"def search(x, seq):\n n = len(seq)\n if n == 0:\n return 0\n else:\n for counter in range(n):\n if x > seq[n-1]:\n result = n\n break\n elif seq[counter] >= x:\n result = counter\n break\n else:\n continue\n return result\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":318,"func_code":"def search(x, seq):\n if seq == () or seq == []:\n return 0\n elif x < seq[0]:\n return 0\n if x > seq[-1]:\n return len(seq)\n for i in range(len(seq)):\n if x == seq[i]:\n return i\n elif x > seq[i-1] and x < seq[i]:\n return i\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":319,"func_code":"def search(x, seq):\n count=0\n while countseq[count]:\n count+=1\n continue\n else:\n return count\n return len(seq)\n \n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":320,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if x <= elem:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":321,"func_code":"def search(x, seq):\n if seq == () or seq == []:\n return 0\n elif x < seq[0]:\n return 0\n elif x > seq[-1]:\n return len(seq)\n for i in range(len(seq)):\n if x == seq[i]:\n return i\n elif x > seq[i-1] and x < seq[i]:\n return i\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":322,"func_code":"def search(x, seq):\n for position in range(len(seq)):\n if x < seq[position] or x == seq[position]:\n return position\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":323,"func_code":"def search(x, seq):\n if type(seq) == tuple:\n lst = list(seq)\n else:\n lst = seq\n\n counter = 0\n for i in lst:\n if x <= i:\n continue\n else:\n counter += 1\n return counter\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":324,"func_code":"def search(x, seq):\n if not seq:\n return 0\n elif x> seq[-1]:\n return len(seq)\n for i, elem in enumerate(seq):\n if x<=elem:\n break\n return i\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":325,"func_code":"def search(x, seq):\n if len(seq) == 0:\n return 0\n elif x < seq[0]:\n return 0\n elif x > seq[len(seq)-1]:\n return len(seq)\n else:\n product = 0\n for i in range(len(seq)-1):\n if x == seq[i]:\n product = i\n elif (seq[i] <= x and x <= seq[i+1]):\n product = product + i + 1\n return product\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":326,"func_code":"def search(x, seq):\n value = 0\n for i in range(0, len(seq)):\n if (x > seq[i]):\n value += 1\n elif (x <= seq[i]):\n break\n return value\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":327,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if (x<=elem):\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":328,"func_code":"def search(x, seq):\n if not seq:\n return 0\n elif x> seq[-1]:\n return len(seq)\n for i, elem in enumerate(seq):\n if x<=elem:\n break\n return i\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":329,"func_code":"def search(x, seq):\n if seq == () or seq == []:\n return 0\n else:\n for i, elem in enumerate (seq):\n if x<=elem:\n return i\n elif x>seq[-1]:\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":330,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if elem >= x:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":331,"func_code":"def search(x, seq):\n if seq == ():\n return 0\n elif seq == []:\n return 0\n else:\n for i,elem in enumerate(seq):\n if x < seq[-1]:\n if x > elem:\n continue\n elif x < elem and type(seq) == tuple:\n seq = seq[:i] + (x,) + seq[i:]\n elif x < elem and type(seq) == list:\n seq = seq[:i] + [x,] + seq[i:]\n elif x > seq[-1]:\n if type(seq) == tuple:\n seq += (x,)\n elif type(seq) == list:\n seq += [x,]\n return seq.index(x)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":332,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if x<=seq[i]:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":333,"func_code":"def search(x, seq):\n if seq == ():\n return 0\n elif seq == []:\n return 0\n else:\n for i,elem in enumerate(seq):\n if x < seq[-1]:\n if x > elem:\n continue\n elif x < elem and type(seq) == tuple:\n seq = seq[:i] + (x,) + seq[i:]\n elif x < elem and type(seq) == list:\n seq = seq[:i] + [x,] + seq[i:]\n elif x > seq[-1]:\n if type(seq) == tuple:\n seq += (x,)\n elif type(seq) == list:\n seq += [x,]\n return seq.index(x)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":334,"func_code":"def search(x, seq):\n position = 0\n for i in range(len(seq)):\n if x <= seq[i]:\n position = i\n break\n else:\n position = len(seq)\n return position\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":335,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if x <= elem:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":336,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if x <= elem:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":337,"func_code":"def search(x, seq):\n result = 0\n for i in range (len(seq)):\n if seq[i] >= x:\n result = i\n break\n else:\n result = i + 1\n return result\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":338,"func_code":"def search(x, seq):\n if seq==[] or seq==():\n return 0\n searchlist = list(enumerate(seq))\n for i in range(len(searchlist)):\n if x <= searchlist[i][1]:\n return searchlist[i][0]\n return i+ 1\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":339,"func_code":"def search(x, seq):\n for position in range(len(seq)):\n if x < seq[position] or x == seq[position]:\n return position\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":340,"func_code":"def search(x, seq):\n for i, j in enumerate(seq):\n if x <= j:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":341,"func_code":"def search(x, seq):\n index = 0\n def helper(index):\n if not seq:\n return 0\n elif x <= seq[index]:\n return index\n else:\n if index + 1 >= len(seq):\n return index + 1\n else:\n return helper(index+1)\n return helper(index)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":342,"func_code":"def search(x, seq):\n if len(seq) ==0 :\n return 0\n else:\n seq = list(seq)\n max_value = max(seq)\n for i,elem in enumerate(seq):\n if x > max_value:\n seq.insert(seq.index(max_value) + 1,x)\n break\n elif x i:\n count += 1\n return count\n \n \n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":344,"func_code":"def search(x, seq):\n if seq == [] or seq==():\n return 0\n elif xseq[0] and len(seq) == 1:\n return 1\n else:\n for i in range(len(seq)-1):\n if seq[i] <= x <= seq[i+1]:\n return i+1\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":345,"func_code":"def search(x, seq):\n if len(seq) ==0 :\n return 0\n else:\n seq = list(seq)\n max_value = max(seq)\n for i,elem in enumerate(seq):\n if x > max_value:\n seq.insert(seq.index(max_value) + 1,x)\n break\n elif x i:\n count += 1\n return count\n \n \n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":347,"func_code":"def search(x, seq):\n if seq == [] or seq==():\n return 0\n elif xseq[0] and len(seq) == 1:\n return 1\n else:\n for i in range(len(seq)-1):\n if seq[i] <= x <= seq[i+1]:\n return i+1\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":348,"func_code":"def search(x, seq):\n n = 0\n a = 0\n while n < len(seq):\n if seq[n] < x:\n n = n + 1\n a = n\n else:\n break\n return a\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":349,"func_code":"def search(x, seq):\n count=0\n for i in seq:\n if x<=i:\n return count\n else:\n count+=1\n return count\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":350,"func_code":"def search(x, seq):\n n = 0\n a = 0\n while n < len(seq):\n if seq[n] < x:\n n = n + 1\n a = n\n else:\n break\n return a\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":351,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if x <= seq[i]:\n return i\n return len(seq)\n #","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":352,"func_code":"def search(x, seq):\n if seq == () or seq == []:\n return 0\n else:\n for i, elem in enumerate(seq):\n if x <= elem:\n return i\n elif i == len(seq) - 1 and x > elem:\n return i + 1\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":353,"func_code":"def search(x, seq):\n if len(seq) == 0:\n return 0\n for i, elem in enumerate(seq):\n if x <= elem:\n return i\n if i == (len(seq)-1):\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":354,"func_code":"def search(x, seq):\n if len(seq) == 0:\n return 0\n for i, elem in enumerate(seq):\n if x <= elem:\n return i\n if i == (len(seq)-1):\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":355,"func_code":"def search(x, seq):\n if seq == () or seq == []:\n return 0\n else:\n for i, elem in enumerate(seq):\n if x <= elem:\n return i\n elif i == len(seq) - 1 and x > elem:\n return i + 1\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":356,"func_code":"def search(x, seq):\n if type(seq) == list:\n seq.append(x)\n seq.sort()\n for i, elem in enumerate(seq):\n if elem == x:\n return i\n else:\n seq+=(x,)\n for i, elem in enumerate(sorted(seq)):\n if elem == x:\n return i\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":357,"func_code":"def search(x, seq):\n result = 0\n if seq == () or seq == []:\n return result\n\n \n for i, elem in enumerate(seq):\n if x <= elem:\n result = i\n break\n \n else:\n result = len(seq)\n return result\n \n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":358,"func_code":"def search(x, seq):\n counter = 0\n for i in seq:\n if x < i:\n return counter\n elif x == i:\n return counter\n else:\n counter += 1\n return counter\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":359,"func_code":"def search(x, seq):\n counter = 0\n for i in seq:\n if x < i:\n return counter\n elif x == i:\n return counter\n else:\n counter += 1\n return counter\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":360,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if x <= seq[i]:\n return i\n return len(seq)\n #","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":361,"func_code":"def search(x, seq):\n result = 0\n if seq == () or seq == []:\n return result\n\n \n for i, elem in enumerate(seq):\n if x <= elem:\n result = i\n break\n \n else:\n result = len(seq)\n return result\n \n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":362,"func_code":"def search(x, seq):\n if seq == () or seq == []:\n return 0\n else:\n for i, elem in enumerate(seq):\n if x <= elem:\n return i\n elif x > seq[len(seq)-1]:\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":363,"func_code":"def search(x, seq):\n if seq == () or seq == []:\n return 0\n else:\n for i, elem in enumerate(seq):\n if x <= elem:\n return i\n elif x > seq[len(seq)-1]:\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":364,"func_code":"def search(x, seq):\n if seq == () or seq == []:\n return 0\n else:\n for i, elem in enumerate(seq):\n if x <= elem:\n return i\n elif x > seq[len(seq)-1]:\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":365,"func_code":"def search(x, seq):\n if seq == () or seq == []:\n return 0\n elif x <= seq[0]:\n return 0\n elif x > seq[len(seq)-1]:\n return len(seq)\n else:\n for i, elem in enumerate(seq):\n if elem <= x <= seq[i+1]:\n return i+1\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":366,"func_code":"def search(x, seq):\n if seq == () or seq == []:\n return 0\n else:\n for i, elem in enumerate(seq):\n if x <= elem:\n return i\n elif x > seq[len(seq)-1]:\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":367,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if x <= elem:\n return i\n else:\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":368,"func_code":"def search(x, seq):\n if len(seq) == 0:\n return 0\n elif x < seq[0]:\n return 0\n elif x > seq[-1]:\n return len(seq)\n else:\n for i in seq:\n if x > i:\n continue\n else:\n return seq.index(i)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":369,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if elem >= x:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":370,"func_code":"def search(x, seq):\n if len(seq) == 0:\n return 0\n elif x <= seq[-1]:\n for i in range(len(seq)):\n if seq[i] < x:\n continue\n else:\n return i\n else:\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":371,"func_code":"def search(x, seq):\n if len(seq) == 0:\n return 0\n elif x <= seq[-1]:\n for i in range(len(seq)):\n if seq[i] < x:\n continue\n else:\n return i\n else:\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":372,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if x <= elem:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":373,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if x <= elem:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":374,"func_code":"def search(x, seq):\n seq2 = list(enumerate(seq,0))\n value = 0\n for element in seq2:\n if x > element[1]:\n value = element[0]+1\n return value\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":375,"func_code":"def search(x, seq):\n seq2 = list(enumerate(seq,0))\n value = 0\n for element in seq2:\n if x > element[1]:\n value = element[0]+1\n return value\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":376,"func_code":"def search(x, seq):\n if list(seq) == []:\n return 0\n else:\n for element in seq:\n if x <= element:\n return list(seq).index(element)\n elif x == max(seq):\n return list(seq).index(max(seq))\n elif x >= max(seq):\n return (list(seq).index(max(seq)))+1\n \n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":377,"func_code":"def search(x, seq):\n if not seq:\n return 0\n elif x < seq[0]:\n return 0\n else:\n i = 0\n while i in range(len(seq)):\n if x <= seq[i]:\n return i\n elif x > seq[len(seq)-1]:\n return len(seq)\n else:\n i += 1\n return\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":378,"func_code":"def search(x, seq):\n for i in enumerate(seq):\n if x <= i[1]:\n if i[0] == 0:\n return 0\n else:\n return i[0]\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":379,"func_code":"def search(x, seq):\n if seq == [] or seq == ():\n return 0\n else:\n for i, elem in enumerate(seq):\n if x < elem: \n return i\n elif x == elem:\n return i\n elif i == len(seq)-1:\n return i+1\n \n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":380,"func_code":"def search(x, seq):\n for i in enumerate(seq):\n if x <= i[1]:\n if i[0] == 0:\n return 0\n else:\n return i[0]\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":381,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if x <= seq[i]:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":382,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if x <= seq[i]:\n return i\n else:\n return len(seq)\n \n \n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":383,"func_code":"def search(x, seq):\n new = list(enumerate(seq))\n for n in new:\n if x <= n[1]:\n return n[0]\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":384,"func_code":"def search(x, seq):\n if seq == [] or seq == ():\n return 0\n if x <= seq[0]:\n position = 0\n if x >= seq[len(seq) - 1]:\n position = len(seq)\n for i in range(len(seq)):\n if x <= seq[i] and x > seq[i-1]:\n position = i\n return position\n\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":385,"func_code":"def search(x, seq):\n for k in range(len(seq)): \n if x <= seq[k]:\n return k\n elif x > seq[k]:\n continue\n return len(seq) # if bigger than the last element \n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":386,"func_code":"def search(x, seq):\n new = list(enumerate(seq))\n for n in new:\n if x <= n[1]:\n return n[0]\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":387,"func_code":"def search(x, seq):\n if seq == [] or seq == ():\n return 0\n if x <= seq[0]:\n position = 0\n if x >= seq[len(seq) - 1]:\n position = len(seq)\n for i in range(len(seq)):\n if x <= seq[i] and x > seq[i-1]:\n position = i\n return position\n\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":388,"func_code":"def search(x, seq):\n for i,elem in enumerate(seq):\n if x<=elem:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":389,"func_code":"def search(x, seq):\n for i,elem in enumerate(seq):\n if x<=elem:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":390,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if seq[i] >= x:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":391,"func_code":"def search(x, seq):\n a = 0\n for i in seq:\n if x <= seq[a]:\n return a\n else:\n a += 1\n return a\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":392,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if x<=seq[i]:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":393,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if x<=seq[i]:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":394,"func_code":"def search(x, seq):\n a = list(enumerate(seq))\n if seq == () or seq == []:\n return 0\n seq = list(seq)\n i = 0\n while i < len(seq):\n if x < seq[i] and i == 0:\n return 0\n elif x <= a[i][1] and x >= a[i-1][1]:\n return a[i][0]\n elif x > a[len(seq)-1][1]:\n return len(seq)\n else:\n i = i + 1\n \n \n return seq\n \n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":395,"func_code":"def search(x, seq):\n lenth=len(seq)\n for i in range(0,lenth):\n if x>seq[i]:\n continue\n else:\n return i\n return lenth\n\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":396,"func_code":"def search(x,seq):\n\tfor i in seq:\n\t\tif x <= i:\n\t\t\treturn seq.index(i)\n\tif seq == () or seq == []:\n\t\treturn 0\n\telif x > seq[len(seq)-1]:\n\t\treturn len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":397,"func_code":"def search(x, seq):\n for i, ele in enumerate(seq):\n if ele >= x:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":398,"func_code":"#def search(x, seq):\n # if len(seq)==0:\n # return 0\n # for i in range(len(seq)):\n # if x<= seq[i]:\n # a=i\n # break\n # elif x> seq[len(seq)-1]:\n # a=len(seq)\n #return a\n\n#def search(x, seq):\n # if len(seq)==0:\n # a=0\n # elif x>seq[len(seq)-1]:\n # a= len(seq)\n# else:\n # for i,elem in enumerate(seq):\n # if x <=elem:\n # a=i\n # break\n #return a\ndef search(x, seq):\n for i,elem in enumerate(seq):\n if x <=elem:\n a=i\n break\n if len(seq)==0:\n a=0\n elif x>seq[len(seq)-1]:\n a= len(seq)\n return a\n \n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":399,"func_code":"def search(x, seq):\n for i, e in enumerate(seq):\n if x <= e:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":400,"func_code":"def search(x, seq):\n for i, e in enumerate(seq):\n if x <= e:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":401,"func_code":"def search(x, seq):\n lenth=len(seq)\n for i in range(0,lenth):\n if x>seq[i]:\n continue\n else:\n return i\n return lenth\n\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":402,"func_code":"def search(x, seq):\n i = 0\n for i, ele in enumerate(seq, 0):\n if x > ele:\n i += 1\n else:\n break\n return i\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":403,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if seq[i] >= x:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":404,"func_code":"def search(x, seq):\n count = 0\n for i in seq:\n if x > i:\n count += 1\n return count\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":405,"func_code":"def search(x, seq):\n count = 0\n for i in seq:\n if x > i:\n count += 1\n return count\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":406,"func_code":"def search(x, seq):\n if seq == () or seq == []:\n return 0\n for i in range (0, len(seq)):\n if x <= seq[i]:\n pos = i\n return pos\n if x > seq[len(seq)-1]:\n return len(seq)\n \n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":407,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if elem >= x: \n return i #return the position of elem\n return len(seq) #if x > the largest value of seq, return the last position (len(seq))\n \n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":408,"func_code":"\ndef search(x, seq):\n if seq==(): \n return 0\n elif seq==[]:\n return 0\n else:\n pos=0\n for i, elem in enumerate(seq):\n if elem >= x:\n return i\n return i+1\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":409,"func_code":"def search(x, seq):\n for i, elem in enumerate((seq)):\n if x > elem:\n continue\n else:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":410,"func_code":"def search(x, seq):\n for i, elem in enumerate((seq)):\n if x > elem:\n continue\n else:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":411,"func_code":"def search(x, seq):\n position=enumerate(seq)\n if len(seq)==0:\n return 0\n elif x>seq[-1]:\n return len(seq)\n else: \n for i in seq:\n if x<=i:\n for index in position:\n if index[1]==i:\n return index[0]\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":412,"func_code":"def search(x, seq):\n count = 0\n for i in seq:\n if x > i:\n count = count + 1\n return count\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":413,"func_code":"def search(x, seq):\n if seq == () or seq == []:\n return 0\n elif x < seq[0]:\n return 0\n elif x > seq[-1]:\n return len(seq)\n for i, elem in enumerate(seq):\n if x <= elem:\n return i \n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":414,"func_code":"def search(x, seq):\n enumerated_list =()\n res= 0\n for i, elem in enumerate(seq):\n enumerated_list = enumerated_list + ((i,elem),)\n\n for number in enumerated_list:\n if x <= number[1]:\n res = number[0]\n break\n else:\n res = len(seq)\n return res\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":415,"func_code":"def search(x, seq):\n enumerated_list =()\n res= 0\n for i, elem in enumerate(seq):\n enumerated_list = enumerated_list + ((i,elem),)\n\n for number in enumerated_list:\n if x <= number[1]:\n res = number[0]\n break\n else:\n res = len(seq)\n return res\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":416,"func_code":"def search(x, seq):\n position = 0\n for ele in seq:\n if x > ele:\n position = position + 1\n return position\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":417,"func_code":"def search(x, seq):\n position = 0\n for ele in seq:\n if x > ele:\n position = position + 1\n return position\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":418,"func_code":"def search(x, seq):\n position = 0\n for ele in seq:\n if x > ele:\n position = position + 1\n return position\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":419,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if seq[i]>=x:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":420,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if seq[i] >= x:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":421,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if seq[i] >= x:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":422,"func_code":"def search(x, seq):\n counter = 0\n new_seq = list(seq)\n if new_seq == []:\n return 0\n for element in seq:\n if x <=element:\n return counter\n if x > seq[len(seq)-1]:\n return len(seq) \n else:\n counter += 1\n continue\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":423,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if seq[i] >= x:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":424,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if seq[i] >= x:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":425,"func_code":"def search(x, seq):\n for i, val in enumerate(seq):\n if x <= val:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":426,"func_code":"def search(x, seq):\n t = 0\n for i in seq:\n if x > i:\n t+=1\n\n return t\n \n \n \n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":427,"func_code":"def search(x, seq):\n if len(seq) == 0:\n return 0\n else:\n for i in range(len(seq)):\n if x < seq[0]:\n pos = 0\n break\n elif x <= seq[i]:\n pos = i\n break\n elif x > seq[len(seq) - 1]:\n pos = len(seq)\n break\n return pos\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":428,"func_code":"def search(x, seq):\n if len(seq) == 0:\n return 0\n else:\n for i in range(len(seq)):\n if x < seq[0]:\n pos = 0\n break\n elif x <= seq[i]:\n pos = i\n break\n elif x > seq[len(seq) - 1]:\n pos = len(seq)\n break\n return pos\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":429,"func_code":"def search(x, seq):\n position = 0\n for i in seq:\n if x <= i:\n break\n position = position + 1\n return position\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":430,"func_code":"def search(x, seq):\n index = 0\n while index < len(seq):\n if x <= seq[index]:\n break\n else:\n index += 1\n return index\n \n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":431,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if x <= elem:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":432,"func_code":"def search(x, seq):\n if seq == () or seq == []:\n return 0\n if seq[0] >= x:\n return 0\n elif seq[len(seq)-1] < x:\n return len(seq)\n else:\n for i in range(len(seq)-1):\n if seq[i] < x and seq[i+1] >= x:\n return i+1\n break\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":433,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if seq[i] >= x:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":434,"func_code":"def search(x, seq):\n if seq == () or seq == []:\n return 0\n if seq[0] >= x:\n return 0\n elif seq[len(seq)-1] < x:\n return len(seq)\n else:\n for i in range(len(seq)-1):\n if seq[i] < x and seq[i+1] >= x:\n return i+1\n break\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":435,"func_code":"def search(x, seq):\n counter = 0\n new_seq = list(seq)\n if new_seq == []:\n return 0\n for element in seq:\n if x <=element:\n return counter\n if x > seq[len(seq)-1]:\n return len(seq) \n else:\n counter += 1\n continue\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":436,"func_code":"def search(x, seq):\n position = 0\n for i in seq:\n if x > i:\n position += 1\n else:\n return position\n return position\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":437,"func_code":"def search(x, seq):\n position = 0\n for i in seq:\n if x > i:\n position += 1\n else:\n return position\n return position\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":438,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if x <= elem:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":439,"func_code":"def search(x, seq):\n position = 0\n while position < len(seq):\n if seq[position] == x:\n break\n elif seq[position] > x:\n break\n position = position + 1\n return position\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":440,"func_code":"def search(x, seq):\n position = 0\n while position < len(seq):\n if seq[position] == x:\n break\n elif seq[position] > x:\n break\n position = position + 1\n return position\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":441,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if x <= seq[i]:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":442,"func_code":"def search(x, seq):\n if seq==[]:\n return 0\n for i,element in enumerate(seq): \n if x<=element:\n return i \n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":443,"func_code":"def search(x, seq):\n if seq == () or seq == []:\n return 0\n elif x > max(seq):\n return len(seq)\n else:\n enumerated = list(enumerate(seq))\n for i in range(len(enumerated)):\n if enumerated[i][1] >= x:\n return enumerated[i][0]\n break\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":444,"func_code":"def search(x, seq):\n if seq == () or seq == []:\n return 0\n elif x > max(seq):\n return len(seq)\n else:\n enumerated = list(enumerate(seq))\n for i in range(len(enumerated)):\n if enumerated[i][1] >= x:\n return enumerated[i][0]\n break\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":445,"func_code":"def search(x, seq):\n counter=0\n for i in seq:\n if x<=i:\n return counter\n else:\n counter=counter+1\n return counter\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":446,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if x <= seq[i]:\n return i\n else:\n continue\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":447,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if x <= seq[i]:\n return i\n else:\n continue\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":448,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if x <= seq[i]:\n return i\n else:\n continue\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":449,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if x<= seq[i]:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":450,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if x<= seq[i]:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":451,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if x <= seq[i]:\n return i\n else:\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":452,"func_code":"def search(x, seq):\n t = 0\n for i in seq:\n if x > i:\n t+=1\n\n return t\n \n \n \n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":453,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if seq[0]>0 and x<0:\n return 0\n elif x==seq[i] or x seq[-1]:\n return len(seq)\n else:\n for i, elem in enumerate(seq):\n if x <= elem:\n return i\n else:\n continue\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":455,"func_code":"def search(x, seq):\n position = 0\n for i in range(len(seq)):\n if x > seq[i]:\n position = i + 1\n elif x == seq[i]:\n position = i\n return position\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":456,"func_code":"def search(x, seq):\n if len(seq) == 0:\n return 0\n elif x > seq[-1]:\n return len(seq)\n else:\n for i, elem in enumerate(seq):\n if x <= elem:\n return i\n else:\n continue\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":457,"func_code":"def search(x, seq):\n for i in range(0, len(seq) + 1):\n if len(seq) == 0:\n return 0\n elif x < seq[0]:\n return 0\n elif seq[i] < x <= seq[i+1]:\n return i + 1\n elif seq[len(seq)-1] < x:\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":458,"func_code":"def search(x, seq):\n position = 0\n found = False\n \n while position < len(seq) and not found:\n if x <= seq[position]:\n found = True\n else:\n position += 1\n \n return position\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":459,"func_code":"def search(x, seq):\n position = 0\n for i in seq:\n if x <= i:\n break\n position += 1\n return position\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":460,"func_code":"def search(x, seq):\n for i in range(0, len(seq) + 1):\n if len(seq) == 0:\n return 0\n elif x < seq[0]:\n return 0\n elif seq[i] < x <= seq[i+1]:\n return i + 1\n elif seq[len(seq)-1] < x:\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":461,"func_code":"def search(x, seq):\n for i in range(0, len(seq) + 1):\n if len(seq) == 0:\n return 0\n elif x < seq[0]:\n return 0\n elif seq[i] < x <= seq[i+1]:\n return i + 1\n elif seq[len(seq)-1] < x:\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":462,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if x <= seq[i]:\n return i\n else:\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":463,"func_code":"def search(x, seq):\n lst = []\n for i, elem in enumerate(seq):\n lst.append((i, elem))\n for i in lst:\n if x <= i[1]:\n return i[0]\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":464,"func_code":"def search(x, seq):\n if len(seq) == 0:\n return 0\n else:\n for i in range(0, len(seq)):\n no = len(seq)\n if x > seq[i]:\n continue\n elif x <= seq[i]:\n no = i\n break\n return no\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":465,"func_code":"def search(x, seq):\n if len(seq)==0:\n return 0\n elif xseq[-1]:\n return len(seq)\n else:\n for i in range(len(seq)):\n if x>seq[i] and x seq[i]:\n continue\n elif x <= seq[i]:\n no = i\n break\n return no\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":467,"func_code":"def search(x,seq):\n if len(seq) == 0:\n return 0\n else:\n for i in range(len(seq)):\n if x > max(seq):\n return len(seq)\n elif x > seq[i]:\n continue\n elif x <= seq[i]:\n break\n return i\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":468,"func_code":"def search(x, seq):\n if type(seq) == list:\n a = seq.copy()\n a.append(x)\n a.sort()\n for i, elem in enumerate(a):\n if elem == x:\n return i\n else:\n temp_list = list(seq)\n temp_list.append(x,)\n temp_list.sort()\n for i, elem in enumerate(temp_list):\n if elem == x:\n return i\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":469,"func_code":"def search(x, seq):\n if len(seq) == 0:\n return 0\n else:\n for i in range(len(seq)-1):\n if x > seq[i] and x <= seq[i+1]:\n return i+1\n if x < seq[0]:\n return 0\n elif x > seq[len(seq)-1]:\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":470,"func_code":"def search(x, seq):\n list2 = list(enumerate(seq))\n if list2 == []: \n return 0\n else:\n for i in list2:\n if x <= (i[1]):\n return i[0] \n return len(seq) \n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":471,"func_code":"def search(x, seq):\n for i,elem in enumerate(seq):\n if x<=elem:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":472,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if x <= elem:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":473,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if x <= elem:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":474,"func_code":"def search(x, seq):\n for i,elem in enumerate(seq):\n if x<=elem:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":475,"func_code":"def search(x, seq):\n if seq==[]:\n return 0\n elif seq==():\n return 0\n else:\n for i,v in enumerate(seq):\n if x>v and i!=len(seq)-1:\n continue\n elif x>v and i==len(seq)-1:\n return i+1\n else:\n break\n \n return i\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":476,"func_code":"def search(x, seq):\n if seq==[]:\n return 0\n elif seq==():\n return 0\n else:\n for i,v in enumerate(seq):\n if x>v and i!=len(seq)-1:\n continue\n elif x>v and i==len(seq)-1:\n return i+1\n else:\n break\n \n return i\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":477,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if x <= elem:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":478,"func_code":"def search(x, seq):\n n = len(seq)\n for i in range(n):\n next_element = seq[i]\n if x <= next_element:\n return i\n return n\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":479,"func_code":"def search(x, seq):\n n = len(seq)\n if seq: #if seq is not an empty list\/tuple\n for i in range(n):\n next_element = seq[i]\n if x <= next_element:\n return i\n return n\n else:\n return 0\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":480,"func_code":"def search(x, seq):\n n = len(seq)\n for i in range(n):\n next_element = seq[i]\n if x <= next_element:\n return i\n return n\n\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":481,"func_code":"def search(x, seq):\n n = len(seq)\n for i in range(n):\n next_element = seq[i]\n if x <= next_element:\n return i\n return n \n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":482,"func_code":"def search(x, seq):\n count=0\n for i in range (len(seq)):\n if x<=seq[i]:\n break\n count +=1\n return count\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":483,"func_code":"def search(x, seq):\n index_for_x = 0\n for index, element in enumerate(seq) :\n if element < x:\n index_for_x+=1\n else:\n break\n return index_for_x\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":484,"func_code":"def search(x, seq):\n result=0\n for i in range(len(seq)):\n if seq[i] i:\n counter+=1\n else:\n break\n return counter\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":486,"func_code":"def search(x, seq):\n if len(seq) == 0 or x < seq[0] :\n return 0\n elif x > seq[len(seq)-1]:\n return len(seq)\n else:\n result = 0\n for i, element in enumerate(seq):\n if x < (element + 1):\n result = i\n break\n return result\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":487,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if x <= seq[i]:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":488,"func_code":"def search(x, seq):\n if not seq:\n return 0\n else:\n for i in range(len(seq)):\n if x<=seq[i]:\n return i\n return i+1\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":489,"func_code":"def search(x, seq):\n i = 0\n for i, ele in enumerate(seq, 0):\n if x > ele:\n i += 1\n else:\n break\n return i\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":490,"func_code":"def search(x, seq):\n index = 0\n for i in seq:\n if x>i:\n index+=1\n else:\n return index\n \n return index\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":491,"func_code":"def search(x, seq):\n\tposition = 0\n\tfor element in seq:\n\t\tif x <= element:\n\t\t\treturn position\n\t\telse:\n\t\t\tposition += 1\n\treturn position\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":492,"func_code":"def search(x, seq):\n count=0\n for i in range (len(seq)):\n if x<=seq[i]:\n break\n count +=1\n return count\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":493,"func_code":"def search(x, seq):\n counter = 0\n for i in seq:\n if x <= i:\n break\n else:\n counter += 1\n return counter\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":494,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if x<=seq[i]:\n return i\n break\n else:\n continue\n \n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":495,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if x<=seq[i]:\n return i\n break\n else:\n continue\n \n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":496,"func_code":"def search(x, seq):\n if seq==[]:\n return 0\n for i,element in enumerate(seq): \n if x<=element:\n return i \n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":497,"func_code":"def search(x, seq):\n counter = 0\n for i in seq:\n if x <= i:\n break\n else:\n counter += 1\n return counter\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":498,"func_code":"def search(x, seq):\n counter=0\n for i in seq:\n if x > i:\n counter+=1\n else:\n break\n return counter\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":499,"func_code":"def search(key, seq):\n lst = list(seq)\n n = len(lst)\n for i in range(n+1): #0,1,2,3 \n if i <= n-1 and key <= lst[i]:\n return i\n return n \n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":500,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if x<= seq[i]:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":501,"func_code":"def search(x, seq):\n n = len(seq)\n for i in range(n):\n next_element = seq[i]\n if x <= next_element:\n return i\n return n\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":502,"func_code":"def search(x, seq):\n n = len(seq)\n for i in range(n):\n next_element = seq[i]\n if x <= next_element:\n return i\n return n\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":503,"func_code":"def search(x, seq):\n n = len(seq)\n for i in range(n):\n next_element = seq[i]\n if x <= next_element:\n return i\n return n\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":504,"func_code":"def search(key, seq):\n lst = list(seq)\n n = len(lst)\n for i in range(n+1): #0,1,2,3 \n if i <= n-1 and key <= lst[i]:\n return i\n return n \n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":505,"func_code":"def search(x, seq):\n if seq == ():\n return 0\n elif seq == []:\n return 0\n else:\n next\n for i, elem in enumerate(seq):\n if x <= elem:\n return i\n elif x > max(seq):\n return len(seq)\n \n \n \n \n ","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":506,"func_code":"def search(x, seq):\n index = 0\n while index < len(seq):\n if x <= seq[index]:\n break\n else:\n index += 1\n return index\n \n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":507,"func_code":"def search(x, seq):\n if len(seq)==0:\n return 0 \n if x <= seq[0]:\n return 0\n for i in range(len(seq)-1):\n if seq[i+1]>=x and x>seq[i]:\n return i+1\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":508,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if x <= seq[i]:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":509,"func_code":"def search(x, seq):\n if len(seq)==0:\n return 0 \n if x <= seq[0]:\n return 0\n for i in range(len(seq)-1):\n if seq[i+1]>=x and x>seq[i]:\n return i+1\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":510,"func_code":"def search(x, seq):\n for i,elem in enumerate(seq):\n if x<=elem:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":511,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if len(seq) == 0:\n return 0\n elif i == 0 and x < elem:\n return 0\n elif x <= elem:\n return i\n elif i == len(seq) - 1:\n return len(seq)\n \ndef search(x, seq):\n if len(seq) == 0:\n return 0\n else:\n for i, elem in enumerate(seq):\n if i == 0 and x < elem:\n return 0\n elif x <= elem:\n return i\n elif i == len(seq) - 1:\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":512,"func_code":"def search(x, seq):\n if len(seq) == 0:\n return 0\n else:\n for i, elem in enumerate(seq):\n if i == 0 and x < elem:\n return 0\n elif x <= elem:\n return i\n elif i == len(seq) - 1:\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":513,"func_code":"def search(x, seq):\n if seq==() or seq==[]:\n return 0\n else:\n largest=seq[0]\n for i in range(len(seq)):\n if x<=seq[i]:\n return i\n elif x>seq[len(seq)-1]:\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":514,"func_code":"def search(x, seq):\n counter = 0\n if len(seq) == 0:\n return 0\n else:\n for counter in range(len(seq)):\n if x <= seq[counter]:\n return counter\n elif x > seq[counter] and counter == len(seq) - 1:\n return len(seq)\n elif x > seq[counter]:\n counter = counter + 1\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":515,"func_code":"def search(x, seq):\n counter = 0\n if len(seq) == 0:\n return 0\n else:\n for counter in range(len(seq)):\n if x <= seq[counter]:\n return counter\n elif x > seq[counter] and counter == len(seq) - 1:\n return len(seq)\n elif x > seq[counter]:\n counter = counter + 1\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":516,"func_code":"def search(x, seq):\n counter = 0\n result = 0\n while counter < len(seq):\n if x < min(seq):\n result = 0\n break\n elif x > max(seq):\n result = len(seq)\n break\n elif x <= seq[counter]:\n result = counter\n break\n counter += 1\n return result\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":517,"func_code":"def search(x, seq):\n lst = list(seq)\n lst.append(x)\n lst.sort()\n tup = tuple(enumerate(lst))\n for i in range(len(tup)):\n if tup[i][1]==x:\n return tup[i][0]\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":518,"func_code":"def search(x, seq):\n if seq == () or seq == []:\n return 0\n for i in range(len(seq)):\n if x > seq[-1]:\n return len(seq)\n elif x <= seq[i]:\n return i\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":519,"func_code":"def search(x, seq):\n if seq == () or seq == []:\n return 0\n for i in range(len(seq)):\n if x > seq[-1]:\n return len(seq)\n elif x == seq[i]:\n return i\n elif x < seq[i]:\n return i\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":520,"func_code":"def search(x, seq):\n #Takes in a value x and a sorted sequence seq, and returns the\n #position that x should go to such that the sequence remains sorted \n \n for i, p in enumerate(seq):\n if x <= p:\n return i\n return len(seq)\n \n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":521,"func_code":"def search(x, seq):\n if seq == () or seq == []:\n return 0\n for i in range(len(seq)):\n if x > seq[-1]:\n return len(seq)\n elif x == seq[i]:\n return i\n elif x < seq[i]:\n return i\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":522,"func_code":"def search(x, seq):\n #Takes in a value x and a sorted sequence seq, and returns the\n #position that x should go to such that the sequence remains sorted \n i =0 \n for p in seq:\n if x <= p:\n return i\n i += 1\n return len(seq)\n \n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":523,"func_code":"def search(x, seq):\n if seq == () or seq == []:\n return 0\n for i in range(len(seq)):\n if x > seq[-1]:\n return len(seq)\n elif x <= seq[i]:\n return i\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":524,"func_code":"def search(x, seq):\n if len(seq)==0:\n return 0\n else:\n if x <= seq[0]:\n return 0\n elif x > seq[-1]:\n return len(seq)\n else:\n for i in range(0, len(seq)-1):\n if seq[i] <= x <= seq[i+1]:\n return i+1\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":525,"func_code":"def search(x, seq):\n if seq==() or seq==[]:\n return 0\n else:\n largest=seq[0]\n for i in range(len(seq)):\n if x<=seq[i]:\n return i\n elif x>seq[len(seq)-1]:\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":526,"func_code":"def search(x, seq):\n position = 0\n found = False\n \n while position < len(seq) and not found:\n if x <= seq[position]:\n found = True\n else:\n position += 1\n \n return position\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":527,"func_code":"def search(x, seq):\n if len(seq)==0 or x < seq[0]:\n return 0\n for i in range(len(seq)-1):\n if seq[i] <= x <= seq[i+1]:\n return i+1\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":528,"func_code":"def search(x, seq):\n for i in range(len(seq)-1):\n if x < seq[0]:\n return 0\n elif seq[i] <= x <= seq[i+1]:\n return i+1\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":529,"func_code":"def search(x, seq):\n if seq == [] or seq == ():\n return 0\n elif type(seq) == tuple:\n new_seq = list(seq)\n sort = []\n for i in range(len(new_seq)):\n if max(new_seq) < x:\n sort.extend(new_seq)\n sort.append(x)\n elif new_seq[i] >=x: \n sort.append(x)\n sort.extend(new_seq[i:])\n break\n elif new_seq[i]=x: \n sort.append(x)\n sort.extend(seq[i:])\n break\n elif seq[i] i:\n count = count + 1\n return count\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":532,"func_code":"def search(x, seq):\n c = 0\n for i in seq:\n if x > i:\n c += 1\n else:\n return c\n return c\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":533,"func_code":"def search(x, seq):\n counter = 0\n for a in seq:\n if x > a:\n counter = counter + 1\n return counter\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":534,"func_code":"def search(x, seq):\n if len(seq)==0:\n return 0\n else:\n if x <= seq[0]:\n return 0\n elif x > seq[-1]:\n return len(seq)\n else:\n for i in range(0, len(seq)-1):\n if seq[i] <= x <= seq[i+1]:\n return i+1\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":535,"func_code":"def search(x, seq):\n for i,elem in enumerate(seq):\n if x<=elem:\n return i \n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":536,"func_code":"def search(x, seq):\n for i,elem in enumerate(seq):\n if x<=elem:\n return i \n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":537,"func_code":"def search(x, seq):\n if len(seq)==0:\n return 0\n else:\n if x <= seq[0]:\n return 0\n elif x > seq[-1]:\n return len(seq)\n else:\n for i in range(0, len(seq)-1):\n if seq[i] <= x <= seq[i+1]:\n return i+1\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":538,"func_code":"def search(x, seq):\n index = 0\n for i in seq:\n if x>i:\n index+=1\n else:\n return index\n \n return index\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":539,"func_code":"def search(x, seq):\n if type(seq) == tuple:\n if seq == ():\n return 0\n else:\n for i in range(len(seq)):\n if x <= seq[i]:\n seq = seq[:i] + (x,) + seq[i:]\n elif seq[len(seq)-1] < x:\n seq = seq + (x,)\n\n elif type(seq) == list:\n if seq == []:\n return 0\n else:\n for i in range(len(seq)):\n if x <= seq[i]:\n seq = seq[:i] + [x,] + seq[i:]\n elif seq[len(seq)-1] < x:\n seq = seq + [x,]\n\n for i in enumerate(seq):\n if x == i[1]:\n return i[0]\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":540,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if seq[i] >= x:\n return i\n return len(seq)\n ","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":541,"func_code":"def search(x, seq):\n\n count = 0\n\n for i in seq:\n if x > i:\n count += 1 \n return count\n \n \n return\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":542,"func_code":"def search(x, seq):\n if type(seq) == tuple:\n seq = list(seq)\n seq.append(x)\n a = sorted(seq)\n return a.index(x)\n \n elif type(seq) == list:\n seq.append(x)\n a = sorted(seq)\n return a.index(x)\n \n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":543,"func_code":"def search(x, seq):\n if type(seq) == tuple:\n seq = list(seq)\n seq.append(x)\n a = sorted(seq)\n return a.index(x)\n \n elif type(seq) == list:\n seq.append(x)\n a = sorted(seq)\n return a.index(x)\n \n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":544,"func_code":"def search(x, seq):\n n = len(seq)\n if n == 0:\n return 0\n else:\n for i in range(len(seq)):\n if x < seq[0]:\n return 0\n elif x <= seq[i] and x >= seq[i-1]:\n return i\n elif x > seq[n-1]:\n return n\n \n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":545,"func_code":"def search(x, seq):\n n = len(seq)\n if n == 0:\n return 0\n else:\n for i in range(len(seq)):\n if x < seq[0]:\n return 0\n elif x <= seq[i] and x >= seq[i-1]:\n return i\n elif x > seq[n-1]:\n return n\n \n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":546,"func_code":"def search(x, seq):\n if not seq:\n i = 0\n else:\n if x > seq[len(seq)-1]:\n i = len(seq)\n else:\n for i, elem in enumerate(seq):\n if x <= elem:\n i\n break \n return i\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":547,"func_code":"def search(x, seq):\n if len(seq) == 0:\n return 0\n else:\n for i, elem in enumerate(seq):\n if x > elem and i < (len(seq)-1):\n continue\n elif x <= elem:\n return i\n else:\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":548,"func_code":"def search(x, seq):\n counter = 0\n result = 0\n while counter < len(seq):\n if x < min(seq):\n result = 0\n break\n elif x > max(seq):\n result = len(seq)\n break\n elif x <= seq[counter]:\n result = counter\n break\n counter += 1\n return result\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":549,"func_code":"def search(x, seq):\n for a, element in enumerate(seq):\n if x <= element:\n return a\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":550,"func_code":"def search (x, s):\n if not s:\n return 0\n for i in range (len(s)):\n if x<=s[i]:\n return i\n return i+1\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":551,"func_code":"def search (x, s):\n if not s:\n return 0\n for i in range (len(s)):\n if x<=s[i]:\n return i\n return i+1\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":552,"func_code":"def search(x, seq):\n if len(seq) == 0:\n return 0\n else:\n for i, elem in enumerate(seq):\n if x > elem and i < (len(seq)-1):\n continue\n elif x <= elem:\n return i\n else:\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":553,"func_code":"def search(x, seq):\n counter=0\n for i in seq:\n if x>i:\n counter+=1\n return counter\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":554,"func_code":"def search(x, seq):\n counter=0\n for i in seq:\n if x>i:\n counter+=1\n return counter\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":555,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if seq[i] >= x:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":556,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if seq[i] >= x:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":557,"func_code":"def search(x, seq):\n pos = 0\n for i, element in enumerate(seq):\n if x <= element:\n pos = i\n return pos\n else:\n pos += 1\n return pos\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":558,"func_code":"def search(x, seq):\n pos = 0\n for i, element in enumerate(seq):\n if x <= element:\n pos = i\n return pos\n else:\n pos += 1\n return pos\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":559,"func_code":"def search(x, seq):\n def find_index(tup,elem):\n for i, j in enumerate(tup):\n if j==elem:\n return i\n if seq==[] or seq==():\n return 0\n elif x<=seq[len(seq)-1]:\n for i in seq:\n if x<=i:\n return find_index(seq,i)\n elif x>seq[len(seq)-1]:\n return len(seq)\n \n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":560,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if elem >= x:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":561,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if elem >= x:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":562,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if x<=elem:\n return i\n return len(seq)\n \n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":563,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if x<=elem:\n return i\n return len(seq)\n \n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":564,"func_code":"def search(x, seq):\n count=0\n for i in seq:\n if x<=i:\n return count\n count+=1\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":565,"func_code":"def search(x, seq):\n position = 0\n if seq == ():\n #Terminates if there is no list of tuple at all \n return position\n else:\n for i in range(len(seq)):\n if x <= seq[i]:\n #Termniates once the sorted position is found \n position = i\n break\n elif i == len(seq)-1:\n #Teminates when it finished sorting through and all are smaller \n position = len(seq)\n return position \n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":566,"func_code":"def search(x, seq):\n position = 0\n if seq == ():\n #Terminates if there is no list of tuple at all \n return position\n else:\n for i in range(len(seq)):\n if x <= seq[i]:\n #Termniates once the sorted position is found \n position = i\n break\n elif i == len(seq)-1:\n #Teminates when it finished sorting through and all are smaller \n position = len(seq)\n return position \n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":567,"func_code":"def search(x, seq):\n if seq == () or seq == []:\n return 0\n for i, elem in enumerate(seq):\n if x <= elem:\n return i\n return i + 1\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":568,"func_code":"def search(x, seq):\n a = 0\n for i in range(len(seq)):\n if x <= seq[i]:\n a = i\n break\n else:\n a = len(seq)\n return a\n \n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":569,"func_code":"def search(x, seq):\n if len(seq) == 0 or x <= seq[0]:\n return 0\n elif x > seq[len(seq) - 1]:\n return len(seq)\n else:\n for i in range(len(seq)):\n if x <= seq[i]:\n return i\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":570,"func_code":"def search(x,seq):\n for i, elem in enumerate(seq):\n if x <= elem:\n return i\n else:\n continue\n return len(seq)\n \n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":571,"func_code":"def search(x, seq):\n if seq == () or seq == [] :\n return 0 \n for i, elem in enumerate(seq) :\n if x <= elem :\n return i\n return i + 1\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":572,"func_code":"def search(x, seq):\n for position, elem in enumerate(seq):\n if x <= elem:\n return position #position to insert x\n return len(seq)\n \n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":573,"func_code":"def search(x,seq):\n for index in range(len(seq)):\n if x <= seq[index]:\n return index\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":574,"func_code":"def search(x,seq):\n for index in range(len(seq)):\n if x <= seq[index]:\n return index\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":575,"func_code":"def search(x,seq):\n for index in range(len(seq)):\n if x <= seq[index]:\n return index\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":576,"func_code":"def search(x,seq):\n for index in range(len(seq)):\n if x <= seq[index]:\n return index\n return len(seq)\n \n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":577,"func_code":"def search(x, seq):\n position = 0\n for num in enumerate(seq):\n if x <= num[1]:\n position = position\n elif x > num[1]:\n position += 1\n \n return position\n\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":578,"func_code":"def search(x, seq):\n counter = 0\n for i in seq:\n if x>i:\n counter +=1 #all the element that is the smaller than x\n return counter\n \n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":579,"func_code":"def search(x, seq):\n position = 0\n for num in enumerate(seq):\n if x <= num[1]:\n position = position\n elif x > num[1]:\n position += 1\n \n return position\n\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":580,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if elem >= x:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":581,"func_code":"def search(x, seq):\n if seq == () or seq == []:\n return 0\n for i, elem in enumerate(seq):\n if x <= elem:\n return i\n return i + 1\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":582,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if x <= seq[i]:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":583,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if x <= seq[i]:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":584,"func_code":"def search(x, seq):\n for i, elem in enumerate (seq):\n if x <= elem:\n return i \n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":585,"func_code":"def search(x, seq):\n for i, elem in enumerate (seq):\n if x <= elem:\n return i \n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":586,"func_code":"def search(x, seq):\n if len(seq)< 1:\n return 0\n else:\n for i in range(len(seq)):\n if x <= seq[i]:\n return i \n else:\n if x > seq[-1]:\n return len(seq) \n else:\n continue\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":587,"func_code":"def search(x, seq):\n if len(seq)< 1:\n return 0\n else:\n for i in range(len(seq)):\n if x <= seq[i]:\n return i \n else:\n if x > seq[-1]:\n return len(seq) \n else:\n continue\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":588,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if x <= seq[i]:\n return i\n else:\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":589,"func_code":"def search(x,seq):\n for i,elem in enumerate(seq):\n if x <= elem:\n return i\n return len(seq)\n \n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":590,"func_code":"def search(x, seq):\n if len(seq) == 0:\n return 0\n else:\n for i, element in enumerate(seq):\n for element in seq:\n if x > element:\n i+=1\n return i\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":591,"func_code":"def search(x, seq):\n counter = 0\n for i in range(len(seq)):\n if x > seq[i]:\n counter += 1\n else:\n break\n return counter\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":592,"func_code":"def search(x, seq):\n counter = 0\n for i in range(len(seq)):\n if x > seq[i]:\n counter += 1\n else:\n break\n return counter\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":593,"func_code":"def search(x, seq):\n if len(seq)==0:\n return 0\n else:\n for i,elem in enumerate(seq):\n if elem>=x:\n return i\n elif i+1==len(seq):\n return len(seq)\n else:\n continue\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":594,"func_code":"def search(x, seq):\n if seq == () or seq == []:\n return 0\n elif x > max(seq):\n return len(seq)\n else:\n enumerated = list(enumerate(seq))\n for i in range(len(enumerated)):\n if enumerated[i][1] >= x:\n return enumerated[i][0]\n break\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":595,"func_code":"def search(x, seq):\n if seq == () or seq == []:\n return 0\n for i in seq:\n if x <= i:\n return seq.index(i)\n elif x > seq[-1]:\n return (seq.index(seq[-1])) + 1\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":596,"func_code":"def search(x, seq):\n if len(seq)==0:\n return 0\n else:\n for i,elem in enumerate(seq):\n if elem>=x:\n return i\n elif i+1==len(seq):\n return len(seq)\n else:\n continue\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":597,"func_code":"def search(x, seq):\n position = 0\n for i in seq:\n if x > i:\n position += 1\n else:\n continue\n return position\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":598,"func_code":"def search(x, seq):\n position = 0\n for i in seq:\n if x > i:\n position += 1\n else:\n continue\n return position\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":599,"func_code":"def search(x, seq):\n if type(seq) == tuple:\n if seq == ():\n return 0\n else:\n for i in range(len(seq)):\n if x <= seq[i]:\n seq = seq[:i] + (x,) + seq[i:]\n elif seq[len(seq)-1] < x:\n seq = seq + (x,)\n\n elif type(seq) == list:\n if seq == []:\n return 0\n else:\n for i in range(len(seq)):\n if x <= seq[i]:\n seq = seq[:i] + [x,] + seq[i:]\n elif seq[len(seq)-1] < x:\n seq = seq + [x,]\n\n for i in enumerate(seq):\n if x == i[1]:\n return i[0]\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":600,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if x <= elem:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":601,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if x <= elem:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":602,"func_code":"def search(x, seq):\n if len(seq) == 0:\n return 0\n elif x > seq[-1]:\n return len(seq)\n elif x < seq[0]:\n return 0\n else:\n for i in seq:\n if x > i:\n continue\n else:\n return seq.index(i) \n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":603,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if x <= seq[i]:\n return i\n else:\n return len(seq)\n \n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":604,"func_code":"def search(x, seq):\n a = 0\n for i in seq:\n if i seq[ len(seq)- 1]:\n return len(seq) \n elif x < seq[0]:\n return 0\n else:\n for i in range(len(seq)):\n if x >= seq[i] and x <= seq[i+1]:\n return i+1\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":609,"func_code":"def search(x, seq):\n if len(seq)==0:\n return 0\n for i in range(len(seq)):\n if x<=seq[i]:\n return i\n return i+1 \n \n \n \n \n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":610,"func_code":"def search(x, seq):\n result = 0\n for i in range (len(seq)):\n if seq[i] >= x:\n result = i\n break\n else:\n result = i + 1\n return result\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":611,"func_code":"def search(x, seq):\n result=0\n for i in range(len(seq)):\n if seq[i] seq[i] and x <= seq[i+1]:\n return i + 1\n return y\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":614,"func_code":"def search(x, seq):\n y = len(seq)\n if y == 0 or x < seq[0]:\n return 0\n else:\n for i in range(y-1):\n if x > seq[i] and x <= seq[i+1]:\n return i + 1\n return y\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":615,"func_code":"def search(x, seq):\n count=0\n for i in seq:\n if x<=i:\n return count\n count+=1\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":616,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if x == elem:\n return i\n elif x < seq[0]:\n return 0\n elif x < elem and x > seq[i-1]:\n return i\n\n return len(seq)\n\n ","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":617,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if x == elem:\n return i\n elif x < seq[0]:\n return 0\n elif x < elem and x > seq[i-1]:\n return i\n\n return len(seq)\n\n ","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":618,"func_code":"def search(x, seq):\n for i,elem in enumerate(seq):\n if elem == x:\n return i \n elif elem > x:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":619,"func_code":"def search(x, seq):\n for i,elem in enumerate(seq):\n if elem == x:\n return i \n elif elem > x:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":620,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if x <= elem:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":621,"func_code":"def search(x, seq):\n for i, ele in enumerate(seq):\n if x <= ele:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":622,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if x <= seq[i]:\n return i\n else:\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":623,"func_code":"def search(x, seq):\n if len(seq) == 0:\n return 0\n else:\n for i in range(len(seq)):\n if x <= seq[i] and i == 0:\n return 0\n elif seq[i-1] < x <= seq[i]:\n return i\n elif x > seq[i] and i == len(seq)-1:\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":624,"func_code":"def search(x, seq):\n for a, i in enumerate(seq):\n if x <= i:\n return a\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":625,"func_code":"def search(x, seq):\n for a, i in enumerate(seq):\n if x <= i:\n return a\n return len(seq)\n\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":626,"func_code":"def search(x, seq):\n if len(seq) == 0:\n return 0\n elif x < seq[0]:\n return 0\n elif x > seq[len(seq)-1]:\n return len(seq)\n else:\n product = 0\n for i in range(len(seq)-1):\n if x == seq[i]:\n product = i\n elif (seq[i] <= x and x <= seq[i+1]):\n product = product + i + 1\n return product\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":627,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if seq[i] >= x:\n return i\n continue\n return len(seq)\n ","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":628,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if seq[i] >= x:\n return i\n continue\n return len(seq)\n ","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":629,"func_code":"def search(x, seq):\n if len(seq) == 0:\n return 0\n else:\n for i, element in enumerate(seq):\n for element in seq:\n if x > element:\n i+=1\n return i\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":630,"func_code":"def search(x, seq):\n index = 0\n for i in range (len(seq)):\n if x <= seq[i]:\n break\n elif x > seq[i]:\n index = i + 1\n return index\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":631,"func_code":"def search(x, seq):\n if len(seq) == 0:\n return 0\n for i in range(len(seq)):\n if x <= seq[i]:\n return i\n if x > seq[-1]:\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":632,"func_code":"def search(x, seq):\n if len(seq) == 0:\n return 0\n for i in range(len(seq)):\n if x <= seq[i]:\n return i\n if x > seq[-1]:\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":633,"func_code":"def search(x, seq):\n result = 0\n for i in range(len(seq)):\n if seq[i] >= x:\n result = i\n break\n elif x > seq[i]:\n result = i + 1\n return result\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":634,"func_code":"def search(x, seq):\n if seq == [] or seq == ():\n return 0\n else:\n for i, elem in enumerate(seq):\n if x < elem: \n return i\n elif x == elem:\n return i\n elif i == len(seq)-1:\n return i+1\n \n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":635,"func_code":"def search(x, seq):\n result = 0\n for i in range(len(seq)):\n if seq[i] >= x:\n result = i\n break\n elif x > seq[i]:\n result = i + 1\n return result\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":636,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if x <= seq[i]:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":637,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if x <= seq[i]:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":638,"func_code":"def search(x, seq):\n\n\n for i, elem in enumerate(seq):\n\n\n if x <= elem: return i\n\n\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":639,"func_code":"def search(x, seq):\n if seq == [] or seq == ():\n return 0\n else:\n for a in range(1,len(seq)):\n if seq[a] == x:\n return a\n elif seq[a-1] < x < seq[a]:\n return a\n else:\n if x > seq[-1]:\n return len(seq)\n elif x < seq[0]:\n return 0\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":640,"func_code":"def search(x, seq):\n if seq==[] or seq==():\n return 0\n searchlist = list(enumerate(seq))\n for i in range(len(searchlist)):\n if x <= searchlist[i][1]:\n return searchlist[i][0]\n return i+ 1\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":641,"func_code":"def search(x, seq):\n if seq:\n for i in range(len(seq)):\n if x <= seq[i]:\n return i\n return len(seq)\n else:\n return 0\n \n\n\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":642,"func_code":"def search(x, seq):\n if not seq:\n return 0\n for i, elem in enumerate(seq):\n if x <= elem:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":643,"func_code":"def search(x, seq):\n\tposition = 0\n\tfor i in seq:\n\t\tif x > i:\n\t\t\tposition = seq.index(i) + 1\n\t\telse:\n\t\t\tposition = seq.index(i)\n\t\t\tbreak\n\treturn position\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":644,"func_code":"def search(x, seq):\n l=len(seq)\n if l==0:\n return 0\n for i in range(l):\n if x<=seq[i]:\n break\n if x>seq[l-1]:\n i=i+1\n return i\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":645,"func_code":"def search(x, seq):\n l=len(seq)\n if l==0:\n return 0\n for i in range(l):\n if x<=seq[i]:\n break\n if x>seq[l-1]:\n i=i+1\n return i\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":646,"func_code":"def search(x, seq):\n a = 0\n for i in seq:\n if i < x:\n a += 1\n return a\n\n\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":647,"func_code":"def search(x, seq):\n if seq == () or seq == []:\n return 0\n else:\n for i in range(1,len(seq)):\n if x == seq[i]:\n return i\n elif seq[i-1] < x < seq[i]:\n return i\n else:\n if x > seq[(len(seq))-1]:\n return len(seq)\n elif x < seq[0]:\n return 0\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":648,"func_code":"def search(x, seq):\n for i, ele in enumerate(seq):\n if x <= ele:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":649,"func_code":"def search(x, seq):\n position = 0\n for elem in seq:\n if x <= elem:\n break\n position += 1\n return position\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":650,"func_code":"def search(x,seq):\n counter = 0\n for i in seq:\n if i < x:\n counter = counter + 1\n return counter\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":651,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if seq[i] >= x:\n return i\n continue\n return len(seq)\n ","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":652,"func_code":"def search(x, seq):\n if seq == () or seq == []:\n return 0\n else:\n for i, elem in enumerate (seq):\n if x<=elem:\n return i\n elif x>seq[-1]:\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":653,"func_code":"def search(x, seq):\n counter = 0\n for i in range(len(seq)):\n if x <= seq[i]:\n break\n else:\n counter += 1\n return counter\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":654,"func_code":"def search(x, seq):\n counter = 0\n for elem in seq:\n if x > elem:\n counter += 1\n else:\n break\n return counter\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":655,"func_code":"def search(x, seq):\n if len(seq) == 0:\n return 0\n elif x > seq[len(seq)-1]:\n return len(seq)\n elif x < seq[0]:\n return 0\n else:\n for i in seq:\n if x > i:\n continue\n else:\n return seq.index(i) \n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":656,"func_code":"def search(x, seq):\n if len(seq) == 0:\n return 0\n elif x > seq[len(seq)-1]:\n return len(seq)\n elif x < seq[0]:\n return 0\n else:\n for i in seq:\n if x > i:\n continue\n else:\n return seq.index(i) \n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":657,"func_code":"def search(x, seq):\n seq = tuple(seq)\n if seq == ():\n return 0\n elif x > seq[len(seq)-1]:\n return len(seq)\n else:\n i = 0\n while i <= len(seq)-1:\n if x <= seq[i]:\n return i\n elif x > seq[i]:\n i += 1\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":658,"func_code":"def search(x, seq):\n if seq:\n for i in range(len(seq)):\n if x <= seq[i]:\n return i\n return len(seq)\n else:\n return 0\n \n\n\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":659,"func_code":"def search(x, seq):\n length = len(seq)\n if length == 0:\n return 0\n else:\n for i, elem in enumerate(seq):\n if x < elem:\n return i\n else:\n if x == elem:\n return i\n if (i == length-1):\n return i+1\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":660,"func_code":"def search(x, seq):\n if not seq:\n return 0\n elif x < seq[0]:\n return 0\n for i in range(len(seq)):\n if i == len(seq) - 1:\n return len(seq)\n if x >= seq[i] and x <= seq[i+1]:\n return i+1\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":661,"func_code":"def search(x, seq):\n a = len(seq)\n for i, elem in enumerate(seq):\n if x <= elem:\n return i\n return a\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":662,"func_code":"def search(x, seq):\n seq = tuple(seq)\n if seq == ():\n return 0\n elif x > seq[len(seq)-1]:\n return len(seq)\n else:\n i = 0\n while i <= len(seq)-1:\n if x <= seq[i]:\n return i\n elif x > seq[i]:\n i += 1\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":663,"func_code":"def search(x, seq):\n index=0\n for i in seq:\n if x>i:\n index += 1\n else:\n break\n return index\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":664,"func_code":"def search(x, seq):\n index=0\n for i in seq:\n if x>i:\n index += 1\n else:\n break\n return index\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":665,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if x<= seq[i]:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":666,"func_code":"def search(x, seq):\n\tcounter = 0\n\tfor i in seq:\n\t\tcounter += 1\n\t\tif x <= i:\n\t\t\treturn counter-1\n\treturn len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":667,"func_code":"def search(x, seq):\n position = 0\n for i in range(len(seq)):\n if x > seq[i]:\n position = i + 1\n elif x == seq[i]:\n position = i\n return position\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":668,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if x <= seq[i]:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":669,"func_code":"def search(x, seq):\n if not seq:\n return 0\n for i, elem in enumerate(seq):\n if x <= elem:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":670,"func_code":"def search(x, seq):\n if len(seq) == 0:\n return 0\n else:\n index = -1\n for i in seq:\n if x <= i:\n index += 1\n return index\n elif x > seq[-1]:\n return len(seq)\n else:\n index += 1\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":671,"func_code":"def search(x, seq):\n if len(seq) == 0:\n return 0\n else:\n index = -1\n for i in seq:\n if x <= i:\n index += 1\n return index\n elif x > seq[-1]:\n return len(seq)\n else:\n index += 1\n\n\ndef search(x, seq):\n new=list(seq)\n new.append(x)\n new.sort()\n y=tuple(enumerate(new))\n for i in range(len(y)):\n if y[i][1]==x:\n return y[i][0]\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":672,"func_code":"def search(x, seq):\n for i, ele in enumerate(seq):\n if x <= ele:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":673,"func_code":"def search(x, seq):\n lst = list(seq)\n lst.append(x)\n lst.sort()\n y = tuple(enumerate(lst))\n for i in range(len(y)):\n if y[i][1]==x:\n return y[i][0]\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":674,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if seq[i] >= x:\n return i\n return len(seq)\n ","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":675,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if seq[i] >= x:\n return i\n return len(seq)\n ","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":676,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if seq[i] >= x:\n return i\n return len(seq)\n ","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":677,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if x <= elem:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":678,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if x <= seq[i]:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":679,"func_code":"def search(x, seq):\n c = 0\n for i in seq:\n if x > i:\n c += 1\n else:\n return c\n return c\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":680,"func_code":"def search(x, seq):\n position = 0\n for i in range(len(seq)):\n if x > seq[i]:\n position = i + 1\n elif x == seq[i]:\n position = i\n return position\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":681,"func_code":"def search(x, seq):\n a = 0\n for i in seq:\n if i < x:\n a += 1\n return a\n\n\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":682,"func_code":"def search(x, seq):\n if seq == [] or seq == ():\n return 0\n for elem in seq:\n if x < elem:\n return seq.index(elem)\n elif x == elem:\n return seq.index(elem)\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":683,"func_code":"def search(x, seq):\n if seq == () or seq == []:\n return 0\n if x>seq[len(seq)-1]:\n return len(seq)\n for i in range(len(seq)):\n if x>seq[i]:\n continue\n return i\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":684,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if seq[i] >= x:\n return i\n return len(seq)\n ","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":685,"func_code":"def search(x, seq):\n a = 0\n for i in seq:\n if i seq[len(seq)-1]:\n return len(seq) \n Index = 0\n for i in range(0,len(seq)): \n if int(x)>seq[i]:\n continue\n Index = i\n return Index\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":687,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if x <= elem:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":688,"func_code":"def search(x, seq):\n counter = 0\n for i in seq:\n if x > i:\n counter += 1\n else:\n continue\n return counter\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":689,"func_code":"def search(x, seq):\n counter = 0\n for i in seq:\n if x > i:\n counter += 1\n else:\n continue\n return counter\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":690,"func_code":"def search(x, seq):\n if seq == []:\n return 0\n else:\n for i in range(len(seq)):\n if x <= seq[i]:\n return i\n return len(seq) \n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":691,"func_code":"def search(x, seq):\n if seq == () or seq == []:\n return 0\n elif type(seq) == tuple:\n new_seq = list(seq)\n sort = []\n for i in range(len(new_seq)):\n if max(new_seq) < x:\n sort.extend(new_seq)\n sort.append(x)\n elif new_seq[i] >=x: \n sort.append(x)\n sort.extend(new_seq[i:])\n break\n elif new_seq[i]=x: \n sort.append(x)\n sort.extend(seq[i:])\n break\n elif seq[i] seq[len(seq)-1]:\n return len(seq) \n Index = 0\n for i in range(0,len(seq)): \n if int(x)>seq[i]:\n continue\n Index = i\n return Index\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":694,"func_code":"def search(x, seq):\n enum_seq = enumerate(seq)\n new_seq = tuple(map(lambda x: x[0], enum_seq))\n if seq == ():\n return 0\n for a in range(len(seq)): \n if x < seq[a]:\n return new_seq[a]\n elif x == seq[a]:\n return new_seq[a]\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":695,"func_code":"def search(x, seq):\n if seq == []:\n return 0\n else:\n for i in range(len(seq)):\n if x <= seq[i]:\n return i\n return len(seq) \n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":696,"func_code":"def search(x, seq):\n if seq == ():\n return 0\n if seq == []:\n return 0\n for c,value in enumerate(seq):\n if value>=x:\n return(c)\n else:\n return(c+1)\n \n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":697,"func_code":"def search(x, seq):\n\tcounter = 0\n\tfor i in seq:\n\t\tif x <= i:\n\t\t\treturn len(seq[:counter])\n\t\tcounter = counter + 1\n\telse:\n\t\treturn len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":698,"func_code":"def search(x, seq):\n if seq == []:\n return 0\n for elem in seq:\n if x < elem:\n return seq.index(elem)\n elif x == elem:\n return seq.index(elem)\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":699,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if seq[i] >= x:\n return i\n return len(seq)\n ","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":700,"func_code":"def search(x, seq):\n if seq == [] or seq == ():\n return 0\n for elem in seq:\n if x < elem:\n return seq.index(elem)\n elif x == elem:\n return seq.index(elem)\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":701,"func_code":"def search(x, seq):\n if not seq:\n return 0\n for i, elem in enumerate(seq):\n if x <= elem:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":702,"func_code":"def search(x, seq):\n\tcounter = 0\n\tfor i in seq:\n\t\tcounter += 1\n\t\tif x <= i:\n\t\t\treturn counter-1\n\treturn len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":703,"func_code":"def search(x, seq):\n if len(seq) == 0 or x < seq[0] :\n return 0\n elif x > seq[len(seq)-1]:\n return len(seq)\n else:\n result = 0\n for i, element in enumerate(seq):\n if x < (element + 1):\n result = i\n break\n return result\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":704,"func_code":"def search(x, seq):\n counter = 0\n if len(seq) == 0:\n return 0\n\n for i in seq:\n if x <= i:\n return counter\n else:\n counter += 1\n\n return counter\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":705,"func_code":"def search(x, seq):\n position = 0\n for i in seq:\n if x <= i:\n break\n position = position + 1\n return position\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":706,"func_code":"def search(x, seq):\n if seq==[] or seq==():\n return 0\n else:\n for i in range(len(seq)):\n if i i:\n position +=1\n else:\n return position\n if position ==len(seq)-1:\n return position+1\n else: \n return position\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":708,"func_code":"def search(x, seq):\n position = 0\n for i in seq:\n if x > i:\n position +=1\n else:\n return position\n if position ==len(seq)-1:\n return position+1\n else: \n return position\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":709,"func_code":"def search(x, seq):\n if not seq:\n return 0\n elif x < seq[0]:\n return 0\n else:\n i = 0\n while i in range(len(seq)):\n if x <= seq[i]:\n return i\n elif x > seq[len(seq)-1]:\n return len(seq)\n else:\n i += 1\n return\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":710,"func_code":"def search(x, seq):\n pos = 0\n for ele in seq:\n if x <= ele:\n return pos\n else:\n pos += 1\n return pos\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":711,"func_code":"def search(x, seq):\n lst = list(seq)\n lst.append(x)\n lst.sort()\n tup = tuple(enumerate(lst))\n for i in range(len(tup)):\n if tup[i][1]==x:\n return tup[i][0]\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":712,"func_code":"def search(x, seq):\n pos = 0\n for ele in seq:\n if x <= ele:\n return pos\n else:\n pos += 1\n return pos\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":713,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if x <= elem:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":714,"func_code":"def search(x, seq):\n length = len(seq)\n if length == 0:\n return 0\n else:\n for i, elem in enumerate(seq):\n if x <= elem:\n return i\n elif i == length-1:\n return length\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":715,"func_code":"def search(x, seq):\n length = len(seq)\n if length == 0:\n return 0\n else:\n for i, elem in enumerate(seq):\n if x <= elem:\n return i\n elif i == length-1:\n return length\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":716,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if x <= elem:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":717,"func_code":"def search(x, seq):\n a = 0\n for i in seq:\n if x <= seq[a]:\n return a\n else:\n a += 1\n return a\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":718,"func_code":"def search(x, seq):\n counter = 0\n if len(seq) == 0:\n return 0\n\n for i in seq:\n if x <= i:\n return counter\n else:\n counter += 1\n\n return counter\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":719,"func_code":"def search(x, seq):\n if not seq:\n return 0\n elif x < seq[0]:\n return 0\n for i in range(len(seq)):\n if i == len(seq) - 1:\n return len(seq)\n if x >= seq[i] and x <= seq[i+1]:\n return i+1\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":720,"func_code":"def search(x, seq):\n seq = list(seq)\n index = 0\n for i in range (len(seq)):\n if x <= seq[i]:\n break\n elif x > seq[i]:\n index = i + 1\n return index\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":721,"func_code":"def search(x, seq):\n counter=0\n for i in seq:\n if i>=x:\n break\n counter=counter+1\n return counter\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":722,"func_code":"def search(x, seq):\n counter=0\n for i in seq:\n if i>=x:\n break\n counter=counter+1\n return counter\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":723,"func_code":"def search(x, seq):\n index = 0\n for i in range (len(seq)):\n if x <= seq[i]:\n break\n elif x > seq[i]:\n index = i + 1\n return index\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":724,"func_code":"def search(x, seq):\n if not seq:\n return 0\n else:\n if x < seq[0]:\n indx = 0\n elif x > seq[-1]:\n indx = seq.index(seq[-1]) + 1\n else:\n for i in seq:\n if x <= i:\n indx = (seq.index(i))\n break \n return indx\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":725,"func_code":"def search(x, seq):\n if not seq:\n return 0\n else:\n if x < seq[0]:\n indx = 0\n elif x > seq[-1]:\n indx = seq.index(seq[-1]) + 1\n else:\n for i in seq:\n if x <= i:\n indx = (seq.index(i))\n break \n return indx\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":726,"func_code":"###########\n# Task 1a #\n###########\n\n# The enumerate function should be helpful for you here.\n# It takes in a sequence (either a list or a tuple)\n# and returns an iteration of pairs each of which\n# contains the index of the element and the element itself.\n# Here's how to use it.\n\n# for i, elem in enumerate((4, 10, 1, 3)):\n# print(\"I am in the\", i ,\"position and I am\", elem)\n# \n# I am in the 0 position and I am 4\n# I am in the 1 position and I am 10\n# I am in the 2 position and I am 1\n# I am in the 3 position and I am 3\n\ndef search(x, seq):\n for i in range(len(seq)):\n if x <= seq[i]:\n return i\n return len(seq)\n\nprint(\"## Q1a ##\")\nprint(search(-5, (1, 5, 10)))\n# => 0\nprint(search(3, (1, 5, 10)))\n# => 1\nprint(search(7, [1, 5, 10]))\n# => 2\nprint(search(5, (1, 5, 10)))\n# => 1\nprint(search(42, [1, 5, 10]))\n# => 3\nprint(search(42, (-5, 1, 3, 5, 7, 10)))\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":727,"func_code":"def search(x, seq):\n if seq == () or seq == []:\n return 0\n if x>seq[len(seq)-1]:\n return len(seq)\n for i in range(len(seq)):\n if x>seq[i]:\n continue\n return i\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":728,"func_code":"def search(x, seq):\n if seq == [] or seq == ():\n return 0\n elif type(seq) == tuple:\n new_seq = list(seq)\n sort = []\n for i in range(len(new_seq)):\n if max(new_seq) < x:\n sort.extend(new_seq)\n sort.append(x)\n elif new_seq[i] >=x: \n sort.append(x)\n sort.extend(new_seq[i:])\n break\n elif new_seq[i]=x: \n sort.append(x)\n sort.extend(seq[i:])\n break\n elif seq[i] seq[ len(seq)- 1]:\n return len(seq) \n elif x < seq[0]:\n return 0\n else:\n for i in range(len(seq)):\n if x >= seq[i] and x <= seq[i+1]:\n return i+1\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":730,"func_code":"def search(x, seq):\n seq = list(seq)\n for i in range(len(seq)):\n if x > seq[i]:\n continue\n elif x <= seq[i]:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":731,"func_code":"def search(x, seq):\n ns = tuple(enumerate(seq))\n for y in ns:\n if x <= y[1]:\n return y[0]\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":732,"func_code":"def search(x, seq):\n if seq==[] or seq==():\n return 0\n else:\n for i in range(len(seq)):\n if i seq[i]:\n continue\n elif x <= seq[i]:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":734,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if x > elem and i == len(seq) - 1:\n # specifies case where i has reached the last element in the tuple or list\n return i + 1\n elif x > elem:\n continue\n else:\n return i\n if len(seq) == 0:\n return 0\n # this is if seq is empty\n # if not defined, task 3(a) won't work\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":735,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if x > elem and i == len(seq) - 1:\n # specifies case where i has reached the last element in the tuple or list\n return i + 1\n elif x > elem:\n continue\n else:\n return i\n if len(seq) == 0:\n return 0\n # this is if seq is empty\n # if not defined, task 3(a) won't work\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":736,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if x > elem and i == len(seq) - 1:\n # specifies case where i has reached the last element in the tuple or list\n return i + 1\n elif x > elem:\n continue\n else:\n return i\n if len(seq) == 0:\n return 0\n # this is if seq is empty\n # if not defined, task 3(a) won't work\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":737,"func_code":"def search(x, seq):\n num = 0\n for i in seq:\n if x <= seq[num]:\n return num\n num += 1\n else:\n return num\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":738,"func_code":"def search(x, seq):\n list2 = list(enumerate(seq))\n if list2 == []: \n return 0\n else:\n for i in list2:\n if x <= (i[1]):\n return i[0] \n return len(seq) \n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":739,"func_code":"def search(x, seq):\n\n new_lst = []\n\n if len(seq) == 0:\n\n return 0\n\n for i, elem in enumerate(seq):\n\n new_lst.append((i, elem))\n\n for i in new_lst:\n\n if x <= i[1]:\n\n return i[0]\n\n else:\n\n continue\n\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":740,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if x <= seq[i]:\n return i\n else:\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":741,"func_code":"def search(x, seq):\n\n new_lst = []\n\n if len(seq) == 0:\n\n return 0\n\n for i, elem in enumerate(seq):\n\n new_lst.append((i, elem))\n\n for i in new_lst:\n\n if x <= i[1]:\n\n return i[0]\n\n else:\n\n continue\n\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":742,"func_code":"def search(x, seq):\n if len(seq)==0:\n return 0\n for i in range(len(seq)):\n if seq[i]>=x:\n break\n elif seq[-1]=x:\n break\n i += 1 \n return i\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":745,"func_code":"def search(x, seq):\n i = 0\n for ele in seq:\n if ele>=x:\n break\n i += 1 \n return i\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":746,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if x > elem and i == len(seq) - 1:\n # specifies case where i has reached the last element in the tuple or list\n return i + 1\n elif x > elem:\n continue\n else:\n return i\n if len(seq) == 0:\n return 0\n # this is if seq is empty\n # if not defined, task 3(a) won't work\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":747,"func_code":"def search(x, seq):\n if seq == [] or seq == ():\n return 0\n elif type(seq) == tuple:\n new_seq = list(seq)\n sort = []\n for i in range(len(new_seq)):\n if max(new_seq) < x:\n sort.extend(new_seq)\n sort.append(x)\n elif new_seq[i] >=x: \n sort.append(x)\n sort.extend(new_seq[i:])\n break\n elif new_seq[i]=x: \n sort.append(x)\n sort.extend(seq[i:])\n break\n elif seq[i]i:\n result+=1\n \n return result\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":749,"func_code":"def search(x, seq):\n result=0\n for i in seq:\n if x>i:\n result+=1\n \n return result\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":750,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if x <= seq[i]:\n return i\n else:\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":751,"func_code":"def search(x, seq):\n lst = list(seq)\n lst.append(x)\n lst.sort()\n tup = tuple(enumerate(lst))\n for i in range(len(tup)):\n if tup[i][1]==x:\n return tup[i][0]\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":752,"func_code":"def search(x, seq):\n counter = 0\n for i in range(len(seq)):\n if x <= seq[i]:\n break\n else:\n counter += 1\n return counter\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":753,"func_code":"def search(x, seq):\n if seq == [] or seq == ():\n return 0\n elif type(seq) == tuple:\n new_seq = list(seq)\n sort = []\n for i in range(len(new_seq)):\n if max(new_seq) < x:\n sort.extend(new_seq)\n sort.append(x)\n elif new_seq[i] >=x: \n sort.append(x)\n sort.extend(new_seq[i:])\n break\n elif new_seq[i]=x: \n sort.append(x)\n sort.extend(seq[i:])\n break\n elif seq[i]= x:\n return i\n return len(seq)\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":758,"func_code":"def search(x, seq):\n if list(seq) == []:\n return 0\n else:\n for element in seq:\n if x <= element:\n return list(seq).index(element)\n elif x == max(seq):\n return list(seq).index(max(seq))\n elif x >= max(seq):\n return (list(seq).index(max(seq)))+1\n \n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":759,"func_code":"def search(x, seq):\n if seq==[] or seq==():\n return 0\n else:\n for i in range(len(seq)):\n if i = x:\n return i\n return len(seq)\n return\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":761,"func_code":"\ndef search(x, seq):\n if seq==(): \n return 0\n elif seq==[]:\n return 0\n else:\n pos=0\n for i, elem in enumerate(seq):\n if elem >= x:\n return i\n return i+1\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":762,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if x <= elem:\n return i\n break\n elif x > elem:\n continue\n return len(seq)\n \n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":763,"func_code":"def search(x, seq):\n if seq == [] or seq == ():\n return 0\n if x < seq[0]:\n return 0\n elif x > seq[len(seq)-1]:\n return len(seq)\n else:\n for i in range(len(seq)):\n if seq[i] == x:\n return i\n elif seq[i] <= x and seq[i+1] > x:\n return i+1\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":764,"func_code":"def search(x, seq):\n n = 0 \n\n for i in seq:\n if x <= i:\n return n\n else:\n n += 1\n \n return n \n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":765,"func_code":"def search(x, seq):\n n = 0 \n\n for i in seq:\n if x <= i:\n return n\n else:\n n += 1\n \n return n \n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":766,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if x <= elem:\n return i\n break\n elif x > elem:\n continue\n return len(seq)\n \n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":767,"func_code":"\ndef search(x, seq):\n if seq==[] or seq==():\n return 0\n elif xseq[-1]:\n return len(seq)\n for i in range(len(seq)-1):\n if x>seq[i] and x<=seq[i+1]:\n return i+1\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":768,"func_code":"\ndef search(x, seq):\n if seq==[] or seq==():\n return 0\n elif xseq[-1]:\n return len(seq)\n for i in range(len(seq)-1):\n if x>seq[i] and x<=seq[i+1]:\n return i+1\n","correct":true,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":769,"func_code":"def search(x, seq):\n for i, e in enumerate(seq):\n if x < e:\n return i\n return len(seq)\n\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":770,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if x <= seq[i]:\n return i\n return i + 1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":771,"func_code":"def search(x, seq):\n i = 0\n for i in range(len(seq)):\n if x <= seq[i]:\n return i\n return i + 1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":772,"func_code":"def search(x, seq):\n if x < seq[0]:\n return 0\n elif x > seq[-1]:\n return len(seq)\n else:\n seq_enum = [i for i in enumerate(seq)]\n for j in range(len(seq_enum) - 1):\n if x >= seq_enum[j][1] and x <= seq_enum[j+1][1]:\n return j+1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":773,"func_code":"def search(x, seq):\n if seq == ():\n return 0\n elif x < seq[0]:\n return 0\n elif x > seq[-1]:\n return len(seq)\n else:\n seq_enum = [i for i in enumerate(seq)]\n for j in range(len(seq_enum) - 1):\n if x >= seq_enum[j][1] and x <= seq_enum[j+1][1]:\n return j+1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":774,"func_code":"def search(x, seq):\n lst1 = list(seq)\n if len(lst1) == 0:\n i = 0\n else: \n length = len(lst1)\n lst2 = []\n if x < seq[0]:\n lst2 = [x] + lst1\n elif x > seq[length -1]:\n lst2 = lst1 + [x]\n else:\n for i in range(0, length):\n if seq[i] <= x <= seq[i+1]:\n lst2 = lst1[:i+1] + [x] + lst1[i+1:]\n for i in range(len(lst2)):\n if x == lst2[i]:\n return i\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":775,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if x <= seq[i]:\n return i\n else:\n return len(seq) \n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":776,"func_code":"def search(x, seq):\n if seq == () or seq == []:\n return 0\n elif x <= seq[0]:\n return 0\n elif x >= seq[-1]:\n return len(seq) - 1\n else:\n seq_enum = [i for i in enumerate(seq)]\n for j in range(len(seq_enum) - 1):\n if x >= seq_enum[j][1] and x <= seq_enum[j+1][1]:\n return j+1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":777,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if elem < x < elem + 1:\n return i + 1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":778,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if elem <= x <= elem + 1:\n return i \n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":779,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if elem <= x <= elem + 1:\n return i + 1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":780,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if elem <= x <= elem + 1:\n return i - 1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":781,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if elem < x < elem + 1:\n return i \n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":782,"func_code":"def search(x, seq):\n if x < seq[0]:\n return 0\n elif x > seq[-1]:\n return len(seq)\n \n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":783,"func_code":"def search(x, seq):\n if x < seq[0]:\n return 0\n elif x > seq[-1]:\n return len(seq)\n for i, elem in enumerate(seq):\n if elem <= x <= elem + 1:\n return i \n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":784,"func_code":"def search(x, seq):\n if x < seq[0]:\n return 0\n elif x > seq[-1]:\n return len(seq)\n for i, elem in enumerate(seq):\n if elem <= x:\n return i \n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":785,"func_code":"def search(x, seq):\n if x < seq[0]:\n return 0\n elif x > seq[-1]:\n return len(seq)\n for i, elem in enumerate(seq):\n if x < elem:\n return i \n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":786,"func_code":"def search(x, seq):\n if x < seq[0]:\n return 0\n elif x > seq[-1]:\n return len(seq)\n for i, elem in enumerate(seq):\n if x <= elem:\n return i \n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":787,"func_code":"def search(x, seq):\n if x < seq[0]:\n return 0\n elif x > seq[-1]:\n return len(seq)\n elif seq == ():\n return 0\n for i, elem in enumerate(seq):\n if x <= elem:\n return i \n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":788,"func_code":"def search(x, seq):\n if x < seq[0]:\n return 0\n elif x > seq[-1]:\n return len(seq)\n elif seq == ():\n return None\n for i, elem in enumerate(seq):\n if x <= elem:\n return i \n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":789,"func_code":"def search(x, seq):\n if x < seq[0]:\n return 0\n elif x > seq[-1]:\n return len(seq)\n elif seq == () or seq ==[]:\n return None\n for i, elem in enumerate(seq):\n if x <= elem:\n return i \n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":790,"func_code":"def search(x, seq):\n lst = list(seq)\n for i in range(len(lst)):\n if x < lst[i]:\n lst.insert(i,x)\n else:\n lst.insert(len(lst),x)\n for i in range(len(lst)):\n if lst[i] == x:\n return i\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":791,"func_code":"def search(x, seq):\n if x < int(seq[0]):\n return 0\n elif x > int(seq[len(seq)-1]):\n return len(seq)\n else:\n for i in range(len(seq)):\n if x > seq[i] and x <= seq[i+1]:\n return i+1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":792,"func_code":"def search(x, seq):\n if seq == ():\n return 0\n elif x < int(seq[0]):\n return 0\n elif x > int(seq[len(seq)-1]):\n return len(seq)\n else:\n for i in range(len(seq)):\n if x > seq[i] and x <= seq[i+1]:\n return i+1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":793,"func_code":"def search(x, seq):\n a = len(seq)\n if x < seq[0]:\n return 0\n elif x > seq[-1]:\n return a\n else:\n for i in range(a):\n if x == seq[i]:\n return i\n elif x < seq[i]:\n return i\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":794,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if x <= elem:\n return i\n elif x > seq[-1]:\n return len(seq)\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":795,"func_code":"def search(x, seq):\n if seq == ():\n return 0\n else:\n for i, elem in enumerate(seq):\n if x <= elem:\n return i\n elif x > seq[-1]:\n return len(seq)\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":796,"func_code":"def search(x, seq):\n \n for i in range(len(seq)):\n if x<=seq[i]:\n return i\n elif x>=seq[len(seq)-1]:\n return len(seq)\n else:\n continue \n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":797,"func_code":"def search(x, seq):\n \n for i in range(len(seq)):\n if x<=seq[i]:\n return i\n elif x>=seq[len(seq)-1]:\n return len(seq)\n elif len(seq)==0:\n return 0\n else:\n continue \n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":798,"func_code":"def search(x, seq):\n \n for i in range(len(seq)):\n if x<=seq[i]:\n return i\n elif x>seq[len(seq)]:\n return len(seq)\n elif len(seq)==0:\n return 0\n else:\n continue \n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":799,"func_code":"def search(x, seq):\n \n for i in range(len(seq)):\n if len(seq)==0:\n return 0\n elif x<=seq[i]:\n return i\n elif x>seq[len(seq)-1]:\n return len(seq)\n \n else:\n continue \n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":800,"func_code":"def search(x, seq):\n if seq == []:\n return 0\n if x < seq[0]:\n return 0\n elif x > seq[len(seq)-1]:\n return len(seq)\n else:\n for i in range(len(seq)-1):\n if seq[i] == x:\n return i+1\n elif seq[i] < x and seq[i+1] > x:\n return i+1\n else:\n return None\n\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":801,"func_code":"def search(x, seq):\n for i in range(1, len(seq)+1):\n if x < seq[i-1]:\n return i-1\n elif seq[i-1] seq[-1]:\n return len(seq)\n for i, elem in enumerate(seq):\n if x <= elem:\n return i \n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":822,"func_code":"def search(x, seq):\n a = list(enumerate(seq))\n for item in a:\n if x <= item[1]:\n return item[0]\n if x > seq[-1]:\n return len(seq)\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":823,"func_code":"def search(x, seq):\n if x < seq[0]:\n return 0\n elif x > seq[len(seq)-1]:\n return len(seq)\n counter = 0\n for i in seq:\n counter = counter + 1\n if x > seq[counter]:\n continue\n elif x <= seq[counter]:\n return counter\n\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":824,"func_code":"def search(x, seq):\n if x > seq[-1]:\n return len(seq)\n else:\n for num in range(len(seq)):\n if x > seq[num]:\n continue\n elif x <= seq[num]:\n return num \n return 0\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":825,"func_code":"def search(x, seq):\n if seq == ():\n return 0\n elif x > seq[-1]:\n return len(seq)\n else:\n for num in range(len(seq)):\n if x > seq[num]:\n continue\n elif x <= seq[num]:\n return num \n return 0\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":826,"func_code":"def search(x, seq):\n if seq == () or []:\n return 0\n elif x > seq[-1]:\n return len(seq)\n else:\n for num in range(len(seq)):\n if x > seq[num]:\n continue\n elif x <= seq[num]:\n return num \n return 0\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":827,"func_code":"def search(x, seq):\n for i in range(0, len(seq)):\n if seq[i] < x:\n continue\n elif seq[len(seq) - 1] < x:\n return len(seq)\n else:\n return i\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":828,"func_code":"def search(x, seq):\n for i in seq:\n if x <= i:\n return seq.index(i)\n elif x > max(seq):\n return len(seq)\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":829,"func_code":"def search(x, seq):\n for i in seq:\n if len(seq) == 0:\n\t return 0\n elif x <= i:\n return seq.index(i)\n elif x > max(seq):\n return len(seq)\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":830,"func_code":"def search(x, seq):\n if type(seq) == tuple:\n seq = list(seq)\n seq.append(x)\n sorted(seq)\n seq.index(x)\n \n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":831,"func_code":"def search(x, seq):\n if type(seq) == tuple:\n seq = list(seq)\n seq.append(x)\n sorted(seq)\n return seq.index(x)\n \n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":832,"func_code":"def search(x, seq):\n if type(seq) == tuple:\n seq = list(seq)\n seq.append(x)\n sorted(seq)\n return seq.index(x)\n \n elif type(seq) == list:\n seq.append(x)\n sorted(seq)\n return seq.index(x)\n \n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":833,"func_code":"def search(x, seq):\n for i in range(0,len(seq)):\n if xseq[len(seq)-1]:\n return len(seq)\n break\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":835,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if x == elem:\n return i\n elif x < elem:\n return i\n elif x > seq[-1]:\n return len(seq)\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":836,"func_code":"def search(x, seq):\n for i in range(0,len(seq)):\n if len(seq)==0:\n return 0\n elif xseq[len(seq)-1]:\n return len(seq)\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":837,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if seq == ():\n return 0\n elif x == elem:\n return i\n elif x < elem:\n return i\n elif x > seq[-1]:\n return len(seq)\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":838,"func_code":"def search(x, seq):\n for i in range(0,len(seq)):\n if len(seq)==0:\n return False\n elif xseq[len(seq)-1]:\n return len(seq)\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":839,"func_code":"def search(x, seq):\n if seq == ():\n return 0\n for i, elem in enumerate(seq):\n if x == elem:\n return i\n elif x < elem:\n return i\n elif x > seq[-1]:\n return len(seq)\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":840,"func_code":"def search(x, seq):\n if len(seq) == 0:\n return 0\n elif x >= seq[-1]:\n return len(seq)\n else:\n for i, elem in enumerate(seq):\n if elem >= x:\n return i\n ","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":841,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if x<= seq[i]:\n a=i\n break\n elif x> seq[len(seq)-1]:\n a=len(seq)\n return a\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":842,"func_code":"def search(x, seq):\n for i in seq:\n if xseq[-1]:\n return (seq.index(seq[-1]))+1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":843,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n pos = len(seq)\n if x <= seq[i]:\n pos = i\n break\n return pos\n\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":844,"func_code":"def search(x, seq):\n if seq:\n for i in range(len(seq)):\n pos = len(seq)\n if x <= seq[i]:\n pos = i\n break\n return pos\n else:\n return seq\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":845,"func_code":"def search(x, seq):\n if seq:\n for i in range(len(seq)):\n pos = len(seq)\n if x <= seq[i]:\n pos = i\n break\n return pos\n else:\n return seq\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":846,"func_code":"def search(x, seq):\n for count, ele in enumerate(seq):\n if x<=ele:\n return count\n \n for ele in seq:\n if x>ele:\n return len(seq)\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":847,"func_code":"def search(x, seq):\n if seq==[]:\n return 0\n for count, ele in enumerate(seq):\n if x<=ele:\n return count\n for ele in seq:\n if x>ele:\n return len(seq)\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":848,"func_code":"def search(x, seq):\n if seq==[]or():\n return 0\n for count, ele in enumerate(seq):\n if x<=ele:\n return count\n for ele in seq:\n if x>ele:\n return len(seq)\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":849,"func_code":"def search(x, seq):\n for index, value in enumerate(seq):\n if x <= value:\n return index\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":850,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if x<=seq[i]:\n return i\n return i+1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":851,"func_code":"def search(x, seq):\n if seq==():\n return 0\n else:\n for i in range(len(seq)):\n if x<=seq[i]:\n return i\n return i+1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":852,"func_code":"def search(x, seq):\n if x <= seq[0]:\n return 0\n for i in range(len(seq)-1):\n if seq[i] <= x <= seq[i+1]:\n return i + 1\n return len(seq)\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":853,"func_code":"def search(x, seq):\n if seq == ():\n return 0\n if x <= seq[0]:\n return 0\n for i in range(len(seq)-1):\n if seq[i] <= x <= seq[i+1]:\n return i + 1\n return len(seq)\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":854,"func_code":"def search(x, seq):\n count = 0\n for i in range (0, len(seq)):\n if seq[count] < x:\n count += 1\n return count if seq[-1] > x else len(seq)\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":855,"func_code":"def search(x, seq):\n if seq == () or seq == []:\n return 0\n else:\n count = 0\n for i in range (0, len(seq)):\n if seq[count] < x:\n count += 1\n return count if seq[-1] > x else len(seq)\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":856,"func_code":"def search(x, seq):\n count = 0\n for i in range (0, len(seq)):\n if seq[count] < x:\n count += 1\n return count if seq[-1] > x else len(seq)\n\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":857,"func_code":"def search(x, seq):\n if seq == () or seq == []:\n return None\n else:\n count = 0\n for i in range (0, len(seq)):\n if seq[count] < x:\n count += 1\n return count if seq[-1] > x else len(seq)\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":858,"func_code":"def search(x, seq):\n count = 0\n for i in range (0, len(seq)):\n if seq[count] < x:\n count += 1\n return count if seq[-1] > x else len(seq)\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":859,"func_code":"def search(x, seq):\n if seq == () or seq == []:\n return 0\n else:\n count = 0\n for i in range (0, len(seq)):\n if seq[count] < x:\n count += 1\n return count if seq[-1] > x else len(seq)\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":860,"func_code":"def search(x, seq):\n if seq == () or seq == []:\n return 0\n else:\n count = 0\n for i in range (0, len(seq)):\n if seq[i] > x:\n return i\n elif seq[-1] < x:\n return len(seq)\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":861,"func_code":"def search(x, seq):\n if x<=seq[0]:\n return 0\n if x>seq[-1]:\n return len(seq)\n else:\n for i,elem in enumerate(seq):\n if x>elem and x<=seq[i+1]:\n return i+1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":862,"func_code":"def search(x, seq):\n if seq==[] or x<=seq[0]:\n return 0\n if x>seq[-1]:\n return len(seq)\n else:\n for i,elem in enumerate(seq):\n if x>elem and x<=seq[i+1]:\n return i+1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":863,"func_code":"def search(x, seq):\n if seq==[] or x<=seq[0]:\n return 0\n if x>seq[-1]:\n return len(seq)\n else:\n for i,elem in enumerate(seq):\n if x>elem and x<=seq[i+1]:\n return i+1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":864,"func_code":"def search(x, seq):\n if seq==[] or x<=seq[0]:\n return 0\n elif x>seq[-1]:\n return len(seq)\n else:\n for i,elem in enumerate(seq):\n if x>elem and x<=seq[i+1]:\n return i+1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":865,"func_code":"def search(x, seq):\n if seq==() or x<=seq[0]:\n return 0\n elif x>seq[-1]:\n return len(seq)\n else:\n for i,elem in enumerate(seq):\n if x>elem and x<=seq[i+1]:\n return i+1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":866,"func_code":"def search(x, seq):\n if seq==() or x<=seq[0]:\n return 0\n elif x>seq[-1]:\n return len(seq)\n else:\n for i,elem in enumerate(seq):\n if x>elem and x<=seq[i+1]:\n return i+1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":867,"func_code":"def search(x, seq):\n for i in range (len(seq)):\n if x < seq[i]:\n return i\n elif x ==seq[i]:\n return i\n else:\n continue\n return i + 1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":868,"func_code":"def search(x, seq):\n if seq == ():\n return ()\n else:\n for i in range (len(seq)):\n if x < seq[i]:\n return i\n elif x ==seq[i]:\n return i\n else:\n continue\n return i + 1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":869,"func_code":"def search(x, seq):\n if seq == ():\n return ()\n else:\n for i in range (len(seq)):\n if x < seq[i]:\n return i\n elif x ==seq[i]:\n return i\n else:\n continue\n return i + 1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":870,"func_code":"def search(x, seq):\n if seq == ():\n return ()\n else:\n for i in range (len(seq)):\n if x < seq[i]:\n return i\n elif x ==seq[i]:\n return i\n else:\n continue\n return i + 1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":871,"func_code":"def search(x, seq):\n if seq == ():\n return ()\n else:\n for i in range (len(seq)):\n if x < seq[i]:\n return i\n elif x ==seq[i]:\n return i\n else:\n continue\n return i + 1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":872,"func_code":"def search(x, seq):\n if seq == ():\n return 0\n else:\n for i in range (len(seq)):\n if x < seq[i]:\n return i\n elif x ==seq[i]:\n return i\n else:\n continue\n return i + 1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":873,"func_code":"def search(x, seq):\n for i in range(len(seq)-1):\n if x > seq[i] and x <= seq[i+1]:\n return i+1\n return None\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":874,"func_code":"def search(x, seq):\n if x <= seq[0]:\n return 0\n elif x >= seq[-1]:\n return len(seq)\n else:\n for i in range(len(seq)-1):\n if x > seq[i] and x <= seq[i+1]:\n return i+1\n return None\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":875,"func_code":"def search(x, seq):\n if len(seq) == 0:\n return 0\n elif x <= seq[0]:\n return 0\n elif x >= seq[-1]:\n return len(seq)\n else:\n for i in range(len(seq)-1):\n if x > seq[i] and x <= seq[i+1]:\n return i+1\n return None\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":876,"func_code":"def search(x, seq):\n if len(seq) == 0:\n return 0\n elif x <= seq[0]:\n return 0\n elif x >= seq[-1]:\n return len(seq)\n else:\n for i in seq:\n if x < i:\n return seq.index(i)\n return None\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":877,"func_code":"def search(x, seq):\n if len(seq) == 0:\n return 0\n elif x <= seq[0]:\n return 0\n elif x >= seq[-1]:\n return len(seq)\n else:\n for i in seq:\n if x <= i:\n return seq.index(i)\n return None\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":878,"func_code":"def search(x, seq):\n for i,j in enumerate(seq[:len(seq)-1]):\n if x < seq[0]:\n return 0\n elif x > j and x <= seq[i+1]:\n return i+1\n elif x > seq[len(seq)-1]:\n return len(seq)\n else:\n continue\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":879,"func_code":"def search(x, seq):\n for i,j in enumerate(seq[:len(seq)-1]):\n if seq == []:\n return 0\n elif x < seq[0]:\n return 0\n elif x > j and x <= seq[i+1]:\n return i+1\n elif x > seq[len(seq)-1]:\n return len(seq)\n else:\n continue\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":880,"func_code":"def search(x, seq):\n for i,j in enumerate(seq[:len(seq)-1]):\n if seq == ():\n return 0\n elif x < seq[0]:\n return 0\n elif x > j and x <= seq[i+1]:\n return i+1\n elif x > seq[len(seq)-1]:\n return len(seq)\n else:\n continue\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":881,"func_code":"def search(x, seq):\n if seq == () or x <= seq[0]:\n return 0\n elif x > seq[-1]:\n return len(seq)\n else:\n for i,j in enumerate(seq[:len(seq)-1]):\n if x > j and x <= seq[i+1]:\n return i+1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":882,"func_code":"def search(x, seq):\n if seq == () or x <= seq[0] or seq == []:\n return 0\n elif x > seq[-1]:\n return len(seq)\n else:\n for i,j in enumerate(seq[:len(seq)-1]):\n if x > j and x <= seq[i+1]:\n return i+1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":883,"func_code":"def search(x, seq):\n if seq == () or x <= seq[0] or seq == []:\n return 0\n elif x > seq[-1]:\n return len(seq)\n else:\n for i,j in enumerate(seq[:len(seq)-1]):\n if x > j and x <= seq[i+1]:\n return i+1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":884,"func_code":"def search(x, seq):\n n = len(seq)\n if seq ==():\n return 0\n for i in range(0,n):\n currentvalue = seq[i]\n position = i\n if position >= 0 and x>currentvalue:\n position = i+1\n elif position >= 0 and x<= currentvalue:\n return position\n return position\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":885,"func_code":"def search(x, seq):\n if x >= seq[-1]:\n return len(seq)\n else:\n for i, elem in enumerate(seq):\n if elem >= x:\n return i\n return\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":886,"func_code":"def search(x, seq):\n if seq == []:\n return 0\n elif x >= seq[-1]:\n return len(seq)\n else:\n for i, elem in enumerate(seq):\n if elem >= x:\n return i\n return\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":887,"func_code":"def search(x, seq):\n if seq == [] or ():\n return 0\n elif x >= seq[-1]:\n return len(seq)\n else:\n for i, elem in enumerate(seq):\n if elem >= x:\n return i\n return\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":888,"func_code":"def search(x, seq):\n if len(seq) == 0:\n return 0\n elif x >= seq[-1]:\n return len(seq)\n else:\n for i, elem in enumerate(seq):\n if elem >= x:\n return i\n return\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":889,"func_code":"def search(x, seq):\n if len(seq) == 0:\n return 0\n elif x >= seq[-1]:\n return len(seq)\n else:\n for i, elem in enumerate(seq):\n if elem >= x:\n return i\n ","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":890,"func_code":"def search(x, seq):\n if len(seq) == 0:\n return 0\n elif x >= seq[-1]:\n return len(seq)\n else:\n for i, elem in enumerate(seq):\n if elem > x:\n return i\n ","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":891,"func_code":"def search(x, seq):\n if len(seq) == 0:\n return 0\n elif x >= seq[-1]:\n return len(seq)\n else:\n for i, elem in enumerate(seq):\n if elem >= x:\n return i\n ","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":892,"func_code":"def search(x, seq):\n if len(seq) == 0:\n return 0\n elif x >= seq[-1]:\n return len(seq)\n else:\n for i, elem in enumerate(seq):\n if x <= elem:\n return i-1\n ","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":893,"func_code":"def search(x, seq):\n if len(seq) == 0:\n return 0\n elif x >= seq[-1]:\n return len(seq)\n else:\n for i, elem in enumerate(seq):\n if elem >= x:\n return i\n ","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":894,"func_code":"def search(x, seq):\n if x <= seq[0]:\n return 0\n else:\n for i in range(len(seq)):\n if seq[i] < x <= seq[i+1]:\n return i+1\n return len(seq)\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":895,"func_code":"def search(x, seq):\n if x <= seq[0]:\n return 0\n else:\n for i in range(len(seq)-1):\n if seq[i] < x <= seq[i+1]:\n return i+1\n return len(seq)\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":896,"func_code":"def search(x, seq):\n if x <= seq[0] or not seq:\n return 0\n else:\n for i in range(len(seq)-1):\n if seq[i] < x <= seq[i+1]:\n return i+1\n return len(seq)\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":897,"func_code":"def search(x, seq):\n if x <= seq[0] or not seq:\n return 0\n else:\n for i in range(len(seq)-1):\n if seq[i] < x <= seq[i+1]:\n return i+1\n return len(seq)\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":898,"func_code":"def search(x, seq):\n if x <= seq[0] or seq == 0:\n return 0\n else:\n for i in range(len(seq)-1):\n if seq[i] < x <= seq[i+1]:\n return i+1\n return len(seq)\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":899,"func_code":"def search(x, seq):\n if seq == 0:\n return 0\n elif x <= seq[0]:\n return 0\n else:\n for i in range(len(seq)-1):\n if seq[i] < x <= seq[i+1]:\n return i+1\n return len(seq)\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":900,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if x <= seq[i] and i == 0:\n return 0\n elif seq[i-1] < x <= seq[i]:\n return i\n elif x > seq[i] and i == len(seq)-1:\n return len(seq)\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":901,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if len(seq) == 0:\n return 0\n elif x <= seq[i] and i == 0:\n return 0\n elif seq[i-1] < x <= seq[i]:\n return i\n elif x > seq[i] and i == len(seq)-1:\n return len(seq)\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":902,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if i == 0 and x < elem:\n return 0\n elif x == elem:\n return i\n elif x < elem:\n return i\n elif x > seq[-1]:\n return len(seq)\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":903,"func_code":"def search(x, seq):\n\n\n for i,elem in enumerate(sort):\n\n if elem==x:\n\n return i\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":904,"func_code":"def search(x, seq):\n\n\n for i,elem in enumerate(seq):\n\n if elem==x:\n\n return i\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":905,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if len(seq) == 0:\n return 0\n elif i == 0 and x < elem:\n return 0\n elif x <= elem:\n return i\n elif i == len(seq) - 1:\n return len(seq)\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":906,"func_code":"def search(x, seq):\n return\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":907,"func_code":"def search(x, seq):\n for i,elem in enumerate(seq):\n if x > elem:\n continue\n return i\n return i+1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":908,"func_code":"def search(x, seq):\n for i in range(len(seq)-1):\n if seq[i] < x:\n return i\n return len(seq)\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":909,"func_code":"def search(x, seq):\n for i in range(len(seq)-1):\n if seq[i] >= x:\n return i\n return len(seq)\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":910,"func_code":"def search(x, seq):\n n=[]\n seq = list(seq)\n a= seq.copy()\n d = 0\n for i in a:\n if i= seq[-1]:\n position = len(seq)\n else:\n for item in seq:\n if val <= item:\n position = seq.index(item)-1\n return position\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":916,"func_code":"#def search(x, seq):\n# # return\n\n\n\ndef search(val,seq):\n if val <= seq[0]:\n position = 0\n elif val >= seq[-1]:\n position = len(seq)\n else:\n for item in seq:\n if val <= item:\n position = seq.index(item)-1\n return position\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":917,"func_code":"#def search(x, seq):\n# # return\n\n\n\ndef search(val,seq):\n if val <= seq[0]:\n position = 0\n elif val >= seq[-1]:\n position = len(seq)\n else:\n for item in seq:\n if val <= item:\n position = seq.index(item)-1\n return position\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":918,"func_code":"def search(x, seq):\n enumerated_list=enumerate(seq)\n for i,elem in enumerated_list:\n if xi:\n return a+1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":923,"func_code":"def search(x, seq):\n if seq==[]:\n return 0\n for a,b in enumerate(seq):\n if x<=b:\n return a\n for i in seq:\n if x>i:\n return a+1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":924,"func_code":"def search(x, seq):\n for a,b in enumerate(seq):\n if eq==[]:\n return a\n if x<=b:\n return a\n for i in seq:\n if x>i:\n return a+1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":925,"func_code":"def search(x, seq):\n if seq==[]:\n return 0\n for a,b in enumerate(seq):\n if x<=b:\n return a\n for i in seq:\n if x>i:\n return a+1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":926,"func_code":"def search(x, seq):\n count = 0\n if x <= seq[0]:\n return 0\n elif x > seq[len(seq)-1]:\n return len(seq)\n else:\n while x > seq[count]:\n count += 1\n return count\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":927,"func_code":"def search(x, seq):\n count = 0\n if x <= seq[0] or not seq:\n return 0\n elif x > seq[len(seq)-1]:\n return len(seq)\n else:\n while x > seq[count]:\n count += 1\n return count\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":928,"func_code":"def search(x, seq):\n count = 0\n if x <= seq[0] or seq == () or seq == []:\n return 0\n elif x > seq[len(seq)-1]:\n return len(seq)\n else:\n while x > seq[count]:\n count += 1\n return count\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":929,"func_code":"def search(x, seq):\n if seq==():\n return 0\n for a,b in enumerate(seq):\n if x<=b:\n return a\n for i in seq:\n if x>i:\n return a+1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":930,"func_code":"def search(x, seq):\n for i in range(len(seq)-1):\n if x<=seq[0]:\n return 0\n if seq[i]<=x<=seq[i+1]:\n return i+1\n if x>=seq[-1]:\n return len(seq)\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":931,"func_code":"def search(x, seq):\n if seq==():\n return 0\n for i in range(len(seq)-1):\n if x<=seq[0]:\n return 0\n if seq[i]<=x<=seq[i+1]:\n return i+1\n if x>=seq[-1]:\n return len(seq)\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":932,"func_code":"def search(x, seq):\n if len(seq)==0:\n return 0\n for i in range(len(seq)-1):\n if x<=seq[0]:\n return 0\n if seq[i]<=x<=seq[i+1]:\n return i+1\n if x>=seq[-1]:\n return len(seq)\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":933,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if x<=seq[i]:break\n if i==len(seq)-1: i+=1\n return i\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":934,"func_code":"def search(x, seq):\n if len(seq)==0:\n return 0\n if len(seq)==1:\n if x>=seq[0]:\n return 1\n elif x=seq[-1]:\n return len(seq)\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":935,"func_code":"def search(x, seq):\n if seq==() or []:\n return 0\n for i in range(len(seq)):\n if x<=seq[i]:break\n if i==len(seq)-1: i+=1\n return i\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":936,"func_code":"def search(x, seq):\n for element in seq:\n if x <= element:\n return list(seq).index(element)\n else:\n continue\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":937,"func_code":"def search(x, seq):\n for element in seq:\n if x <= element:\n return list(seq).index(element)\n elif x >= max(seq):\n return (list(seq).index(max(seq)))+1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":938,"func_code":"def search(x, seq):\n for element in seq:\n if x <= element:\n return list(seq).index(element)\n elif x >= max(seq):\n return (list(seq).index(max(seq)))+1\n elif seq == ():\n return ()\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":939,"func_code":"def search(x, seq):\n if seq == ():\n return ()\n else:\n for element in seq:\n if x <= element:\n return list(seq).index(element)\n elif x >= max(seq):\n return (list(seq).index(max(seq)))+1\n \n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":940,"func_code":"def search(x, seq):\n if seq == ():\n return None\n else:\n for element in seq:\n if x <= element:\n return list(seq).index(element)\n elif x >= max(seq):\n return (list(seq).index(max(seq)))+1\n \n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":941,"func_code":"def search(x, seq):\n if seq == ():\n return 0\n else:\n for element in seq:\n if x <= element:\n return list(seq).index(element)\n elif x >= max(seq):\n return (list(seq).index(max(seq)))+1\n \n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":942,"func_code":"def search(x, seq):\n if list(seq) == ():\n return 0\n else:\n for element in seq:\n if x <= element:\n return list(seq).index(element)\n elif x >= max(seq):\n return (list(seq).index(max(seq)))+1\n \n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":943,"func_code":"def search(x, seq):\n if list(seq) == ():\n return 0\n elif seq == ():\n return 0\n else:\n for element in seq:\n if x <= element:\n return list(seq).index(element)\n elif x >= max(seq):\n return (list(seq).index(max(seq)))+1\n \n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":944,"func_code":"def search(x, seq):\n if list(seq) == []:\n return 0\n elif seq == ():\n return 0\n else:\n for element in seq:\n if x <= element:\n return list(seq).index(element)\n elif x >= max(seq):\n return (list(seq).index(max(seq)))+1\n \n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":945,"func_code":"def search(x, seq):\n if list(seq) == []:\n return 0\n else:\n for element in seq:\n if x <= element:\n return list(seq).index(element)\n elif x >= max(seq):\n return (list(seq).index(max(seq)))+1\n \n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":946,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if x > seq[-1]:\n return len(seq)\n elif x > elem:\n continue\n else:\n return i\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":947,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if len(seq) == 0:\n return 0\n elif x > seq[-1]:\n return len(seq)\n elif x > elem:\n continue\n else:\n return i\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":948,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if seq == ():\n return 0\n elif x > seq[-1]:\n return len(seq)\n elif x > elem:\n continue\n else:\n return i\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":949,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if seq == ():\n return 0\n elif seq == []:\n return 0\n elif x > seq[-1]:\n return len(seq)\n elif x > elem:\n continue\n else:\n return i\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":950,"func_code":"def search(x, seq):\n return\ndef search(x, seq):\n if list(seq) == []:\n return 0\n else:\n for element in seq:\n if x <= element:\n return list(seq).index(element)\n elif x >= max(seq):\n return (list(seq).index(max(seq)))\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":951,"func_code":"def search(x, seq):\n for i in seq:\n if x>i:\n continue\n else:\n return (seq.index(i))-1\n \n\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":952,"func_code":"def search(x, seq):\n for i in seq:\n if x>i:\n continue\n else:\n return ((seq).index(i))-1\n \n\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":953,"func_code":"def search(x, seq):\n for i in seq:\n if x>i:\n continue\n return seq.index(i)-1\n \n\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":954,"func_code":"def search(x, seq):\n count==0\n while count=seq[i]) and (x<=seq[i+1]):\n return i+1\n else:\n return len(seq)\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":956,"func_code":"def search(x, seq):\n if seq ==[]:\n return 0\n if x<0:\n return 0\n elif x=seq[i]) and (x<=seq[i+1]):\n return i+1\n else:\n return len(seq)\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":957,"func_code":"def search(x, seq):\n if seq ==[]:\n return 0\n elif x<0:\n return 0\n elif x=seq[i]) and (x<=seq[i+1]):\n return i+1\n else:\n return len(seq)\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":958,"func_code":"def search(x, seq):\n n = len(seq)\n for counter in range(n):\n if x > seq[n-1]:\n result = n\n break\n elif seq[counter] >= x:\n result = counter\n break\n else:\n continue\n return result\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":959,"func_code":"def search(x, seq):\n count==0\n while countseq[count]:\n count+=1\n continue\n else:\n return count-1\n break\n return len(seq)\n \n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":960,"func_code":"def search(x, seq):\n count=0\n while countseq[count]:\n count+=1\n continue\n else:\n return count-1\n break\n return len(seq)\n \n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":961,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if x <= elem:\n return i\n elif x > seq[len(seq)-1]:\n return len(seq)\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":962,"func_code":"def search(x, seq):\n count=0\n while countseq[count]:\n count+=1\n continue\n else:\n return count-1\n return len(seq)\n \n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":963,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if seq == ():\n return (i,)\n elif seq == []:\n return [i,]\n elif x <= elem:\n return i\n elif x > seq[len(seq)-1]:\n return len(seq)\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":964,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if seq == ():\n return (i,)\n elif seq == []:\n return [i]\n elif x <= elem:\n return i\n elif x > seq[len(seq)-1]:\n return len(seq)\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":965,"func_code":"def search(x, seq):\n count=0\n while countseq[count]:\n count+=1\n continue\n else:\n if count!=0:\n return count-1\n else:\n return 0\n return len(seq)\n \n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":966,"func_code":"def search(x, seq):\n for i in len(range(seq)):\n if x>seq[i]:\n return i\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":967,"func_code":"def search(x, seq):\n l=len(seq)\n if len(seq)==0:\n return 0\n elif x<=seq[0]:\n return 0\n elif x>=seq[l-1]:\n return l\n else:\n for i in range (l):\n if x>=seq[i] and x<=seq[i+1]:\n return i+1\n else: \n continue\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":968,"func_code":"def search(x, seq):\n for i,elem in enumerate(seq):\n if x < seq[-1]:\n if x > elem:\n continue\n elif x < elem and type(seq) == tuple:\n seq = seq[:i] + (x,) + seq[i:]\n elif x < elem and type(seq) == list:\n seq = seq[:i] + [x,] + seq[i:]\n elif x > seq[-1]:\n if type(seq) == tuple:\n seq += (x,)\n elif type(seq) == list:\n seq += [x,]\n return seq.index(x)\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":969,"func_code":"def search(x, seq):\n if seq == ():\n return (x,)\n elif seq == []:\n return [x,]\n else:\n for i,elem in enumerate(seq):\n if x < seq[-1]:\n if x > elem:\n continue\n elif x < elem and type(seq) == tuple:\n seq = seq[:i] + (x,) + seq[i:]\n elif x < elem and type(seq) == list:\n seq = seq[:i] + [x,] + seq[i:]\n elif x > seq[-1]:\n if type(seq) == tuple:\n seq += (x,)\n elif type(seq) == list:\n seq += [x,]\n return seq.index(x)\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":970,"func_code":"def search(x, seq):\n l=len(seq)\n if x<=seq[0]:\n return 0\n elif x>=seq[l-1]:\n return l+1\n else:\n for i in range (l):\n if x>=seq[i] and x<=seq[i+1]:\n return i+1\n else: \n continue\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":971,"func_code":"def search(x, seq):\n l=len(seq)\n if x<=seq[0]:\n return 0\n elif x>=seq[l-1]:\n return l\n else:\n for i in range (l):\n if x>=seq[i] and x<=seq[i+1]:\n return i+1\n else: \n continue\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":972,"func_code":"def search(x, seq):\n l=len(seq)\n if len(seq)==0:\n return 0\n elif x<=seq[0]:\n return 0\n elif x>=seq[l-1]:\n return l\n else:\n for i in range (l):\n if x>=seq[i] and x<=seq[i+1]:\n return i+1\n else: \n continue\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":973,"func_code":"def search(x, seq):\n for i in range(len(seq) - 1):\n if seq[i] < x < seq[i+1]:\n return i+1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":974,"func_code":"def search(x, seq):\n if x < seq[0]:\n return 0\n elif x > seq[-1]:\n return len(seq)\n else:\n for i in range(len(seq) - 1):\n if seq[i] < x < seq[i+1]:\n return i+1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":975,"func_code":"def search(x, seq):\n if x < seq[0]:\n return 0\n elif x > seq[-1]:\n return len(seq)\n else:\n for i in range(len(seq) - 1):\n if seq[i] == x:\n return i\n elif seq[i] < x < seq[i+1]:\n return i+1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":976,"func_code":"def search(x, seq):\n if x < seq[0]:\n return 0\n elif x > seq[-1]:\n return len(seq)\n elif seq == []:\n return 0\n else:\n for i in range(len(seq) - 1):\n if seq[i] == x:\n return i\n elif seq[i] < x < seq[i+1]:\n return i+1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":977,"func_code":"def search(x, seq):\n if x < seq[0]:\n return 0\n elif x > seq[-1]:\n return len(seq)\n elif seq == [] or seq == ():\n return 0\n else:\n for i in range(len(seq) - 1):\n if seq[i] == x:\n return i\n elif seq[i] < x < seq[i+1]:\n return i+1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":978,"func_code":"def search(x, seq):\n if x < seq[0]:\n return 0\n elif x > seq[-1]:\n return len(seq)\n elif len(seq) == 0:\n return 0\n else:\n for i in range(len(seq) - 1):\n if seq[i] == x:\n return i\n elif seq[i] < x < seq[i+1]:\n return i+1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":979,"func_code":"def search(x, seq):\n if not seq:\n return 0\n elif x < seq[0]:\n return 0\n elif x > seq[-1]:\n return 0\n else:\n for i in range(len(seq) - 1):\n if seq[i] == x:\n return i\n elif seq[i] < x < seq[i+1]:\n return i+1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":980,"func_code":"def search(x, seq):\n if not seq:\n return 0\n elif x < seq[0]:\n return 0\n elif x > seq[-1]:\n return len(seq)\n else:\n for i in range(len(seq) - 1):\n if seq[i] == x:\n return i\n elif seq[i] < x < seq[i+1]:\n return i+1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":981,"func_code":"def search(x, seq):\n index = 0\n def helper(index):\n if not seq:\n return 0\n elif x <= seq[index]:\n return index\n else:\n if index + 1 >= len(seq):\n return index + 1\n else:\n return helper(index+1)\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":982,"func_code":"\ndef search(x, seq):\n \n seq = list(seq)\n max_value = max(seq)\n for i,elem in enumerate(seq):\n if x > max_value:\n seq.insert(seq.index(max_value) + 1,x)\n break\n elif xseq[0] and len(seq) == 1:\n return 1\n else:\n for i in range(len(seq)-1):\n if seq[i] <= x <= seq[i+1]:\n return i+1\n return len(seq)\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":984,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if x <= elem:\n return i\n if i == (len(seq)-1):\n return len(seq)\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":985,"func_code":"def search(x, seq):\n if seq == ():\n return 0\n for i, elem in enumerate(seq):\n if x <= elem:\n return i\n if i == (len(seq)-1):\n return len(seq)\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":986,"func_code":"def search(x, seq):\n if seq == []:\n return 0\n for i, elem in enumerate(seq):\n if x <= elem:\n return i\n if i == (len(seq)-1):\n return len(seq)\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":987,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if x <= elem:\n return i\n elif i == len(seq) - 1 and x > elem:\n return i + 1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":988,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if x <= elem:\n return i\n elif i == len(seq) - 1 and x > elem:\n return i + 1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":989,"func_code":"def search(x, seq):\n for i in len(seq):\n if x <= seq[i]:\n return i\n #","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":990,"func_code":"def search(x, seq):\n for i in len(seq):\n if x <= seq[i]:\n return i\n return len(seq)+1\n #","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":991,"func_code":"def search(x, seq):\n \n for i, elem in enumerate(seq):\n if x <= elem:\n return i\n else:\n return len(seq)\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":992,"func_code":"def search(x, seq):\n for i in len(seq):\n if x <= seq[i]:\n return i\n return len(seq)+1\n #","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":993,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if x <= seq[i]:\n return i\n return len(seq)+1\n #","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":994,"func_code":"def search(x, seq):\n if seq == ():\n return -1\n for i, elem in enumerate(seq):\n if x <= elem:\n return i\n return i+1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":995,"func_code":"def search(x, seq):\n result = None\n for i, elem in enumerate(seq):\n if x <= elem:\n result = i\n break\n \n else:\n result = len(seq)\n return result\n \n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":996,"func_code":"def search(x, seq):\n result = None\n if seq == () or seq == []:\n return result\n\n \n for i, elem in enumerate(seq):\n if x <= elem:\n result = i\n break\n \n else:\n result = len(seq)\n return result\n \n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":997,"func_code":"def search(x, seq):\n if x <= seq[0]:\n return 0\n elif x >= seq[len(seq)-1]:\n return len(seq)\n else:\n for i, elem in enumerate(seq):\n if elem <= x <= seq[i+1]:\n return i+1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":998,"func_code":"def search(x, seq):\n if x <= seq[0]:\n return 0\n elif x >= seq[len(seq)-1]:\n return len(seq)\n elif seq == [] or ():\n return 0\n else:\n for i, elem in enumerate(seq):\n if elem <= x <= seq[i+1]:\n return i+1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":999,"func_code":"def search(x, seq):\n if x <= seq[0]:\n return 0\n elif x >= seq[len(seq)-1]:\n return len(seq)\n elif seq == ():\n return 0\n else:\n for i, elem in enumerate(seq):\n if elem <= x <= seq[i+1]:\n return i+1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1000,"func_code":"def search(x, seq):\n if seq == () or seq == []:\n return 0\n elif x <= seq[0]:\n return 0\n elif x >= seq[len(seq)-1]:\n return len(seq)\n else:\n for i, elem in enumerate(seq):\n if elem <= x <= seq[i+1]:\n return i+1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1001,"func_code":"def search(x, seq):\n if seq == () or seq == []:\n return 0\n else:\n for i, elem in enumerate(seq):\n if x <= elem:\n return i\n elif x >= seq[len(seq)-1]:\n return len(seq)\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1002,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if x <= elem:\n return i\n return i+1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1003,"func_code":"def search(x, seq):\n n = len(seq)\n for i in range(0,n):\n currentvalue = seq[i]\n position = i\n if position >= 0 and x>currentvalue:\n position = i+1\n elif position >= 0 and x<= currentvalue:\n return position\n return position\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1004,"func_code":"def search(x, seq):\n if x < seq[0]:\n return 0\n elif x > seq[-1]:\n return len(seq)\n else:\n for i in seq:\n if x > i:\n continue\n else:\n return seq.index(i)\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1005,"func_code":"def search(x, seq):\n if x <= seq[-1]:\n for i in range(len(seq)):\n if seq[i] < x:\n continue\n else:\n return i\n else:\n return len(seq)\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1006,"func_code":"def search(x, seq):\n if list(seq) == []:\n return 0\n else:\n for element in seq:\n if x <= element:\n return list(seq).index(element)\n elif x == element:\n return (list(seq).index(element))-1\n elif x >= max(seq):\n return (list(seq).index(max(seq)))+1\n \n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1007,"func_code":"def search(x, seq):\n if list(seq) == []:\n return 0\n else:\n for element in seq:\n if x <= element:\n return list(seq).index(element)\n elif x == element:\n return list(seq).index(element)\n elif x >= max(seq):\n return (list(seq).index(max(seq)))+1\n \n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1008,"func_code":"def search(x, seq):\n n = len(seq)\n for i in range(0,n):\n currentvalue = seq[i]\n position = i\n if position >= 0 and x>currentvalue:\n position = i+1\n elif position >= 0 and x<= currentvalue:\n return position\n elif seq==():\n return 0\n return position\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1009,"func_code":"def search(x, seq):\n n = len(seq)\n for i in range(0,n):\n currentvalue = seq[i]\n position = i\n if position >= 0 and x>currentvalue:\n position = i+1\n elif position >= 0 and x<= currentvalue:\n return position\n return position\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1010,"func_code":"def search(x, seq):\n for i in seq:\n if x < seq[i]:\n return i\n \n \n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1011,"func_code":"def search(x, seq):\n for i in seq:\n if x <= seq[i]:\n return i\n \n \n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1012,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if x <= seq[i]:\n return i\n \n \n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1013,"func_code":"def search(x, seq):\n for i in range(len(sorted_seq)):\n if x <= sorted_seq[i]:\n return i\n else:\n return len(sorted_seq)\n\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1014,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if x <= seq[i]:\n return i\n else:\n return len(seq)\n\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1015,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if x <= seq[i] and x >= seq[i-1]:\n position = i\n return position\n\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1016,"func_code":"def search(x, seq):\n if x <= seq[0]:\n position = 0\n for i in range(len(seq)):\n if x <= seq[i] and x >= seq[i-1]:\n position = i\n return position\n\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1017,"func_code":"def search(x, seq):\n if x <= seq[0]:\n position = 0\n for i in range(len(seq)):\n if x <= seq[i] and x > seq[i-1]:\n position = i\n return position\n\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1018,"func_code":"def search(x, seq):\n if x <= seq[0]:\n position = 0\n for i in range(len(seq)):\n if x <= seq[i] and x > seq[i-1]:\n position = i\n else:\n position = len(seq)\n return position\n\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1019,"func_code":"def search(x, seq):\n if x <= seq[0]:\n position = 0\n for i in range(len(seq)):\n if x <= seq[i] and x > seq[i-1]:\n position = i\n return position\n\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1020,"func_code":"def search(x, seq):\n if x <= seq[0]:\n position = 0\n if x >= seq[len(seq) - 1]:\n position = len(seq)\n for i in range(len(seq)):\n if x <= seq[i] and x > seq[i-1]:\n position = i\n return position\n\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1021,"func_code":"def search(x, seq):\n if seq == [] or seq == ():\n position = 0\n if x <= seq[0]:\n position = 0\n if x >= seq[len(seq) - 1]:\n position = len(seq)\n for i in range(len(seq)):\n if x <= seq[i] and x > seq[i-1]:\n position = i\n return position\n\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1022,"func_code":"def search(x, seq):\n a = list(enumerate(seq))\n seq = list(seq)\n i = 0\n while i < len(seq):\n if x < seq[i] and i == 0:\n seq.insert(a[i][0], x)\n i = i + 2\n elif x < seq[i] and x > seq[i-1]:\n seq.insert(a[i][0],x)\n i = i + 2\n elif x > seq[len(seq)-1]:\n seq.append(x)\n i = i + 2\n else:\n i = i + 1\n \n \n return seq\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1023,"func_code":"def search(x, seq):\n a = list(enumerate(seq))\n seq = list(seq)\n i = 0\n while i < len(seq):\n if x < seq[i] and i == 0:\n return 0\n elif x <= a[i][1] and x >= a[i-1][1]:\n return a[i][0]\n elif x > a[len(seq)-1][1]:\n return len(seq)\n else:\n i = i + 1\n \n \n return seq\n \n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1024,"func_code":"def search(x, seq):\n a = list(enumerate(seq))\n seq = list(seq)\n i = 0\n while i < len(seq):\n if seq == []:\n return 0\n if x < seq[i] and i == 0:\n return 0\n elif x <= a[i][1] and x >= a[i-1][1]:\n return a[i][0]\n elif x > a[len(seq)-1][1]:\n return len(seq)\n else:\n i = i + 1\n \n \n return seq\n \n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1025,"func_code":"def search(x, seq):\n position=enumerate(seq)\n if x>seq[-1]:\n return len(seq)\n else: \n for i in seq:\n if x<=i:\n for index in position:\n if index[1]==i:\n return index[0]\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1026,"func_code":"def search(x, seq):\n enumerated_list =()\n for i, elem in enumerate(seq):\n enumerated_list = enumerated_list + ((i,elem),)\n\n for number in enumerated_list:\n if x <= number[1]:\n res = number[0]\n break\n else:\n res = len(seq)\n return res\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1027,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if seq[i] < x:\n return x\n return len(seq)\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1028,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if seq[i] >= x:\n return i\n return i\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1029,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if seq[i] >= x:\n return i\n else:\n return len(seq)\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1030,"func_code":"def search(x, seq):\n for i in len(range(seq)):\n if x <= i:\n return i\n return len(seq)\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1031,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if x < seq[0]:\n pos = 0\n break\n elif x <= seq[i]:\n pos = i\n break\n elif x > seq[len(seq) - 1]:\n pos = len(seq)\n break\n return pos\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1032,"func_code":"def search(x, seq):\n if seq[len(seq)-1] < x:\n return len(seq)\n elif seq[0] >= x:\n return 0\n else:\n for i in range(len(seq)-1):\n if seq[i] < x and seq[i+1] >= x:\n return i+1\n break\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1033,"func_code":"def search(x, seq):\n if seq[len(seq)-1] < x:\n return len(seq)\n elif seq[0] >= x or seq == () or seq == []:\n return 0\n else:\n for i in range(len(seq)-1):\n if seq[i] < x and seq[i+1] >= x:\n return i+1\n break\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1034,"func_code":"def search(x, seq):\n if seq[0] >= x or seq == () or seq == []:\n return 0\n elif seq[len(seq)-1] < x:\n return len(seq)\n else:\n for i in range(len(seq)-1):\n if seq[i] < x and seq[i+1] >= x:\n return i+1\n break\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1035,"func_code":"def search(x, seq):\n if seq[0] >= x or seq == () or seq == []:\n return 0\n elif seq[len(seq)-1] < x:\n return len(seq)\n else:\n for i in range(len(seq)-1):\n if seq[i] < x and seq[i+1] >= x:\n return i+1\n break\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1036,"func_code":"def search(x, seq):\n counter = 0\n new_seq = list(seq)\n for element in seq:\n if x <=element:\n return counter\n if x > seq[len(seq)-1]:\n return len(seq) \n else:\n counter += 1\n continue\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1037,"func_code":"def search(x, seq):\n counter = 0\n new_seq = list(seq)\n if seq == ():\n return (x,)\n for element in seq:\n if x <=element:\n return counter\n if x > seq[len(seq)-1]:\n return len(seq) \n else:\n counter += 1\n continue\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1038,"func_code":"def search(x, seq):\n counter = 0\n new_seq = list(seq)\n if seq == ():\n return 0\n for element in seq:\n if x <=element:\n return counter\n if x > seq[len(seq)-1]:\n return len(seq) \n else:\n counter += 1\n continue\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1039,"func_code":"def search(x, seq):\n position = 0\n while position < len(seq)-1:\n if seq[position] == x:\n break\n elif seq[position] > x:\n break\n position = position + 1\n if seq[position] < x:\n position = position + 1\n return position\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1040,"func_code":"def search(x, seq):\n enumerated = list(enumerate(seq))\n if x > max(seq):\n return len(seq)\n else:\n for i in range(len(enumerated)):\n if enumerated[i][1] >= x:\n return enumerated[i][0]\n break\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1041,"func_code":"def search(x, seq):\n enumerated = list(enumerate(seq))\n if seq == ():\n return 0\n elif x > max(seq):\n return len(seq)\n else:\n for i in range(len(enumerated)):\n if enumerated[i][1] >= x:\n return enumerated[i][0]\n break\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1042,"func_code":"def search(x, seq):\n enumerated = list(enumerate(seq))\n if seq == () or []:\n return 0\n elif x > max(seq):\n return len(seq)\n else:\n for i in range(len(enumerated)):\n if enumerated[i][1] >= x:\n return enumerated[i][0]\n break\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1043,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if x < seq[i]:\n return i\n else:\n continue\n return len(seq)\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1044,"func_code":"def search(x, seq):\n t = 0\n for i in seq:\n if x >= i:\n return t\n t += 1\n return len(seq)-1\n \n \n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1045,"func_code":"def search(x, seq):\n t = 0\n for i in seq:\n if x >= i:\n t+=1\n\n return t\n \n \n \n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1046,"func_code":"def search(x, seq):\n if x > seq[-1]:\n return len(seq)\n else:\n for i, elem in enumerate(seq):\n if x <= elem:\n return i\n else:\n continue\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1047,"func_code":"def search(x, seq):\n for i in range(0, len(seq) + 1):\n if x < seq[0]:\n return 0\n elif seq[i] < x <= seq[i+1]:\n return i + 1\n elif seq[len(seq)-1] < x:\n return len(seq)\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1048,"func_code":"def search(x, seq):\n for i in range(0, len(seq) + 1):\n if (x < seq[0]) or (seq == ()):\n return 0\n elif seq[i] < x <= seq[i+1]:\n return i + 1\n elif seq[len(seq)-1] < x:\n return len(seq)\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1049,"func_code":"def search(x, seq):\n for i in range(0, len(seq) + 1):\n if ((x < seq[0]) or (seq == ())):\n return 0\n elif seq[i] < x <= seq[i+1]:\n return i + 1\n elif seq[len(seq)-1] < x:\n return len(seq)\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1050,"func_code":"def search(x, seq):\n for i in range(0, len(seq) + 1):\n if x < seq[0]:\n return 0\n elif seq[i] < x <= seq[i+1]:\n return i + 1\n elif seq[len(seq)-1] < x:\n return len(seq)\n elif seq == ():\n return None\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1051,"func_code":"def search(x, seq):\n for i in range(0, len(seq) + 1):\n if seq == ():\n return None\n elif x < seq[0]:\n return 0\n elif seq[i] < x <= seq[i+1]:\n return i + 1\n elif seq[len(seq)-1] < x:\n return len(seq)\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1052,"func_code":"def search(x, seq):\n for i in range(0, len(seq) + 1):\n if seq == ():\n return 0\n elif x < seq[0]:\n return 0\n elif seq[i] < x <= seq[i+1]:\n return i + 1\n elif seq[len(seq)-1] < x:\n return len(seq)\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1053,"func_code":"def search(x, seq):\n for i in range(0, len(seq) + 1):\n if len(seq) == 0:\n return None\n elif x < seq[0]:\n return 0\n elif seq[i] < x <= seq[i+1]:\n return i + 1\n elif seq[len(seq)-1] < x:\n return len(seq)\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1054,"func_code":"def search(x, seq):\n if xseq[-1]:\n return len(seq)\n else:\n for i in range(len(seq)-1):\n if x>seq[i] and xseq[-1]:\n return len(seq)\n elif seq is ():\n return 0\n else:\n for i in range(len(seq)-1):\n if x>seq[i] and xseq[-1]:\n return len(seq)\n elif len(seq)==0:\n return 0\n else:\n for i in range(len(seq)-1):\n if x>seq[i] and xseq[-1]:\n return len(seq)\n else:\n for i in range(len(seq)-1):\n if x>seq[i] and x= seq[i]:\n return i\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1061,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if x < seq[i]:\n continue\n elif x >= seq[i]:\n break\n return i\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1062,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if x >= seq[i]:\n break\n else:\n continue\n return i\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1063,"func_code":"def search(x,seq):\n for i in range(len(seq)):\n if x > seq[i]:\n continue\n elif x <= seq[i]:\n break\n return i\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1064,"func_code":"def search(x,seq):\n for i in range(len(seq)):\n if x > seq[i]:\n continue\n elif x <= seq[i]:\n break\n elif x > max(seq):\n return len(seq)\n return i\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1065,"func_code":"def search(x,seq):\n for i in range(len(seq)):\n if x > seq[i]:\n continue\n elif x <= seq[i]:\n break\n elif x > max(seq):\n return len(seq)+1\n return i\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1066,"func_code":"def search(x,seq):\n for i in range(len(seq)):\n if x > seq[i]:\n continue\n elif x <= seq[i]:\n break\n elif x > max(seq):\n return len(seq)\n return i\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1067,"func_code":"def search(x, seq):\n for i in range(0, len(seq)):\n no = len(seq)\n if x > seq[i]:\n continue\n elif x <= seq[i]:\n no = i\n break\n return no\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1068,"func_code":"def search(x,seq):\n for i in range(len(seq)):\n if x > max(seq):\n return len(seq)\n elif x > seq[i]:\n continue\n elif x <= seq[i]:\n break\n \n return i\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1069,"func_code":"def search(x,seq):\n for i in range(len(seq)):\n if len(seq) == 0:\n return 0\n elif x > max(seq):\n return len(seq)\n elif x > seq[i]:\n continue\n elif x <= seq[i]:\n break\n \n return i\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1070,"func_code":"def search(x,seq):\n for i in range(len(seq)):\n if len(seq) == 0:\n return 0\n elif x > max(seq):\n return len(seq)\n elif x > seq[i]:\n continue\n elif x <= seq[i]:\n break\n \n return i\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1071,"func_code":"def search(x,seq):\n for i in range(len(seq)):\n if len(seq) == 0:\n return 0\n elif x > max(seq):\n return len(seq)\n elif x > seq[i]:\n continue\n elif x <= seq[i]:\n break\n \n return i\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1072,"func_code":"def search(x, seq):\n if type(seq) == list:\n a = seq.copy()\n a.append(x)\n a.sort()\n for i, elem in enumerate(a):\n if elem == x:\n return i\n else:\n temp_tuple = seq.copy()\n temp_tuple+=(x,)\n for i, elem in enumerate(sorted(temp_tuple)):\n if elem == x:\n return i\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1073,"func_code":"def search(x, seq):\n for i,v in enumerate(seq):\n if x>v and i!=len(seq)-1:\n continue\n elif x>v and i==len(seq)-1:\n return i+1\n else:\n break\n \n return i\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1074,"func_code":"def search(x, seq):\n if seq==[]or():\n return 0\n for i,v in enumerate(seq):\n if x>v and i!=len(seq)-1:\n continue\n elif x>v and i==len(seq)-1:\n return i+1\n else:\n break\n \n return i\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1075,"func_code":"def search(x, seq):\n n = len(seq)\n if seq: #if seq is not an empty list\/tuple\n for i in range(n):\n next_element = seq[i]\n if x <= next_element:\n return i\n return n \n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1076,"func_code":"def search(x, seq):\n seq = []\n n = len(seq)\n if seq: #if seq is not an empty list\/tuple\n for i in range(n):\n next_element = seq[i]\n if x <= next_element:\n return i\n return n \n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1077,"func_code":"def search(x, seq):\n n = len(seq)\n if seq: #if seq is not an empty list\/tuple\n for i in range(n):\n next_element = seq[i]\n if x <= next_element:\n return i\n return n\n else:\n return None\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1078,"func_code":"def search(x, seq):\n for i in range(seq):\n if x<=seq[i]:\n break\n return i\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1079,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if x<=seq[i]:\n break\n return i\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1080,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if x<=seq[i]:\n return i\n return i+1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1081,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if len(seq)==0:\n return 0\n elif x<=seq[i]:\n return i\n return i+1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1082,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if not seq:\n return 0\n elif x<=seq[i]:\n return i\n return i+1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1083,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if x<=seq[i]:\n return i\n return i+1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1084,"func_code":"def search(x, seq):\n for i, ele in enumerate(seq, 0):\n if x > ele:\n i += 1\n else:\n break\n return i\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1085,"func_code":"def search(x, seq):\n for i in range(seq):\n if x <= seq[i]:\n return i\n else:\n continue\n ","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1086,"func_code":"def search(x, seq):\n n = len(seq)\n for i in range(n):\n next_element = seq[i]\n if x > next_element:\n return 0\n else:\n return i\n return n \n \n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1087,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if x <= elem:\n return i\n else:\n continue\n ","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1088,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if x <= elem:\n return i\n \n \n \n ","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1089,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if x <= elem:\n return i\n elif x > max(seq):\n return i+1\n \n \n \n \n ","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1090,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if x <= elem:\n return i\n elif x > max(seq):\n return len(seq)\n \n \n \n \n ","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1091,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if seq == ():\n return 0\n if x <= elem:\n return i\n elif x > max(seq):\n return len(seq)\n \n \n \n \n ","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1092,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if seq == ():\n return 0\n if x <= elem:\n return i\n elif x > max(seq):\n return len(seq)\n \n \n \n \n ","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1093,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if seq == ():\n return None\n if x <= elem:\n return i\n elif x > max(seq):\n return len(seq)\n \n \n \n \n ","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1094,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if seq == ():\n return 1\n if x <= elem:\n return i\n elif x > max(seq):\n return len(seq)\n \n \n \n \n ","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1095,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if x <= elem:\n return i\n elif x > max(seq):\n return len(seq)\n \n \n \n \n ","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1096,"func_code":"def search(x, seq):\n if seq == ():\n return None\n elif seq == []:\n return None\n else:\n next\n for i, elem in enumerate(seq):\n if x <= elem:\n return i\n elif x > max(seq):\n return len(seq)\n \n \n \n \n ","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1097,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if x <= seq(i):\n return i\n elif x > seq[-1]:\n return len(seq) + 1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1098,"func_code":"def search(x, seq):\n for item in seq:\n if x < item:\n return index(item)\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1099,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if x < seq[i]:\n return i\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1100,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if x <= seq[i]:\n return i\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1101,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if x <= seq[i]:\n return i\n else:\n return len(seq)\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1102,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if x <= seq[i]:\n return i\n else:\n return len(seq)\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1103,"func_code":"def search(x, seq):\n if x <= seq[0]:\n return 0\n for i in range(len(seq)-1):\n if seq[i+1]>=x and x>seq[i]:\n return i+1\n return len(seq)\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1104,"func_code":"def search(x, seq):\n if seq == ():\n return 0 \n if x <= seq[0]:\n return 0\n for i in range(len(seq)-1):\n if seq[i+1]>=x and x>seq[i]:\n return i+1\n return len(seq)\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1105,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if x seq[counter] and counter == len(seq) - 1:\n return len(seq)\n elif x > seq[counter]:\n counter = counter + 1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1109,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if x > seq[-1]:\n return len(seq)\n elif x == seq[i]:\n return i\n elif x < seq[i]:\n return i\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1110,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if seq == [] or ():\n return None\n elif x > seq[-1]:\n return len(seq)\n elif x == seq[i]:\n return i\n elif x < seq[i]:\n return i\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1111,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if seq == [] or ():\n return 0\n elif x > seq[-1]:\n return len(seq)\n elif x == seq[i]:\n return i\n elif x < seq[i]:\n return i\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1112,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if seq == ():\n return 0\n elif x > seq[-1]:\n return len(seq)\n elif x == seq[i]:\n return i\n elif x < seq[i]:\n return i\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1113,"func_code":"def search(x, seq):\n if seq == ():\n return 0\n for i in range(len(seq)):\n if x > seq[-1]:\n return len(seq)\n elif x == seq[i]:\n return i\n elif x < seq[i]:\n return i\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1114,"func_code":"def search(x, seq):\n if seq == () or []:\n return 0\n for i in range(len(seq)):\n if x > seq[-1]:\n return len(seq)\n elif x == seq[i]:\n return i\n elif x < seq[i]:\n return i\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1115,"func_code":"def search(x, seq):\n #Takes in a value x and a sorted sequence seq, and returns the\n #position that x should go to such that the sequence remains sorted \n i = 0 \n for x in seq:\n if x < seq[i]:\n return i\n i+=1\n return len(seq)\n \n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1116,"func_code":"def search(x, seq):\n #Takes in a value x and a sorted sequence seq, and returns the\n #position that x should go to such that the sequence remains sorted \n \n for i, x in seq:\n if x < seq[i]:\n return i\n return len(seq)\n \n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1117,"func_code":"def search(x, seq):\n #Takes in a value x and a sorted sequence seq, and returns the\n #position that x should go to such that the sequence remains sorted \n \n for i, x in enumerate(seq):\n if x < seq[i]:\n return i\n return len(seq)\n \n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1118,"func_code":"def search(x, seq):\n #Takes in a value x and a sorted sequence seq, and returns the\n #position that x should go to such that the sequence remains sorted \n \n for i, x in enumerate(seq):\n if x < seq[i]:\n return i\n return i\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1119,"func_code":"def search(x, seq):\n #Takes in a value x and a sorted sequence seq, and returns the\n #position that x should go to such that the sequence remains sorted \n \n for i, p in enumerate(seq):\n if x < p:\n return i\n return len(seq)\n \n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1120,"func_code":"def search(x, seq):\n largest=seq[0]\n for i in range(len(seq)):\n if x<=seq[i]:\n return i\n elif x>seq[len(seq)-1]:\n return len(seq)\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1121,"func_code":"def search(x, seq):\n largest=seq[0]\n for i in range(len(seq)):\n if seq==() or seq==[]:\n return 0 \n if x<=seq[i]:\n return i\n elif x>seq[len(seq)-1]:\n return len(seq)\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1122,"func_code":"def search(x, seq):\n position = 0\n found = False\n \n while position < len(seq) and not found:\n if x > seq[position]:\n found = True\n else:\n position += position\n \n return position\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1123,"func_code":"def search(x, seq):\n position = 0\n found = False\n \n while position < len(seq) and not found:\n if x < seq[position]:\n found = True\n else:\n position += position\n \n return position\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1124,"func_code":"def search(x, seq):\n position = 0\n found = False\n \n while position < len(seq) and not found:\n if x < seq[position]:\n found = True\n else:\n position += 1\n \n return position\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1125,"func_code":"def search(x, seq):\n if type(seq) == tuple:\n new_seq = list(seq)\n sort = []\n for i in range(len(new_seq)):\n if new_seq[i]<=x:\n sort.append(new_seq[i])\n else: \n sort.append(x)\n sort.extend(new_seq[i:])\n break\n return sort\n else:\n sort = []\n for i in range(len(seq)):\n if seq[i]<=x:\n sort.append(seq[i])\n else: \n sort.append(x)\n sort.extend(seq[i:])\n break\n return sort\n\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1126,"func_code":"def search(x, seq):\n if x <= seq[0]:\n return 0\n elif x >= seq[-1]:\n return len(seq)\n else:\n for i in range(0, len(seq)-1):\n if seq[i] <= x <= seq[i+1]:\n return i+1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1127,"func_code":"def search(x, seq):\n if x <= seq[0]:\n return 0\n elif x >= seq[-1]:\n return len(seq)\n elif seq == ():\n return 0\n else:\n for i in range(0, len(seq)-1):\n if seq[i] <= x <= seq[i+1]:\n return i+1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1128,"func_code":"def search(x, seq):\n if x <= seq[0]:\n return 0\n elif x >= seq[-1]:\n return len(seq)\n elif len(seq) == 0:\n return 0\n else:\n for i in range(0, len(seq)-1):\n if seq[i] <= x <= seq[i+1]:\n return i+1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1129,"func_code":"def search(x, seq):\n if len(seq) == 0:\n return 0\n if x <= seq[0]:\n return 0\n elif x >= seq[-1]:\n return len(seq)\n else:\n for i in range(0, len(seq)-1):\n if seq[i] <= x <= seq[i+1]:\n return i+1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1130,"func_code":"def search(x, seq):\n if len(seq)==0:\n return 0\n else:\n if x <= seq[0]:\n return 0\n elif x >= seq[-1]:\n return len(seq)\n else:\n for i in range(0, len(seq)-1):\n if seq[i] <= x <= seq[i+1]:\n return i+1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1131,"func_code":"def search(x, seq):\n if len(seq)==0:\n return 0\n elif x <= seq[0]:\n return 0\n elif x >= seq[-1]:\n return len(seq)\n else:\n for i in range(0, len(seq)-1):\n if seq[i] <= x <= seq[i+1]:\n return i+1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1132,"func_code":"def search(x, seq):\n if len(seq)==0:\n return 0\n elif x <= seq[0]:\n return 0\n elif x >= seq[-1]:\n return len(seq)\n else:\n for i in range(0, len(seq)-1):\n if seq[i] <= x <= seq[i+1]:\n return i+1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1133,"func_code":"def search(x, seq):\n if x <= seq[0] or len(seq)==0:\n return 0\n elif x >= seq[-1]:\n return len(seq)\n else:\n for i in range(0, len(seq)-1):\n if seq[i] <= x <= seq[i+1]:\n return i+1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1134,"func_code":"def search(x, seq):\n if len(seq)==0:\n return 0\n else:\n if x <= seq[0]:\n return 0\n elif x >= seq[-1]:\n return len(seq)\n else:\n for i in range(0, len(seq)-1):\n if seq[i] <= x <= seq[i+1]:\n return i+1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1135,"func_code":"def search(x, seq):\n if seq==():\n return 0\n else:\n if x <= seq[0]:\n return 0\n elif x > seq[-1]:\n return len(seq)\n else:\n for i in range(0, len(seq)-1):\n if seq[i] <= x <= seq[i+1]:\n return i+1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1136,"func_code":"def search(x, seq):\n lst1 = list(seq)\n length = len(lst1)\n lst2 = []\n if x < seq[0]:\n lst2 = [x] + lst1\n elif x > seq[length -1]:\n lst2 = lst1 + [x]\n else:\n for i in range(0, length):\n if seq[i] <= x <= seq[i+1]:\n lst2 = lst1[:i+1] + [x] + lst1[i+1:]\n print(lst2)\n for i in range(len(lst2)):\n if x == lst2[i]:\n return i\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1137,"func_code":"def search(x, seq):\n lst1 = list(seq)\n if lst1 == []:\n return [x]\n else: \n length = len(lst1)\n lst2 = []\n if x < seq[0]:\n lst2 = [x] + lst1\n elif x > seq[length -1]:\n lst2 = lst1 + [x]\n else:\n for i in range(0, length):\n if seq[i] <= x <= seq[i+1]:\n lst2 = lst1[:i+1] + [x] + lst1[i+1:]\n for i in range(len(lst2)):\n if x == lst2[i]:\n return i\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1138,"func_code":"def search(x, seq):\n lst1 = list(seq)\n if lst1 == []:\n return 0\n else: \n length = len(lst1)\n lst2 = []\n if x < seq[0]:\n lst2 = [x] + lst1\n elif x > seq[length -1]:\n lst2 = lst1 + [x]\n else:\n for i in range(0, length):\n if seq[i] <= x <= seq[i+1]:\n lst2 = lst1[:i+1] + [x] + lst1[i+1:]\n for i in range(len(lst2)):\n if x == lst2[i]:\n return i\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1139,"func_code":"def search(x, seq):\n lst1 = list(seq)\n if lst1 == []:\n return 0\n else: \n length = len(lst1)\n lst2 = []\n if x < seq[0]:\n lst2 = [x] + lst1\n elif x > seq[length -1]:\n lst2 = lst1 + [x]\n else:\n for i in range(0, length):\n if seq[i] <= x <= seq[i+1]:\n lst2 = lst1[:i+1] + [x] + lst1[i+1:]\n for i in range(len(lst2)):\n if x == lst2[i]:\n return i\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1140,"func_code":"def search(x, seq):\n lst1 = list(seq)\n if lst1 == []:\n return 0\n else: \n length = len(lst1)\n lst2 = []\n if x < seq[0]:\n lst2 = [x] + lst1\n elif x > seq[length -1]:\n lst2 = lst1 + [x]\n else:\n for i in range(0, length):\n if seq[i] <= x <= seq[i+1]:\n lst2 = lst1[:i+1] + [x] + lst1[i+1:]\n for i in range(len(lst2)):\n if x == lst2[i]:\n return i\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1141,"func_code":"def search(x, seq):\n for i in len(seq):\n if seq[i] < x:\n continue\n else:\n return i-1\n return\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1142,"func_code":"def search(x, seq):\n for i in len(seq):\n if seq[i] < x:\n continue\n else:\n return i-1\n ","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1143,"func_code":"def search(x, seq):\n for i in len(seq):\n if seq[i] < x:\n continue\n else:\n return int(i-1)\n ","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1144,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if seq[i] < x:\n continue\n else:\n return i\n ","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1145,"func_code":"def search(x, seq):\n lst1 = list(seq)\n if lst1 == []:\n i = 0\n else: \n length = len(lst1)\n lst2 = []\n if x < seq[0]:\n lst2 = [x] + lst1\n elif x > seq[length -1]:\n lst2 = lst1 + [x]\n else:\n for i in range(0, length):\n if seq[i] <= x <= seq[i+1]:\n lst2 = lst1[:i+1] + [x] + lst1[i+1:]\n for i in range(len(lst2)):\n if x == lst2[i]:\n return i\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1146,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if seq[i] < x:\n continue\n elif seq[len(seq)-1] < x:\n return len(seq)\n else:\n return i\n ","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1147,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if seq[i] < x:\n continue\n elif seq[len(seq)-1] < x:\n return len(seq)-1\n else:\n return i\n ","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1148,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if seq[i] < x:\n continue\n elif seq[len(seq)] < x:\n return len(seq)\n else:\n return i\n ","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1149,"func_code":"def search(x, seq):\n lst1 = list(seq)\n if lst1 == [] or seq == ():\n i = 0\n else: \n length = len(lst1)\n lst2 = []\n if x < seq[0]:\n lst2 = [x] + lst1\n elif x > seq[length -1]:\n lst2 = lst1 + [x]\n else:\n for i in range(0, length):\n if seq[i] <= x <= seq[i+1]:\n lst2 = lst1[:i+1] + [x] + lst1[i+1:]\n for i in range(len(lst2)):\n if x == lst2[i]:\n return i\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1150,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if seq[i] < x:\n continue\n elif seq[len(seq)] < x:\n return len(seq)+1\n else:\n return i\n ","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1151,"func_code":"def search(x, seq):\n lst1 = list(seq)\n if lst1 == []:\n return 0\n else: \n length = len(lst1)\n lst2 = []\n if x < seq[0]:\n lst2 = [x] + lst1\n elif x > seq[length -1]:\n lst2 = lst1 + [x]\n else:\n for i in range(0, length):\n if seq[i] <= x <= seq[i+1]:\n lst2 = lst1[:i+1] + [x] + lst1[i+1:]\n for i in range(len(lst2)):\n if x == lst2[i]:\n return i\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1152,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if seq[i] < x:\n continue\n elif seq[len(seq)-1] < x:\n return len(seq)-1\n else:\n return i\n ","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1153,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if seq[i] < x:\n continue\n elif seq[len(seq)] < x:\n return len(seq)\n else:\n return i\n ","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1154,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if seq[i] < x:\n continue\n elif x <= seq[i]:\n return i\n else:\n return len(seq)\n ","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1155,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if seq[i] < x:\n continue\n elif x <= seq[i]:\n return i\n else:\n return len(seq)+1\n ","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1156,"func_code":"def search(x, seq):\n lst1 = list(seq)\n if seq == ():\n return 0\n else: \n length = len(lst1)\n lst2 = []\n if x < seq[0]:\n lst2 = [x] + lst1\n elif x > seq[length -1]:\n lst2 = lst1 + [x]\n else:\n for i in range(0, length):\n if seq[i] <= x <= seq[i+1]:\n lst2 = lst1[:i+1] + [x] + lst1[i+1:]\n for i in range(len(lst2)):\n if x == lst2[i]:\n return i\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1157,"func_code":"def search(x, seq):\n lst1 = list(seq)\n if seq == () or seq ==[]:\n return 0\n else: \n length = len(lst1)\n lst2 = []\n if x < seq[0]:\n lst2 = [x] + lst1\n elif x > seq[length -1]:\n lst2 = lst1 + [x]\n else:\n for i in range(0, length):\n if seq[i] <= x <= seq[i+1]:\n lst2 = lst1[:i+1] + [x] + lst1[i+1:]\n for i in range(len(lst2)):\n if x == lst2[i]:\n return i\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1158,"func_code":"def search(x, seq):\n lst1 = list(seq)\n if len(lst1) == 0:\n return 0\n else: \n length = len(lst1)\n lst2 = []\n if x < seq[0]:\n lst2 = [x] + lst1\n elif x > seq[length -1]:\n lst2 = lst1 + [x]\n else:\n for i in range(0, length):\n if seq[i] <= x <= seq[i+1]:\n lst2 = lst1[:i+1] + [x] + lst1[i+1:]\n for i in range(len(lst2)):\n if x == lst2[i]:\n return i\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1159,"func_code":"def search(x, seq):\n lst1 = list(seq)\n if not seq:\n return 0\n else: \n length = len(lst1)\n lst2 = []\n if x < seq[0]:\n lst2 = [x] + lst1\n elif x > seq[length -1]:\n lst2 = lst1 + [x]\n else:\n for i in range(0, length):\n if seq[i] <= x <= seq[i+1]:\n lst2 = lst1[:i+1] + [x] + lst1[i+1:]\n for i in range(len(lst2)):\n if x == lst2[i]:\n return i\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1160,"func_code":"def search(x, seq):\n lst1 = list(seq)\n if len(lst1) == 0:\n return 0\n else: \n length = len(lst1)\n lst2 = []\n if x < seq[0]:\n lst2 = [x] + lst1\n elif x > seq[length -1]:\n lst2 = lst1 + [x]\n else:\n for i in range(0, length):\n if seq[i] <= x <= seq[i+1]:\n lst2 = lst1[:i+1] + [x] + lst1[i+1:]\n for i in range(len(lst2)):\n if x == lst2[i]:\n return i\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1161,"func_code":"def search(x, seq):\n if type(seq) == tuple:\n seq = list(seq)\n seq.append(x)\n a = sorted(seq)\n return a.index(x)\n \n elif type(seq) == list:\n seq.append(x)\n sorted(seq)\n return seq.index(x)\n \n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1162,"func_code":"def search(x, seq):\n n = len(seq)\n for i in range(len(seq)):\n if x < seq[0]:\n return 0\n elif x <= seq[i] and x >= seq[i-1]:\n return i\n elif x > seq[n-1]:\n return n\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1163,"func_code":"def search(x, seq):\n lst1 = list(seq)\n if len(lst1) == 0:\n i = 0\n else: \n length = len(lst1)\n lst2 = []\n if x < seq[0]:\n lst2 = [x] + lst1\n elif x > seq[length -1]:\n lst2 = lst1 + [x]\n else:\n for i in range(0, length):\n if seq[i] <= x <= seq[i+1]:\n lst2 = lst1[:i+1] + [x] + lst1[i+1:]\n for i in range(len(lst2)):\n if x == lst2[i]:\n return i\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1164,"func_code":"\ndef search(x, seq):\n for i in range(len(seq)):\n if x <= seq[i]:\n return i\n elif x >= max(seq):\n return len(seq) \n else:\n continue \n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1165,"func_code":"def search(x, seq):\n if seq == ():\n return\n else:\n for i in range(len(seq)):\n if x <= seq[i]:\n return i\n elif x >= max(seq):\n return len(seq) \n else:\n continue \n\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1166,"func_code":"def search(x, seq):\n if seq == ():\n return ()\n else:\n for i in range(len(seq)):\n if x <= seq[i]:\n return i\n elif x >= max(seq):\n return len(seq) \n else:\n continue \n\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1167,"func_code":"def search(x, seq):\n if seq == ():\n return 0\n else:\n for i in range(len(seq)):\n if x <= seq[i]:\n return i\n elif x >= max(seq):\n return len(seq) \n else:\n continue \n\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1168,"func_code":"def search(x, seq):\n if seq == () or seq == []:\n return 0\n else:\n for i in range(len(seq)):\n if x <= seq[i]:\n return i\n elif x >= max(seq):\n return len(seq) \n else:\n continue \n\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1169,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if x > elem:\n continue\n else:\n return i\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1170,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if x > elem and i < (len(seq)-1):\n continue\n elif x <= elem:\n return i\n else:\n return len(seq)\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1171,"func_code":"def search(x, seq):\n n = len(seq)\n if seq ==():\n return 0\n for i in range(0,n):\n currentvalue = seq[i]\n position = i\n if position >= 0 and x>currentvalue:\n position = i+1\n elif position >= 0 and x<= currentvalue:\n return position\n return position\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1172,"func_code":"def search(x, seq):\n counter=0\n for i in seq:\n if x= x:\n return i\n if seq[len(seq) - 1] < x:\n return len(seq)\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1174,"func_code":"def search(x, seq):\n for i in seq:\n if x <= i:\n return seq.index[i]\n else:\n return (seq.index[-1] + 1)\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1175,"func_code":"def search(x, seq):\n for i in seq:\n if x <= i:\n return seq.index(i)\n elif x > seq[-1]:\n return (seq.index(seq[-1])) + 1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1176,"func_code":"def search(x, seq):\n for i in seq:\n if x <= i:\n return seq.index(i)\n elif x > seq[-1]:\n return (seq.index(seq[-1])) + 1\n elif seq == () or seq == []:\n return 0\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1177,"func_code":"def search(x, seq):\n for i, element in enumerate(seq):\n if x < element:\n return i\n return len(seq)\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1178,"func_code":"def search(x,seq):\n for i, elem in enumerate(seq):\n if x <= elem:\n return i\n else:\n continue\n \n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1179,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if x <= elem:\n return i\n return i + 1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1180,"func_code":"def search(x, seq):\n for i in range(len(seq)-1):\n if x > seq[i]:\n continue\n else:\n return i\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1181,"func_code":"def search(x, seq):\n if x <= elem:\n return i\n return i + 1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1182,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if x <= elem:\n return i\n return i + 1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1183,"func_code":"def search(x, seq):\n for i in range(len(seq)-1):\n if x > seq[i]:\n continue\n elif x <= seq[i]:\n return i\n else:\n return len(seq)\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1184,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq) :\n if x <= elem :\n return i\n return i + 1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1185,"func_code":"def search(x, seq):\n if seq == () :\n return 0 \n for i, elem in enumerate(seq) :\n if x <= elem :\n return i\n return i + 1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1186,"func_code":"def search(x, seq):\n for i in range(len(seq)-1):\n if x >= seq[i] and x <= seq[i+1]:\n break\n return i\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1187,"func_code":"def search(x, seq):\n for i in range(len(seq)-1):\n if x <= seq[i+1]:\n break\n return i\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1188,"func_code":"def search(x, seq):\n for i in range(len(seq)-1):\n if x <= seq[i+1]:\n return i\n return len(seq)\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1189,"func_code":"def search(x, seq):\n for i in range (len(seq)):\n if x <= seq[i]:\n return i\n elif x > seq[len(seq)-1]:\n return len(seq)\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1190,"func_code":"def search(x, seq):\n for i in range (len(seq)):\n if seq == ():\n return \n if x <= seq[i]:\n return i\n elif x > seq[len(seq)-1]:\n return len(seq)\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1191,"func_code":"def search(x, seq):\n for i in range (len(seq)):\n if seq == ():\n return 0\n if x <= seq[i]:\n return i\n elif x > seq[len(seq)-1]:\n return len(seq)\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1192,"func_code":"def search(x, seq):\n if seq == () or []:\n return 0\n for i in range (len(seq)):\n if x <= seq[i]:\n return i\n elif x > seq[len(seq)-1]:\n return len(seq)\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1193,"func_code":"def search(x, seq):\n if seq == () or []:\n return 0\n for i in range (len(seq)):\n if x <= seq[i]:\n return i\n elif x > seq[len(seq)-1]:\n return len(seq)\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1194,"func_code":"def search(x,seq):\n for i, elem in enumerate(seq):\n if x <= elem:\n return i\n else:\n return len(seq)\n \n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1195,"func_code":"def search(x,seq):\n for i,elem in enumerate(seq):\n if x <= elem:\n return i\n else:\n return len(seq)\n \n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1196,"func_code":"def search(x, seq):\n\n for i in seq:\n\n if seq == () or seq == []:\n\n return 0\n\n elif x <= i:\n\n return seq.index(i)\n\n elif x > seq[-1]:\n\n return (seq.index(seq[-1])) + 1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1197,"func_code":"def search(x, seq):\n for i,elem in enumerate(seq):\n if elem>=x:\n return i\n elif i+1==len(seq):\n return len(seq)\n else:\n continue\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1198,"func_code":"def search(x, seq):\n for i,elem in enumerate(seq):\n if seq==() or []:\n return 0\n elif elem>=x:\n return i\n elif i+1==len(seq):\n return len(seq)\n else:\n continue\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1199,"func_code":"def search(x, seq):\n for i,elem in enumerate(seq):\n if len(seq)==0:\n return 0\n elif elem>=x:\n return i\n elif i+1==len(seq):\n return len(seq)\n else:\n continue\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1200,"func_code":"def search(x, seq):\n if type(seq) == tuple:\n for i in range(len(seq)):\n if x <= seq[i]:\n seq = seq[:i] + (x,) + seq[i:]\n elif seq[len(seq)-1] < x:\n seq = seq + (x,)\n\n elif type(seq) == list:\n for i in range(len(seq)):\n if x <= seq[i]:\n seq = seq[:i] + [x,] + seq[i:]\n elif seq[len(seq)-1] < x:\n seq = seq + [x,]\n\n for i in enumerate(seq):\n if x == i[1]:\n return i[0]\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1201,"func_code":"def search(x, seq):\n for i in range(len(seq)-1):\n if x <= seq[i]:\n return i\n else:\n return len(seq)\n \n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1202,"func_code":"def search2(x,seq):\n for i,elem in enumerate(seq):\n counter = 0\n if x<= elem:\n counter = i\n else:\n counter = len(seq)\n return counter\n \n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1203,"func_code":"def search(x,seq):\n for i,elem in enumerate(seq):\n counter = 0\n if x<= elem:\n counter = i\n else:\n counter = len(seq)\n return counter\n \n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1204,"func_code":"def search(x,seq):\n tup = ()\n if type(seq) == tuple:\n for i in seq:\n if i < x:\n tup = tup + (i,)\n else:\n tup = tup + (x,)\n break\n return len(tup) - 1\n \n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1205,"func_code":"def search(x,seq):\n if type(seq) == tuple:\n tup = ()\n for i in seq:\n if i < x:\n tup = tup + (i,)\n else:\n tup = tup + (x,)\n break\n return len(tup) - 1\n \n elif type(seq) == list:\n lst = []\n for i in seq:\n if i < x:\n lst.append(i)\n else:\n lst.append(x)\n break\n return len(lst) - 1\n \n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1206,"func_code":"def search(x,seq):\n if type(seq) == tuple:\n tup = ()\n for i in seq:\n if i < x:\n tup = tup + (i,)\n else:\n tup = tup + (x,)\n break\n return len(tup) - 1\n \n elif type(seq) == list:\n lst = []\n for i in seq:\n if i < x:\n lst.append(i)\n else:\n lst.append(x)\n continue\n return len(lst) - 1\n \n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1207,"func_code":"def search(x, seq):\n a = 0\n for i in seq:\n if i>x:\n a = a+1\n return a\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1208,"func_code":"def search(x,seq):\n if type(seq) == tuple:\n tup = ()\n for i in seq:\n if i < x:\n tup = tup + (i,)\n else:\n tup = tup + (x,)\n break\n return len(tup) - 1\n \n elif type(seq) == list:\n counter = 0\n for i in seq:\n if i < x:\n counter = counter + 1\n return counter\n \n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1209,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if x<=seq[i]:\n return i\n return i+1 \n \n \n \n \n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1210,"func_code":"def search(x, seq):\n if seq==():\n return None\n for i in range(len(seq)):\n if x<=seq[i]:\n return i\n return i+1 \n \n \n \n \n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1211,"func_code":"def search(x, seq):\n if len(seq)==0:\n pass\n for i in range(len(seq)):\n if x<=seq[i]:\n return i\n return i+1 \n \n \n \n \n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1212,"func_code":"def search(x, seq):\n if x < seq[0]:\n return 0\n else:\n y = len(seq)\n for i in range(y-1):\n if x > seq[i] and x <= seq[i+1]:\n return i + 1\n return y\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1213,"func_code":"def search(x, seq):\n y = len(seq)\n if y == 0:\n return None\n if x < seq[0]:\n return 0\n else:\n for i in range(y-1):\n if x > seq[i] and x <= seq[i+1]:\n return i + 1\n return y\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1214,"func_code":"def search(x, seq):\n y = len(seq)\n if y == 0:\n return 1\n else:\n for i in range(y-1):\n if x > seq[i] and x <= seq[i+1]:\n return i + 1\n return y\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1215,"func_code":"def search(x, seq):\n for i in seq:\n if x seq[i] and x < seq[i+1]:\n return i+1\n else:\n return len(seq)\n\n ","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1218,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if x < elem:\n return i\n return len(seq)\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1219,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if seq[i] < x:\n continue\n elif x <= seq[i]:\n return i\n else:\n return len(seq)+1\n ","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1220,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if seq[i] >= x:\n return i\n else:\n return len(seq)\n ","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1221,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if seq[i] >= x:\n return i-1\n else:\n return len(seq)\n ","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1222,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if seq[i] >= x:\n return i\n else:\n return len(seq)\n ","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1223,"func_code":"def search(x, seq):\n if seq == [] or seq == (): \n return 0\n elif len(seq) == 1:\n if seq[0] < x:\n return 0\n else: \n return 1\n elif seq[-1] <= x:\n return len(seq)\n elif seq[0] >= x:\n return 0\n else:\n for i in range(len(seq)):\n if x >= seq[i] and x <= seq[i+1]:\n return i + 1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1224,"func_code":"def search(x, seq):\n if seq == []:\n return 0\n elif len(seq) == 1:\n if seq[0] < x:\n return 0\n else:\n return 1\n elif seq[-1] <= x:\n return len(seq) + 1\n else:\n for i in range(len(seq)):\n if x >= seq[i] and x <= seq[i + 1]:\n return i + 1\n \n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1225,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if seq[i] >= x:\n return i\n return len(seq)\n ","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1226,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if seq[i] >= x:\n return i\n continue\n return len(seq)\n ","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1227,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if seq[i] >= x:\n return i\n continue\n else:\n return len(seq)\n ","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1228,"func_code":"def search(x, seq):\n if x < seq[0]:\n return 0\n elif x > seq[len(seq)-1]:\n return len(seq)\n else:\n product = 0\n for i in range(len(seq)-1):\n if x == seq[i]:\n product = i\n elif (seq[i] <= x and x <= seq[i+1]):\n product = product + i + 1\n return product\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1229,"func_code":"def search(x, seq):\n if seq == []: \n return 0\n elif len(seq) == 1:\n if seq[0] < x:\n return 0\n else: \n return 1\n elif seq[-1] <= x:\n return len(seq)\n elif seq[0] >= x:\n return 0\n else:\n for i in range(len(seq)):\n if x >= seq[i] and x <= seq[i+1]:\n return i + 1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1230,"func_code":"def search(x, seq):\n if seq == [] or seq == (): \n return 0\n elif len(seq) == 1:\n if seq[0] < x:\n return 0\n else: \n return 1\n elif seq[-1] <= x:\n return len(seq)\n elif seq[0] >= x:\n return 0\n else:\n for i in range(len(seq)):\n if x >= seq[i] and x <= seq[i+1]:\n return i + 1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1231,"func_code":"def search(x, seq):\n if seq == ():\n return 0\n elif x < seq[0]:\n return 0\n elif x > seq[len(seq)-1]:\n return len(seq)\n else:\n product = 0\n for i in range(len(seq)-1):\n if x == seq[i]:\n product = i\n elif (seq[i] <= x and x <= seq[i+1]):\n product = product + i + 1\n return product\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1232,"func_code":"def search(x, seq):\n if seq == []: \n return 0\n elif len(seq) == 1:\n if seq[0] < x:\n return 0\n else: \n return 1\n elif seq[-1] <= x:\n return len(seq)\n elif seq[0] >= x:\n return 0\n else:\n for i in range(len(seq)):\n if x >= seq[i] and x <= seq[i+1]:\n return i + 1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1233,"func_code":"def search(x, seq):\n if seq == [] or (): \n return 0\n elif len(seq) == 1:\n if seq[0] < x:\n return 0\n else: \n return 1\n elif seq[-1] <= x:\n return len(seq)\n elif seq[0] >= x:\n return 0\n else:\n for i in range(len(seq)):\n if x >= seq[i] and x <= seq[i+1]:\n return i + 1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1234,"func_code":"def search(x, seq):\n if seq == () or []:\n return 0\n elif x < seq[0]:\n return 0\n elif x > seq[len(seq)-1]:\n return len(seq)\n else:\n product = 0\n for i in range(len(seq)-1):\n if x == seq[i]:\n product = i\n elif (seq[i] <= x and x <= seq[i+1]):\n product = product + i + 1\n return product\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1235,"func_code":"def search(x, seq):\n if seq == [] or seq == (): \n return 0\n elif len(seq) == 1:\n if seq[0] < x:\n return 0\n else: \n return 1\n elif seq[-1] <= x:\n return len(seq)\n elif seq[0] >= x:\n return 0\n else:\n for i in range(len(seq)):\n if x >= seq[i] and x <= seq[i+1]:\n return i + 1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1236,"func_code":"def search(x, seq):\n if x < seq[0]:\n return 0\n else:\n i = 0\n while i in range(len(seq)):\n if x <= seq[i]:\n return i\n elif x > seq[len(seq)-1]:\n return len(seq)\n else:\n i += 1\n return\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1237,"func_code":"def search(x, seq):\n for i, element in enumerate(seq):\n for element in seq:\n if x > element:\n i+=1\n return i\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1238,"func_code":"def search(x, seq):\n if seq == [] or ():\n return 0\n else:\n for i, element in enumerate(seq):\n for element in seq:\n if x > element:\n i+=1\n return i\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1239,"func_code":"def search(x, seq):\n for i, element in enumerate(seq):\n for element in seq:\n if seq == ():\n return 0\n elif x > element:\n i+=1\n return i\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1240,"func_code":"def search(x, seq):\n for i, element in enumerate(seq):\n if seq == ():\n return 0\n else:\n for element in seq:\n if x > element:\n i+=1\n return i\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1241,"func_code":"def search(x, seq):\n if seq == ():\n return 0\n else:\n for i, element in enumerate(seq):\n for element in seq:\n if x > element:\n i+=1\n return i\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1242,"func_code":"def search(x, seq):\n if seq == () or []:\n return 0\n else:\n for i, element in enumerate(seq):\n for element in seq:\n if x > element:\n i+=1\n return i\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1243,"func_code":"def search(x, seq):\n if seq == () or []:\n return 0\n else:\n for i, element in enumerate(seq):\n for element in seq:\n if x > element:\n i+=1\n return i\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1244,"func_code":"def search(x, seq):\n if seq == () and []:\n return 0\n else:\n for i, element in enumerate(seq):\n for element in seq:\n if x > element:\n i+=1\n return i\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1245,"func_code":"def search(x, seq):\n if seq == () or []:\n return 0\n else:\n for i, element in enumerate(seq):\n for element in seq:\n if x > element:\n i+=1\n return i\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1246,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if x <= seq[i]:\n return i\n if x > seq[-1]:\n return len(seq)\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1247,"func_code":"def search(x, seq):\n if seq == []:\n return 0\n for i in range(len(seq)):\n if x <= seq[i]:\n return i\n if x > seq[-1]:\n return len(seq)\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1248,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if x < elem: \n return i\n elif x == elem:\n return i\n elif i == len(seq)-1:\n return i+1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1249,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if x < elem: \n return i\n elif x == elem:\n return i\n elif i == len(seq)-1:\n return i+1\n elif seq == []:\n return 0\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1250,"func_code":"def search(x, seq):\n if seq == []:\n return 0\n else:\n for i, elem in enumerate(seq):\n if x < elem: \n return i\n elif x == elem:\n return i\n elif i == len(seq)-1:\n return i+1\n \n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1251,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if seq[i] > x:\n seq.insert(x, i)\n return seq\n return\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1252,"func_code":"def search(x, seq):\n result = 0\n for i in range(len(seq)):\n if seq[i] > x:\n result = i\n return result\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1253,"func_code":"def search(x, seq):\n result = 0\n for i in range(len(seq)):\n if seq[i] > x:\n result = i\n break\n return result\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1254,"func_code":"def search(x, seq):\n result = 0\n for i in range(len(seq)):\n if seq[i] >= x:\n result = i\n break\n return result\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1255,"func_code":"def search(x, seq):\n if seq==[]:\n return 0\n searchlist = list(enumerate(seq))\n for i in range(len(searchlist)):\n if x <= searchlist[i][1]:\n return searchlist[i][0]\n return i+ 1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1256,"func_code":"def search(x, seq):\n l=len(seq)\n for i in range(l):\n if x<=seq[i]:\n break\n return i\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1257,"func_code":"def search(x, seq):\n l=len(seq)\n for i in range(l+1):\n if x<=seq[i]:\n break\n return i\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1258,"func_code":"def search(x, seq):\n l=len(seq)\n for i in range(l):\n if x<=seq[i]:\n break\n if i==l-1:\n i=i+1\n return i\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1259,"func_code":"def search(x, seq):\n l=len(seq)\n for i in range(l):\n if x<=seq[i]:\n break\n if x>seq[l-1]:\n i=i+1\n return i\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1260,"func_code":"def search(x, seq):\n for i, elem in enumerate (seq):\n if xseq[-1]:\n return len(seq)\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1261,"func_code":"def search(x, seq):\n for i, elem in enumerate (seq):\n if x<=elem:\n return i\n elif x>seq[-1]:\n return len(seq)\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1262,"func_code":"def search(x, seq):\n if seq == () or []:\n return None\n else:\n for i, elem in enumerate (seq):\n if x<=elem:\n return i\n elif x>seq[-1]:\n return len(seq)\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1263,"func_code":"def search(x, seq):\n if seq == () or []:\n return 0\n else:\n for i, elem in enumerate (seq):\n if x<=elem:\n return i\n elif x>seq[-1]:\n return len(seq)\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1264,"func_code":"def search(x, seq):\n length = len(seq)\n for i, elem in enumerate(seq):\n if x < elem:\n return i\n else:\n if x == elem:\n return i\n if (i == length-1):\n return i+1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1265,"func_code":"def search(x, seq):\n seq = tuple(seq)\n if x > seq[len(seq)-1]:\n return len(seq)\n else:\n i = 0\n while i <= len(seq)-1:\n if x <= seq[i]:\n return i\n elif x > seq[i]:\n i += 1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1266,"func_code":"def search(x, seq):\n seq = tuple(seq)\n if x == () or x == []:\n return None\n elif x > seq[len(seq)-1]:\n return len(seq)\n else:\n i = 0\n while i <= len(seq)-1:\n if x <= seq[i]:\n return i\n elif x > seq[i]:\n i += 1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1267,"func_code":"def search(x, seq):\n seq = tuple(seq)\n if x == () or x == []:\n return 0\n elif x > seq[len(seq)-1]:\n return len(seq)\n else:\n i = 0\n while i <= len(seq)-1:\n if x <= seq[i]:\n return i\n elif x > seq[i]:\n i += 1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1268,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if x<= seq[i]:\n return i\n return len(seq)\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1269,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if seq[i] >= x:\n return i\n return len(seq)\n ","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1270,"func_code":"def search(x, seq):\n while (xseq[len(seq)-1]:\n return len(seq)\n for i in range(len(seq)):\n if x>seq[i]:\n continue\n return i\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1278,"func_code":"def search(x, seq):\n if x>seq[len(seq)-1]:\n return len(seq)\n for i in range(len(seq)):\n if x>seq[i]:\n continue\n return i\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1279,"func_code":"def search(x, seq):\n for i in seq:\n if xseq[-1]:\n return (seq.index(seq[-1]))+1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1280,"func_code":"def search(x, seq): \n Index = 0\n for i in range(0,len(seq)+1): \n Index = i\n if int(x) < seq[0]:\n return 0 \n elif int(x)> list1[len(seq)-1]:\n return len(seq) \n elif int(x) > seq[i]:\n continue \n return Index\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1281,"func_code":"def search(x, seq): \n Index = 0\n for i in range(0,len(seq)+1): \n Index = i\n if int(x) < seq[0]:\n return 0 \n elif int(x)> seq[len(seq)-1]:\n return len(seq) \n elif int(x) > seq[i]:\n continue \n return Index\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1282,"func_code":"def search(x, seq):\n if type(seq) == tuple:\n new_seq = list(seq)\n sort = []\n for i in range(len(new_seq)):\n if max(new_seq) < x:\n sort.extend(new_seq)\n sort.append(x)\n elif new_seq[i] >=x: \n sort.append(x)\n sort.extend(new_seq[i:])\n break\n elif new_seq[i]=x: \n sort.append(x)\n sort.extend(seq[i:])\n break\n elif seq[i] seq[len(seq)-1]:\n return len(seq) \n Index = 0\n for i in range(0,len(seq)): \n if int(x)>seq[i]:\n continue\n Index = i\n return Index\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1284,"func_code":"def search(x, seq):\n if x >= seq[len(seq)-1]:\n return len(seq)\n else:\n for i in range(len(seq)):\n if x > seq[i]:\n continue\n else:\n return i\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1285,"func_code":"def search(x, seq):\n if seq == []:\n return 0\n elif x >= seq[len(seq)-1]:\n return len(seq)\n else:\n for i in range(len(seq)):\n if x > seq[i]:\n continue\n else:\n return i\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1286,"func_code":"def search(x, seq):\n if seq == () or []:\n return 0\n for c,value in enumerate(seq):\n if value>=x:\n return(c)\n else:\n return(c+1)\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1287,"func_code":"def search(x, seq):\n for i,elem in enumerate(seq):\n if elemx:\n pos=i\n return pos\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1288,"func_code":"def search(x, seq):\n if x not in seq:\n result = 0 \n elif x > seq[len(seq) - 1]:\n return len(seq)\n else:\n result = 0\n for i, elem in enumerate(seq):\n if x < (elem + 1):\n result = i\n return\n return result \n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1289,"func_code":"def search(x, seq):\n if len(seq) == 0 or x < seq[0] :\n return 0\n elif x > seq[len(seq)-1]:\n return len(seq)\n else:\n result = 0\n for i, element in enumerate(seq):\n if x < (element + 1):\n result = i\n return\n return result\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1290,"func_code":"def search(x, seq):\n counter = -1\n for i in seq:\n if x <= i:\n counter += 1\n return counter\n elif x > i:\n counter += 1\n else:\n counter += 1\n if x > seq[counter]:\n return counter + 1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1291,"func_code":"def search(x, seq):\n counter = -1\n for i in seq:\n if len(seq) == 0:\n return none\n if x <= i:\n counter += 1\n return counter\n elif x > i:\n counter += 1\n else:\n counter += 1\n if x > seq[counter]:\n return counter + 1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1292,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if x <= elem:\n return i\n return i+1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1293,"func_code":"def search(x, seq):\n counter = -1\n for i in seq:\n if len(seq) == 0:\n return 0\n if x <= i:\n counter += 1\n return counter\n elif x > i:\n counter += 1\n else:\n counter += 1\n if x > seq[counter]:\n return counter + 1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1294,"func_code":"def search(x, seq):\n if seq == ():\n return None\n for i, elem in enumerate(seq):\n if x <= elem:\n return i\n return i+1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1295,"func_code":"def search(x, seq):\n if seq == ():\n return ()\n for i, elem in enumerate(seq):\n if x <= elem:\n return i\n return i+1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1296,"func_code":"def search(x, seq):\n counter = -1\n for i in seq:\n if len(seq) == 0:\n return 0\n if x <= i:\n counter += 1\n return counter\n else:\n counter += 1\n if x > seq[counter]:\n return counter + 1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1297,"func_code":"def search(x, seq):\n counter = -1\n for i in seq:\n if len(seq) == 0:\n return 0\n elif x <= i:\n counter += 1\n return counter\n else:\n counter += 1\n if x > seq[counter]:\n return counter + 1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1298,"func_code":"def search(x, seq):\n length = len(seq)\n for i, elem in enumerate(seq):\n if x <= elem:\n return i\n elif i == length-1:\n return length\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1299,"func_code":"def search(x, seq):\n counter = 0\n if len(seq) == 0:\n return 0\n \n for i in seq:\n if x < i:\n counter += 1\n else:\n return counter\n \n return counter\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1300,"func_code":"def search(x, seq):\n counter = 0\n if len(seq) == 0:\n return 0\n \n for i in seq:\n if x < i:\n counter += 1\n else:\n return counter\n \n return counter\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1301,"func_code":"def search(x, seq):\n counter = 0\n if len(seq) == 0:\n return 0\n \n for i in seq:\n if x < i:\n counter += 1\n else:\n return counter\n\n return counter\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1302,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if x <= elem:\n return i\n else:\n return len(seq)\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1303,"func_code":"def search(x, seq):\n counter = 0\n if len(seq) == 0:\n return 0\n\n for i in seq:\n if x < i:\n return counter\n else:\n counter += 1\n\n return counter\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1304,"func_code":"def search(x,seq):\n\n if max(seq) < x:\n\n return len(seq)\n\n if x <= min(seq):\n\n return 0\n\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1305,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if seq[i]>x:\n break\n return i\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1306,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if seq[i]>=x:\n break\n return i\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1307,"func_code":"def search(x, seq):\n for i in range(len(seq)):\n if seq[i]>=x:\n break\n elif seq[-1]=x:\n break\n elif seq[-1] seq[-1]:\n indx = seq.index(seq[-1]) + 1\n else:\n for i in seq:\n if x <= i:\n indx = (seq.index(i))\n break \n return indx\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1310,"func_code":"def search(x, seq):\n if seq == () or []:\n indx = 0\n else:\n if x < seq[0]:\n indx = 0\n elif x > seq[-1]:\n indx = seq.index(seq[-1]) + 1\n else:\n for i in seq:\n if x <= i:\n indx = (seq.index(i))\n break \n return indx\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1311,"func_code":"def search(x, seq):\n if len(seq) == 0:\n indx = 0\n else:\n if x < seq[0]:\n indx = 0\n elif x > seq[-1]:\n indx = seq.index(seq[-1]) + 1\n else:\n for i in seq:\n if x <= i:\n indx = (seq.index(i))\n break \n return indx\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1312,"func_code":"def search(x, seq):\n if len(seq) == 0:\n indx = 0\n else:\n if x < seq[0]:\n indx = 0\n elif x > seq[-1]:\n indx = seq.index(seq[-1]) + 1\n else:\n for i in seq:\n if x <= i:\n indx = (seq.index(i))\n break \n return indx\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1313,"func_code":"def search(x, seq):\n if not seq:\n indx = 0\n else:\n if x < seq[0]:\n indx = 0\n elif x > seq[-1]:\n indx = seq.index(seq[-1]) + 1\n else:\n for i in seq:\n if x <= i:\n indx = (seq.index(i))\n break \n return indx\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1314,"func_code":"def search(x,seq):\n if max(seq) < x:\n return len(seq)\n if x <= min(seq):\n return 0\n \n \n\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1315,"func_code":"def search(x, seq):\n if seq == ():\n return 'empty'\n for i, elem in enumerate(seq):\n if x <= elem:\n return i\n return i+1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1316,"func_code":"def search(x, seq):\n if seq == tuple():\n return 'empty'\n for i, elem in enumerate(seq):\n if x <= elem:\n return i\n return i+1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1317,"func_code":"def search(x, seq):\n if seq == tuple():\n return 'not found'\n for i, elem in enumerate(seq):\n if x <= elem:\n return i\n return i+1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1318,"func_code":"def search(x, seq):\n if seq is ():\n return 'not found'\n for i, elem in enumerate(seq):\n if x <= elem:\n return i\n return i+1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1319,"func_code":"def search(x, seq):\n if seq == ():\n return 0\n if x>seq[len(seq)-1]:\n return len(seq)\n for i in range(len(seq)):\n if x>seq[i]:\n continue\n return i\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1320,"func_code":"def search(x, seq):\n if seq == ():\n return 'not found'\n for i, elem in enumerate(seq):\n if x <= elem:\n return i\n return i+1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1321,"func_code":"def search(x, seq):\n if seq == ():\n return ()\n for i, elem in enumerate(seq):\n if x <= elem:\n return i\n return i+1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1322,"func_code":"def search(x, seq):\n if seq == ():\n return -1\n for i, elem in enumerate(seq):\n if x <= elem:\n return i\n return i+1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1323,"func_code":"def search(x, seq):\n if type(seq) == tuple:\n new_seq = list(seq)\n sort = []\n for i in range(len(new_seq)):\n if max(new_seq) < x:\n sort.extend(new_seq)\n sort.append(x)\n elif new_seq[i] >=x: \n sort.append(x)\n sort.extend(new_seq[i:])\n break\n elif new_seq[i]=x: \n sort.append(x)\n sort.extend(seq[i:])\n break\n elif seq[i]=x: \n sort.append(x)\n sort.extend(new_seq[i:])\n break\n elif new_seq[i]=x: \n sort.append(x)\n sort.extend(seq[i:])\n break\n elif seq[i]x:\n\t\t pos=i\n return pos\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1326,"func_code":"def search(x, seq):\n for i,elem in enumerate(seq):\n\t if elemx:\n\t\t pos=i\n return pos\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1327,"func_code":"def search(x, seq):\n for i,elem in enumerate(seq):\n if elemx:\n pos=i\n return pos\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1328,"func_code":"def search(x, seq):\n if x>=max(seq):\n return len(seq)\n else:\n for i in range(len(seq)):\n if x<=seq[i]:\n return i\n break\n else:\n continue\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1329,"func_code":"def search(x, seq):\n if seq==[] or seq==():\n return 0\n elif x>=max(seq):\n return len(seq)\n else:\n for i in range(len(seq)):\n if x<=seq[i]:\n return i\n break\n else:\n continue\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1330,"func_code":"def search(x,seq):\n if max(seq) < x:\n return len(seq)\n if x <= min(seq):\n return 0\n \n \n \n\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1331,"func_code":"def search(x,seq):\n\n if max(seq) < x:\n\n return len(seq)\n\n if x <= min(seq):\n\n return 0\n\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1332,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if x <= elem:\n return i\n elif i == (len(seq)-1):\n return i+1\n else:\n continue\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1333,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if seq == ():\n return 0\n elif x <= elem:\n return i\n elif i == (len(seq)-1):\n return i+1\n else:\n continue\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1334,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if elem == None:\n return 0\n elif x <= elem:\n return i\n elif i == (len(seq)-1):\n return i+1\n else:\n continue\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1335,"func_code":"def search(x, seq):\n for i, elem in enumerate(seq):\n if seq == False:\n return 0\n elif x <= elem:\n return i\n elif i == (len(seq)-1):\n return i+1\n else:\n continue\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1336,"func_code":"def search(x, seq):\n for eleme in seq:\n if x <= ele:\n break\n position += 1\n return position\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1337,"func_code":"def search(x, seq):\n for elem in seq:\n if x <= elem:\n break\n position += 1\n return position\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1338,"func_code":"def search(x, seq):\n for elem in seq:\n if x <= elem:\n break\n position += 1\n return position\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1339,"func_code":"def search(x, seq):\n if seq == []:\n return 0\n if x < seq[0]:\n return 0\n elif x > seq[len(seq)-1]:\n return len(seq)\n else:\n for i in range(len(seq)-1):\n if seq[i] == x:\n return i+1\n elif seq[i] < x and seq[i+1] > x:\n return i+1\n else:\n return None\n\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1340,"func_code":"def search(x, seq):\n if seq == []:\n return 0\n if x < seq[0]:\n return 0\n elif x > seq[len(seq)-1]:\n return len(seq)\n else:\n for i in range(len(seq)-1):\n if seq[i] == x:\n return i+1\n elif seq[i] < x and seq[i+1] > x:\n return i+1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1341,"func_code":"def search(x, seq):\n if seq == []:\n return 0\n if x < seq[0]:\n return 0\n elif x > seq[len(seq)-1]:\n return len(seq)\n else:\n for i in range(len(seq)-1):\n if seq[i] == x:\n return i\n elif seq[i] < x and seq[i+1] > x:\n return i+1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1342,"func_code":"def search(x, seq):\n if seq == [] or seq == ():\n return 0\n if x < seq[0]:\n return 0\n elif x > seq[len(seq)-1]:\n return len(seq)\n else:\n for i in range(len(seq)-1):\n if seq[i] == x:\n return i\n elif seq[i] < x and seq[i+1] > x:\n return i+1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1343,"func_code":"def search(x, seq):\n if seq == [] or seq == ():\n return 0\n if x < seq[0]:\n return 0\n elif x > seq[len(seq)-1]:\n return len(seq)\n else:\n for i in range(len(seq)-1):\n if seq[i] == x:\n return i\n elif seq[i] <= x and seq[i+1] > x:\n return i+1\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1344,"func_code":"def search(x, seq):\n index = 0\n def helper(index):\n if not seq:\n return 0\n elif x <= seq[index]:\n return index\n else:\n if index + 1 >= len(seq):\n return index + 1\n else:\n return helper(index+1)\n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1345,"func_code":"def search2(x,seq):\n for i,elem in enumerate(seq):\n counter = 0\n if x<= elem:\n counter = i\n else:\n counter = len(seq)\n return counter\n \n","correct":false,"assignment_id":1,"func_name":"search","test":"assert search(42, (-5, 1, 3, 5, 7, 10))==6 and search(42, [1, 5, 10])==3 and search(5, (1, 5, 10))==1 and search(7, [1, 5, 10])==2 and search(3, (1, 5, 10))==1 and search(-5, (1, 5, 10))==0 and search(10, (-5, -1, 3, 5, 7, 10))==5 and search(-100, (-5, -1, 3, 5, 7, 10))==0 and search(0, (-5, -1, 3, 5, 7, 10))==2 and search(100, [])==0 and search(-100, ())==0","description":"Task: Sequential Search"} {"submission_id":1346,"func_code":"def unique_day(day, possible_birthdays):\n count = 0\n for birthday in possible_birthdays:\n if birthday[1] == day:\n count += 1\n return count == 1\n\ndef unique_month(month, possible_birthdays):\n count = 0\n for birthday in possible_birthdays:\n if birthday[0] == month:\n count += 1\n return count == 1\n\ndef contains_unique_day(month, possible_birthdays):\n for birthday in possible_birthdays:\n if birthday[0] == month and unique_day(birthday[1], possible_birthdays):\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1347,"func_code":"def unique_day(day, possible_birthdays):\n all_days = ()\n for i in possible_birthdays:\n all_days += (i[1],)\n return all_days.count(day) == 1\n\ndef unique_month(month, possible_birthdays):\n all_months = ()\n for i in possible_birthdays:\n all_months += (i[0],)\n return all_months.count(month) == 1\n\ndef contains_unique_day(month, possible_birthdays):\n all_day_in_given_month = ()\n for i in possible_birthdays:\n if i[0] == month:\n all_day_in_given_month += (i[1],)\n for i in all_day_in_given_month:\n if unique_day(i, possible_birthdays):\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1348,"func_code":"def unique_day(day, possible_birthdays):\n all_days = ()\n for i in possible_birthdays:\n all_days += (i[1],)\n return all_days.count(day) == 1\n\ndef unique_month(month, possible_birthdays):\n all_months = ()\n for i in possible_birthdays:\n all_months += (i[0],)\n return all_months.count(month) == 1\n\ndef contains_unique_day(month, possible_birthdays):\n all_day_in_given_month = ()\n for i in possible_birthdays:\n if i[0] == month:\n all_day_in_given_month += (i[1],)\n for i in all_day_in_given_month:\n if unique_day(i, possible_birthdays):\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1349,"func_code":"def unique_day(day, possible_birthdays):\n count = 0\n for birthday in possible_birthdays:\n if birthday[1] == day:\n count += 1\n return count == 1\n\ndef unique_month(month, possible_birthdays):\n count = 0\n for birthday in possible_birthdays:\n if birthday[0] == month:\n count += 1\n return count == 1\n\ndef contains_unique_day(month, possible_birthdays):\n for birthday in possible_birthdays:\n if birthday[0] == month:\n if unique_day(birthday[1], possible_birthdays):\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1350,"func_code":"def unique_day(day, possible_birthdays):\n count = 0\n for birthday in possible_birthdays:\n if birthday[1] == day:\n count += 1\n return count == 1\n\ndef unique_month(month, possible_birthdays):\n count = 0\n for birthday in possible_birthdays:\n if birthday[0] == month:\n count += 1\n return count == 1\n\ndef contains_unique_day(month, possible_birthdays):\n for birthday in possible_birthdays:\n if birthday[0] == month:\n if unique_day(birthday[1], possible_birthdays):\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1351,"func_code":"def unique_day(day, possible_birthdays):\n def dayfilter(birthday):\n if birthday[1] == day:\n return True\n else:\n return False\n possible = tuple(filter(dayfilter,possible_birthdays))\n if len(possible) == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n def monthfilter(birthday):\n if birthday[0] == month:\n return True\n else:\n return False\n possible = tuple(filter(monthfilter,possible_birthdays))\n if len(possible) == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n def monthfilter(birthday):\n if birthday[0]==month:\n return True\n else:\n return False\n possible = tuple(filter(monthfilter,possible_birthdays))\n def daymap(birthday):\n return birthday[1]\n possibledays = tuple(map(daymap,possible))\n result = False\n for n in range(0,len(possibledays)):\n if unique_day(possibledays[n],possible_birthdays):\n result = True\n return result\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1352,"func_code":"def unique_day(day, possible_birthdays):\n possible_days = tuple(map(lambda x: x[1], possible_birthdays))\n if possible_days.count(day) == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n possible_months = tuple(map(lambda x: x[0], possible_birthdays))\n if possible_months.count(month) == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n #Gets the unique days in the form (month, days)\n unique_days = tuple(filter(lambda x: unique_day(x[1], possible_birthdays), possible_birthdays))\n for birthday in unique_days:\n if birthday[0] == month:\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1353,"func_code":"def unique_day(date, possible_birthdays):\n count = 0\n for birthday in possible_birthdays:\n if birthday[1] == date:\n count += 1\n return count == 1\n\ndef unique_month(month, possible_birthdays):\n count = 0\n for birthday in possible_birthdays:\n if birthday[0] == month:\n count += 1\n return count == 1\n\ndef contains_unique_day(month, possible_birthdays):\n for birthday in possible_birthdays:\n if birthday[0] == month:\n if unique_day(birthday[1], possible_birthdays):\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1354,"func_code":"def unique_day(date, possible_birthdays):\n count = 0\n for birthday in possible_birthdays:\n if birthday[1] == date:\n count += 1\n return count == 1\n\ndef unique_month(month, possible_birthdays):\n count = 0\n for birthday in possible_birthdays:\n if birthday[0] == month:\n count += 1\n return count == 1\n\ndef contains_unique_day(month, possible_birthdays):\n for birthday in possible_birthdays:\n if birthday[0] == month:\n if unique_day(birthday[1], possible_birthdays):\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1355,"func_code":"def unique_day(day, possible_birthdays):\n return tuple(map(lambda x: x[1], possible_birthdays)).count(day) == 1\n\ndef unique_month(month, possible_birthdays):\n return tuple(map(lambda x: x[0], possible_birthdays)).count(month) == 1\n\ndef contains_unique_day(month, possible_birthdays):\n is_unique_day = tuple((i, unique_day(i, possible_birthdays)) for i in tuple(map(lambda y: y[1], possible_birthdays)))\n is_unique_day_true = tuple(map(lambda c: c[0], tuple(filter(lambda b: b[1] == True, is_unique_day))))\n days_in_month = tuple(map(lambda b: b[1], tuple(filter(lambda d: d[0] == month, possible_birthdays))))\n check_month = tuple(x in days_in_month for x in is_unique_day_true)\n return True in check_month\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1356,"func_code":"def unique_day(day, possible_birthdays):\n counter = 0\n for i in possible_birthdays:\n if day in i:\n counter += 1\n return counter == 1\n\ndef unique_month(month, possible_birthdays):\n counter = 0\n for i in possible_birthdays:\n if month in i:\n counter += 1\n return counter == 1\n\ndef contains_unique_day(month, possible_birthdays):\n daysinmonth =()\n for i in possible_birthdays:\n if month in i:\n daysinmonth += (i[1],)\n for j in daysinmonth:\n if unique_day(j, possible_birthdays):\n return True \n return False \n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1357,"func_code":"def unique_day(day, possible_birthdays):\n counter = 0\n for i in possible_birthdays:\n if day in i:\n counter += 1\n return counter == 1\n\ndef unique_month(month, possible_birthdays):\n counter = 0\n for i in possible_birthdays:\n if month in i:\n counter += 1\n return counter == 1\n\ndef contains_unique_day(month, possible_birthdays):\n daysinmonth =()\n for i in possible_birthdays:\n if month in i:\n daysinmonth += (i[1],)\n for j in daysinmonth:\n if unique_day(j, possible_birthdays):\n return True \n return False \n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1358,"func_code":"def unique_day(day, possible_birthdays):\n count=0\n for i in possible_birthdays:\n if i[1]==day:\n count+=1\n return count==1\n\ndef unique_month(month, possible_birthdays):\n count=0\n for i in possible_birthdays:\n if i[0]==month:\n count+=1\n return count==1\n\ndef contains_unique_day(month, possible_birthdays):\n for i in possible_birthdays:\n if i[0]==month and unique_day(i[1],possible_birthdays):\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1359,"func_code":"def unique_day(day, possible_birthdays):\n count=0\n for i in possible_birthdays:\n if i[1]==day:\n count+=1\n return count==1\n\ndef unique_month(month, possible_birthdays):\n count=0\n for i in possible_birthdays:\n if i[0]==month:\n count+=1\n return count==1\n\ndef contains_unique_day(month, possible_birthdays):\n for i in possible_birthdays:\n if i[0]==month and unique_day(i[1],possible_birthdays):\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1360,"func_code":"def unique_day(day, possible_birthdays):\n \n days = 0 \n \n for i in range(len(possible_birthdays)): #creating the for loop for the range of possible birthdays\n if possible_birthdays[i][1] == day: # looking for the date according to the list\n days = days + 1\n \n if days == 1: #return when the day matches\n return True\n else:\n return False \n \n\n\ndef unique_month(month, possible_birthdays):\n \n months = 0\n for j in range(len(possible_birthdays)): #creating the for loop for the range of possible birthday months \n \n if possible_birthdays[j][0] == month:# looking for the month according to the list\n months = months + 1\n if months == 1: #return when the month matches\n return True\n else:\n return False\n \ndef contains_unique_day(month, possible_birthdays):\n \n tup = () \n \n for k in range(len(possible_birthdays)):\n if possible_birthdays[k][0] == month:\n tup = tup + (possible_birthdays[k],)\n \n for l in range(len(tup)):\n if unique_day(tup[l][1], possible_birthdays):\n return True\n return False \n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1361,"func_code":"def unique_day(day, possible_birthdays):\n count = 0\n days = map(lambda x:x[1], possible_birthdays)\n for i in days:\n if i == day:\n count += 1\n if count != 1:\n return False\n return True\n\ndef unique_month(month, possible_birthdays):\n count = 0\n months = map(lambda x:x[0], possible_birthdays)\n for i in months:\n if i == month:\n count += 1\n if count != 1:\n return False\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n months = map(lambda x:x[0], possible_birthdays)\n for birthday in possible_birthdays:\n if birthday[0] == month:\n if unique_day(birthday[1], possible_birthdays):\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1362,"func_code":"def unique_day(day, possible_birthdays):\n count = 0\n for i in range(len(possible_birthdays)):\n if day == possible_birthdays[i][1]:\n count += 1\n if count == 1:\n return True\n else:\n return False\n \ndef unique_month(month, possible_birthdays):\n count = 0\n for i in range(len(possible_birthdays)):\n if month == possible_birthdays[i][0]:\n count += 1\n if count == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n for date in possible_birthdays:\n if unique_day(date[1], possible_birthdays) == True and month == date[0]:\n return True\n return False \n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1363,"func_code":"def unique_day(day, possible_birthdays):\n count = 0\n for i in range(len(possible_birthdays)):\n if day == possible_birthdays[i][1]:\n count += 1\n if count == 1:\n return True\n else:\n return False\n \ndef unique_month(month, possible_birthdays):\n count = 0\n for i in range(len(possible_birthdays)):\n if month == possible_birthdays[i][0]:\n count += 1\n if count == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n for date in possible_birthdays:\n if unique_day(date[1], possible_birthdays) == True and month == date[0]:\n return True\n return False \n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1364,"func_code":"def unique_day(day, possible_birthdays):\n \n days = 0 \n \n for i in range(len(possible_birthdays)):\n if possible_birthdays[i][1] == day:\n days = days + 1\n \n if days == 1:\n return True\n else:\n return False \n \n\n\ndef unique_month(month, possible_birthdays):\n \n months = 0\n for j in range(len(possible_birthdays)):\n \n if possible_birthdays[j][0] == month:\n months = months + 1\n if months == 1:\n return True\n else:\n return False\n \ndef contains_unique_day(month, possible_birthdays):\n \n x = () \n \n for k in range(len(possible_birthdays)):\n \n if possible_birthdays[k][0] == month:\n \n x = x + (possible_birthdays[k],)\n \n for l in range(len(x)):\n if unique_day(x[l][1], possible_birthdays):\n return True\n else:\n continue\n return False \n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1365,"func_code":"def unique_day(day, possible_birthdays):\n \n days = 0 \n \n for i in range(len(possible_birthdays)): #creating the for loop for the range of possible birthdays\n if possible_birthdays[i][1] == day: # looking for the date according to the list\n days = days + 1\n \n if days == 1: #return when the day matches\n return True\n else:\n return False \n \n\n\ndef unique_month(month, possible_birthdays):\n \n months = 0\n for j in range(len(possible_birthdays)): #creating the for loop for the range of possible birthday months \n \n if possible_birthdays[j][0] == month:# looking for the month according to the list\n months = months + 1\n if months == 1: #return when the month matches\n return True\n else:\n return False\n \ndef contains_unique_day(month, possible_birthdays):\n \n x = () \n \n for k in range(len(possible_birthdays)):\n \n if possible_birthdays[k][0] == month:\n \n x = x + (possible_birthdays[k],)\n \n for l in range(len(x)):\n if unique_day(x[l][1], possible_birthdays):\n return True\n return False \n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1366,"func_code":"def unique_day(day, possible_birthdays):\n \n days = 0 \n \n for i in range(len(possible_birthdays)): #creating the for loop for the range of possible birthdays\n if possible_birthdays[i][1] == day: # looking for the date according to the list\n days = days + 1\n \n if days == 1: #return when the day matches\n return True\n else:\n return False \n \n\n\ndef unique_month(month, possible_birthdays):\n \n months = 0\n for j in range(len(possible_birthdays)): #creating the for loop for the range of possible birthday months \n \n if possible_birthdays[j][0] == month:# looking for the month according to the list\n months = months + 1\n if months == 1: #return when the month matches\n return True\n else:\n return False\n \ndef contains_unique_day(month, possible_birthdays):\n \n tup = () \n \n for k in range(len(possible_birthdays)):\n if possible_birthdays[k][0] == month:\n tup = tup + (possible_birthdays[k],)\n \n for l in range(len(tup)):\n if unique_day(tup[l][1], possible_birthdays):\n return True\n return False \n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1367,"func_code":"def unique_day(day, possible_birthdays):\n count_day = 0\n for i in possible_birthdays:\n if i[1] == day:\n count_day += 1\n if count_day == 1:\n return True\n return False\n\ndef unique_month(month, possible_birthdays):\n count_month = 0\n for i in possible_birthdays:\n if i[0] == month:\n count_month += 1\n if count_month == 1:\n return True\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n possible_days = ()\n for i in possible_birthdays:\n if i[0] == month:\n possible_days += (i[1],)\n for i in possible_days:\n if unique_day(i, possible_birthdays) == True:\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1368,"func_code":"def unique_day(day, possible_birthdays):\n count_day = 0\n for i in possible_birthdays:\n if i[1] == day:\n count_day += 1\n if count_day == 1:\n return True\n return False\n\ndef unique_month(month, possible_birthdays):\n count_month = 0\n for i in possible_birthdays:\n if i[0] == month:\n count_month += 1\n if count_month == 1:\n return True\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n possible_days = ()\n for i in possible_birthdays:\n if i[0] == month:\n possible_days += (i[1],)\n for i in possible_days:\n if unique_day(i, possible_birthdays) == True:\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1369,"func_code":"def unique_day(day, possible_birthdays):\n counter = 0\n for bday in possible_birthdays:\n if day == bday[1]:\n counter += 1 \n if counter == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n counter = 0\n for bday in possible_birthdays:\n if month == bday[0]:\n counter += 1 \n if counter == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n days_in_month = ()\n for bday in possible_birthdays:\n if month == bday[0]:\n days_in_month += (bday[1],)\n for day in days_in_month:\n if unique_day(day, possible_birthdays) == True:\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1370,"func_code":"def unique_day(day, possible_birthdays):\n counter = 0\n for bday in possible_birthdays:\n if day == bday[1]:\n counter += 1 \n if counter == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n counter = 0\n for bday in possible_birthdays:\n if month == bday[0]:\n counter += 1 \n if counter == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n days_in_month = ()\n for bday in possible_birthdays:\n if month == bday[0]:\n days_in_month += (bday[1],)\n for day in days_in_month:\n if unique_day(day, possible_birthdays) == True:\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1371,"func_code":"def unique_day(day, possible_birthdays):\n counter = 0\n for birthday in possible_birthdays:\n counter += 1 if day == birthday[1] else 0\n return (counter == 1)\n\ndef unique_month(month, possible_birthdays):\n counter = 0\n for birthday in possible_birthdays:\n counter += 1 if month == birthday[0] else 0\n return (counter == 1)\n\ndef contains_unique_day(month, possible_birthdays):\n birthdays_in_month = ()\n for birthday in possible_birthdays:\n if birthday[0] == month: birthdays_in_month += (birthday,)\n \n for birthday in birthdays_in_month:\n if unique_day(birthday[1], possible_birthdays):\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1372,"func_code":"def unique_day(day, possible_birthdays):\n counter = 0\n for birthday in possible_birthdays:\n counter += 1 if day == birthday[1] else 0\n return (counter == 1)\n\ndef unique_month(month, possible_birthdays):\n counter = 0\n for birthday in possible_birthdays:\n counter += 1 if month == birthday[0] else 0\n return (counter == 1)\n\ndef contains_unique_day(month, possible_birthdays):\n birthdays_in_month = ()\n for birthday in possible_birthdays:\n if birthday[0] == month: birthdays_in_month += (birthday,)\n \n for birthday in birthdays_in_month:\n if unique_day(birthday[1], possible_birthdays):\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1373,"func_code":"def unique_day(day, possible_birthdays):\n counter = 0\n for dates in possible_birthdays:\n if day in dates:\n counter += 1\n if counter == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n counter = 0\n for dates in possible_birthdays:\n if month in dates:\n counter += 1\n if counter == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n counter = 0\n filtered_dates = ()\n for dates in possible_birthdays:\n if month in dates:\n filtered_dates += (dates,)\n for date in filtered_dates:\n if unique_day(date[1], possible_birthdays):\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1374,"func_code":"def unique_day(day, possible_birthdays):\n counter = 0\n for dates in possible_birthdays:\n if day in dates:\n counter += 1\n if counter == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n counter = 0\n for dates in possible_birthdays:\n if month in dates:\n counter += 1\n if counter == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n counter = 0\n filtered_dates = ()\n for dates in possible_birthdays:\n if month in dates:\n filtered_dates += (dates,)\n for date in filtered_dates:\n if unique_day(date[1], possible_birthdays):\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1375,"func_code":"def unique_day(day, possible_birthdays):\n tup = ()\n for i in possible_birthdays:\n if i[1] == day:\n tup += (i[1],)\n if len(tup) == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n tup = ()\n for i in possible_birthdays:\n if i[0] == month:\n tup += (i[0],)\n if len(tup) == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n tup = ()\n for date in possible_birthdays:\n if date[0] == month:\n tup += (date,)\n for bday in tup:\n if unique_day(bday[1], possible_birthdays):\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1376,"func_code":"def unique_day(day, possible_birthdays):\n \n days = 0 \n \n for i in range(len(possible_birthdays)): #creating the for loop for the range of possible birthdays\n if possible_birthdays[i][1] == day: # looking for the date according to the list\n days = days + 1\n \n if days == 1: #return when the day matches\n return True\n else:\n return False \n \n\n\ndef unique_month(month, possible_birthdays):\n \n months = 0\n for j in range(len(possible_birthdays)): #creating the for loop for the range of possible birthday months \n \n if possible_birthdays[j][0] == month:# looking for the month according to the list\n months = months + 1\n if months == 1: #return when the month matches\n return True\n else:\n return False\n \ndef contains_unique_day(month, possible_birthdays):\n \n tup = () \n \n for k in range(len(possible_birthdays)):\n if possible_birthdays[k][0] == month:\n tup = tup + (possible_birthdays[k],)\n \n for l in range(len(tup)):\n if unique_day(tup[l][1], possible_birthdays):\n return True\n return False \n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1377,"func_code":"def unique_day(date, possible_birthdays):\n count = 0\n for tup in possible_birthdays:\n if tup[1] == date:\n count+=1\n return count == 1\n\ndef unique_month(month, possible_birthdays):\n count = 0\n for tup in possible_birthdays:\n if tup[0] == month:\n count+=1\n return count == 1\n\ndef contains_unique_day(month, possible_birthdays):\n month_tup = ()\n for tup in possible_birthdays:\n if month in tup:\n month_tup += (tup,)\n for tup in month_tup:\n if unique_day(tup[1],possible_birthdays):\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1378,"func_code":"def unique_day(day, possible_birthdays):\n count = 0\n for possible_birthday in possible_birthdays:\n if possible_birthday[1] == day:\n count += 1\n continue\n if count == 1:\n return True\n return False\n\ndef unique_month(month, possible_birthdays):\n count = 0\n for possible_birthday in possible_birthdays:\n if possible_birthday[0] == month:\n count += 1\n continue\n if count == 1:\n return True\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n days_in_month = ()\n for possible_birthday in possible_birthdays:\n if possible_birthday[0] == month:\n days_in_month += (possible_birthday[1],)\n continue\n for day in days_in_month:\n if unique_day(day, possible_birthdays) == True:\n return True\n continue\n return False \n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1379,"func_code":"def unique_day(date, possible_birthdays):\n flag = 0\n for i in possible_birthdays:\n if i[1] == date:\n flag += 1\n\n return True if flag == 1 else False\n\ndef unique_month(month, possible_birthdays):\n flag = 0\n for i in possible_birthdays:\n if i[0] == month:\n flag += 1\n\n return True if flag == 1 else False\n\ndef contains_unique_day(month, possible_birthdays):\n flag = 0\n unique_days = []\n\n for i in possible_birthdays:\n if i[1] not in unique_days:\n unique_days.append(i[1])\n else:\n unique_days.remove(i[1])\n\n for i in possible_birthdays:\n if i[0] == month and i[1] in unique_days:\n return True\n\n return False \n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1380,"func_code":"def unique_day(date, possible_birthdays):\n flag = 0\n for i in possible_birthdays:\n if i[1] == date:\n flag += 1\n\n return True if flag == 1 else False\n\ndef unique_month(month, possible_birthdays):\n flag = 0\n for i in possible_birthdays:\n if i[0] == month:\n flag += 1\n\n return True if flag == 1 else False\n\ndef contains_unique_day(month, possible_birthdays):\n flag = 0\n unique_days = []\n\n for i in possible_birthdays:\n if i[1] not in unique_days:\n unique_days.append(i[1])\n else:\n unique_days.remove(i[1])\n\n for i in possible_birthdays:\n if i[0] == month and i[1] in unique_days:\n return True\n\n return False \n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1381,"func_code":"def unique_day(day, possible_birthdays):\n count = 0\n for possible_birthday in possible_birthdays:\n if possible_birthday[1] == day:\n count += 1\n continue\n if count == 1:\n return True\n return False\n\ndef unique_month(month, possible_birthdays):\n count = 0\n for possible_birthday in possible_birthdays:\n if possible_birthday[0] == month:\n count += 1\n continue\n if count == 1:\n return True\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n days_in_month = ()\n for possible_birthday in possible_birthdays:\n if possible_birthday[0] == month:\n days_in_month += (possible_birthday[1],)\n continue\n for day in days_in_month:\n if unique_day(day, possible_birthdays) == True:\n return True\n continue\n return False \n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1382,"func_code":"def unique_day(day, possible_birthdays):\n result = 0\n for bday in possible_birthdays:\n if bday[1] == day:\n result += 1\n return result == 1\ndef unique_month(month, possible_birthdays):\n result = 0\n for bday in possible_birthdays:\n if bday[0] == month:\n result += 1\n return result == 1\ndef contains_unique_day(month, possible_birthdays):\n filter_month = tuple(filter(lambda x: x[0] == month, possible_birthdays))\n for day in filter_month:\n if unique_day(day[1], possible_birthdays):\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1383,"func_code":"def unique_day(day, possible_birthdays):\n counter = 0\n for birthday in possible_birthdays:\n if day == birthday[1]:\n counter += 1\n return counter == 1\n\ndef unique_month(month, possible_birthdays):\n counter = 0\n for birthday in possible_birthdays:\n if month == birthday[0]:\n counter += 1\n return counter == 1\n \ndef contains_unique_day(month, possible_birthdays):\n for birthday in possible_birthdays:\n if birthday[0] == month and unique_day(birthday[1], possible_birthdays) == True:\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1384,"func_code":"def unique_day(day, possible_birthdays):\n counter = 0\n for birthday in possible_birthdays:\n if day == birthday[1]:\n counter += 1\n return counter == 1\n\ndef unique_month(month, possible_birthdays):\n counter = 0\n for birthday in possible_birthdays:\n if month == birthday[0]:\n counter += 1\n return counter == 1\n \ndef contains_unique_day(month, possible_birthdays):\n for birthday in possible_birthdays:\n if birthday[0] == month and unique_day(birthday[1], possible_birthdays) == True:\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1385,"func_code":"def unique_day(day, possible_birthdays):\n day_count = 0\n for birthday in possible_birthdays:\n if birthday[1] == day:\n day_count = day_count + 1\n if day_count > 1:\n break\n if day_count == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n month_count = 0\n for birthday in possible_birthdays:\n if birthday[0] == month:\n month_count = month_count + 1\n if month_count > 1:\n break\n if month_count == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n has_unique_day = 0\n for birthday in possible_birthdays:\n if birthday[0] == month:\n if unique_day(birthday[1], possible_birthdays):\n has_unique_day = 1\n break\n if has_unique_day:\n return True\n else:\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1386,"func_code":"def unique_day(day, possible_birthdays):\n day_count = 0\n for birthday in possible_birthdays:\n if birthday[1] == day:\n day_count = day_count + 1\n if day_count > 1:\n break\n if day_count == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n month_count = 0\n for birthday in possible_birthdays:\n if birthday[0] == month:\n month_count = month_count + 1\n if month_count > 1:\n break\n if month_count == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n has_unique_day = 0\n for birthday in possible_birthdays:\n if birthday[0] == month:\n if unique_day(birthday[1], possible_birthdays):\n has_unique_day = 1\n break\n if has_unique_day:\n return True\n else:\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1387,"func_code":"def unique_day(day, possible_birthdays):\n day_count = 0\n for i in possible_birthdays:\n if day in i:\n day_count += 1\n if day_count > 1:\n return False\n if day_count == 0:\n return False \n return True\n\n\ndef unique_month(month, possible_birthdays):\n month_count = 0\n for i in possible_birthdays:\n if month in i:\n month_count += 1\n if month_count > 1:\n return False\n if month_count == 0:\n return False\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n days_in_month = ()\n for i in possible_birthdays:\n if month in i:\n days_in_month += (i[1],)\n for i in days_in_month:\n if unique_day(i, possible_birthdays):\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1388,"func_code":"def unique_day(day, possible_birthdays):\n tup = ()\n for i in possible_birthdays:\n if i[1] == day:\n tup += (i[1],)\n if len(tup) == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n tup = ()\n for i in possible_birthdays:\n if i[0] == month:\n tup += (i[0],)\n if len(tup) == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n tup = ()\n for date in possible_birthdays:\n if date[0] == month:\n tup += (date,)\n for bday in tup:\n if unique_day(bday[1], possible_birthdays):\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1389,"func_code":"def unique_day(date, possible_birthdays):\n num = 0\n for birthday in possible_birthdays:\n if date == birthday[1]:\n num += 1\n return num == 1\n\ndef unique_month(month, possible_birthdays):\n num = 0\n for birthday in possible_birthdays:\n if month == birthday[0]:\n num += 1\n return num == 1\n\ndef contains_unique_day(month, possible_birthdays):\n for birthday in possible_birthdays:\n if month == birthday[0]:\n if unique_day(birthday[1], possible_birthdays):\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1390,"func_code":"def unique_day(day, possible_birthdays):\n tup = ()\n for i in possible_birthdays:\n if i[1] == day:\n tup += (i[1],)\n if len(tup) == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n tup = ()\n for i in possible_birthdays:\n if i[0] == month:\n tup += (i[0],)\n if len(tup) == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n tup = ()\n for date in possible_birthdays:\n if date[0] == month:\n tup += (date,)\n for bday in tup:\n if unique_day(bday[1], possible_birthdays):\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1391,"func_code":"def unique_day(date, possible_birthdays):\n num = 0\n for birthday in possible_birthdays:\n if date == birthday[1]:\n num += 1\n return num == 1\n\ndef unique_month(month, possible_birthdays):\n num = 0\n for birthday in possible_birthdays:\n if month == birthday[0]:\n num += 1\n return num == 1\n\ndef contains_unique_day(month, possible_birthdays):\n for birthday in possible_birthdays:\n if month == birthday[0]:\n if unique_day(birthday[1], possible_birthdays):\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1392,"func_code":"def unique_day(day, possible_birthdays):\n counter = 0\n for date in possible_birthdays:\n if day in date:\n counter += 1\n if counter != 1:\n return False\n return True\n\ndef unique_month(month, possible_birthdays):\n counter = 0\n for date in possible_birthdays:\n if month in date:\n counter += 1\n return True if counter ==1 else False\n\ndef contains_unique_day(month, possible_birthdays):\n contains = ()\n for date in possible_birthdays:\n if month in date and unique_day(date[1],possible_birthdays):\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1393,"func_code":"def unique_day(day, possible_birthdays):\n counter = 0\n for date in possible_birthdays:\n if day in date:\n counter += 1\n if counter != 1:\n return False\n return True\n\ndef unique_month(month, possible_birthdays):\n counter = 0\n for date in possible_birthdays:\n if month in date:\n counter += 1\n return True if counter ==1 else False\n\ndef contains_unique_day(month, possible_birthdays):\n contains = ()\n for date in possible_birthdays:\n if month in date and unique_day(date[1],possible_birthdays):\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1394,"func_code":"def unique_day(day, possible_birthdays):\n days = ()\n for birthdays in possible_birthdays:\n days += (birthdays[1],)\n a = 0\n for dates in days:\n if day == dates:\n a +=1\n if a !=1:\n return False\n return True\n\ndef unique_month(month, possible_birthdays):\n months = ()\n for birthdays in possible_birthdays:\n months += (birthdays[0],)\n a = 0\n for dates in months:\n if month == dates:\n a +=1\n if a !=1:\n return False\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n dates =()\n for birthdays in possible_birthdays:\n if unique_day(birthdays[1], possible_birthdays):\n dates += (birthdays[0],)\n for days in dates:\n if month in dates:\n return True\n break\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1395,"func_code":"def unique_day(day, possible_birthdays):\n days = ()\n for birthdays in possible_birthdays:\n days += (birthdays[1],)\n a = 0\n for dates in days:\n if day == dates:\n a +=1\n if a !=1:\n return False\n return True\n\ndef unique_month(month, possible_birthdays):\n months = ()\n for birthdays in possible_birthdays:\n months += (birthdays[0],)\n a = 0\n for dates in months:\n if month == dates:\n a +=1\n if a !=1:\n return False\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n dates =()\n for birthdays in possible_birthdays:\n if unique_day(birthdays[1], possible_birthdays):\n dates += (birthdays[0],)\n for days in dates:\n if month in dates:\n return True\n break\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1396,"func_code":"def unique_day(day, possible_birthdays):\n freq=0\n for birthday in possible_birthdays:\n if birthday[1]==day:\n freq=freq+1\n else:\n continue\n if freq==1:\n return True\n else:\n return False\n\n\ndef unique_month(month, possible_birthdays):\n freq=0\n for birthday in possible_birthdays:\n if birthday[0]==month:\n freq=freq+1\n else:\n continue\n if freq==1:\n return True\n else:\n return False\n\n\ndef contains_unique_day(month, possible_birthdays):\n for birthday in possible_birthdays:\n if birthday[0]==month:\n if unique_day(birthday[1], possible_birthdays)==True:\n return True\n break\n \n return False\n \n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1397,"func_code":"def unique_day(day, possible_birthdays):\n count = 0\n for birthday in possible_birthdays:\n if birthday[1] == day:\n count += 1\n if count == 1:\n return True\n return False\n\ndef unique_month(month, possible_birthdays):\n count = 0\n for birthday in possible_birthdays:\n if birthday[0] == month:\n count += 1\n if count == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n result = ()\n for birthday in possible_birthdays:\n if birthday[0] == month:\n result += (unique_day(birthday[1], possible_birthdays),)\n if any(result):\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1398,"func_code":"def unique_day(day, possible_birthdays):\n count = 0\n for birthday in possible_birthdays:\n if birthday[1] == day:\n count += 1\n if count == 1:\n return True\n return False\n\ndef unique_month(month, possible_birthdays):\n count = 0\n for birthday in possible_birthdays:\n if birthday[0] == month:\n count += 1\n if count == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n result = ()\n for birthday in possible_birthdays:\n if birthday[0] == month:\n result += (unique_day(birthday[1], possible_birthdays),)\n if any(result):\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1399,"func_code":"def unique_day(day, possible_birthdays):\n day_count = 0\n for i in possible_birthdays:\n if day in i:\n day_count += 1\n if day_count > 1:\n return False\n if day_count == 0:\n return False \n return True\n\n\ndef unique_month(month, possible_birthdays):\n month_count = 0\n for i in possible_birthdays:\n if month in i:\n month_count += 1\n if month_count > 1:\n return False\n if month_count == 0:\n return False\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n days_in_month = ()\n for i in possible_birthdays:\n if month in i:\n days_in_month += (i[1],)\n for i in days_in_month:\n if unique_day(i, possible_birthdays):\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1400,"func_code":"def filter(pred, seq):\n res = ()\n for ele in seq:\n if pred(ele):\n res = res + (ele, )\n return res\n\ndef unique_day(day, possible_birthdays):\n return len(filter(lambda x:x[1]==day, possible_birthdays)) == 1\n\ndef unique_month(month, possible_birthdays):\n return len(filter(lambda x:x[0]==month, possible_birthdays)) == 1\n\ndef contains_unique_day(month, possible_birthdays):\n bdays_in_mth = filter(lambda x:x[0]==month, possible_birthdays)\n for bday in bdays_in_mth:\n if unique_day(bday[1], possible_birthdays):\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1401,"func_code":"def map(fn, seq):\n res = ()\n for ele in seq:\n res = res + (fn(ele), )\n return res\n\ndef filter(pred, seq):\n res = ()\n for ele in seq:\n if pred(ele):\n res = res + (ele, )\n return res\n \ndef unique_day(day, possible_birthdays):\n possible_days=map(lambda x:x[1],possible_birthdays)\n def count(day,possible_days):\n count_day=0\n for i in possible_days:\n if i==day:\n count_day=count_day+1\n return count_day\n return count(day,possible_days)==1\n\ndef unique_month(month, possible_birthdays):\n possible_months=map(lambda x:x[0],possible_birthdays)\n def count(month,possible_months):\n count_month=0\n for i in possible_months:\n if i==month:\n count_month=count_month+1\n return count_month\n return count(month,possible_months)==1\n\ndef contains_unique_day(month, possible_birthdays):\n tuple_with_unique_day=filter(lambda x:unique_day(x[1],possible_birthdays)==True,possible_birthdays)\n month_with_unique_day=map(lambda x:x[0],tuple_with_unique_day)\n return month in month_with_unique_day\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1402,"func_code":"def unique_day(day, possible_birthdays):\n freq=0\n for birthday in possible_birthdays:\n if birthday[1]==day:\n freq=freq+1\n else:\n continue\n if freq==1:\n return True\n else:\n return False\n\n\ndef unique_month(month, possible_birthdays):\n freq=0\n for birthday in possible_birthdays:\n if birthday[0]==month:\n freq=freq+1\n else:\n continue\n if freq==1:\n return True\n else:\n return False\n\n\ndef contains_unique_day(month, possible_birthdays):\n for birthday in possible_birthdays:\n if birthday[0]==month:\n if unique_day(birthday[1], possible_birthdays)==True:\n return True\n break\n \n return False\n \n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1403,"func_code":"def map(fn, seq):\n res = ()\n for ele in seq:\n res = res + (fn(ele), )\n return res\n\ndef filter(pred, seq):\n res = ()\n for ele in seq:\n if pred(ele):\n res = res + (ele, )\n return res\n \ndef unique_day(day, possible_birthdays):\n possible_days=map(lambda x:x[1],possible_birthdays)\n def count(day,possible_days):\n count_day=0\n for i in possible_days:\n if i==day:\n count_day=count_day+1\n return count_day\n return count(day,possible_days)==1\n\ndef unique_month(month, possible_birthdays):\n possible_months=map(lambda x:x[0],possible_birthdays)\n def count(month,possible_months):\n count_month=0\n for i in possible_months:\n if i==month:\n count_month=count_month+1\n return count_month\n return count(month,possible_months)==1\n\ndef contains_unique_day(month, possible_birthdays):\n tuple_with_unique_day=filter(lambda x:unique_day(x[1],possible_birthdays)==True,possible_birthdays)\n month_with_unique_day=map(lambda x:x[0],tuple_with_unique_day)\n return month in month_with_unique_day\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1404,"func_code":"def unique_day(day, possible_birthdays):\n total_day = 0\n for birthday in possible_birthdays:\n if birthday[1] == day:\n total_day += 1\n if total_day == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n total_month = 0\n for birthday in possible_birthdays:\n if birthday[0] == month:\n total_month += 1\n if total_month == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n for birthday in possible_birthdays:\n if unique_day(birthday[1], possible_birthdays):\n birthday_month = birthday[0]\n if month == birthday_month:\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1405,"func_code":"def unique_day(day, possible_birthdays):\n count = 0\n for x in possible_birthdays:\n if day == x[1]:\n count += 1\n if count == 1:\n return True\n else:\n return False\n \ndef unique_month(month, possible_birthdays):\n count = 0\n for x in possible_birthdays:\n if month == x[0]:\n count += 1\n if count == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n possible_days = ()\n for x in possible_birthdays:\n if x[0] == month:\n possible_days += (x,)\n for day in possible_days:\n if unique_day(day[1], possible_birthdays) == True:\n return True\n else:\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1406,"func_code":"def unique_day(day, possible_birthdays):\n total_day = 0\n for birthday in possible_birthdays:\n if birthday[1] == day:\n total_day += 1\n if total_day == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n total_month = 0\n for birthday in possible_birthdays:\n if birthday[0] == month:\n total_month += 1\n if total_month == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n for birthday in possible_birthdays:\n if unique_day(birthday[1], possible_birthdays):\n birthday_month = birthday[0]\n if month == birthday_month:\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1407,"func_code":"def unique_day(day, possible_birthdays):\n unique = ()\n for birthday in possible_birthdays:\n if day == birthday[1]:\n unique = unique + (day,)\n if len(unique) == 1: \n return True\n return False\n\ndef unique_month(month, possible_birthdays):\n unique = ()\n for birthday in possible_birthdays:\n if month == birthday[0]:\n unique = unique + (month,)\n if len(unique) == 1:\n return True\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n correct_months = ()\n for birthday in possible_birthdays:\n if unique_day(birthday[1], possible_birthdays):\n correct_months = correct_months + (birthday[0],)\n if month in correct_months:\n return True\n return False \n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1408,"func_code":"def unique_day(day, possible_birthdays):\n unique = ()\n for birthday in possible_birthdays:\n if day == birthday[1]:\n unique = unique + (day,)\n if len(unique) == 1: \n return True\n return False\n\ndef unique_month(month, possible_birthdays):\n unique = ()\n for birthday in possible_birthdays:\n if month == birthday[0]:\n unique = unique + (month,)\n if len(unique) == 1:\n return True\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n correct_months = ()\n for birthday in possible_birthdays:\n if unique_day(birthday[1], possible_birthdays):\n correct_months = correct_months + (birthday[0],)\n if month in correct_months:\n return True\n return False \n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1409,"func_code":"def unique_day(day, possible_birthdays):\n unique = ()\n for birthday in possible_birthdays:\n if day == birthday[1]:\n unique = unique + (day,)\n if len(unique) == 1: \n return True\n return False\n\ndef unique_month(month, possible_birthdays):\n unique = ()\n for birthday in possible_birthdays:\n if month == birthday[0]:\n unique = unique + (month,)\n if len(unique) == 1:\n return True\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n correct_months = ()\n for birthday in possible_birthdays:\n if unique_day(birthday[1], possible_birthdays):\n correct_months = correct_months + (birthday[0],)\n if month in correct_months:\n return True\n return False \n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1410,"func_code":"def unique_day(date, possible_birthdays):\n count = 0\n for i in range(len(possible_birthdays)):\n if possible_birthdays[i][1] == date:\n count += 1\n if count == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n count = 0\n for i in range(len(possible_birthdays)):\n if possible_birthdays[i][0] == month:\n count += 1\n if count == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n for i in range(len(possible_birthdays)):\n if possible_birthdays[i][0] == month and unique_day(possible_birthdays[i][1], possible_birthdays) == True:\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1411,"func_code":"def unique_day(date, possible_birthdays):\n count = 0\n for i in range(len(possible_birthdays)):\n if possible_birthdays[i][1] == date:\n count += 1\n if count == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n count = 0\n for i in range(len(possible_birthdays)):\n if possible_birthdays[i][0] == month:\n count += 1\n if count == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n for i in range(len(possible_birthdays)):\n if possible_birthdays[i][0] == month and unique_day(possible_birthdays[i][1], possible_birthdays) == True:\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1412,"func_code":"def unique_day(date, possible_birthdays):\n count = 0\n for i in range(len(possible_birthdays)):\n if possible_birthdays[i][1] == date:\n count += 1\n if count == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n count = 0\n for i in range(len(possible_birthdays)):\n if possible_birthdays[i][0] == month:\n count += 1\n if count == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n for i in range(len(possible_birthdays)):\n if possible_birthdays[i][0] == month and unique_day(possible_birthdays[i][1], possible_birthdays) == True:\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1413,"func_code":"def unique_day(day, possible_birthdays):\n count = 0\n for possible_birthday in possible_birthdays:\n if day == possible_birthday[1]:\n count += 1\n return count == 1\n\ndef unique_month(month, possible_birthdays):\n count = 0\n for possible_birthday in possible_birthdays:\n if month == possible_birthday[0]:\n count += 1\n return count == 1\n\ndef contains_unique_day(month, possible_birthdays):\n for possible_birthday in possible_birthdays:\n if month == possible_birthday[0] and unique_day(possible_birthday[1], possible_birthdays):\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1414,"func_code":"def unique_day(day, possible_birthdays):\n count = 0\n for possible_birthday in possible_birthdays:\n if day == possible_birthday[1]:\n count += 1\n return count == 1\n\ndef unique_month(month, possible_birthdays):\n count = 0\n for possible_birthday in possible_birthdays:\n if month == possible_birthday[0]:\n count += 1\n return count == 1\n\ndef contains_unique_day(month, possible_birthdays):\n for possible_birthday in possible_birthdays:\n if month == possible_birthday[0] and unique_day(possible_birthday[1], possible_birthdays):\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1415,"func_code":"def unique_day(day, possible_birthdays):\n days = tuple(map(lambda x: x[1],possible_birthdays))\n count = 0\n for i in days:\n if i == day:\n count = count+1\n return count == 1\n\ndef unique_month(month, possible_birthdays):\n months = tuple(map(lambda x: x[0],possible_birthdays))\n count = 0\n for i in months:\n if i == month:\n count = count +1\n return count ==1\n \ndef contains_unique_day(month, possible_birthdays):\n specific_set = tuple(filter(lambda x: x[0] == month, possible_birthdays))\n get_days = tuple(map(lambda x: x[1],specific_set))\n ans = tuple(map(lambda x: unique_day(x,possible_birthdays),get_days))\n if True in ans:\n return True\n else:\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1416,"func_code":"def unique_day(day, possible_birthdays):\n counter = 0\n for dates in possible_birthdays:\n if day == dates[1]:\n possible_birthdays = possible_birthdays[1:]\n counter = counter + 1 \n if counter == 1:\n return True\n else:\n return False \n return\n\ndef unique_month(month, possible_birthdays):\n counter = 0\n for dates in possible_birthdays:\n if month == dates[0]:\n possible_birthdays = possible_birthdays[1:]\n counter = counter + 1 \n if counter == 1:\n return True\n else:\n return False \n\ndef keep_month(month,possible_birthdays):\n new_list = ()\n for date in possible_birthdays:\n if month == date[0]:\n new_list = new_list + (date,)\n return new_list\n\n\n\ndef contains_unique_day(month, possible_birthdays):\n counter = 0\n revised_list = keep_month(month,possible_birthdays)\n for i in revised_list:\n if unique_day(i[1], possible_birthdays) == True:\n return True\n\n return False \n\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1417,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n \ndef unique_day(date, possible_birthdays):\n if count_dates(date, possible_birthdays) == 1:\n return True\n else:\n return False\n \ndef count_months(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n count += 1\n return count\n \ndef unique_month(month, possible_birthdays):\n if count_months(month, possible_birthdays) == 1:\n return True\n else:\n return False\n\ndef days(month, possible_birthdays):\n days_in_month = ()\n for i in range(len(possible_birthdays)):\n if possible_birthdays[i][0] == month:\n days_in_month += (possible_birthdays[i],)\n return days_in_month\n\ndef contains_unique_day(month, possible_birthdays):\n for x in range(len(days(month, possible_birthdays))):\n if unique_day(days(month, possible_birthdays)[x][1], possible_birthdays):\n return True\n elif unique_day(days(month, possible_birthdays)[len(days(month, possible_birthdays))-1][1], possible_birthdays) == False:\n return False\n \n \n \n \n \n \n \n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1418,"func_code":"def unique_day(day, possible_birthdays):\n counter = 0\n for dates in possible_birthdays:\n if day == dates[1]:\n possible_birthdays = possible_birthdays[1:]\n counter = counter + 1 \n if counter == 1:\n return True\n else:\n return False \n return\n\ndef unique_month(month, possible_birthdays):\n counter = 0\n for dates in possible_birthdays:\n if month == dates[0]:\n possible_birthdays = possible_birthdays[1:]\n counter = counter + 1 \n if counter == 1:\n return True\n else:\n return False \n\ndef keep_month(month,possible_birthdays):\n new_list = ()\n for date in possible_birthdays:\n if month == date[0]:\n new_list = new_list + (date,)\n return new_list\n\n\n\ndef contains_unique_day(month, possible_birthdays):\n counter = 0\n revised_list = keep_month(month,possible_birthdays)\n for i in revised_list:\n if unique_day(i[1], possible_birthdays) == True:\n return True\n\n return False \n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1419,"func_code":"def unique_day(day, possible_birthdays):\n counter = 0\n for dates in possible_birthdays:\n if day == dates[1]:\n possible_birthdays = possible_birthdays[1:]\n counter = counter + 1 \n if counter == 1:\n return True\n else:\n return False \n return\n\ndef unique_month(month, possible_birthdays):\n counter = 0\n for dates in possible_birthdays:\n if month == dates[0]:\n possible_birthdays = possible_birthdays[1:]\n counter = counter + 1 \n if counter == 1:\n return True\n else:\n return False \n\ndef keep_month(month,possible_birthdays):\n new_list = ()\n for date in possible_birthdays:\n if month == date[0]:\n new_list = new_list + (date,)\n return new_list\n\n\n\ndef contains_unique_day(month, possible_birthdays):\n counter = 0\n revised_list = keep_month(month,possible_birthdays)\n for i in revised_list:\n if unique_day(i[1], possible_birthdays) == True:\n return True\n\n return False \n\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1420,"func_code":"def unique_day(day, possible_birthdays):\n counter = 0\n for i in possible_birthdays:\n if day in i:\n counter += 1\n return True if counter == 1 else False\n\ndef unique_month(month, possible_birthdays):\n counter = 0\n for i in possible_birthdays:\n if month in i:\n counter += 1\n return True if counter == 1 else False\n\ndef contains_unique_day(month, possible_birthdays):\n counter = 0\n result = False\n for i in possible_birthdays:\n if month == i[0]:\n result = result or unique_day(i[1], possible_birthdays)\n return result\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1421,"func_code":"def unique_day(day, possible_birthdays):\n counter = 0\n for i in possible_birthdays:\n if day in i:\n counter += 1\n return True if counter == 1 else False\n\ndef unique_month(month, possible_birthdays):\n counter = 0\n for i in possible_birthdays:\n if month in i:\n counter += 1\n return True if counter == 1 else False\n\ndef contains_unique_day(month, possible_birthdays):\n counter = 0\n result = False\n for i in possible_birthdays:\n if month == i[0]:\n result = result or unique_day(i[1], possible_birthdays)\n return result\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1422,"func_code":"def unique_day(day, possible_birthdays):\n count = 0\n for birthday in possible_birthdays:\n if birthday[1] == day:\n count += 1\n if count == 1:\n return True\n return False\n\ndef unique_month(month, possible_birthdays):\n count = 0\n for birthday in possible_birthdays:\n if birthday[0] == month:\n count += 1\n if count == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n result = ()\n for birthday in possible_birthdays:\n if birthday[0] == month:\n result += (unique_day(birthday[1], possible_birthdays),)\n if any(result):\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1423,"func_code":"def unique_day(date, possible_birthdays):\n tester = 0\n for i in possible_birthdays:\n if date == i[1]:\n if tester:\n return False\n else:\n tester = 1\n return tester\n\ndef unique_month(month, possible_birthdays):\n tester = 0\n for i in possible_birthdays:\n if month == i[0]:\n if tester:\n return False\n else:\n tester = 1\n return tester\n\ndef contains_unique_day(month, possible_birthdays):\n for i in possible_birthdays:\n if month == i[0]:\n if unique_day(i[1], possible_birthdays):\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1424,"func_code":"def unique_day(day, possible_birthdays):\n unique_day_counter = 0\n for i in possible_birthdays:\n if day == i[1]:\n unique_day_counter += 1\n if unique_day_counter != 1:\n return False\n return True\n\ndef unique_month(month, possible_birthdays):\n unique_month_counter = 0\n for i in possible_birthdays:\n if month == i[0]:\n unique_month_counter += 1\n if unique_month_counter != 1:\n return False\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n days = ()\n true_false = ()\n for i in possible_birthdays:\n if month == i[0]:\n days += (i[1], )\n\n for j in days:\n if unique_day(j, possible_birthdays):\n true_false += ('True', )\n else:\n true_false += ('False', )\n if 'True' in true_false:\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1425,"func_code":"def unique_day(day, possible_birthdays):\n unique_day_counter = 0\n for i in possible_birthdays:\n if day == i[1]:\n unique_day_counter += 1\n if unique_day_counter != 1:\n return False\n return True\n\ndef unique_month(month, possible_birthdays):\n unique_month_counter = 0\n for i in possible_birthdays:\n if month == i[0]:\n unique_month_counter += 1\n if unique_month_counter != 1:\n return False\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n days = ()\n true_false = ()\n for i in possible_birthdays:\n if month == i[0]:\n days += (i[1], )\n\n for j in days:\n if unique_day(j, possible_birthdays):\n true_false += ('True', )\n else:\n true_false += ('False', )\n if 'True' in true_false:\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1426,"func_code":"def unique_day(day, possible_birthdays):\n count = 0\n for birthday in possible_birthdays:\n if day == birthday[1]:\n count += 1\n else:\n continue\n if count == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n count = 0\n for birthday in possible_birthdays:\n if month == birthday[0]:\n count +=1\n else:\n continue\n if count == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n for birthday in possible_birthdays:\n if unique_day(birthday[1],possible_birthdays):\n months = birthday[0]\n if months == month:\n return True\n else:\n continue\n else:\n continue\n return False\n \n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1427,"func_code":"def unique_day(day, possible_birthdays):\n count = 0\n for k in possible_birthdays:\n if k[1] == day:\n count = count + 1\n else:\n continue\n if count == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n count = 0\n for k in possible_birthdays:\n if k[0] == month:\n count = count + 1\n else:\n continue\n if count == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n for k in possible_birthdays:\n if month == k[0] and unique_day(k[1], possible_birthdays)==True:\n return True\n return False\n\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1428,"func_code":"def unique_day(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if date == i[1]:\n count += 1\n return count == 1\n\ndef unique_month(month, possible_birthdays):\n count = 0\n for birthday in possible_birthdays:\n if month == birthday[0]:\n count += 1\n return count == 1\n \ndef contains_unique_day(month, possible_birthdays):\n singlemonthbirthday = ()\n for birthmonth in possible_birthdays:\n if month == birthmonth[0]:\n singlemonthbirthday += (birthmonth,)\n for birthday in singlemonthbirthday:\n if unique_day(birthday[1], possible_birthdays) == True:\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1429,"func_code":"def unique_day(day, possible_birthdays):\n count = 0\n for k in possible_birthdays:\n if k[1] == day:\n count = count + 1\n else:\n continue\n if count == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n count = 0\n for k in possible_birthdays:\n if k[0] == month:\n count = count + 1\n else:\n continue\n if count == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n for k in possible_birthdays:\n if month == k[0] and unique_day(k[1], possible_birthdays)==True:\n return True\n return False\n\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1430,"func_code":"def unique_day(day, possible_birthdays):\n count = 0\n for k in possible_birthdays:\n if k[1] == day:\n count = count + 1\n else:\n continue\n if count == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n count = 0\n for k in possible_birthdays:\n if k[0] == month:\n count = count + 1\n else:\n continue\n if count == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n for k in possible_birthdays:\n if month == k[0] and unique_day(k[1], possible_birthdays)==True:\n return True\n return False\n\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1431,"func_code":"def unique_day(day, possible_birthdays):\n\n count = 0\n\n for i in possible_birthdays:\n if day in i:\n count += 1\n \n if count == 1:\n return True\n else:\n return False\n \n \ndef unique_month(month, possible_birthdays):\n \n count = 0\n\n for i in possible_birthdays:\n if month in i:\n count += 1\n \n if count == 1:\n return True\n else:\n return False\n \ndef contains_unique_day(month, possible_birthdays):\n\n for i in possible_birthdays:\n if month in i:\n if unique_day(i[1],possible_birthdays):\n return True\n\n return False\n \n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1432,"func_code":"def unique_day(day, possible_birthdays):\n value = 0\n for i in range(0, len(possible_birthdays)):\n if (day == possible_birthdays[i][1]):\n value += 1\n if (value > 1) or (value == 0):\n return False\n else:\n return True\n\ndef unique_month(month, possible_birthdays):\n value = 0\n for i in range(0, len(possible_birthdays)):\n if (month == possible_birthdays[i][0]):\n value += 1\n if (value > 1) or (value == 0):\n return False\n else:\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n unique_days = ()\n for i in range(0, len(possible_birthdays)):\n if (unique_day(possible_birthdays[i][1], possible_birthdays) == True):\n unique_days += (possible_birthdays[i][1],)\n for j in range(0, len(unique_days)):\n if ((month, unique_days[j]) in possible_birthdays):\n return True\n return False \n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1433,"func_code":"def unique_day(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if date == i[1]:\n count += 1\n return count == 1\n\ndef unique_month(month, possible_birthdays):\n count = 0\n for birthday in possible_birthdays:\n if month == birthday[0]:\n count += 1\n return count == 1\n \ndef contains_unique_day(month, possible_birthdays):\n singlemonthbirthday = ()\n for birthmonth in possible_birthdays:\n if month == birthmonth[0]:\n singlemonthbirthday += (birthmonth,)\n for birthday in singlemonthbirthday:\n if unique_day(birthday[1], possible_birthdays) == True:\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1434,"func_code":"def unique_day(day, possible_birthdays):\n counter = 0\n for i in possible_birthdays:\n if i[1] == day:\n counter += 1\n if counter == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n counter = 0\n for i in possible_birthdays:\n if i[0] == month:\n counter += 1\n if counter == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n possible_days = ()\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n possible_days += (i,)\n for j in possible_days:\n day = j[1]\n if (unique_day(day, possible_birthdays) == True):\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1435,"func_code":"def unique_day(day, possible_birthdays):\n\n count = 0\n\n for i in possible_birthdays:\n if day in i:\n count += 1\n \n if count == 1:\n return True\n else:\n return False\n \n \ndef unique_month(month, possible_birthdays):\n \n count = 0\n\n for i in possible_birthdays:\n if month in i:\n count += 1\n \n if count == 1:\n return True\n else:\n return False\n \ndef contains_unique_day(month, possible_birthdays):\n\n for i in possible_birthdays:\n if month in i:\n if unique_day(i[1],possible_birthdays):\n return True\n \n else:\n continue\n\n return False\n \n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1436,"func_code":"def unique_day(day, possible_birthdays):\n\n count = 0\n\n for i in possible_birthdays:\n if day in i:\n count += 1\n \n if count == 1:\n return True\n else:\n return False\n \n \ndef unique_month(month, possible_birthdays):\n \n count = 0\n\n for i in possible_birthdays:\n if month in i:\n count += 1\n \n if count == 1:\n return True\n else:\n return False\n \ndef contains_unique_day(month, possible_birthdays):\n\n for i in possible_birthdays:\n if month in i:\n if unique_day(i[1],possible_birthdays):\n return True\n\n return False\n \n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1437,"func_code":"def unique_day(day, possible_birthdays):\n counter = 0\n for i in possible_birthdays:\n if i[1] == day:\n counter += 1\n if counter == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n counter = 0\n for i in possible_birthdays:\n if i[0] == month:\n counter += 1\n if counter == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n possible_days = ()\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n possible_days += (i,)\n for j in possible_days:\n day = j[1]\n if (unique_day(day, possible_birthdays) == True):\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1438,"func_code":"def unique_day(day, possible_birthdays):\n if (tuple(map(lambda x: x[1], possible_birthdays))).count(day) == 1:\n return True\n return False\n\ndef unique_month(month, possible_birthdays):\n if (tuple(map(lambda x: x[0], possible_birthdays))).count(month) == 1:\n return True\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n b =()\n for p in possible_birthdays:\n if month == p[0]:\n b += (p[1],) #tuple of all the days of that month\n for d in b:\n if unique_day(d, possible_birthdays) == False:\n continue\n return True\n return False\n\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1439,"func_code":"def unique_day(day, possible_birthdays):\n if (tuple(map(lambda x: x[1], possible_birthdays))).count(day) == 1:\n return True\n return False\n\ndef unique_month(month, possible_birthdays):\n if (tuple(map(lambda x: x[0], possible_birthdays))).count(month) == 1:\n return True\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n b =()\n for p in possible_birthdays:\n if month == p[0]:\n b += (p[1],) #tuple of all the days of that month\n for d in b:\n if unique_day(d, possible_birthdays) == False:\n continue\n return True\n return False\n\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1440,"func_code":"def unique_day(day, possible_birthdays):\n count = 0\n for possible_dates in possible_birthdays:\n if possible_dates[1] == day:\n count += 1\n if count != 1:\n return False\n return True\n\ndef unique_month(month, possible_birthdays):\n count = 0\n for possible_dates in possible_birthdays:\n if possible_dates[0] == month:\n count += 1\n if count != 1:\n return False\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n possible_days_in_month = ()\n possible_days_in_others = ()\n for possible_dates in possible_birthdays:\n if possible_dates[0] == month:\n possible_days_in_month += (possible_dates[1],)\n else:\n possible_days_in_others += (possible_dates[1],)\n for day_in_month in possible_days_in_month:\n unique = True\n for day_in_others in possible_days_in_others:\n if day_in_month == day_in_others:\n unique = False\n break\n if unique == True:\n return True\n return False \n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1441,"func_code":"def unique_day(day, possible_birthdays):\n count = 0\n for possible_dates in possible_birthdays:\n if possible_dates[1] == day:\n count += 1\n if count != 1:\n return False\n return True\n\ndef unique_month(month, possible_birthdays):\n count = 0\n for possible_dates in possible_birthdays:\n if possible_dates[0] == month:\n count += 1\n if count != 1:\n return False\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n possible_days_in_month = ()\n possible_days_in_others = ()\n for possible_dates in possible_birthdays:\n if possible_dates[0] == month:\n possible_days_in_month += (possible_dates[1],)\n else:\n possible_days_in_others += (possible_dates[1],)\n for day_in_month in possible_days_in_month:\n unique = True\n for day_in_others in possible_days_in_others:\n if day_in_month == day_in_others:\n unique = False\n break\n if unique == True:\n return True\n return False \n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1442,"func_code":"def unique_day(date, possible_birthdays):\n counter=0\n for i in possible_birthdays:\n if i[1]==date:\n counter+=1\n else:\n counter=counter\n if counter==1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n counter=0\n for date in possible_birthdays:\n if date[0]==month:\n counter+=1\n else:\n counter=counter\n if counter==1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n date=()\n for mon in possible_birthdays:\n if month ==mon[0]:\n date+=(mon,)\n else:\n date=date\n days=()\n for day in date:\n days+=(day[1],)\n y=()\n for x in days:\n if unique_day(x, possible_birthdays)==True:\n y+=(x,)\n else:\n y=y\n if y==():\n return False\n else:\n return True \n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1443,"func_code":"def unique_day(day, possible_birthdays):\n count = 0\n for possible_dates in possible_birthdays:\n if possible_dates[1] == day:\n count += 1\n if count != 1:\n return False\n return True\n\ndef unique_month(month, possible_birthdays):\n count = 0\n for possible_dates in possible_birthdays:\n if possible_dates[0] == month:\n count += 1\n if count != 1:\n return False\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n possible_days_in_month = ()\n possible_days_in_others = ()\n for possible_dates in possible_birthdays:\n if possible_dates[0] == month:\n possible_days_in_month += (possible_dates[1],)\n else:\n possible_days_in_others += (possible_dates[1],)\n for day_in_month in possible_days_in_month:\n unique = True\n for day_in_others in possible_days_in_others:\n if day_in_month == day_in_others:\n unique = False\n break\n if unique == True:\n return True\n return False \n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1444,"func_code":"def unique_day(day, possible_birthdays):\n days = ()\n unique = ()\n for i in possible_birthdays:\n days += (i[1],)\n for i in days:\n if i == day:\n unique += (i,)\n else:\n continue\n if len(unique) == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n months = ()\n unique = ()\n for i in possible_birthdays:\n months += (i[0],)\n for i in months:\n if i == month:\n unique += (i,)\n else:\n continue\n if len(unique) == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n selected_month = ()\n unique = ()\n for i in possible_birthdays:\n if i[0] == month:\n selected_month += (i,)\n else:\n continue\n for i in selected_month:\n if unique_day(i[1], possible_birthdays) == True:\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1445,"func_code":"def unique_day(date, possible_birthdays):\n counter=0\n for i in possible_birthdays:\n if i[1]==date:\n counter+=1\n else:\n counter=counter\n if counter==1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n counter=0\n for date in possible_birthdays:\n if date[0]==month:\n counter+=1\n else:\n counter=counter\n if counter==1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n date=()\n for mon in possible_birthdays:\n if month ==mon[0]:\n date+=(mon,)\n else:\n date=date\n days=()\n for day in date:\n days+=(day[1],)\n y=()\n for x in days:\n if unique_day(x, possible_birthdays)==True:\n y+=(x,)\n else:\n y=y\n if y==():\n return False\n else:\n return True \n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1446,"func_code":"def unique_day(day, possible_birthdays):\n count = 0\n for x in possible_birthdays:\n if day == x[1]:\n count += 1\n if count == 1:\n return True\n else:\n return False\n \ndef unique_month(month, possible_birthdays):\n count = 0\n for x in possible_birthdays:\n if month == x[0]:\n count += 1\n if count == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n possible_days = ()\n for x in possible_birthdays:\n if x[0] == month:\n possible_days += (x,)\n for day in possible_days:\n if unique_day(day[1], possible_birthdays) == True:\n return True\n else:\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1447,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n \ndef unique_day(date, possible_birthdays):\n if count_dates(date, possible_birthdays) == 1:\n return True\n else:\n return False\n \ndef count_months(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n count += 1\n return count\n \ndef unique_month(month, possible_birthdays):\n if count_months(month, possible_birthdays) == 1:\n return True\n else:\n return False\n\ndef days(month, possible_birthdays):\n days_in_month = ()\n for i in range(len(possible_birthdays)):\n if possible_birthdays[i][0] == month:\n days_in_month += (possible_birthdays[i],)\n return days_in_month\n\ndef contains_unique_day(month, possible_birthdays):\n for x in range(len(days(month, possible_birthdays))):\n if unique_day(days(month, possible_birthdays)[x][1], possible_birthdays):\n return True\n elif unique_day(days(month, possible_birthdays)[len(days(month, possible_birthdays))-1][1], possible_birthdays) == False:\n return False\n \n \n \n \n \n \n \n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1448,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n \ndef unique_day(date, possible_birthdays):\n if count_dates(date, possible_birthdays) == 1:\n return True\n else:\n return False\n \ndef count_months(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n count += 1\n return count\n \ndef unique_month(month, possible_birthdays):\n if count_months(month, possible_birthdays) == 1:\n return True\n else:\n return False\n\ndef days(month, possible_birthdays):\n days_in_month = ()\n for i in range(len(possible_birthdays)):\n if possible_birthdays[i][0] == month:\n days_in_month += (possible_birthdays[i],)\n return days_in_month\n\ndef contains_unique_day(month, possible_birthdays):\n for x in range(len(days(month, possible_birthdays))):\n if unique_day(days(month, possible_birthdays)[x][1], possible_birthdays):\n return True\n elif unique_day(days(month, possible_birthdays)[len(days(month, possible_birthdays))-1][1], possible_birthdays) == False:\n return False\n \n \n \n \n \n \n \n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1449,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n \ndef unique_day(date, possible_birthdays):\n if count_dates(date, possible_birthdays) == 1:\n return True\n else:\n return False\n \ndef count_months(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n count += 1\n return count\n \ndef unique_month(month, possible_birthdays):\n if count_months(month, possible_birthdays) == 1:\n return True\n else:\n return False\n\ndef days(month, possible_birthdays):\n days_in_month = ()\n for i in range(len(possible_birthdays)):\n if possible_birthdays[i][0] == month:\n days_in_month += (possible_birthdays[i],)\n return days_in_month\n\ndef contains_unique_day(month, possible_birthdays):\n for x in range(len(days(month, possible_birthdays))):\n if unique_day(days(month, possible_birthdays)[x][1], possible_birthdays):\n return True\n elif unique_day(days(month, possible_birthdays)[len(days(month, possible_birthdays))-1][1], possible_birthdays) == False:\n return False\n \n \n \n \n \n \n \n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1450,"func_code":"def unique_day(date, possible_birthdays):\n dates = ()\n for d in possible_birthdays:\n dates += (d[1],)\n if dates.count(date) == 1:\n return True\n else:\n return False\n \n\ndef unique_month(month, possible_birthdays):\n months = ()\n for a in possible_birthdays:\n months += (a[0],)\n if months.count(month) == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n dates = ()\n for z in possible_birthdays:\n if unique_day(z[1], possible_birthdays):\n dates += (z,)\n else:\n continue\n for i in dates:\n if i[0] == month:\n return True\n else:\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1451,"func_code":"def unique_day(day, possible_birthdays):\n count = 0\n for birthday in possible_birthdays:\n if day == birthday[1]:\n count += 1\n else:\n continue\n if count == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n count = 0\n for birthday in possible_birthdays:\n if month == birthday[0]:\n count +=1\n else:\n continue\n if count == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n for birthday in possible_birthdays:\n if unique_day(birthday[1],possible_birthdays):\n months = birthday[0]\n if months == month:\n return True\n else:\n continue\n else:\n continue\n return False\n \n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1452,"func_code":"def unique_day(date, possible_birthdays):\n dates = ()\n for d in possible_birthdays:\n dates += (d[1],)\n if dates.count(date) == 1:\n return True\n else:\n return False\n \n\ndef unique_month(month, possible_birthdays):\n months = ()\n for a in possible_birthdays:\n months += (a[0],)\n if months.count(month) == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n dates = ()\n for z in possible_birthdays:\n if unique_day(z[1], possible_birthdays):\n dates += (z,)\n else:\n continue\n for i in dates:\n if i[0] == month:\n return True\n else:\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1453,"func_code":"def unique_day(date, possible_birthdays):\n count=0\n for i in possible_birthdays: \n if i[1]==date:\n count+=1\n if count!=1: #if not can put count==1\n return False\n else:\n return True\n \n\ndef unique_month(month, possible_birthdays):\n count=0\n for i in possible_birthdays:\n if i[0]==month:\n count+=1\n if count!= 1:\n return False \n else:\n return True\n \n\ndef contains_unique_day(month, possible_birthdays):\n new_possible_birthdays = ()\n for i in range(len(possible_birthdays)):\n if month == possible_birthdays[i][0]:\n new_possible_birthdays += (possible_birthdays[i],)\n new_day = \"\"\n counter = 0\n for n in range(len(new_possible_birthdays)):\n new_day = new_possible_birthdays[n][1]\n if unique_day(new_day,possible_birthdays) == True:\n counter += 1\n if counter == 0:\n return False\n else:\n return True\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1454,"func_code":"def unique_day(date, possible_birthdays):\n counter = 0\n for i in range(0,len(possible_birthdays)):\n if possible_birthdays[i][1] == date:\n counter = counter + 1\n if counter == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n counter = 0\n for i in range(0,len(possible_birthdays)):\n if possible_birthdays[i][0] == month:\n counter = counter + 1\n if counter == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n for i in range(0,len(possible_birthdays)):\n if possible_birthdays[i][0] == month:\n if unique_day(possible_birthdays[i][1],possible_birthdays):\n return True\n return False \n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1455,"func_code":"def unique_day(date, possible_birthdays):\n counter = 0\n for i in range(0,len(possible_birthdays)):\n if possible_birthdays[i][1] == date:\n counter = counter + 1\n if counter == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n counter = 0\n for i in range(0,len(possible_birthdays)):\n if possible_birthdays[i][0] == month:\n counter = counter + 1\n if counter == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n for i in range(0,len(possible_birthdays)):\n if possible_birthdays[i][0] == month:\n if unique_day(possible_birthdays[i][1],possible_birthdays):\n return True\n else:\n return False \n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1456,"func_code":"def unique_day(day, possible_birthdays):\n counter = 0\n for j in possible_birthdays:\n if day == j[1]:\n counter += 1\n if counter != 1:\n return False\n else:\n return True\n\ndef unique_month(month, possible_birthdays):\n counter = 0\n for j in possible_birthdays:\n if month == j[0]:\n counter +=1\n if counter != 1:\n return False\n else:\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n for j in possible_birthdays:\n if month != j[0]:\n continue\n else:\n if unique_day(j[1],possible_birthdays):\n return True\n return False\n\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1457,"func_code":"def unique_day(day, possible_birthdays):\n counter = 0\n for j in possible_birthdays:\n if day == j[1]:\n counter += 1\n if counter != 1:\n return False\n else:\n return True\n\ndef unique_month(month, possible_birthdays):\n counter = 0\n for j in possible_birthdays:\n if month == j[0]:\n counter +=1\n if counter != 1:\n return False\n else:\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n for j in possible_birthdays:\n if month != j[0]:\n continue\n else:\n if unique_day(j[1],possible_birthdays):\n return True\n return False\n\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1458,"func_code":"def unique_day(day, possible_birthdays):\n checker=0\n for k in possible_birthdays:\n if k[1]==day:\n checker+=1\n return checker==1\n \ndef unique_month(day, possible_birthdays):\n checker=0\n for k in possible_birthdays:\n if k[0]==day:\n checker+=1\n return checker==1\n \ndef contains_unique_day(month, possible_birthdays):\n collect=()\n for i in possible_birthdays:\n if i[0]==month:\n collect+=(i[1],)\n for i in collect:\n if unique_day(i,possible_birthdays):\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1459,"func_code":"def unique_day(day, possible_birthdays):\n checker=0\n for k in possible_birthdays:\n if k[1]==day:\n checker+=1\n return checker==1\n \ndef unique_month(day, possible_birthdays):\n checker=0\n for k in possible_birthdays:\n if k[0]==day:\n checker+=1\n return checker==1\n \ndef contains_unique_day(month, possible_birthdays):\n collect=()\n for i in possible_birthdays:\n if i[0]==month:\n collect+=(i[1],)\n for i in collect:\n if unique_day(i,possible_birthdays):\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1460,"func_code":"def unique_day(day, possible_birthdays):\n days = tuple(map(lambda x: x[1], possible_birthdays))\n count = 0\n for temp_day in days:\n if temp_day == day:\n count+=1\n return True if count == 1 else False\n\ndef unique_month(month, possible_birthdays):\n months = tuple(map(lambda x: x[0], possible_birthdays))\n count = 0\n for temp_month in months:\n if temp_month==month:\n count+=1\n return True if count == 1 else False\n\ndef contains_unique_day(month, possible_birthdays):\n temp_days = tuple(map(lambda x: x[1] ,filter(lambda x: x[0]==month,possible_birthdays)))\n for temp_day in temp_days:\n if unique_day(temp_day, possible_birthdays):\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1461,"func_code":"def unique_day(day, possible_birthdays):\n product = 0\n for i in possible_birthdays:\n if i[1] == day:\n product +=1\n if product == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n product = 0\n for i in possible_birthdays:\n if i[0] == month:\n product +=1\n if product == 1:\n return True\n else:\n return False\n \ndef contains_unique_day(month, possible_birthdays):\n for i in possible_birthdays:\n if i[0] == month and unique_day(i[1], possible_birthdays) == True:\n return True\n else:\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1462,"func_code":"def unique_day(day, possible_birthdays):\n occurence = 0\n for date in possible_birthdays:\n if day == date[1]:\n occurence +=1\n if occurence == 0 or occurence > 1:\n return False\n return True\n\ndef unique_month(month, possible_birthdays):\n occurence = 0\n for date in possible_birthdays:\n if month == date[0]:\n occurence +=1\n if occurence == 0 or occurence > 1:\n return False\n return True \n\ndef contains_unique_day(month, possible_birthdays):\n more_possible_dates = filter(lambda date: date[0] == month, possible_birthdays)\n for date in more_possible_dates:\n if unique_day(date[1], possible_birthdays):\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1463,"func_code":"def unique_day(day, possible_birthdays):\n counter = 0\n for birthday in possible_birthdays:\n birthday_day = birthday[1]\n if day == birthday_day:\n counter += 1\n if counter == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n counter = 0\n for birthday in possible_birthdays:\n birthday_month = birthday[0]\n if month == birthday_month:\n counter += 1\n if counter == 1:\n return True\n else:\n return False\n \ndef contains_unique_day(month, possible_birthdays):\n birthday_days_in_month = ()\n for birthday in possible_birthdays:\n if month == birthday[0]:\n birthday_days_in_month += (birthday[1],)\n day_counter = 0\n for day in birthday_days_in_month:\n if unique_day(day, possible_birthdays):\n return True\n return False \n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1464,"func_code":"def unique_day(day, possible_birthdays):\n counter=0\n for birthday in possible_birthdays:\n if day == birthday[1]:\n counter+=1\n if counter==1:\n return True\n return False\n\ndef unique_month(month, possible_birthdays):\n counter=0\n for birthday in possible_birthdays:\n if month == birthday[0]:\n counter+=1\n if counter==1:\n return True\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n for birthday in possible_birthdays:\n if month==birthday[0] and unique_day(birthday[1],possible_birthdays)==True:\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1465,"func_code":"def unique_day(day, possible_birthdays):\n counter=0\n for birthday in possible_birthdays:\n if day == birthday[1]:\n counter+=1\n if counter==1:\n return True\n return False\n\ndef unique_month(month, possible_birthdays):\n counter=0\n for birthday in possible_birthdays:\n if month == birthday[0]:\n counter+=1\n if counter==1:\n return True\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n for birthday in possible_birthdays:\n if month==birthday[0] and unique_day(birthday[1],possible_birthdays)==True:\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1466,"func_code":"def unique_day(day, possible_birthdays):\n result = 0\n for i in possible_birthdays:\n if day == i[1]:\n result = result + 1\n\n if result == 1:\n return True\n\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n result = 0\n for i in possible_birthdays:\n if month == i[0]:\n result = result + 1\n\n if result == 1:\n return True\n \n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n for i in possible_birthdays:\n if month == i[0]:\n if unique_day(i[1], possible_birthdays) == True:\n return True\n\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1467,"func_code":"def unique_day(date, possible_birthdays):\n j = 0\n for i in possible_birthdays:\n if date == i[1]:\n j = j+1\n else:\n j = j\n if j == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n j = 0\n for i in possible_birthdays:\n if month == i[0]:\n j = j+1\n else:\n j = j\n if j == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n dayi = ()\n result = False\n for i in possible_birthdays:\n if month == i[0]:\n dayi += (i[1],)\n for j in dayi:\n result = result or unique_day(j, possible_birthdays)\n return result\n \n \n \n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1468,"func_code":"def unique_day(day, possible_birthdays):\n count = 0\n for element in possible_birthdays:\n if element[1] == day:\n count += 1\n if count != 1:\n return False\n return True\n\ndef unique_month(month, possible_birthdays):\n count = 0\n for element in possible_birthdays:\n if element[0] == month:\n count += 1\n if count != 1:\n return False\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n month_collection = ()\n outside_month_collection = ()\n for element in possible_birthdays:\n if element[0] == month:\n month_collection += (element, )\n else:\n outside_month_collection += (element, )\n for days in month_collection:\n count = 0\n for dates in outside_month_collection:\n if days[1] == dates[1]:\n count += 1\n if count == 0:\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1469,"func_code":"def unique_day(date, possible_birthdays):\n j = 0\n for i in possible_birthdays:\n if date == i[1]:\n j = j+1\n else:\n j = j\n if j == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n j = 0\n for i in possible_birthdays:\n if month == i[0]:\n j = j+1\n else:\n j = j\n if j == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n dayi = ()\n result = False\n for i in possible_birthdays:\n if month == i[0]:\n dayi += (i[1],)\n for j in dayi:\n result = result or unique_day(j, possible_birthdays)\n return result\n \n \n \n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1470,"func_code":"def unique_day(day, possible_birthdays):\n count = 0\n for element in possible_birthdays:\n if element[1] == day:\n count += 1\n if count != 1:\n return False\n return True\n\ndef unique_month(month, possible_birthdays):\n count = 0\n for element in possible_birthdays:\n if element[0] == month:\n count += 1\n if count != 1:\n return False\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n month_collection = ()\n outside_month_collection = ()\n for element in possible_birthdays:\n if element[0] == month:\n month_collection += (element, )\n else:\n outside_month_collection += (element, )\n for days in month_collection:\n count = 0\n for dates in outside_month_collection:\n if days[1] == dates[1]:\n count += 1\n if count == 0:\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1471,"func_code":"def unique_day(day, possible_birthdays):\n count = 0\n for element in possible_birthdays:\n if element[1] == day:\n count += 1\n if count != 1:\n return False\n return True\n\ndef unique_month(month, possible_birthdays):\n count = 0\n for element in possible_birthdays:\n if element[0] == month:\n count += 1\n if count != 1:\n return False\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n month_collection = ()\n outside_month_collection = ()\n for element in possible_birthdays:\n if element[0] == month:\n month_collection += (element, )\n else:\n outside_month_collection += (element, )\n for days in month_collection:\n count = 0\n for dates in outside_month_collection:\n if days[1] == dates[1]:\n count += 1\n if count == 0:\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1472,"func_code":"def unique_day(day, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == day:\n count = count + 1\n if count == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n count = count + 1\n if count == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n for i in possible_birthdays:\n if i[0] == month:\n if unique_day(i[1], possible_birthdays) == True:\n return True\n else:\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1473,"func_code":"def unique_day(day, possible_birthdays):\n counter = 0\n for x in possible_birthdays:\n if day == x[1]:\n counter += 1\n if counter == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n counter = 0\n for x in possible_birthdays:\n if month == x[0]:\n counter += 1\n if counter == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n temp = [x for x in possible_birthdays if x[0] == month]\n temp = tuple(temp)\n counter = 0\n for x in temp:\n if unique_day(x[1], possible_birthdays):\n counter += 1\n if counter > 0:\n return True\n else:\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1474,"func_code":"def unique_day(day, possible_birthdays):\n counter = 0\n for birthday in possible_birthdays:\n if day == birthday[1]:\n counter += 1 \n return counter == 1\n\ndef unique_month(month, possible_birthdays):\n counter = 0\n for birthday in possible_birthdays:\n if month == birthday[0]:\n counter += 1\n return counter == 1\n\ndef contains_unique_day(month, possible_birthdays):\n truth_holder = False\n for birthday in possible_birthdays:\n if birthday[0] != month:\n continue\n else:\n truth_holder = truth_holder or unique_day(birthday[1], possible_birthdays)\n return truth_holder\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1475,"func_code":"def unique_day(date, possible_birthdays):\n count = 0\n for bday in possible_birthdays:\n if date == bday[1]:\n count += 1\n return count == 1\n\ndef unique_month(month, possible_birthdays):\n count = 0\n for bday in possible_birthdays:\n if month == bday[0]:\n count += 1\n return count == 1\n\ndef contains_unique_day(month, possible_birthdays):\n for bday in possible_birthdays:\n if month == bday[0]:\n if unique_day(bday[1], possible_birthdays):\n return True\n return False \n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1476,"func_code":"def unique_day(day, possible_birthdays):\n counter = 0\n for x in possible_birthdays:\n if day == x[1]:\n counter += 1\n if counter == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n counter = 0\n for x in possible_birthdays:\n if month == x[0]:\n counter += 1\n if counter == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n temp = [x for x in possible_birthdays if x[0] == month]\n temp = tuple(temp)\n counter = 0\n for x in temp:\n if unique_day(x[1], possible_birthdays):\n counter += 1\n if counter > 0:\n return True\n else:\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1477,"func_code":"def unique_day(day, possible_birthdays):\n counter = 0\n for birthday in possible_birthdays:\n birthday_day = birthday[1]\n if day == birthday_day:\n counter += 1\n if counter == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n counter = 0\n for birthday in possible_birthdays:\n birthday_month = birthday[0]\n if month == birthday_month:\n counter += 1\n if counter == 1:\n return True\n else:\n return False\n \ndef contains_unique_day(month, possible_birthdays):\n birthday_days_in_month = ()\n for birthday in possible_birthdays:\n if month == birthday[0]:\n birthday_days_in_month += (birthday[1],)\n day_counter = 0\n for day in birthday_days_in_month:\n if unique_day(day, possible_birthdays):\n return True\n return False \n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1478,"func_code":"def unique_day(day, possible_birthdays):\n #generate boolean array of whether tuple matches day\n days = sum(map(lambda x: x[1]==day,possible_birthdays))\n return days == 1\n\ndef unique_month(month, possible_birthdays):\n #generate boolean array of whether tuple matches month\n months = sum(map(lambda x: x[0]==month,possible_birthdays))\n return months == 1\n\ndef contains_unique_day(month, possible_birthdays):\n this_month = filter(lambda x: x[0]==month,possible_birthdays)\n days_in_this_month = tuple(map(lambda x: x[1],this_month))\n for i in range(1,31):\n if unique_day(str(i),possible_birthdays) and str(i) in days_in_this_month:\n return True\n return False\n\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1479,"func_code":"def unique_day(day, possible_birthdays):\n a = 0\n for date in possible_birthdays:\n cb = date[1]\n if day == cb:\n a+= 1\n else:\n continue\n if a==1:\n return True\n else:\n return False\ndef unique_month(month, possible_birthdays):\n a = 0\n for date in possible_birthdays:\n lj = date[0]\n if month == lj:\n a+= 1\n else:\n continue\n if a == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n #find the possible days in that month\n #determine if they are unique days one by one\n possible_days = ()\n for date in possible_birthdays:\n if month == date[0]:\n possible_days += (date[1],)\n else:\n continue\n for day in possible_days:\n if unique_day(day,possible_birthdays):\n return True\n else:\n continue\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1480,"func_code":"def unique_day(day, possible_birthdays):\n x = ()\n for i in range (0,len(possible_birthdays)):\n x += (possible_birthdays[i][-1],)\n if x.count(day) == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n y = ()\n for i in range (0,len(possible_birthdays)):\n y += (possible_birthdays[i][0],)\n if y.count(month) == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n for x in possible_birthdays:\n if month == x[0]:\n if unique_day(x[-1],possible_birthdays):\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1481,"func_code":"def unique_day(day, possible_birthdays):\n x = ()\n for i in range (0,len(possible_birthdays)):\n x += (possible_birthdays[i][-1],)\n if x.count(day) == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n y = ()\n for i in range (0,len(possible_birthdays)):\n y += (possible_birthdays[i][0],)\n if y.count(month) == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n for x in possible_birthdays:\n if month == x[0]:\n if unique_day(x[-1],possible_birthdays):\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1482,"func_code":"def unique_day(day, possible_birthdays):\n counter=0\n for date in possible_birthdays:\n if day == date[1]:\n counter+=1\n return counter==1\n\ndef unique_month(month, possible_birthdays):\n counter=0\n for date in possible_birthdays:\n if month == date[0]:\n counter+=1\n return counter==1\n\ndef contains_unique_day(month, possible_birthdays):\n for date in possible_birthdays:\n if month==date[0]:\n if unique_day(date[1], possible_birthdays):\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1483,"func_code":"def unique_day(day, possible_birthdays):\n a = 0\n for date in possible_birthdays:\n cb = date[1]\n if day == cb:\n a+= 1\n else:\n continue\n if a==1:\n return True\n else:\n return False\ndef unique_month(month, possible_birthdays):\n a = 0\n for date in possible_birthdays:\n lj = date[0]\n if month == lj:\n a+= 1\n else:\n continue\n if a == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n #find the possible days in that month\n #determine if they are unique days one by one\n possible_days = ()\n for date in possible_birthdays:\n if month == date[0]:\n possible_days += (date[1],)\n else:\n continue\n for day in possible_days:\n if unique_day(day,possible_birthdays):\n return True\n else:\n continue\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1484,"func_code":"def unique_day(date, possible_birthdays):\n count = 0\n for bday in possible_birthdays:\n if date == bday[1]:\n count += 1\n return count == 1\n\ndef unique_month(month, possible_birthdays):\n count = 0\n for bday in possible_birthdays:\n if month == bday[0]:\n count += 1\n return count == 1\n\ndef contains_unique_day(month, possible_birthdays):\n for bday in possible_birthdays:\n if month == bday[0]:\n if unique_day(bday[1], possible_birthdays):\n return True\n return False \n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1485,"func_code":"def unique_day(day, possible_birthdays):\n counter=0\n for date in possible_birthdays:\n if day == date[1]:\n counter+=1\n return counter==1\n\ndef unique_month(month, possible_birthdays):\n counter=0\n for date in possible_birthdays:\n if month == date[0]:\n counter+=1\n return counter==1\n\ndef contains_unique_day(month, possible_birthdays):\n for date in possible_birthdays:\n if month==date[0]:\n if unique_day(date[1], possible_birthdays):\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1486,"func_code":"def unique_day(day, possible_birthdays):\n count = 0\n for date in possible_birthdays:\n if date[1] == day:\n count += 1\n return count == 1\n\ndef unique_month(month, possible_birthdays):\n count = 0\n for mon in possible_birthdays:\n if mon[0] == month:\n count += 1\n return count == 1\n\ndef contains_unique_day(month, possible_birthdays):\n filter_by_month = tuple( filter(lambda x: x[0] == month, possible_birthdays))\n for date in filter_by_month:\n if unique_day(date[1], possible_birthdays):\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1487,"func_code":"def unique_day(day, possible_birthdays):\n count = tuple(filter(lambda x: x[1] == day, possible_birthdays))\n if len(count) == 1:\n return True\n return False\n\ndef unique_month(month, possible_birthdays):\n count = tuple(filter(lambda x: x[0] == month, possible_birthdays))\n if len(count) == 1:\n return True\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n T_or_F = False\n for i in possible_birthdays:\n if i[0] == month and unique_day(i[1], possible_birthdays):\n T_or_F = T_or_F or True\n return T_or_F\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1488,"func_code":"def unique_day(day, possible_birthdays):\n result = 0\n for i in possible_birthdays:\n if i[1] == day:\n result += 1\n elif i[1] != day:\n result += 0\n if result == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n result = 0\n for i in possible_birthdays:\n if i[0] == month:\n result += 1\n elif i[0] != month:\n result += 0\n if result == 1:\n return True\n else:\n return False\n\n\ndef contains_unique_day(month, possible_birthdays):\n for i in possible_birthdays:\n if i[0] == month:\n if unique_day(i[1],possible_birthdays):\n return True\n else:\n continue\n else:\n continue\n return False\n\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1489,"func_code":"def unique_day(day, possible_birthdays):\n count = 0\n alldays = ()\n for i in possible_birthdays:\n alldays += (i[1],)\n for i in alldays:\n if day == i:\n count += 1\n if count == 1:\n return True\n else:\n return False\n \ndef unique_month(month, possible_birthdays):\n count = 0\n allmonths = ()\n for i in possible_birthdays:\n allmonths += (i[0],)\n for i in allmonths:\n if month == i:\n count += 1\n if count == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n count = 0\n matchmonth = ()\n for i in possible_birthdays:\n if month == i[0]:\n matchmonth += (i,)\n for i in matchmonth:\n if unique_day(i[1], possible_birthdays):\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1490,"func_code":"def unique_day(day, possible_birthdays):\n counter = 0\n for i in possible_birthdays:\n if day == i[1]:\n counter += 1\n else:\n continue\n if counter == 1:\n return True\n else:\n return False\n \ndef unique_month(month, possible_birthdays):\n counter = 0\n for i in possible_birthdays:\n if month == i[0]:\n counter += 1\n else:\n continue\n if counter == 1:\n return True\n else:\n return False\n \ndef contains_unique_day(month, possible_birthdays):\n counter = 0\n dummy = ()\n indicator = ()\n for i in possible_birthdays:\n if month == i[0]:\n dummy += (i,)\n for i in dummy:\n indicator += (unique_day(i[1],possible_birthdays),)\n if True not in indicator:\n return False\n else:\n return True\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1491,"func_code":"def unique_day(day, possible_birthdays):\n counter = 0\n for i in possible_birthdays:\n if day == i[1]:\n counter += 1\n else:\n continue\n if counter == 1:\n return True\n else:\n return False\n \ndef unique_month(month, possible_birthdays):\n counter = 0\n for i in possible_birthdays:\n if month == i[0]:\n counter += 1\n else:\n continue\n if counter == 1:\n return True\n else:\n return False\n \ndef contains_unique_day(month, possible_birthdays):\n counter = 0\n dummy = ()\n indicator = ()\n for i in possible_birthdays:\n if month == i[0]:\n dummy += (i,)\n for i in dummy:\n indicator += (unique_day(i[1],possible_birthdays),)\n if True not in indicator:\n return False\n else:\n return True\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1492,"func_code":"def unique_day(day, possible_birthdays):\n count=0\n for i in possible_birthdays:\n if i[1]==day:\n count+=1\n return count==1\n\ndef unique_month(month, possible_birthdays):\n count=0\n for i in possible_birthdays:\n if i[0]==month:\n count+=1\n return count==1\n\ndef contains_unique_day(month, possible_birthdays):\n for i in possible_birthdays:\n if i[0]==month:\n if unique_day(i[1],possible_birthdays):\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1493,"func_code":"def unique_day(day, possible_birthdays):\n count=0\n for i in possible_birthdays:\n if i[1]==day:\n count+=1\n return count==1\n\ndef unique_month(month, possible_birthdays):\n count=0\n for i in possible_birthdays:\n if i[0]==month:\n count+=1\n return count==1\n\ndef contains_unique_day(month, possible_birthdays):\n for i in possible_birthdays:\n if i[0]==month:\n if unique_day(i[1],possible_birthdays):\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1494,"func_code":"def unique_day(day, possible_birthdays):\n counter = 0\n for i in possible_birthdays:\n if day == i[1]:\n counter = counter + 1\n if counter != 1:\n return False\n return True\n \ndef unique_month(month, possible_birthdays):\n counter = 0\n for i in possible_birthdays:\n if month == i[0]:\n counter = counter + 1\n if counter != 1:\n return False\n return True\n \ndef contains_unique_day(month, possible_birthdays):\n count_of_days = ()\n for i in possible_birthdays:\n if month == i[0]:\n count_of_days = count_of_days + (i[1], )\n for i2 in count_of_days: \n if unique_day(i2, possible_birthdays) == True:\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1495,"func_code":"def unique_day(day, possible_birthdays):\n count, result = 0, 0\n for count in range(0, len(possible_birthdays)):\n if day == possible_birthdays[count][1]:\n result = result + 1\n else:\n continue\n if result == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n count, result = 0, 0\n for count in range(0, len(possible_birthdays)):\n if month == possible_birthdays[count][0]:\n result = result + 1\n else:\n continue\n if result == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n for day in possible_birthdays:\n if month == day[0]:\n if unique_day(day[1], possible_birthdays):\n return True\n else:\n continue\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1496,"func_code":"def unique_day(day, possible_birthdays):\n b=[] # list of dates\n for birthday in possible_birthdays:\n b.append(birthday[1])\n if b.count(day)==1:\n return True\n \n return False\n\ndef unique_month(month, possible_birthdays):\n b=[] \n for birthday in possible_birthdays:\n b.append(birthday[0])\n if b.count(month)==1:\n return True\n \n return False\n \ndef contains_unique_day(month, possible_birthdays):\n b=[]\n for birthday in possible_birthdays:\n if month == birthday[0]:\n b.append(birthday[1]) #add date to b\n for day in b:\n if unique_day(day,possible_birthdays)==True:\n return True\n \n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1497,"func_code":"def unique_day(day, possible_birthdays):\n days = ()\n for i in possible_birthdays:\n days += (i[1],)\n count = 0\n for ele in days:\n if ele == day:\n count += 1\n if count == 1:\n return True\n else:\n return False\n \ndef unique_month(month, possible_birthdays):\n months = ()\n for i in possible_birthdays:\n months += (i[0],)\n count = 0\n for ele in months:\n if ele == month:\n count += 1\n if count == 1:\n return True\n else:\n return False\n \ndef contains_unique_day(month, possible_birthdays):\n possible_birthdays_in_month = tuple(filter(lambda x: x[0] == month, possible_birthdays))\n for i in possible_birthdays_in_month:\n if unique_day(i[1], possible_birthdays):\n return True\n else:\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1498,"func_code":"def unique_day(day, possible_birthdays):\n x = ()\n y = ()\n for i in possible_birthdays:\n x += (i[1],)\n for i in x:\n if i == day:\n y += (i,)\n else:\n continue\n if len(y) == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n x = ()\n y = ()\n for i in possible_birthdays:\n x += (i[0],)\n for i in x:\n if i == month:\n y += (i,)\n else:\n continue\n if len(y) == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n x = ()\n y = ()\n for i in possible_birthdays:\n if i[0] == month:\n x += (i,)\n else:\n continue\n for i in x:\n if unique_day(i[1], possible_birthdays) == True:\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1499,"func_code":"def unique_day(date, possible_birthdays):\n if len(tuple(filter(lambda x: x[1] == date ,possible_birthdays))) == 1:\n return True\n else:\n return False\n \n\ndef unique_month(month, possible_birthdays):\n if len(tuple(filter(lambda x: x[0] == month ,possible_birthdays))) == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n birthdays = tuple(filter(lambda x: x[0] == month ,possible_birthdays))\n for i in birthdays:\n if unique_day(i[1], possible_birthdays) == True:\n return True\n else:\n return False \n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1500,"func_code":"def unique_day(date, possible_birthdays):\n count = 0\n for tup in possible_birthdays:\n if tup[1] == date:\n count+=1\n return count == 1\n\ndef unique_month(month, possible_birthdays):\n count = 0\n for tup in possible_birthdays:\n if tup[0] == month:\n count+=1\n return count == 1\n\ndef contains_unique_day(month, possible_birthdays):\n month_tup = ()\n for tup in possible_birthdays:\n if month in tup:\n month_tup += (tup,)\n for tup in month_tup:\n if unique_day(tup[1],possible_birthdays):\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1501,"func_code":"def unique_day(day, possible_birthdays):\n counter =0\n for elements in possible_birthdays:\n if day == elements[1]:\n counter +=1\n return counter == 1\n\ndef unique_month(month, possible_birthdays):\n counter =0\n for elements in possible_birthdays:\n if month == elements[0]:\n counter +=1\n return counter == 1\n\ndef contains_unique_day(month, possible_birthdays):\n tupleofdays=()\n for elements in possible_birthdays:\n if elements[0]==month:\n tupleofdays += (elements[1],)\n for elements in tupleofdays:\n if unique_day(elements,possible_birthdays):\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1502,"func_code":"def unique_day(day, possible_birthdays):\n counter =0\n for elements in possible_birthdays:\n if day == elements[1]:\n counter +=1\n return counter == 1\n\ndef unique_month(month, possible_birthdays):\n counter =0\n for elements in possible_birthdays:\n if month == elements[0]:\n counter +=1\n return counter == 1\n\ndef contains_unique_day(month, possible_birthdays):\n tupleofdays=()\n for elements in possible_birthdays:\n if elements[0]==month:\n tupleofdays += (elements[1],)\n for elements in tupleofdays:\n if unique_day(elements,possible_birthdays):\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1503,"func_code":"def unique_day(day, possible_birthdays):\n days = ()\n for elem in possible_birthdays:\n days += (elem[1],)\n times = days.count(day)\n if times == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n months = ()\n for elem in possible_birthdays:\n months += (elem[0],)\n times = months.count(month)\n if times == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n bdays_in_month = ()\n for elem in possible_birthdays:\n if elem[0] == month:\n bdays_in_month += (elem[1],)\n else:\n bdays_in_month = bdays_in_month\n for el in bdays_in_month:\n if unique_day(el, possible_birthdays) == True:\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1504,"func_code":"def unique_day(day, possible_birthdays):\n days = ()\n for elem in possible_birthdays:\n days += (elem[1],)\n times = days.count(day)\n if times == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n months = ()\n for elem in possible_birthdays:\n months += (elem[0],)\n times = months.count(month)\n if times == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n bdays_in_month = ()\n for elem in possible_birthdays:\n if elem[0] == month:\n bdays_in_month += (elem[1],)\n else:\n bdays_in_month = bdays_in_month\n for el in bdays_in_month:\n if unique_day(el, possible_birthdays) == True:\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1505,"func_code":"def unique_day(day, possible_birthdays):\n days = ()\n for elem in possible_birthdays:\n days += (elem[1],)\n times = days.count(day)\n if times == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n months = ()\n for elem in possible_birthdays:\n months += (elem[0],)\n times = months.count(month)\n if times == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n bdays_in_month = ()\n for elem in possible_birthdays:\n if elem[0] == month:\n bdays_in_month += (elem[1],)\n else:\n bdays_in_month = bdays_in_month\n for el in bdays_in_month:\n if unique_day(el, possible_birthdays) == True:\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1506,"func_code":"def unique_day(date, possible_birthdays):\n count = 0\n for tup in possible_birthdays:\n if tup[1] == date:\n count+=1\n return count == 1\n\ndef unique_month(month, possible_birthdays):\n count = 0\n for tup in possible_birthdays:\n if tup[0] == month:\n count+=1\n return count == 1\n\ndef contains_unique_day(month, possible_birthdays):\n month_tup = ()\n for tup in possible_birthdays:\n if month in tup:\n month_tup += (tup,)\n for tup in month_tup:\n if unique_day(tup[1],possible_birthdays):\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1507,"func_code":"def unique_day(day, possible_birthdays):\n counter = 0\n for i in possible_birthdays:\n if i[1] == day:\n counter += 1\n if counter == 1:\n return True\n return False\n \ndef unique_month(month, possible_birthdays):\n counter = 0\n for i in possible_birthdays:\n if i[0] == month:\n counter += 1\n if counter == 1:\n return True\n return False\n \ndef contains_unique_day(month, possible_birthdays):\n counter = 0\n for i in possible_birthdays:\n if month == i[0] and unique_day(i[1], possible_birthdays):\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1508,"func_code":"def unique_day(date, possible_birthdays):\n counter = 0\n for i in range(len(possible_birthdays)):\n if possible_birthdays[i][1] == date:\n counter += 1\n if counter == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n counter = 0\n for i in range(len(possible_birthdays)):\n if possible_birthdays[i][0] == month:\n counter += 1\n if counter == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n monies = ()\n for i in range(len(possible_birthdays)):\n if possible_birthdays[i][0] == month:\n monies += (possible_birthdays[i][1],)\n for i in range(len(monies)):\n if unique_day(monies[i], possible_birthdays):\n return True\n return False \n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1509,"func_code":"def unique_day(day, possible_birthdays):\n c=0\n for birthday in possible_birthdays:\n if day==birthday[1]:\n c+=1\n return c==1\n\ndef unique_month(month, possible_birthdays):\n c=0\n for birthday in possible_birthdays:\n if month==birthday[0]:\n c+=1\n return c==1\n\ndef contains_unique_day(month, possible_birthdays):\n d=map(lambda birthday:birthday[1],filter(lambda birthday:birthday[0]==month,possible_birthdays))\n for day in d:\n if unique_day(day,possible_birthdays):\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1510,"func_code":"def unique_day(day, possible_birthdays):\n count = 0\n for birthday in possible_birthdays:\n if day == birthday[1]:\n count += 1\n return count == 1\n\ndef unique_month(month, possible_birthdays):\n count = 0\n for birthday in possible_birthdays:\n if month == birthday[0]:\n count += 1\n return count == 1\n\ndef contains_unique_day(month, possible_birthdays):\n for birthday in possible_birthdays:\n if month == birthday[0]:\n if unique_day(birthday[1], possible_birthdays):\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1511,"func_code":"def unique_day(day, possible_birthdays):\n count = 0\n for x in possible_birthdays:\n if day in x:\n count += 1\n return count == 1\n\ndef unique_month(month, possible_birthdays):\n count = 0\n for x in possible_birthdays:\n if month in x:\n count += 1\n return count == 1\n\ndef contains_unique_day(month, possible_birthdays):\n possible_days = ()\n for x in possible_birthdays:\n if month in x:\n possible_days += (x[1],)\n for x in possible_days:\n contains = unique_day(x,possible_birthdays)\n if contains == False:\n continue\n else:\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1512,"func_code":"def unique_day(date, possible_birthdays):\n counter = 0\n for i in range(len(possible_birthdays)):\n if possible_birthdays[i][1] == date:\n counter += 1\n if counter == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n counter = 0\n for i in range(len(possible_birthdays)):\n if possible_birthdays[i][0] == month:\n counter += 1\n if counter == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n monies = ()\n for i in range(len(possible_birthdays)):\n if possible_birthdays[i][0] == month:\n monies += (possible_birthdays[i][1],)\n for i in range(len(monies)):\n if unique_day(monies[i], possible_birthdays):\n return True\n return False \n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1513,"func_code":"\ndef unique_day(day, possible_birthdays):\n days = ()\n unique = ()\n for i in possible_birthdays:\n days += (i[1],)\n for i in days:\n if i == day:\n unique += (i,)\n else:\n continue\n if len(unique) == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n months = ()\n unique = ()\n for i in possible_birthdays:\n months += (i[0],)\n for i in months:\n if i == month:\n unique += (i,)\n else:\n continue\n if len(unique) == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n selected_month = ()\n unique = ()\n for i in possible_birthdays:\n if i[0] == month:\n selected_month += (i,)\n else:\n continue\n for i in selected_month:\n if unique_day(i[1], possible_birthdays) == True:\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1514,"func_code":"def unique_day(day, possible_birthdays):\n value = 0\n for i in range(0, len(possible_birthdays)):\n if (day == possible_birthdays[i][1]):\n value += 1\n if (value > 1) or (value == 0):\n return False\n else:\n return True\n\ndef unique_month(month, possible_birthdays):\n value = 0\n for i in range(0, len(possible_birthdays)):\n if (month == possible_birthdays[i][0]):\n value += 1\n if (value > 1) or (value == 0):\n return False\n else:\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n unique_days = ()\n for i in range(0, len(possible_birthdays)):\n if (unique_day(possible_birthdays[i][1], possible_birthdays) == True):\n unique_days += (possible_birthdays[i][1],)\n for j in range(0, len(unique_days)):\n if ((month, unique_days[j]) in possible_birthdays):\n return True\n return False \n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1515,"func_code":"def unique_day(day, possible_birthdays):\n appearance = 0\n for i in possible_birthdays:\n if i[1] == day:\n appearance += 1\n if appearance == 1:\n return True\n return False\n\ndef unique_month(month, possible_birthdays):\n appearance = 0\n for i in possible_birthdays:\n if i[0] == month:\n appearance += 1\n if appearance == 1:\n return True\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n for i in possible_birthdays:\n if i[0] == month:\n if unique_day(i[1],possible_birthdays):\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1516,"func_code":"def unique_day(day, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if day == i[1]:\n count += 1\n if count == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if month == i[0]:\n count += 1\n if count == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n for i in possible_birthdays:\n if month == i[0]:\n if unique_day(i[1], possible_birthdays):\n return True\n break\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1517,"func_code":"def unique_day(day, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if day == i[1]:\n count += 1\n if count == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if month == i[0]:\n count += 1\n if count == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n for i in possible_birthdays:\n if month == i[0]:\n if unique_day(i[1], possible_birthdays):\n return True\n break\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1518,"func_code":"def unique_day(day, possible_birthdays):\n a=0\n for birthday in possible_birthdays:\n if day == birthday[1]:\n a = a + 1\n if a == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n a=0\n for birthday in possible_birthdays:\n if month == birthday[0]:\n a = a + 1\n if a == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n x = ()\n for birthday in possible_birthdays:\n mn,dy = birthday\n if mn == month:\n x = x + (dy,)\n for i in x:\n if unique_day(i,possible_birthdays) == True:\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1519,"func_code":"def unique_day(day, possible_birthdays):\n count = 0\n for x in possible_birthdays:\n if day in x:\n count += 1\n return count == 1\n\ndef unique_month(month, possible_birthdays):\n count = 0\n for x in possible_birthdays:\n if month in x:\n count += 1\n return count == 1\n\ndef contains_unique_day(month, possible_birthdays):\n possible_days = ()\n for x in possible_birthdays:\n if month in x:\n possible_days += (x[1],)\n for x in possible_days:\n contains = unique_day(x,possible_birthdays)\n if contains == False:\n continue\n else:\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1520,"func_code":"def unique_day(day, possible_birthdays):\n a=0\n for birthday in possible_birthdays:\n if day == birthday[1]:\n a = a + 1\n if a == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n a=0\n for birthday in possible_birthdays:\n if month == birthday[0]:\n a = a + 1\n if a == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n x = ()\n for birthday in possible_birthdays:\n mn,dy = birthday\n if mn == month:\n x = x + (dy,)\n for i in x:\n if unique_day(i,possible_birthdays) == True:\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1521,"func_code":"def unique_day(day, possible_birthdays):\n count = 0\n for birthday in possible_birthdays:\n if day == birthday[1]:\n count += 1\n if count == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n count = 0\n for birthday in possible_birthdays:\n if month == birthday[0]:\n count += 1\n if count == 1:\n return True\n else:\n return False\n \ndef contains_unique_day(month, possible_birthdays):\n for birthday in possible_birthdays:\n if month == birthday[0]:\n if unique_day(birthday[1], possible_birthdays) == True:\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1522,"func_code":"def unique_day(day, possible_birthdays):\n days = ()\n unique = ()\n for i in possible_birthdays:\n days += (i[1],)\n for i in days:\n if i == day:\n unique += (i,)\n else:\n continue\n if len(unique) == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n months = ()\n unique = ()\n for i in possible_birthdays:\n months += (i[0],)\n for i in months:\n if i == month:\n unique += (i,)\n else:\n continue\n if len(unique) == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n selected_month = ()\n unique = ()\n for i in possible_birthdays:\n if i[0] == month:\n selected_month += (i,)\n else:\n continue\n for i in selected_month:\n if unique_day(i[1], possible_birthdays) == True:\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1523,"func_code":"def unique_day(day, possible_birthdays):\n count = 0\n for birthday in possible_birthdays:\n if day == birthday[1]:\n count += 1\n return count == 1\n\ndef unique_month(month, possible_birthdays):\n count = 0\n for birthday in possible_birthdays:\n if month == birthday[0]:\n count += 1\n return count == 1\n\ndef contains_unique_day(month, possible_birthdays):\n for birthday in possible_birthdays:\n if month == birthday[0]:\n if unique_day(birthday[1], possible_birthdays):\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1524,"func_code":"def unique_day(day, possible_birthdays):\n number=0\n for i in possible_birthdays:\n if i[1]==day:\n number+=1\n return number==1\n\ndef unique_month(month, possible_birthdays):\n number=0\n for i in possible_birthdays:\n if i[0]==month:\n number+=1\n return number==1\n\ndef contains_unique_day(month, possible_birthdays):\n number=0\n for i in possible_birthdays:\n if i[0]==month:\n if unique_day(i[1], possible_birthdays)== True:\n number+=1\n return number>0\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1525,"func_code":"\ndef unique_day(day, possible_birthdays):\n if len(tuple(filter(lambda x: x[1] == day, possible_birthdays))) == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n if len(tuple(filter(lambda x: x[0] == month, possible_birthdays))) == 1:\n return True\n else:\n return False\n \ndef contains_unique_day(month, possible_birthdays):\n total = ()\n i = 0\n while i < len(possible_birthdays):\n if possible_birthdays[i][0] == month:\n total = total + (possible_birthdays[i],)\n else:\n total = total\n i = i + 1\n for t in total:\n if unique_day(t[1], possible_birthdays) == True:\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1526,"func_code":"def unique_day(day, possible_birthdays):\n number=0\n for i in possible_birthdays:\n if i[1]==day:\n number+=1\n return number==1\n\ndef unique_month(month, possible_birthdays):\n number=0\n for i in possible_birthdays:\n if i[0]==month:\n number+=1\n return number==1\n\ndef contains_unique_day(month, possible_birthdays):\n number=0\n for i in possible_birthdays:\n if i[0]==month:\n if unique_day(i[1], possible_birthdays)== True:\n number+=1\n return number>0\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1527,"func_code":"def unique_day(date, possible_birthdays):\n lenth=len(possible_birthdays)\n count=0\n for i in range(0,lenth):\n if date==possible_birthdays[i][1]:\n count=count+1\n if count==1:\n return True\n else:\n return False\n \n\ndef unique_month(month, possible_birthdays):\n lenth=len(possible_birthdays)\n count=0\n for i in range(0,lenth):\n if month==possible_birthdays[i][0]:\n count=count+1\n if count==1:\n return True\n else:\n return False\n \n\ndef contains_unique_day(month, possible_birthdays):\n count=()\n for i in possible_birthdays:\n if i[0]==month:\n if i not in count:\n count=count+(i,)\n for j in count:\n if unique_day(j[1], possible_birthdays):\n return True\n return False\n\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1528,"func_code":"def unique_day(day, possible_birthdays):\n a = 0\n for i in range(len(possible_birthdays)):\n if day == possible_birthdays[i][1]:\n a += 1\n if a == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n a = 0\n for i in range(len(possible_birthdays)):\n if month == possible_birthdays[i][0]:\n a += 1\n if a == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n for i in range(len(possible_birthdays)):\n if month == possible_birthdays[i][0]:\n if unique_day(possible_birthdays[i][1], possible_birthdays) == True:\n return True\n else:\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1529,"func_code":"def unique_day(day, possible_birthdays):\n count=0\n for i in possible_birthdays:\n count+=i.count(day)\n if count==1:\n return True\n return False\n\ndef unique_month(month, possible_birthdays):\n count=0\n for i in possible_birthdays:\n count+=i.count(month)\n if count==1:\n return True\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n tup=tuple(filter(lambda x: x[0]==month,possible_birthdays))\n for i in range(len(tup)):\n if unique_day(tup[i][1],possible_birthdays)==True:\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1530,"func_code":"def unique_day(day, possible_birthdays):\n n=0\n for tup in possible_birthdays:\n if tup[1]==day:\n n+=1\n if n==1:\n return True \n return False\n \ndef unique_month(month, possible_birthdays):\n n=0\n for tup in possible_birthdays:\n if tup[0]==month:\n n+=1\n if n==1:\n return True \n return False\n \n \ndef contains_unique_day(month, possible_birthdays):\n n=0\n for tup in possible_birthdays:\n if tup[0]==month:\n if unique_day(tup[1],possible_birthdays):\n n+=1\n if n>=1:\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1531,"func_code":"def unique_day(day, possible_birthdays):\n n=0\n for tup in possible_birthdays:\n if tup[1]==day:\n n+=1\n if n==1:\n return True \n return False\n \ndef unique_month(month, possible_birthdays):\n n=0\n for tup in possible_birthdays:\n if tup[0]==month:\n n+=1\n if n==1:\n return True \n return False\n \n \ndef contains_unique_day(month, possible_birthdays):\n n=0\n for tup in possible_birthdays:\n if tup[0]==month:\n if unique_day(tup[1],possible_birthdays):\n n+=1\n if n>=1:\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1532,"func_code":"def unique_day(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if date == i[1]:\n count += 1\n else:\n continue\n if count == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if month == i[0]:\n count += 1\n else:\n continue\n if count == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n months = ()\n for i in possible_birthdays:\n if i[0] == month:\n months = months + (i,)\n else:\n continue\n for i in months:\n if unique_day(i[1], possible_birthdays) == True:\n return True\n else:\n continue\n return False\n\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1533,"func_code":"def unique_day(day, possible_birthdays):\n counter = 0\n for i in possible_birthdays:\n if day == i[1]:\n counter += 1\n if counter == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n counter = 0\n for i in possible_birthdays:\n if month == i[0]:\n counter += 1\n if counter == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n unique = ()\n for i in possible_birthdays:\n if unique_day(i[1], possible_birthdays):\n unique += (i,)\n for i in unique:\n if month == i[0]:\n return True\n else:\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1534,"func_code":"def unique_day(day, possible_birthdays):\n n = len(possible_birthdays)\n result = 0\n for counter in range(n):\n if day == possible_birthdays[counter][1]:\n result = result + 1\n return result == 1\n\ndef unique_month(month, possible_birthdays):\n n = len(possible_birthdays)\n result = 0\n for counter in range(n):\n if month == possible_birthdays[counter][0]:\n result = result + 1\n return result == 1\n\ndef contains_unique_day(month, possible_birthdays):\n n = len(possible_birthdays)\n for counter in range(n):\n if month == possible_birthdays[counter][0]:\n if unique_day(possible_birthdays[counter][1], possible_birthdays) == True:\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1535,"func_code":"def unique_day(day, possible_birthdays):\n dates = map(lambda x: x[1], possible_birthdays)\n counter = 0\n for date in dates:\n if day == date:\n counter += 1\n if counter == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n months = map(lambda x: x[0], possible_birthdays)\n counter = 0\n for i in months:\n if month == i:\n counter += 1\n if counter == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n days_in_month = map(lambda x: x[1] if x[0] == month else (), possible_birthdays)\n check = map(lambda x: unique_day(x, possible_birthdays), days_in_month)\n return True in check\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1536,"func_code":"def unique_day(day, possible_birthdays):\n appearance = 0\n for i in possible_birthdays:\n if i[1] == day:\n appearance += 1\n if appearance == 1:\n return True\n return False\n\ndef unique_month(month, possible_birthdays):\n appearance = 0\n for i in possible_birthdays:\n if i[0] == month:\n appearance += 1\n if appearance == 1:\n return True\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n for i in possible_birthdays:\n if i[0] == month:\n if unique_day(i[1],possible_birthdays):\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1537,"func_code":"def unique_day(day, possible_birthdays):\n n = len(possible_birthdays)\n result = 0\n for counter in range(n):\n if day == possible_birthdays[counter][1]:\n result = result + 1\n return result == 1\n\ndef unique_month(month, possible_birthdays):\n n = len(possible_birthdays)\n result = 0\n for counter in range(n):\n if month == possible_birthdays[counter][0]:\n result = result + 1\n return result == 1\n\ndef contains_unique_day(month, possible_birthdays):\n n = len(possible_birthdays)\n for counter in range(n):\n if month == possible_birthdays[counter][0]:\n if unique_day(possible_birthdays[counter][1], possible_birthdays) == True:\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1538,"func_code":"def unique_day(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count = count + 1\n if count == 1:\n return True \n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n count = count + 1\n if count == 1:\n return True\n else:\n return False\n \ndef contains_unique_day(month, possible_birthdays):\n same_month_tuple = ()\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n same_month_tuple = same_month_tuple + (i,)\n for i in same_month_tuple:\n if unique_day(i[1], possible_birthdays):\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1539,"func_code":"def unique_day(day, possible_birthdays):\n count = 0\n for birthday in possible_birthdays:\n if day == birthday[1]:\n count += 1\n if count == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n count = 0\n for birthday in possible_birthdays:\n if month == birthday[0]:\n count += 1\n if count == 1:\n return True\n else:\n return False\n \ndef contains_unique_day(month, possible_birthdays):\n for birthday in possible_birthdays:\n if month == birthday[0]:\n if unique_day(birthday[1], possible_birthdays) == True:\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1540,"func_code":"def unique_day(date, possible_birthdays):\n total= 0\n for i in possible_birthdays:\n if date == i[1]:\n total= total + 1\n return total == 1\n\ndef unique_month(month, possible_birthdays):\n total= 0\n for i in possible_birthdays:\n if month == i[0]:\n total= total + 1\n return total == 1\n\ndef contains_unique_day(month, possible_birthdays):\n for a in possible_birthdays:\n if unique_day(a[1],possible_birthdays):\n if month == a[0]:\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1541,"func_code":"def unique_day(day, possible_birthdays):\n the_day = ()\n for i in possible_birthdays:\n if i[1] == day:\n the_day += (day,)\n return len(the_day) == 1\n\ndef unique_month(month, possible_birthdays):\n the_month = ()\n for i in possible_birthdays:\n if i[0] == month:\n the_month += (month,)\n return len(the_month) == 1\n\ndef contains_unique_day(month, possible_birthdays):\n wanted_month = ()\n for i in possible_birthdays:\n if i[0] == month:\n wanted_month += (i,)\n wanted_month_days = list(map(lambda x: x[1], wanted_month))\n unique_days = list(filter(lambda x: unique_day(x, possible_birthdays), wanted_month_days))\n return len(unique_days) > 0\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1542,"func_code":"def unique_day(day, possible_birthdays):\n counter = 0\n for i in possible_birthdays:\n if day == i[1]:\n counter += 1\n return counter == 1\n \ndef unique_month(month, possible_birthdays):\n counter = 0\n for i in possible_birthdays:\n if month == i[0]:\n counter += 1\n return counter == 1\n\ndef contains_unique_day(month, possible_birthdays):\n mth = tuple(filter(lambda bd: month == bd[0], possible_birthdays))\n for i in mth:\n if unique_day(i[1], possible_birthdays):\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1543,"func_code":"def unique_day(day, possible_birthdays):\n result = 0\n for i in range(len(possible_birthdays)):\n if day in possible_birthdays[i]:\n result += 1\n if result == 1:\n return True\n else:\n return False\n\n\ndef unique_month(month, possible_birthdays):\n result = 0\n for i in range(len(possible_birthdays)):\n if month in possible_birthdays[i]:\n result += 1\n if result == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n days = ()\n for i in possible_birthdays:\n if i[0] == month:\n days += (i[1],)\n for i in days:\n if unique_day(i, possible_birthdays):\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1544,"func_code":"def unique_day(day, possible_birthdays):\n appearance = 0\n for i in possible_birthdays:\n if i[1] == day:\n appearance += 1\n if appearance == 1:\n return True\n return False\n\ndef unique_month(month, possible_birthdays):\n appearance = 0\n for i in possible_birthdays:\n if i[0] == month:\n appearance += 1\n if appearance == 1:\n return True\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n for i in possible_birthdays:\n if i[0] == month:\n if unique_day(i[1],possible_birthdays):\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1545,"func_code":"def unique_day(day, possible_birthdays):\n appearance = 0\n for i in possible_birthdays:\n if i[1] == day:\n appearance += 1\n if appearance == 1:\n return True\n return False\n\ndef unique_month(month, possible_birthdays):\n appearance = 0\n for i in possible_birthdays:\n if i[0] == month:\n appearance += 1\n if appearance == 1:\n return True\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n for i in possible_birthdays:\n if i[0] == month:\n if unique_day(i[1],possible_birthdays):\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1546,"func_code":"def unique_day(day, possible_birthdays):\n count = 0\n for birthday in possible_birthdays:\n if day == birthday[1]:\n count+=1\n if count==1:\n return True\n return False\n\ndef unique_month(month, possible_birthdays):\n count = 0\n for birthday in possible_birthdays:\n if month == birthday[0]:\n count+=1\n if count==1:\n return True\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n days=()\n for birthday in possible_birthdays:\n if month== birthday[0]:\n days += (birthday[1],)\n for day in days:\n if unique_day(day, possible_birthdays)== False:\n continue\n else:\n return unique_day(day, possible_birthdays)\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1547,"func_code":"def unique_day(day, possible_birthdays):\n count = 0\n for birthday in possible_birthdays:\n if day == birthday[1]:\n count+=1\n if count==1:\n return True\n return False\n\ndef unique_month(month, possible_birthdays):\n count = 0\n for birthday in possible_birthdays:\n if month == birthday[0]:\n count+=1\n if count==1:\n return True\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n days=()\n for birthday in possible_birthdays:\n if month== birthday[0]:\n days += (birthday[1],)\n for day in days:\n if unique_day(day, possible_birthdays)== False:\n continue\n else:\n return unique_day(day, possible_birthdays)\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1548,"func_code":"def unique_day(day, possible_birthdays):\n new = ()\n for i in range (len(possible_birthdays)):\n new = new + (possible_birthdays[i][1],)\n if new.count(day) == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n new = ()\n for i in range (len(possible_birthdays)):\n new = new + (possible_birthdays[i][0],)\n if new.count(month) == 1:\n return True\n else:\n return False\n\n\ndef contains_unique_day(month, possible_birthdays):\n new = ()\n for i in possible_birthdays:\n if i[0] == month:\n new = new + (i[1],)\n for i in new:\n if unique_day(i, possible_birthdays):\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1549,"func_code":"def unique_day(day, possible_birthdays):\n counter = 0\n for item in possible_birthdays:\n if item[1] == day:\n counter = counter + 1\n if counter !=1:\n return False\n return True\n\ndef unique_month(month, possible_birthdays):\n counter = 0\n for item in possible_birthdays:\n if item[0] == month:\n counter = counter + 1\n if counter != 1:\n return False\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n dates_in_month = ()\n new_possible_birthdays = ()\n for item in possible_birthdays:\n if month in item:\n dates_in_month += (item[1],)\n elif month not in item:\n new_possible_birthdays += (item[1],)\n result = 0\n for item in dates_in_month:\n if item in new_possible_birthdays:\n result += 1\n if result != len(dates_in_month):\n return True\n else:\n return False \n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1550,"func_code":"def unique_day(date, possible_birthdays):\n result = 0\n for i in possible_birthdays:\n if i[1] == date:\n result += 1\n elif i[1] != date:\n result += 0\n if result == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n result = 0\n for i in possible_birthdays:\n if i[0] == month:\n result += 1\n elif i[0] != month:\n result += 0\n if result == 1:\n return True\n else:\n return False\n\n\ndef contains_unique_day(month, possible_birthdays):\n for i in possible_birthdays:\n if i[0] != month:\n continue\n elif unique_day(i[1],possible_birthdays):\n return True\n return False\n\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1551,"func_code":"def unique_day(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1]==date:\n count+=1\n if count==1:\n return True\n return False\n\ndef unique_month(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0]==month:\n count+=1\n if count==1:\n return True\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n for i in possible_birthdays:\n if month==i[0]:\n if unique_day(i[1], possible_birthdays):\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1552,"func_code":"def unique_day(date, possible_birthdays):\n uniqueday = ()\n days = ()\n for i in possible_birthdays:\n days += (i[1],)\n for i in days:\n if i == date:\n uniqueday += (i,)\n else:\n continue\n \n if len(uniqueday) == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n uniquemonth = ()\n months = ()\n for i in possible_birthdays:\n months += (i[0],)\n for i in months:\n if i == month:\n uniquemonth += (i,)\n else:\n continue\n \n if len(uniquemonth) == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n choose_month = ()\n uniqueday_in_month = ()\n \n for i in possible_birthdays:\n if i[0] == month:\n choose_month += (i,)\n else:\n continue\n \n for i in choose_month:\n if unique_day(i[1], possible_birthdays) == True:\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1553,"func_code":"def unique_day(day, possible_birthdays):\n count, result = 0, 0\n for count in range(0, len(possible_birthdays)):\n if day == possible_birthdays[count][1]:\n result = result + 1\n else:\n continue\n if result == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n count, result = 0, 0\n for count in range(0, len(possible_birthdays)):\n if month == possible_birthdays[count][0]:\n result = result + 1\n else:\n continue\n if result == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n for day in possible_birthdays:\n if month == day[0]:\n if unique_day(day[1], possible_birthdays):\n return True\n else:\n continue\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1554,"func_code":"def unique_day(day, possible_birthdays):\n result = 0\n for i in possible_birthdays:\n if day == i[1]:\n result = result + 1\n\n if result == 1:\n return True\n\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n result = 0\n for i in possible_birthdays:\n if month == i[0]:\n result = result + 1\n\n if result == 1:\n return True\n \n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n for i in possible_birthdays:\n if month == i[0]:\n if unique_day(i[1], possible_birthdays) == True:\n return True\n\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1555,"func_code":"def unique_day(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1]==date:\n count+=1\n if count==1:\n return True\n return False\n\ndef unique_month(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0]==month:\n count+=1\n if count==1:\n return True\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n for i in possible_birthdays:\n if month==i[0]:\n if unique_day(i[1], possible_birthdays):\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1556,"func_code":"def unique_day(day, possible_birthdays):\n counter = 0\n for i in possible_birthdays:\n if day == i[1]:\n counter = counter + 1\n if counter == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n counter = 0\n for i in possible_birthdays:\n if month == i[0]:\n counter = counter + 1\n if counter == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n tup = ()\n for i in possible_birthdays:\n if month == i[0]:\n tup = tup + (i,)\n for j in tup:\n day = j[1]\n if unique_day(day, possible_birthdays) == True:\n return True\n else:\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1557,"func_code":"def unique_day(day, possible_birthdays):\n counter = 0\n for i in possible_birthdays:\n if day == i[1]:\n counter = counter + 1\n if counter == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n counter = 0\n for i in possible_birthdays:\n if month == i[0]:\n counter = counter + 1\n if counter == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n month_day = ()\n for j in possible_birthdays:\n if month == j[0]:\n month_day = month_day + (j,)\n for t in month_day:\n if unique_day(t[1], possible_birthdays) == True:\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1558,"func_code":"def unique_day(day, possible_birthdays):\n new = ()\n for i in range (len(possible_birthdays)):\n new = new + (possible_birthdays[i][1],)\n if new.count(day) == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n new = ()\n for i in range (len(possible_birthdays)):\n new = new + (possible_birthdays[i][0],)\n if new.count(month) == 1:\n return True\n else:\n return False\n\n\ndef contains_unique_day(month, possible_birthdays):\n new = ()\n for i in possible_birthdays:\n if i[0] == month:\n new = new + (i[1],)\n for i in new:\n if unique_day(i, possible_birthdays):\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1559,"func_code":"def unique_day(date, possible_birthdays):\n uniqueday = ()\n days = ()\n for i in possible_birthdays:\n days += (i[1],)\n for i in days:\n if i == date:\n uniqueday += (i,)\n else:\n continue\n \n if len(uniqueday) == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n uniquemonth = ()\n months = ()\n for i in possible_birthdays:\n months += (i[0],)\n for i in months:\n if i == month:\n uniquemonth += (i,)\n else:\n continue\n \n if len(uniquemonth) == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n choose_month = ()\n uniqueday_in_month = ()\n \n for i in possible_birthdays:\n if i[0] == month:\n choose_month += (i,)\n else:\n continue\n \n for i in choose_month:\n if unique_day(i[1], possible_birthdays) == True:\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1560,"func_code":"def unique_day(day, possible_birthdays):\n\treturn len(tuple(filter(lambda y: day == y, \n\tmap(lambda x: x[1], possible_birthdays)))) == 1\n\ndef unique_month(month, possible_birthdays):\n\treturn len(tuple(filter(lambda y: month == y, \n\tmap(lambda x: x[0], possible_birthdays)))) == 1\n\ndef contains_unique_day(month, possible_birthdays):\n\treturn len(tuple(filter(lambda x: unique_day(x[1], possible_birthdays), \n\t\tfilter(lambda y: y[0] == month, possible_birthdays)))) > 0\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1561,"func_code":"def unique_day(day, possible_birthdays):\n counter = 0\n for i in range(len(possible_birthdays)):\n if day == possible_birthdays[i][1]:\n counter = counter + 1\n return counter == 1\n\ndef unique_month(month, possible_birthdays):\n counter = 0\n for i in range(len(possible_birthdays)):\n if month == possible_birthdays[i][0]:\n counter = counter + 1\n return counter == 1\n\ndef contains_unique_day(month, possible_birthdays):\n counter = 0\n birthdays = ()\n days = ()\n for i in range(len(possible_birthdays)):\n if month == possible_birthdays[i][0]:\n birthdays = birthdays + (possible_birthdays[i],)\n else:\n days = days + (possible_birthdays[i][1],)\n for i in range(len(birthdays)):\n if birthdays[i][1] in days:\n counter = counter + 1\n return (len(birthdays)> counter)\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1562,"func_code":"def unique_day(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if date == i[1]:\n count += 1\n else:\n continue\n if count == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if month == i[0]:\n count += 1\n else:\n continue\n if count == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n months = ()\n for i in possible_birthdays:\n if i[0] == month:\n months = months + (i,)\n else:\n continue\n for i in months:\n if unique_day(i[1], possible_birthdays) == True:\n return True\n else:\n continue\n return False\n\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1563,"func_code":"def unique_day(date, possible_birthdays):\n counter = 0\n for i in possible_birthdays:\n if i[1] == date:\n counter += 1\n if counter == 1:\n return True\n return False\n \ndef unique_month(month, possible_birthdays):\n counter = 0\n for i in possible_birthdays:\n if i[0] == month:\n counter += 1\n if counter == 1:\n return True\n return False\n \ndef contains_unique_day(month, possible_birthdays):\n counter = 0\n for i in possible_birthdays:\n if month == i[0] and unique_day(i[1], possible_birthdays):\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1564,"func_code":"def unique_day(day, possible_birthdays):\n counter = 0\n for i in possible_birthdays:\n if i[1] == day:\n counter += 1\n if counter == 1:\n return True\n return False\n \ndef unique_month(month, possible_birthdays):\n counter = 0\n for i in possible_birthdays:\n if i[0] == month:\n counter += 1\n if counter == 1:\n return True\n return False\n \ndef contains_unique_day(month, possible_birthdays):\n counter = 0\n for i in possible_birthdays:\n if month == i[0] and unique_day(i[1], possible_birthdays):\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1565,"func_code":"def unique_day(day, possible_birthdays):\n count=0\n for x in possible_birthdays:\n if x[1]==day:\n count=count+1\n if count == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n count=0\n for x in possible_birthdays:\n if x[0]==month:\n count=count+1\n if count == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n for x in possible_birthdays:\n if x[0]==month:\n if unique_day(x[1], possible_birthdays):\n return True\n else:\n continue\n else:\n continue\n return False\n \n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1566,"func_code":"def unique_day(day, possible_birthdays):\n counter = 0\n for i in range(len(possible_birthdays)):\n if day == possible_birthdays[i][1]:\n counter = counter + 1\n return counter == 1\n\ndef unique_month(month, possible_birthdays):\n counter = 0\n for i in range(len(possible_birthdays)):\n if month == possible_birthdays[i][0]:\n counter = counter + 1\n return counter == 1\n\ndef contains_unique_day(month, possible_birthdays):\n counter = 0\n birthdays = ()\n days = ()\n for i in range(len(possible_birthdays)):\n if month == possible_birthdays[i][0]:\n birthdays = birthdays + (possible_birthdays[i],)\n else:\n days = days + (possible_birthdays[i][1],)\n for i in range(len(birthdays)):\n if birthdays[i][1] in days:\n counter = counter + 1\n return (len(birthdays)> counter)\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1567,"func_code":"def unique_day(day, possible_birthdays):\n result = 0\n for i in possible_birthdays:\n if day in i:\n result = result + 1\n if result > 1:\n return False\n elif result == 0:\n return False\n else:\n return True\n\ndef unique_month(month, possible_birthdays):\n result = 0\n for i in possible_birthdays:\n if month in i:\n result = result + 1\n if result > 1:\n return False\n elif result == 0:\n return False\n else:\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n month_tup = ()\n helper = 0\n for i in possible_birthdays:\n if month in i:\n month_tup = month_tup + possible_birthdays[helper]\n helper = helper + 1\n for i in range(1, 32):\n if unique_day(str(i), possible_birthdays) == True:\n if str(i) in month_tup:\n return True\n return False\n\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1568,"func_code":"def unique_day(day, possible_birthdays):\n count=0\n for x in possible_birthdays:\n if x[1]==day:\n count=count+1\n if count == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n count=0\n for x in possible_birthdays:\n if x[0]==month:\n count=count+1\n if count == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n for x in possible_birthdays:\n if x[0]==month:\n if unique_day(x[1], possible_birthdays):\n return True\n else:\n continue\n else:\n continue\n return False\n \n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1569,"func_code":"def unique_day(day, possible_birthdays):\n s=0\n for b in possible_birthdays:\n if b[1]==day:\n s=s+1\n else:\n continue\n return s==1\n\ndef unique_month(month, possible_birthdays):\n s=0\n for b in possible_birthdays:\n if b[0]==month:\n s=s+1\n else:\n continue\n return s==1\n\ndef contains_unique_day(month, possible_birthdays):\n a=0\n for b in possible_birthdays:\n if b[0]==month:\n s=b[1]\n if unique_day(s,possible_birthdays):\n a=a+1\n break\n else:\n continue\n else:\n continue\n if a==1:\n return True\n else:\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1570,"func_code":"def unique_day(day, possible_birthdays):\n bag = []\n for birthdays in possible_birthdays:\n if birthdays[1] == day:\n bag.append(day)\n n = len(bag)\n if n == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n bag = []\n for months in possible_birthdays:\n if months[0] == month:\n bag.append(month)\n n = len(bag)\n if n == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n bag = ()\n for months in possible_birthdays:\n if months[0] == month:\n bag += ((months[1]),)\n for days in bag:\n if unique_day(days,possible_birthdays):\n return True\n else:\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1571,"func_code":"def unique_day(date, possible_birthdays):\n count=0\n for i in possible_birthdays:\n if i[1] == date:\n count+=1\n return count==1\n\ndef unique_month(month, possible_birthdays):\n count=0\n for i in possible_birthdays:\n if i[0] == month:\n count=count+1\n return count==1\n\ndef contains_unique_day(month, possible_birthdays):\n tf=False \n for i in possible_birthdays:\n if i[0]==month:\n tf=tf or unique_day(i[1],possible_birthdays)\n return tf\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1572,"func_code":"def unique_day(date, possible_birthdays):\n total= 0\n for i in possible_birthdays:\n if date == i[1]:\n total= total + 1\n return total == 1\n\ndef unique_month(month, possible_birthdays):\n total= 0\n for i in possible_birthdays:\n if month == i[0]:\n total= total + 1\n return total == 1\n\ndef contains_unique_day(month, possible_birthdays):\n for a in possible_birthdays:\n if unique_day(a[1],possible_birthdays):\n if month == a[0]:\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1573,"func_code":"def unique_day(day, possible_birthdays):\n a= tuple(filter(lambda birthday: day == birthday[1], possible_birthdays))\n\n return (len(a) ==1) \n\ndef unique_month(month, possible_birthdays):\n a= tuple(filter(lambda birth_month: month == birth_month[0], possible_birthdays))\n\n return (len(a) ==1) \n \ndef contains_unique_day(month, possible_birthdays):\n #filter out month\n a = filter(lambda birth_month: month == birth_month[0], possible_birthdays)\n for i in a:\n if unique_day(i[1],possible_birthdays):\n return True\n\n return False \n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1574,"func_code":"def unique_day(day, possible_birthdays):\n count=0\n for i in possible_birthdays:\n if day == i[1]:\n count+=1\n else:\n continue\n if count==1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n count=0\n for i in possible_birthdays:\n if month == i[0]:\n count+=1\n else:\n continue\n if count==1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n for i in possible_birthdays:\n if i[0]==month:\n if unique_day(i[1],possible_birthdays):\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1575,"func_code":"def unique_day(day, possible_birthdays):\n s=0\n for b in possible_birthdays:\n if b[1]==day:\n s=s+1\n else:\n continue\n return s==1\n\ndef unique_month(month, possible_birthdays):\n s=0\n for b in possible_birthdays:\n if b[0]==month:\n s=s+1\n else:\n continue\n return s==1\n\ndef contains_unique_day(month, possible_birthdays):\n a=0\n for b in possible_birthdays:\n if b[0]==month:\n s=b[1]\n if unique_day(s,possible_birthdays):\n a=a+1\n break\n else:\n continue\n else:\n continue\n if a==1:\n return True\n else:\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1576,"func_code":"def unique_day(day, possible_birthdays):\n count=0\n for i in possible_birthdays:\n if day == i[1]:\n count+=1\n else:\n continue\n if count==1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n count=0\n for i in possible_birthdays:\n if month == i[0]:\n count+=1\n else:\n continue\n if count==1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n for i in possible_birthdays:\n if i[0]==month:\n if unique_day(i[1],possible_birthdays):\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1577,"func_code":"def unique_day(day, possible_birthdays):\n result = 0\n for birthdays in possible_birthdays:\n if birthdays[1] == day:\n result = result + 1\n if result == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n result = 0\n for months in possible_birthdays:\n if months[0] == month:\n result = result + 1\n if result == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n result = ()\n for birthdays in possible_birthdays:\n if birthdays[0] == month:\n result = result + (birthdays,)\n for birthdayss in result:\n if unique_day(birthdayss[1], possible_birthdays):\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1578,"func_code":"def unique_day(day, possible_birthdays):\n result = 0\n for birthdays in possible_birthdays:\n if birthdays[1] == day:\n result = result + 1\n if result == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n result = 0\n for months in possible_birthdays:\n if months[0] == month:\n result = result + 1\n if result == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n result = ()\n for birthdays in possible_birthdays:\n if birthdays[0] == month:\n result = result + (birthdays,)\n for birthdayss in result:\n if unique_day(birthdayss[1], possible_birthdays):\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1579,"func_code":"def unique_day(day, possible_birthdays):\n b=[] # list of dates\n for birthday in possible_birthdays:\n b.append(birthday[1])\n if b.count(day)==1:\n return True\n \n return False\n\ndef unique_month(month, possible_birthdays):\n b=[] \n for birthday in possible_birthdays:\n b.append(birthday[0])\n if b.count(month)==1:\n return True\n \n return False\n \ndef contains_unique_day(month, possible_birthdays):\n b=[]\n for birthday in possible_birthdays:\n if month == birthday[0]:\n b.append(birthday[1]) #add date to b\n for day in b:\n if unique_day(day,possible_birthdays)==True:\n return True\n \n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1580,"func_code":"def unique_day(date, possible_birthdays):\n lenth=len(possible_birthdays)\n count=0\n for i in range(0,lenth):\n if date==possible_birthdays[i][1]:\n count=count+1\n if count==1:\n return True\n else:\n return False\n \n\ndef unique_month(month, possible_birthdays):\n lenth=len(possible_birthdays)\n count=0\n for i in range(0,lenth):\n if month==possible_birthdays[i][0]:\n count=count+1\n if count==1:\n return True\n else:\n return False\n \n\ndef contains_unique_day(month, possible_birthdays):\n count=()\n for i in possible_birthdays:\n if i[0]==month:\n if i not in count:\n count=count+(i,)\n for j in count:\n if unique_day(j[1], possible_birthdays):\n return True\n return False\n\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1581,"func_code":"def unique_day(date, possible_birthdays):\n count=0\n for i in possible_birthdays:\n if i[1] == date:\n count+=1\n return count==1\n\ndef unique_month(month, possible_birthdays):\n count=0\n for i in possible_birthdays:\n if i[0] == month:\n count=count+1\n return count==1\n\ndef contains_unique_day(month, possible_birthdays):\n tf=False \n for i in possible_birthdays:\n if i[0]==month:\n tf=tf or unique_day(i[1],possible_birthdays)\n return tf\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1582,"func_code":"def unique_day(day, possible_birthdays):\n result = 0\n for i in possible_birthdays:\n if i[1] == day:\n result += 1\n elif i[1] != day:\n result += 0\n if result == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n result = 0\n for i in possible_birthdays:\n if i[0] == month:\n result += 1\n elif i[0] != month:\n result += 0\n if result == 1:\n return True\n else:\n return False\n\n\ndef contains_unique_day(month, possible_birthdays):\n for i in possible_birthdays:\n if i[0] == month:\n if unique_day(i[1],possible_birthdays):\n return True\n else:\n continue\n else:\n continue\n return False\n\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1583,"func_code":"def unique_day(day, possible_birthdays):\n counter = 0\n for birthday in possible_birthdays:\n if day == birthday[1]:\n counter += 1 \n return counter == 1\n\ndef unique_month(month, possible_birthdays):\n counter = 0\n for birthday in possible_birthdays:\n if month == birthday[0]:\n counter += 1\n return counter == 1\n\ndef contains_unique_day(month, possible_birthdays):\n truth_holder = False\n for birthday in possible_birthdays:\n if birthday[0] != month:\n continue\n else:\n truth_holder = truth_holder or unique_day(birthday[1], possible_birthdays)\n return truth_holder\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1584,"func_code":"def unique_day(day, possible_birthdays):\n check_day = tuple(filter(lambda x: x[1] == day, possible_birthdays))\n if len(check_day) == 1:\n return True\n return False\n\ndef unique_month(month, possible_birthdays):\n \"\"\"Your solution here\"\"\"\n check_month = tuple(filter(lambda x: x[0] == month, possible_birthdays))\n if len(check_month) == 1:\n return True\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n date_day = ()\n for date in possible_birthdays:\n if date[0] == month:\n date_day += (date[1],)\n for check in date_day: # loop through the tuple date_day, each element gives a day\n check_day = tuple(filter(lambda x: x[1] == check, possible_birthdays))\n if len(check_day) == 1:\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1585,"func_code":"\ndef unique_day(day, possible_birthdays):\n counter = 0\n for i in range (len(possible_birthdays)):\n if day == possible_birthdays[i][1]:\n counter += 1\n if counter == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n counter = 0\n for i in range (len(possible_birthdays)):\n if month == possible_birthdays[i][0]:\n counter += 1\n if counter == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n total,i = (), 0\n while i < len(possible_birthdays):\n if possible_birthdays[i][0] == month:\n total += (possible_birthdays[i],)\n i += 1\n for x in total:\n if unique_day(x[1], possible_birthdays) == True:\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1586,"func_code":"def unique_day(day, possible_birthdays):\n result = 0\n for birthdays in possible_birthdays:\n if birthdays[1] == day:\n result = result + 1\n if result == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n result = 0\n for months in possible_birthdays:\n if months[0] == month:\n result = result + 1\n if result == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n result = ()\n for birthdays in possible_birthdays:\n if birthdays[0] == month:\n result = result + (birthdays,)\n for birthdayss in result:\n if unique_day(birthdayss[1], possible_birthdays):\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1587,"func_code":"\ndef unique_day(day, possible_birthdays):\n count = 0\n for i in range(len(possible_birthdays)):\n if day == possible_birthdays[i][1]:\n count += 1\n if count != 1:\n return False\n else:\n return True\n\ndef unique_month(month, possible_birthdays):\n count = 0\n for i in range(len(possible_birthdays)):\n if month == possible_birthdays[i][0]:\n count += 1\n if count != 1:\n return False\n else:\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n new_possible_birthdays = ()\n for i in range(len(possible_birthdays)):\n if month == possible_birthdays[i][0]:\n new_possible_birthdays += (possible_birthdays[i],)\n new_day = \"\"\n counter = 0\n for n in range(len(new_possible_birthdays)):\n new_day = new_possible_birthdays[n][1]\n if unique_day(new_day,possible_birthdays) == True:\n counter += 1\n if counter == 0:\n return False\n else:\n return True\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1588,"func_code":"def unique_day(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count = count + 1\n if count == 1:\n return True \n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n count = count + 1\n if count == 1:\n return True\n else:\n return False\n \ndef contains_unique_day(month, possible_birthdays):\n same_month_tuple = ()\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n same_month_tuple = same_month_tuple + (i,)\n for i in same_month_tuple:\n if unique_day(i[1], possible_birthdays):\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1589,"func_code":"def unique_day(day, possible_birthdays):\n counter = 0\n for i in possible_birthdays:\n if day == i[1]:\n counter = counter + 1\n if counter != 1:\n return False\n return True\n \ndef unique_month(month, possible_birthdays):\n counter = 0\n for i in possible_birthdays:\n if month == i[0]:\n counter = counter + 1\n if counter != 1:\n return False\n return True\n \ndef contains_unique_day(month, possible_birthdays):\n count_of_days = ()\n for i in possible_birthdays:\n if month == i[0]:\n count_of_days = count_of_days + (i[1], )\n for i2 in count_of_days: \n if unique_day(i2, possible_birthdays) == True:\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1590,"func_code":"def unique_day(day, possible_birthdays):\n result = 0\n for i in range(len(possible_birthdays)):\n if day in possible_birthdays[i]:\n result += 1\n if result == 1:\n return True\n else:\n return False\n\n\ndef unique_month(month, possible_birthdays):\n result = 0\n for i in range(len(possible_birthdays)):\n if month in possible_birthdays[i]:\n result += 1\n if result == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n days = ()\n for i in possible_birthdays:\n if i[0] == month:\n days += (i[1],)\n for i in days:\n if unique_day(i, possible_birthdays):\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1591,"func_code":"def unique_day(day, possible_birthdays):\n i = 0\n for days in possible_birthdays:\n if int(day) == int(days[1]):\n i += 1\n if i == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n i = 0\n for months in possible_birthdays:\n if month == months[0]:\n i += 1\n if i == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n data = ()\n number = 0\n for datas in possible_birthdays:\n if month in datas:\n data += (datas,)\n for days in data:\n number += unique_day(days[1], possible_birthdays)\n if number >= 1:\n return True\n else:\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1592,"func_code":"def unique_day(day, possible_birthdays):\n data=()\n for birthday in possible_birthdays:\n if day == birthday[1]:\n data += (birthday,)\n if len(data)==1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n data = ()\n for birthday in possible_birthdays:\n if month == birthday[0]:\n data += (birthday,)\n if len(data)==1:\n return True\n else:\n return False\n \ndef contains_unique_day(month, possible_birthdays):\n data, outcome = (),()\n for birthday in possible_birthdays:\n if month == birthday[0]:\n data += (birthday,)\n for birthday in data:\n if unique_day(birthday[1], possible_birthdays) == True:\n outcome += birthday\n else:\n continue\n if outcome == ():\n return False\n else:\n return unique_day(outcome[1],possible_birthdays)\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1593,"func_code":"def unique_day(date, possible_birthdays):\n result = 0\n for n in possible_birthdays:\n if n[1] == date:\n result = result + 1\n if result != 1:\n return False\n else:\n return True\n\ndef unique_month(month, possible_birthdays):\n result = 0\n for n in possible_birthdays:\n if n[0] == month:\n result = result + 1\n if result != 1:\n return False\n else:\n return True\n \n\ndef contains_unique_day(month, possible_birthdays):\n tup = ()\n for n in possible_birthdays:\n if n[0] == month:\n tup = tup + ((n), )\n else:\n continue\n for n in tup:\n if unique_day(n[1], possible_birthdays):\n return True\n return False\n \n\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1594,"func_code":"def unique_day(day, possible_birthdays):\n i = 0\n for days in possible_birthdays:\n if int(day) == int(days[1]):\n i += 1\n if i == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n i = 0\n for months in possible_birthdays:\n if month == months[0]:\n i += 1\n if i == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n data = ()\n number = 0\n for datas in possible_birthdays:\n if month in datas:\n data += (datas,)\n for days in data:\n number += unique_day(days[1], possible_birthdays)\n if number >= 1:\n return True\n else:\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1595,"func_code":"def unique_day(day, possible_birthdays):\n counter = 0\n for i in possible_birthdays:\n if day == i[1]:\n counter += 1\n if counter != 1:\n return False\n return True\n\ndef unique_month(month, possible_birthdays):\n counter = 0\n for i in possible_birthdays:\n if month == i[0]:\n counter += 1\n if counter != 1:\n return False\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n counter = 0\n for i in possible_birthdays:\n if month == i[0]:\n if unique_day(i[1], possible_birthdays):\n counter += 1\n if counter != 0:\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1596,"func_code":"def unique_day(day, possible_birthdays):\n data=()\n for birthday in possible_birthdays:\n if day == birthday[1]:\n data += (birthday,)\n if len(data)==1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n data = ()\n for birthday in possible_birthdays:\n if month == birthday[0]:\n data += (birthday,)\n if len(data)==1:\n return True\n else:\n return False\n \ndef contains_unique_day(month, possible_birthdays):\n data, outcome = (),()\n for birthday in possible_birthdays:\n if month == birthday[0]:\n data += (birthday,)\n for birthday in data:\n if unique_day(birthday[1], possible_birthdays) == True:\n outcome += birthday\n else:\n continue\n if outcome == ():\n return False\n else:\n return unique_day(outcome[1],possible_birthdays)\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1597,"func_code":"def unique_day(day, possible_birthdays):\n counter = 0\n for elem in possible_birthdays:\n birthday = elem[1]\n if birthday == day:\n counter += 1\n if counter == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n counter = 0\n for elem in possible_birthdays:\n birthmonth = elem[0]\n if birthmonth == month:\n counter += 1\n if counter == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n for elem in possible_birthdays:\n birthmonth = elem[0]\n if birthmonth == month:\n if unique_day(elem[1], possible_birthdays) == True:\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1598,"func_code":"def unique_day(day, possible_birthdays):\n counter = 0\n for i in possible_birthdays:\n if day == i[1]:\n counter += 1\n if counter != 1:\n return False\n return True\n\ndef unique_month(month, possible_birthdays):\n counter = 0\n for i in possible_birthdays:\n if month == i[0]:\n counter += 1\n if counter != 1:\n return False\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n counter = 0\n for i in possible_birthdays:\n if month == i[0]:\n if unique_day(i[1], possible_birthdays):\n counter += 1\n if counter != 0:\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1599,"func_code":"\ndef unique_day(day, possible_birthdays):\n count = 0\n for i in range(len(possible_birthdays)):\n if day == possible_birthdays[i][1]:\n count += 1\n if count != 1:\n return False\n else:\n return True\n\ndef unique_month(month, possible_birthdays):\n count = 0\n for i in range(len(possible_birthdays)):\n if month == possible_birthdays[i][0]:\n count += 1\n if count != 1:\n return False\n else:\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n new_possible_birthdays = ()\n for i in range(len(possible_birthdays)):\n if month == possible_birthdays[i][0]:\n new_possible_birthdays += (possible_birthdays[i],)\n new_day = \"\"\n counter = 0\n for n in range(len(new_possible_birthdays)):\n new_day = new_possible_birthdays[n][1]\n if unique_day(new_day,possible_birthdays) == True:\n counter += 1\n if counter == 0:\n return False\n else:\n return True\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1600,"func_code":"def unique_day(day, possible_birthdays):\n result = 0\n for i in possible_birthdays:\n if day in i:\n result = result + 1\n if result > 1:\n return False\n elif result == 0:\n return False\n else:\n return True\n\ndef unique_month(month, possible_birthdays):\n result = 0\n for i in possible_birthdays:\n if month in i:\n result = result + 1\n if result > 1:\n return False\n elif result == 0:\n return False\n else:\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n month_tup = ()\n helper = 0\n for i in possible_birthdays:\n if month in i:\n month_tup = month_tup + possible_birthdays[helper]\n helper = helper + 1\n for i in range(1, 32):\n if unique_day(str(i), possible_birthdays) == True:\n if str(i) in month_tup:\n return True\n return False\n\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1601,"func_code":"def unique_day(day, possible_birthdays):\n datetup = ()\n for item in possible_birthdays:\n if item[1] == day:\n datetup = datetup + (item[1],)\n if len(datetup) == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n datetup = ()\n for item in possible_birthdays:\n if item[0] == month:\n datetup = datetup + (item[0],)\n if len(datetup) == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n datetup = ()\n for item in possible_birthdays:\n if item[0] == month:\n datetup = datetup + (item,)\n for item in datetup:\n if unique_day(item[1], possible_birthdays):\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1602,"func_code":"def unique_day(day, possible_birthdays):\n datetup = ()\n for item in possible_birthdays:\n if item[1] == day:\n datetup = datetup + (item[1],)\n if len(datetup) == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n datetup = ()\n for item in possible_birthdays:\n if item[0] == month:\n datetup = datetup + (item[0],)\n if len(datetup) == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n datetup = ()\n for item in possible_birthdays:\n if item[0] == month:\n datetup = datetup + (item,)\n for item in datetup:\n if unique_day(item[1], possible_birthdays):\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1603,"func_code":"def unique_day(day, possible_birthdays):\n counter = 0\n for i in possible_birthdays:\n if day in i:\n counter += 1\n if counter == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n counter = 0\n for i in possible_birthdays:\n if month in i:\n counter += 1\n if counter == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n new_list = ()\n for i in possible_birthdays:\n if month in i:\n new_list += (i,)\n if len(new_list)== 1 or 0:\n return False\n else:\n counter = 0\n for i in new_list:\n if unique_day(i[1], possible_birthdays) == True:\n counter += 1\n if counter >= 1:\n return True\n else:\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1604,"func_code":"def unique_day(day, possible_birthdays):\n counter = 0\n for i in possible_birthdays:\n if day in i:\n counter += 1\n if counter == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n counter = 0\n for i in possible_birthdays:\n if month in i:\n counter += 1\n if counter == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n new_list = ()\n for i in possible_birthdays:\n if month in i:\n new_list += (i,)\n if len(new_list)== 1 or 0:\n return False\n else:\n counter = 0\n for i in new_list:\n if unique_day(i[1], possible_birthdays) == True:\n counter += 1\n if counter >= 1:\n return True\n else:\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1605,"func_code":"def unique_day(date, possible_birthdays):\n count=0\n for i in possible_birthdays: \n if i[1]==date:\n count+=1\n if count!=1: #if not can put count==1\n return False\n else:\n return True\n \n\ndef unique_month(month, possible_birthdays):\n count=0\n for i in possible_birthdays:\n if i[0]==month:\n count+=1\n if count!= 1:\n return False \n else:\n return True\n \n\ndef contains_unique_day(month, possible_birthdays):\n new_possible_birthdays = ()\n for i in range(len(possible_birthdays)):\n if month == possible_birthdays[i][0]:\n new_possible_birthdays += (possible_birthdays[i],)\n new_day = \"\"\n counter = 0\n for n in range(len(new_possible_birthdays)):\n new_day = new_possible_birthdays[n][1]\n if unique_day(new_day,possible_birthdays) == True:\n counter += 1\n if counter == 0:\n return False\n else:\n return True\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1606,"func_code":"def unique_day(day, possible_birthdays):\n a = 0\n for birthday in possible_birthdays:\n if birthday[1] == day:\n a = a + 1\n if a == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n \"\"\"Your solution here\"\"\"\n a = 0\n for birthday in possible_birthdays:\n if birthday[0] == month:\n a = a + 1\n if a == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n \"\"\"Your solution here\"\"\"\n b = False\n def month_tup(month):\n a = ()\n for birthday in possible_birthdays:\n if month == birthday[0]:\n a = a + (birthday,)\n return a\n for birthday in month_tup(month):\n if unique_day(birthday[1], possible_birthdays) == True:\n b = True\n return b\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1607,"func_code":"\ndef unique_day(day, possible_birthdays):\n counter = 0\n for i in range (len(possible_birthdays)):\n if day == possible_birthdays[i][1]:\n counter += 1\n if counter == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n counter = 0\n for i in range (len(possible_birthdays)):\n if month == possible_birthdays[i][0]:\n counter += 1\n if counter == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n total,i = (), 0\n while i < len(possible_birthdays):\n if possible_birthdays[i][0] == month:\n total += (possible_birthdays[i],)\n i += 1\n for x in total:\n if unique_day(x[1], possible_birthdays) == True:\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1608,"func_code":"def unique_day(day, possible_birthdays):\n counter = 0\n for i in possible_birthdays:\n if day == i[1]:\n counter = counter + 1\n if counter == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n counter = 0\n for i in possible_birthdays:\n if month == i[0]:\n counter = counter + 1\n if counter == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n month_day = ()\n for j in possible_birthdays:\n if month == j[0]:\n month_day = month_day + (j,)\n for t in month_day:\n if unique_day(t[1], possible_birthdays) == True:\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1609,"func_code":"def unique_day(day, possible_birthdays):\n count = 0\n alldays = ()\n for i in possible_birthdays:\n alldays += (i[1],)\n for i in alldays:\n if day == i:\n count += 1\n if count == 1:\n return True\n else:\n return False\n \ndef unique_month(month, possible_birthdays):\n count = 0\n allmonths = ()\n for i in possible_birthdays:\n allmonths += (i[0],)\n for i in allmonths:\n if month == i:\n count += 1\n if count == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n count = 0\n matchmonth = ()\n for i in possible_birthdays:\n if month == i[0]:\n matchmonth += (i,)\n for i in matchmonth:\n if unique_day(i[1], possible_birthdays):\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1610,"func_code":"def unique_day(date, possible_birthdays):\n result = 0\n for n in possible_birthdays:\n if n[1] == date:\n result = result + 1\n if result != 1:\n return False\n else:\n return True\n\ndef unique_month(month, possible_birthdays):\n result = 0\n for n in possible_birthdays:\n if n[0] == month:\n result = result + 1\n if result != 1:\n return False\n else:\n return True\n \n\ndef contains_unique_day(month, possible_birthdays):\n tup = ()\n for n in possible_birthdays:\n if n[0] == month:\n tup = tup + ((n), )\n else:\n continue\n for n in tup:\n if unique_day(n[1], possible_birthdays):\n return True\n return False\n \n\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1611,"func_code":"def unique_day(day, possible_birthdays):\n def get_day(birthday):\n return birthday[1]\n count = 0\n for i in possible_birthdays:\n if get_day(i) == day:\n count +=1\n else:\n continue\n if count == 1:\n return True\n else:\n return False\n\n\ndef unique_month(month, possible_birthdays):\n def get_month(birthday):\n return birthday[0]\n count = 0\n for i in possible_birthdays:\n if get_month(i) == month:\n count +=1\n else:\n continue\n if count == 1:\n return True\n else:\n return False\n\ndef get_month(birthday):\n return birthday[0]\ndef get_day(birthday):\n return birthday[1]\n\ndef contains_unique_day(month, possible_birthdays):\n for i in possible_birthdays:\n if get_month(i) == month and unique_day(get_day(i), possible_birthdays):\n return True\n else:\n continue\n return False \n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1612,"func_code":"def unique_day(day, possible_birthdays):\n counter = 0\n for x in possible_birthdays:\n x_day = x[1]\n if day == x_day:\n counter += 1\n else:\n counter = counter\n if counter == 1:\n return True\n else:\n return False\n\n\ndef unique_month(month, possible_birthdays):\n counter = 0\n for x in possible_birthdays:\n x_month = x[0]\n if month == x_month:\n counter += 1\n else:\n counter = counter\n if counter == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n list_of_days = ()\n for x in possible_birthdays:\n if month == x[0]:\n x_day = x[1]\n if unique_day(x_day,possible_birthdays) == True:\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1613,"func_code":"def unique_day(date, possible_birthdays):\n if len(tuple(filter(lambda x: x[1] == date, possible_birthdays))) != 1:\n return False\n else:\n return True\n\ndef unique_month(month, possible_birthdays):\n if len(tuple(filter(lambda x: x[0] == month, possible_birthdays))) != 1:\n return False\n else:\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n singledays = tuple(filter((lambda x: unique_day(x[1], possible_birthdays)), possible_birthdays))\n for i in singledays:\n if i[0] == month:\n return True\n return False\n \n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1614,"func_code":"def unique_day(date, possible_birthdays):\n total= 0\n for i in possible_birthdays:\n if date == i[1]:\n total= total + 1\n return total == 1\n\ndef unique_month(month, possible_birthdays):\n total= 0\n for i in possible_birthdays:\n if month == i[0]:\n total= total + 1\n return total == 1\n\ndef contains_unique_day(month, possible_birthdays):\n for a in possible_birthdays:\n if unique_day(a[1],possible_birthdays):\n if month == a[0]:\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1615,"func_code":"def unique_day(day, possible_birthdays):\n counter = 0\n for x in possible_birthdays:\n x_day = x[1]\n if day == x_day:\n counter += 1\n else:\n counter = counter\n if counter == 1:\n return True\n else:\n return False\n\n\ndef unique_month(month, possible_birthdays):\n counter = 0\n for x in possible_birthdays:\n x_month = x[0]\n if month == x_month:\n counter += 1\n else:\n counter = counter\n if counter == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n list_of_days = ()\n for x in possible_birthdays:\n if month == x[0]:\n x_day = x[1]\n if unique_day(x_day,possible_birthdays) == True:\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1616,"func_code":"def unique_day(day, possible_birthdays):\n result = 0\n for i in possible_birthdays:\n if day == i[1]:\n result = result + 1\n else:\n continue \n \n if result == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n result = 0\n for i in possible_birthdays:\n if month == i[0]:\n result = result + 1\n else:\n continue \n \n if result == 1:\n return True\n else:\n return False\ndef contains_unique_day(month, possible_birthdays):\n for i in possible_birthdays:\n if month == i[0]:\n if unique_day(i[1], possible_birthdays) == False:\n continue \n else:\n return True \n return False \n return True\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1617,"func_code":"def unique_day(day, possible_birthdays):\n result = 0\n for i in possible_birthdays:\n if day == i[1]:\n result = result + 1\n else:\n continue \n \n if result == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n result = 0\n for i in possible_birthdays:\n if month == i[0]:\n result = result + 1\n else:\n continue \n \n if result == 1:\n return True\n else:\n return False\ndef contains_unique_day(month, possible_birthdays):\n for i in possible_birthdays:\n if month == i[0]:\n if unique_day(i[1], possible_birthdays) == False:\n continue \n else:\n return True \n return False \n return True\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1618,"func_code":"def unique_day(day, possible_birthdays):\n counter = 0\n for item in possible_birthdays:\n if item[1] == day:\n counter = counter + 1\n if counter !=1:\n return False\n return True\n\ndef unique_month(month, possible_birthdays):\n counter = 0\n for item in possible_birthdays:\n if item[0] == month:\n counter = counter + 1\n if counter != 1:\n return False\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n dates_in_month = ()\n new_possible_birthdays = ()\n for item in possible_birthdays:\n if month in item:\n dates_in_month += (item[1],)\n elif month not in item:\n new_possible_birthdays += (item[1],)\n result = 0\n for item in dates_in_month:\n if item in new_possible_birthdays:\n result += 1\n if result != len(dates_in_month):\n return True\n else:\n return False \n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1619,"func_code":"def unique_day(day, possible_birthdays):\n \n if len(tuple(filter(\n lambda x : x[1] == day, possible_birthdays))) == 1:\n return True\n return False\n\ndef unique_month(month, possible_birthdays):\n\n if len(tuple(filter(\n lambda x : x[0] == month, possible_birthdays))) == 1:\n return True\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n special_days = tuple(filter((\n lambda x: unique_day(x[1], possible_birthdays)),\n possible_birthdays))\n for i in special_days:\n if i[0] == month:\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1620,"func_code":"def unique_day(day, possible_birthdays):\n counter = 0\n for elem in possible_birthdays:\n birthday = elem[1]\n if birthday == day:\n counter += 1\n if counter == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n counter = 0\n for elem in possible_birthdays:\n birthmonth = elem[0]\n if birthmonth == month:\n counter += 1\n if counter == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n for elem in possible_birthdays:\n birthmonth = elem[0]\n if birthmonth == month:\n if unique_day(elem[1], possible_birthdays) == True:\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1621,"func_code":"def unique_day(date, possible_birthdays):\n days = [birthday[1] for birthday in possible_birthdays]\n return days.count(date) == 1\n\ndef unique_month(month, possible_birthdays):\n months = [birthday[0] for birthday in possible_birthdays]\n return months.count(month) == 1\n\ndef contains_unique_day(month, possible_birthdays):\n days = list(filter(lambda x: x[0] == month, possible_birthdays))\n for day in days:\n if unique_day(day[1], possible_birthdays):\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1622,"func_code":"def unique_day(day, possible_birthdays):\n x = ()\n y = ()\n for i in possible_birthdays:\n x += (i[1],)\n for i in x:\n if i == day:\n y += (i,)\n else:\n continue\n if len(y) == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n x = ()\n y = ()\n for i in possible_birthdays:\n x += (i[0],)\n for i in x:\n if i == month:\n y += (i,)\n else:\n continue\n if len(y) == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n x = ()\n y = ()\n for i in possible_birthdays:\n if i[0] == month:\n x += (i,)\n else:\n continue\n for i in x:\n if unique_day(i[1], possible_birthdays) == True:\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1623,"func_code":"def unique_day(day, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if day == i[1]:\n count = count + 1\n if count == 1:\n return True\n else:\n return False\ndef unique_month(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if month== i[0]:\n count = count + 1\n if count == 1:\n return True\n else:\n return False\ndef contains_unique_day(month, possible_birthdays):\n newtuple = ()\n for i in possible_birthdays:\n if month== i[0]:\n newtuple = newtuple + (i,)\n for j in newtuple:\n if unique_day(j[1], possible_birthdays) == True:\n return True\n else:\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1624,"func_code":"def unique_day(day, possible_birthdays):\n i, times = 0, 0\n while i < len(possible_birthdays):\n if possible_birthdays[i][1] == day:\n times += 1\n i += 1\n if times == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n i, times = 0, 0\n while i < len(possible_birthdays):\n if possible_birthdays[i][0] == month:\n times += 1\n i += 1\n if times == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n for i in range (0,len(possible_birthdays)):\n if possible_birthdays[i][0] == month and unique_day(possible_birthdays[i][1], possible_birthdays):\n return True\n else:\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1625,"func_code":"def unique_day(day, possible_birthdays):\n i, times = 0, 0\n while i < len(possible_birthdays):\n if possible_birthdays[i][1] == day:\n times += 1\n i += 1\n if times == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n i, times = 0, 0\n while i < len(possible_birthdays):\n if possible_birthdays[i][0] == month:\n times += 1\n i += 1\n if times == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n for i in range (0,len(possible_birthdays)):\n if possible_birthdays[i][0] == month and unique_day(possible_birthdays[i][1], possible_birthdays):\n return True\n else:\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1626,"func_code":"\ndef unique_day(day, possible_birthdays):\n days = ()\n unique = ()\n for i in possible_birthdays:\n days += (i[1],)\n for i in days:\n if i == day:\n unique += (i,)\n else:\n continue\n if len(unique) == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n months = ()\n unique = ()\n for i in possible_birthdays:\n months += (i[0],)\n for i in months:\n if i == month:\n unique += (i,)\n else:\n continue\n if len(unique) == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n selected_month = ()\n unique = ()\n for i in possible_birthdays:\n if i[0] == month:\n selected_month += (i,)\n else:\n continue\n for i in selected_month:\n if unique_day(i[1], possible_birthdays) == True:\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1627,"func_code":"def unique_day(day, possible_birthdays):\n def map(fn,seq):\n if seq == ():\n return ()\n else:\n return (fn(seq[0]),) + map(fn,seq[1:])\n days = map(lambda x: x[1], possible_birthdays)\n filter1 = filter(lambda x:x == day, days)\n tup = tuple(filter1)\n return len(tup) == 1\n\ndef unique_month(month, possible_birthdays):\n def map(fn,seq):\n if seq == ():\n return ()\n else:\n return (fn(seq[0]),) + map(fn,seq[1:])\n months = map(lambda x: x[0], possible_birthdays)\n filter2 = filter(lambda x:x == month, months)\n tup2 = tuple(filter2)\n return len(tup2) == 1\n\ndef contains_unique_day(month, possible_birthdays):\n days = ()\n for a in possible_birthdays: \n if a[0] == month:\n days = days + (a[1],)\n for b in days:\n if unique_day(b, possible_birthdays):\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1628,"func_code":"def unique_day(day, possible_birthdays):\n counter = 0\n for ele in possible_birthdays:\n birthday = ele[1]\n if birthday == day:\n counter += 1\n if counter == 1:\n return True\n else:\n return False\n\n\n\n\ndef unique_month(month, possible_birthdays):\n counter = 0\n for ele in possible_birthdays:\n birthmonth = ele[0]\n if birthmonth == month:\n counter += 1\n if counter == 1:\n return True\n else:\n return False\n\n\n\n\ndef contains_unique_day(month, possible_birthdays):\n for ele in possible_birthdays:\n birthmonth = ele[0]\n if birthmonth == month:\n if unique_day(ele[1], possible_birthdays) == True:\n return True\n return False\n\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1629,"func_code":"def unique_day(day, possible_birthdays):\n get_possible_days = map(lambda bdays:bdays[1],possible_birthdays)\n count = 0\n for days in get_possible_days:\n if days == day:\n count = count + 1\n if count == 1:\n return True\n else:\n return False\ndef unique_month(month, possible_birthdays):\n get_possible_months = map(lambda bdays:bdays[0],possible_birthdays)\n count = 0\n for months in get_possible_months:\n if months == month:\n count = count + 1\n if count == 1:\n return True\n else:\n return False\ndef contains_unique_day(month, possible_birthdays):\n get_possible_months = filter(lambda birthday: birthday[0] == month, possible_birthdays)\n get_possible_days = map(lambda birthday: birthday[1],get_possible_months)\n for days in get_possible_days:\n if unique_day(days, possible_birthdays):\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1630,"func_code":"def unique_day(day, possible_birthdays):\n counter=0\n for birthday in possible_birthdays:\n if day==birthday[1]:\n counter+=1\n else:\n continue\n if counter==1:\n return True\n else:\n return False\ndef unique_month(month, possible_birthdays):\n counter=0\n for birthday in possible_birthdays:\n if month==birthday[0]:\n counter+=1\n else:\n continue\n if counter==1:\n return True\n else:\n return False\ndef filter_1(pred,seq):\n if seq==():\n return ()\n elif pred(seq[0]):\n return (seq[0],) + filter_1(pred,seq[1:])\n else:\n return filter_1(pred,seq[1:])\n \ndef contains_unique_day(month, possible_birthdays):\n month_dates=filter_1(lambda x:True if x[0]==month else False, possible_birthdays)\n for date in month_dates:\n if unique_day(date[1],possible_birthdays):\n return True\n else:\n continue\n else:\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1631,"func_code":"def unique_day(day, possible_birthdays):\n\n count=0\n\n for i in possible_birthdays:\n\n if day == i[1]:\n\n count+=1\n\n else:\n\n continue\n\n if count==1:\n\n return True\n\n else:\n\n return False\n\ndef unique_month(month, possible_birthdays):\n\n count=0\n\n for i in possible_birthdays:\n\n if month == i[0]:\n\n count+=1\n\n else:\n\n continue\n\n if count==1:\n\n return True\n\n else:\n\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n\n for i in possible_birthdays:\n\n if i[0]==month:\n\n if unique_day(i[1],possible_birthdays):\n\n return True\n\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1632,"func_code":"\ndef unique_day(day, possible_birthdays):\n a = 0\n for item in possible_birthdays:\n for i in item:\n if i == day:\n a += 1\n if a == 1:\n return True\n else:\n return False\ndef unique_month(month, possible_birthdays):\n a = 0\n for item in possible_birthdays:\n for i in item:\n if i == month:\n a += 1\n if a == 1:\n return True\n else:\n return False\ndef contains_unique_day(month, possible_birthdays):\n a = 0\n b = 0\n for item in possible_birthdays:\n if month in item:\n a = item\n if unique_day(item[1],possible_birthdays) == True:\n b += 1\n if b >= 1:\n return True\n else:\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1633,"func_code":"def unique_day(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if date == i[1]:\n count += 1\n return count == 1\ndef unique_month(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if month == i[0]:\n count += 1\n return count == 1\ndef contains_unique_day(month, possible_birthdays):\n days = ()\n for i in possible_birthdays:\n if month == i[0]:\n days += (i[1],)\n for i in days:\n if unique_day(i, possible_birthdays):\n return True\n \n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1634,"func_code":"def unique_day(day, possible_birthdays):\n counter=0\n for i in possible_birthdays:\n if i[1]==day:\n counter+=1\n return counter==1\n \ndef unique_month(month, possible_birthdays):\n counter=0\n for i in possible_birthdays:\n if i[0]==month:\n counter+=1\n return counter==1\n \ndef contains_unique_day(month, possible_birthdays):\n value=()\n for i in possible_birthdays:\n if i[0]==month:\n value+=(i,)\n for i in value:\n if unique_day(i[1],possible_birthdays):\n return True\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1635,"func_code":"def unique_day(day, possible_birthdays):\n counter = 0\n for ele in possible_birthdays:\n birthday = ele[1]\n if birthday == day:\n counter += 1\n if counter == 1:\n return True\n else:\n return False\n\n\n\n\ndef unique_month(month, possible_birthdays):\n counter = 0\n for ele in possible_birthdays:\n birthmonth = ele[0]\n if birthmonth == month:\n counter += 1\n if counter == 1:\n return True\n else:\n return False\n\n\n\n\ndef contains_unique_day(month, possible_birthdays):\n for ele in possible_birthdays:\n birthmonth = ele[0]\n if birthmonth == month:\n if unique_day(ele[1], possible_birthdays) == True:\n return True\n return False\n\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1636,"func_code":"def unique_day(day, possible_birthdays):\n a=0\n for i in range(len(possible_birthdays)):\n if day==possible_birthdays[i][1]:\n a+=1\n if a==1:\n return True\n else:\n return False\n \ndef contains_unique_day(month, possible_birthdays):\n b=0\n for i in range(len(possible_birthdays)):\n if month==possible_birthdays[i][0]:\n b+=unique_day(possible_birthdays[i][1],possible_birthdays)\n if b==0:\n return False\n else:\n return True\n \ndef unique_month(month, possible_birthdays):\n a=0\n for i in range(len(possible_birthdays)):\n if month==possible_birthdays[i][0]:\n a+=1\n if a==1:\n return True\n else:\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1637,"func_code":"def unique_day(day, possible_birthdays):\n a=0\n for i in range(len(possible_birthdays)):\n if day==possible_birthdays[i][1]:\n a+=1\n if a==1:\n return True\n else:\n return False\n \ndef contains_unique_day(month, possible_birthdays):\n b=0\n for i in range(len(possible_birthdays)):\n if month==possible_birthdays[i][0]:\n b+=unique_day(possible_birthdays[i][1],possible_birthdays)\n if b==0:\n return False\n else:\n return True\n \ndef unique_month(month, possible_birthdays):\n a=0\n for i in range(len(possible_birthdays)):\n if month==possible_birthdays[i][0]:\n a+=1\n if a==1:\n return True\n else:\n return False\n","correct":true,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1638,"func_code":"def unique_day(day, possible_birthdays):\n for i in range (len(possible_birthdays)):\n if possible_birthdays[i][1] == day:\n for j in range (i + 1, len(possible_birthdays)):\n if possible_birthdays[j][1] == day:\n return False\n return True\ndef unique_month(month, possible_birthdays):\n for i in range (len(possible_birthdays)):\n if possible_birthdays[i][0] == month:\n for j in range (i + 1, len(possible_birthdays)):\n if possible_birthdays[j][0] == month:\n return False\n return True\ndef contains_unique_day(month, possible_birthdays):\n for i in possible_birthdays:\n if i[0] == month:\n if unique_day(i[1], possible_birthdays):\n return True\n return False \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1639,"func_code":"def unique_day(day, possible_birthdays):\n num=0\n for i in possible_birthdays:\n if day==i[1]:\n num+=1\n return num==1\n\ndef unique_month(month, possible_birthdays):\n num=0\n for i in possible_birthdays:\n if month==i[0]:\n num+=1\n return num==1\n\ndef contains_unique_day(month, possible_birthdays):\n days=()\n for i in possible_birthdays:\n if month==i[0]:\n if unique_day(i[1],possible_birthdays):\n days = days + (i[1],)\n return len(days)==1\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1640,"func_code":"def unique_day(day, possible_birthdays):\n num=0\n for i in possible_birthdays:\n if day==i[1]:\n num+=1\n return num==1\n\ndef unique_month(month, possible_birthdays):\n num=0\n for i in possible_birthdays:\n if month==i[0]:\n num+=1\n return num==1\n\ndef contains_unique_day(month, possible_birthdays):\n days=()\n for i in possible_birthdays:\n if month==i[0]:\n if unique_day(i[1],possible_birthdays):\n days = days + (i[1],)\n return len(days)==1\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1641,"func_code":"def unique_day(date, possible_birthdays):\n count = 0\n for birthday in possible_birthdays:\n if birthday[1] == day:\n count += 1\n return count == 1\n\ndef unique_month(month, possible_birthdays):\n return\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1642,"func_code":"def unique_day(date, possible_birthdays):\n count = 0\n for birthday in possible_birthdays:\n if birthday[1] == day:\n count += 1\n return count == 1\n\ndef unique_month(month, possible_birthdays):\n count = 0\n for birthday in possible_birthdays:\n if birthday[0] == month:\n count += 1\n return count == 1\n\ndef contains_unique_day(month, possible_birthdays):\n for birthday in possible_birthdays:\n if birthday[0] == month:\n if unique_day(birthday[1], possible_birthdays):\n return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1643,"func_code":"def unique_day(date, possible_birthdays):\n \n days = 0 \n \n for i in range(len(possible_birthdays)):\n if possible_birthdays[i][1] == days:\n day = day + 1\n \n if days == 1:\n return True\n else:\n return False \n\ndef unique_month(month, possible_birthdays):\n \n month = 0\n \n for i in range(len(possible_birthdays)):\n if possible_birthdays[i][0] == days:\n day = day + 1\n \n if days == 1:\n return True\n else:\n return False \n \ndef contains_unique_day(month, possible_birthdays):\n \n x = () \n \n for i in range(len(possible_birthdays)):\n \n if possible_birthdays[i][0] == month:\n \n x = x + (possible_birthdays[i],)\n for j in range(len(x)):\n if unique_day(x[j][1], possible_birthdays):\n return True\n else:\n continue\n return False \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1644,"func_code":"def unique_day(date, possible_birthdays):\n \n days = 0 \n \n for i in range(len(possible_birthdays)):\n if possible_birthdays[i][1] == days:\n day = day + 1\n \n if days == 1:\n return True\n else:\n return False \n\ndef unique_month(month, possible_birthdays):\n \n month = 0\n \n for i in range(len(possible_birthdays)):\n if possible_birthdays[i][0] == month:\n day = day + 1\n \n if days == 1:\n return True\n else:\n return False \n \ndef contains_unique_day(month, possible_birthdays):\n \n x = () \n \n for i in range(len(possible_birthdays)):\n \n if possible_birthdays[i][0] == month:\n \n x = x + (possible_birthdays[i],)\n for j in range(len(x)):\n if unique_day(x[j][1], possible_birthdays):\n return True\n else:\n continue\n return False \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1645,"func_code":"def unique_day(date, possible_birthdays):\n \n days = 0 \n \n for i in range(len(possible_birthdays)):\n if possible_birthdays[i][1] == days:\n day = day + 1\n \n if days == 1:\n return True\n else:\n return False \n\ndef unique_month(month, possible_birthdays):\n \n months = 0\n \n for i in range(len(possible_birthdays)):\n if possible_birthdays[i][0] == month:\n months = months + 1\n \n if months == 1:\n return True\n else:\n return False \n \ndef contains_unique_day(month, possible_birthdays):\n \n x = () \n \n for i in range(len(possible_birthdays)):\n \n if possible_birthdays[i][0] == month:\n \n x = x + (possible_birthdays[i],)\n for j in range(len(x)):\n if unique_day(x[j][1], possible_birthdays):\n return True\n else:\n continue\n return False \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1646,"func_code":"def unique_day(date, possible_birthdays):\n \n days = 0 \n \n for i in range(len(possible_birthdays)):\n if possible_birthdays[i][1] == days:\n day = day + 1\n \n if days == 1:\n return True\n else:\n return False \n\ndef unique_month(month, possible_birthdays):\n \n months = 0\n \n for i in range(len(possible_birthdays)):\n if possible_birthdays[i][0] == month:\n months = months + 1\n \n if months == 1:\n return True\n else:\n return False \n \ndef contains_unique_day(month, possible_birthdays):\n \n x = () \n \n for i in range(len(possible_birthdays)):\n \n if possible_birthdays[i][0] == month:\n \n x = x + (possible_birthdays[i],)\n for j in range(len(x)):\n if unique_day(x[j][1], possible_birthdays):\n return True\n else:\n continue\n return False \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1647,"func_code":"def unique_day(date, possible_birthdays):\n \n days = 0 \n \n for i in range(len(possible_birthdays)):\n if possible_birthdays[i][1] == days:\n day = day + 1\n \n if days == 1:\n return True\n else:\n return False \n\n\ndef unique_month(month, possible_birthdays):\n \n months = 0\n for i in range(len(possible_birthdays)):\n \n if possible_birthdays[i][0] == month:\n months = months + 1\n if months == 1:\n return True\n else:\n return False\n \ndef contains_unique_day(month, possible_birthdays):\n \n x = () \n \n for i in range(len(possible_birthdays)):\n \n if possible_birthdays[i][0] == month:\n \n x = x + (possible_birthdays[i],)\n for j in range(len(x)):\n if unique_day(x[j][1], possible_birthdays):\n return True\n else:\n continue\n return False \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1648,"func_code":"def unique_day(date, possible_birthdays):\n \n days = 0 \n \n for i in range(len(possible_birthdays)):\n if possible_birthdays[i][1] == day:\n days = days + 1\n \n if days == 1:\n return True\n else:\n return False \n\n\ndef unique_month(month, possible_birthdays):\n \n months = 0\n for i in range(len(possible_birthdays)):\n \n if possible_birthdays[i][0] == month:\n months = months + 1\n if months == 1:\n return True\n else:\n return False\n \ndef contains_unique_day(month, possible_birthdays):\n \n x = () \n \n for i in range(len(possible_birthdays)):\n \n if possible_birthdays[i][0] == month:\n \n x = x + (possible_birthdays[i],)\n for j in range(len(x)):\n if unique_day(x[j][1], possible_birthdays):\n return True\n else:\n continue\n return False \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1649,"func_code":"def unique_day(date, possible_birthdays):\n \n days = 0 \n \n for i in range(len(possible_birthdays)):\n if possible_birthdays[i][1] == day:\n days = days + 1\n \n if days == 1:\n return True\n else:\n return False \n \n count = 0 \n for i in range(len(possible_birthdays)):\n if possible_birthdays[i][1] == day:\n count += 1\n if count == 1:\n return True\n else:\n return False\n\n\ndef unique_month(month, possible_birthdays):\n \n months = 0\n for i in range(len(possible_birthdays)):\n \n if possible_birthdays[i][0] == month:\n months = months + 1\n if months == 1:\n return True\n else:\n return False\n \ndef contains_unique_day(month, possible_birthdays):\n \n x = () \n \n for i in range(len(possible_birthdays)):\n \n if possible_birthdays[i][0] == month:\n \n x = x + (possible_birthdays[i],)\n for j in range(len(x)):\n if unique_day(x[j][1], possible_birthdays):\n return True\n else:\n continue\n return False \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1650,"func_code":"def unique_day(date, possible_birthdays):\n \n days = 0 \n \n for i in range(len(possible_birthdays)):\n if possible_birthdays[i][1] == day:\n days = days + 1\n \n if days == 1:\n return True\n else:\n return False \n \n\n\ndef unique_month(month, possible_birthdays):\n \n months = 0\n for i in range(len(possible_birthdays)):\n \n if possible_birthdays[i][0] == month:\n months = months + 1\n if months == 1:\n return True\n else:\n return False\n \ndef contains_unique_day(month, possible_birthdays):\n \n x = () \n \n for i in range(len(possible_birthdays)):\n \n if possible_birthdays[i][0] == month:\n \n x = x + (possible_birthdays[i],)\n for j in range(len(x)):\n if unique_day(x[j][1], possible_birthdays):\n return True\n else:\n continue\n return False \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1651,"func_code":"def unique_day(date, possible_birthdays):\n count = 0 \n for i in range(len(possible_birthdays)):\n if possible_birthdays[i][1] == day:\n count += 1\n if count == 1:\n return True\n else:\n return False\n \n\n\ndef unique_month(month, possible_birthdays):\n \n months = 0\n for i in range(len(possible_birthdays)):\n \n if possible_birthdays[i][0] == month:\n months = months + 1\n if months == 1:\n return True\n else:\n return False\n \ndef contains_unique_day(month, possible_birthdays):\n \n x = () \n \n for i in range(len(possible_birthdays)):\n \n if possible_birthdays[i][0] == month:\n \n x = x + (possible_birthdays[i],)\n for j in range(len(x)):\n if unique_day(x[j][1], possible_birthdays):\n return True\n else:\n continue\n return False \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1652,"func_code":"def unique_day(date, possible_birthdays):\n \n days = 0 \n \n for i in range(len(possible_birthdays)):\n if possible_birthdays[i][1] == day:\n days = days + 1\n \n if days == 1:\n return True\n else:\n return False \n \n\n\ndef unique_month(month, possible_birthdays):\n \n months = 0\n for j in range(len(possible_birthdays)):\n \n if possible_birthdays[j][0] == month:\n months = months + 1\n if months == 1:\n return True\n else:\n return False\n \ndef contains_unique_day(month, possible_birthdays):\n \n x = () \n \n for k in range(len(possible_birthdays)):\n \n if possible_birthdays[k][0] == month:\n \n x = x + (possible_birthdays[k],)\n \n for l in range(len(x)):\n if unique_day(x[l][1], possible_birthdays):\n return True\n else:\n continue\n return False \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1653,"func_code":"def map(fn, seq):\n res = ()\n\n for ele in seq:\n res = res + (fn(ele), )\n return res\n\ndef unique_day(day, possible_birthdays):\n days = map(lambda x: x[1], possible_birthdays)\n times = 0\n for i in days:\n if i==day:\n times = times+1\n else:\n continue\n if times>1:\n return False\n else:\n return True\n\ndef unique_month(month, possible_birthdays):\n months = map(lambda x: x[0], possible_birthdays)\n times = 0\n for i in months:\n if i==month:\n times = times+1\n else:\n continue\n if times>1:\n return False\n else:\n return True\n\n\ndef filter(pred, seq):\n res = ()\n\n for ele in seq:\n if pred(ele):\n res = res + (ele, )\n return res\n\ndef contains_unique_day(month, possible_birthdays):\n relevant_dates= filter(lambda x: x[0] == month, possible_birthdays)\n days = map(lambda x: x[1], relevant_dates)\n times = 0\n for i in days:\n if unique_day(i, possible_birthdays):\n times = times+1\n else:\n continue\n if times==0:\n return False\n else:\n return True \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1654,"func_code":"def unique_day(day, possible_birthdays):\n count_day = 0\n for birthday in possible_birthdays:\n if day == birthday[1]:\n if count_day == 0: count_day += 1\n else: return False\n return True\n\ndef unique_month(month, possible_birthdays):\n count_month = 0\n for birthday in possible_birthdays:\n if month == birthday[0]:\n if count_month == 0: count_month += 1\n else: return False\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n for birthday in possible_birthdays:\n if month == birthday[0]:\n day = birthday[1]\n if unique_day(day, possible_birthdays): return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1655,"func_code":"def unique_day(day, possible_birthdays):\n count_day = 0\n for birthday in possible_birthdays:\n if day == birthday[1]:\n if count_day == 0: count_day += 1\n else: return False\n return True\n\ndef unique_month(month, possible_birthdays):\n count_month = 0\n for birthday in possible_birthdays:\n if month == birthday[0]:\n if count_month == 0: count_month += 1\n else: return False\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n for birthday in possible_birthdays:\n if month == birthday[0]:\n day = birthday[1]\n if unique_day(day, possible_birthdays): return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1656,"func_code":"def unique_day(date, possible_birthdays):\n\n count =0\n\n for i in possible_birthdays:\n\n if date==i[1]:\n\n count+=1\n\n return count==1\n\ndef unique_month(month, possible_birthdays):\n\n count =0\n\n for i in possible_birthdays:\n\n if month==i[0]:\n\n count+=1\n\n return count==1\n\ndef contains_unique_day(month, possible_birthdays):\n\n daysinmonth=()\n\n count=0\n\n for i in possible_birthdays:\n\n if month==i[0]:\n\n daysinmonth+=(i[1],)\n\n for i in daysinmonth:\n\n if unique_day(i,possible_birthdays):\n count+=1\n\n return count==1\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1657,"func_code":"def unique_day(date, possible_birthdays):\n\n count =0\n\n for i in possible_birthdays:\n\n if date==i[1]:\n\n count+=1\n\n return count==1\n\ndef unique_month(month, possible_birthdays):\n\n count =0\n\n for i in possible_birthdays:\n\n if month==i[0]:\n\n count+=1\n\n return count==1\n\ndef contains_unique_day(month, possible_birthdays):\n\n daysinmonth=()\n\n count=0\n\n for i in possible_birthdays:\n\n if month==i[0]:\n\n daysinmonth+=(i[1],)\n\n for i in daysinmonth:\n\n if unique_day(i,possible_birthdays):\n count+=1\n\n return count==1\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1658,"func_code":"def unique_day(day, possible_birthdays):\n possible_days = tuple(map(lambda x: x[1], possible_birthdays))\n counter = 0\n for possible_day in possible_days:\n if day == possible_day:\n counter = counter + 1\n if counter == 1:\n return True\n elif counter > 1:\n return False\n else:\n return \"Not a day in possible_birthdays\"\n\ndef unique_month(month, possible_birthdays):\n possible_months = tuple(map(lambda x: x[0], possible_birthdays))\n counter = 0\n for possible_month in possible_months:\n if month == possible_month:\n counter = counter + 1\n if counter == 1:\n return True\n elif counter > 1:\n return False\n else:\n return \"Not a month in possible_birthdays\" \n\ndef contains_unique_day(month, possible_birthdays):\n def contains_month(month, elem):\n return month == elem[0]\n pos_bd_containing_month = tuple(filter(lambda x: contains_month(month, x), possible_birthdays))\n for element in pos_bd_containing_month:\n if unique_day(element[1], possible_birthdays) == True:\n return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1659,"func_code":"def unique_day(day, possible_birthdays):\n index = 1\n for days in tuple(map(lambda x:x[1], possible_birthdays)):\n if day == days:\n index = index*(-1)\n if index == 1:\n return False\n return True\n\ndef unique_month(month, possible_birthdays):\n index = 1\n for months in tuple(map(lambda x:x[0], possible_birthdays)):\n if month == months:\n index = index*(-1)\n if index == 1:\n return False\n return True\n \ndef contains_unique_day(month, possible_birthdays):\n birthday_list = tuple(filter(lambda x: x[0] == month, possible_birthdays))\n for i in tuple(map(lambda x: x[1], birthday_list)):\n if unique_day(i,possible_birthdays):\n return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1660,"func_code":"def unique_day(day, possible_birthdays):\n count = 0\n for birthdays in possible_birthdays:\n if birthdays[1] == day:\n count +=1\n if count == 2:\n return False\n return True\n\ndef unique_month(month, possible_birthdays):\n count = 0\n for birthdays in possible_birthdays:\n if birthdays[0] == month:\n count +=1\n if count == 2:\n return False\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n count = ()\n for birthdays in possible_birthdays:\n if birthdays[0] == month:\n count += (birthdays,)\n for sub_birthday in count:\n if unique_day(sub_birthday[1], possible_birthdays):\n return True\n return False \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1661,"func_code":"def unique_day(day, possible_birthdays):\n count = 0\n for birthdays in possible_birthdays:\n if birthdays[1] == day:\n count +=1\n if count == 2:\n return False\n return True\n\ndef unique_month(month, possible_birthdays):\n count = 0\n for birthdays in possible_birthdays:\n if birthdays[0] == month:\n count +=1\n if count == 2:\n return False\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n count = ()\n for birthdays in possible_birthdays:\n if birthdays[0] == month:\n count += (birthdays,)\n for sub_birthday in count:\n if unique_day(sub_birthday[1], possible_birthdays):\n return True\n return False \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1662,"func_code":"def unique_day(day, possible_birthdays):\n checker = []\n for bday in possible_birthdays:\n if day == bday[1] and day not in checker:\n checker.append(day)\n elif day == bday[1] and day in checker:\n return False\n return True\n\ndef unique_month(month, possible_birthdays):\n checker = []\n for bday in possible_birthdays:\n if month == bday[0] and month not in checker:\n checker.append(month)\n elif month == bday[0] and month in checker:\n return False\n return True\n \ndef contains_unique_day(month, possible_birthdays):\n for bday in possible_birthdays:\n if bday[0] == month:\n if unique_day(bday[1], possible_birthdays) == True:\n return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1663,"func_code":"def unique_day(day, possible_birthdays):\n checker = []\n for bday in possible_birthdays:\n if day == bday[1] and day not in checker:\n checker.append(day)\n elif day == bday[1] and day in checker:\n return False\n return True\n\ndef unique_month(month, possible_birthdays):\n checker = []\n for bday in possible_birthdays:\n if month == bday[0] and month not in checker:\n checker.append(month)\n elif month == bday[0] and month in checker:\n return False\n return True\n \ndef contains_unique_day(month, possible_birthdays):\n for bday in possible_birthdays:\n if bday[0] == month:\n if unique_day(bday[1], possible_birthdays) == True:\n return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1664,"func_code":"def unique_day(day, possible_birthdays):\n birthday_with_day = list(filter(lambda birthday: birthday[1] == day \\\n , possible_birthdays))\n if len(birthday_with_day) >= 2:\n return False\n return True\n\ndef unique_month(month, possible_birthdays):\n birthday_with_month = list(filter(lambda birthday: birthday[0] == month \\\n , possible_birthdays))\n if len(birthday_with_month) >= 2:\n return False\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n birthday_with_month = list(filter(lambda birthday: birthday[0] == month \\\n , possible_birthdays))\n birthday_day = list(map(lambda birthday: birthday[1], birthday_with_month))\n unique_day_list = list(filter(lambda day: unique_day(day, possible_birthdays)\\\n , birthday_day))\n return len(unique_day_list) > 0\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1665,"func_code":"def unique_day(date, possible_birthdays):\n flag = 0\n for i in possible_birthdays:\n if i[1] == day:\n flag += 1\n\n return True if flag == 1 else False\n\ndef unique_month(month, possible_birthdays):\n flag = 0\n for i in possible_birthdays:\n if i[0] == month:\n flag += 1\n\n return True if flag == 1 else False\n\ndef contains_unique_day(month, possible_birthdays):\n flag = 0\n unique_days = []\n\n for i in possible_birthdays:\n if i[1] not in unique_days:\n unique_days.append(i[1])\n else:\n unique_days.remove(i[1])\n\n for i in possible_birthdays:\n if i[0] == month and i[1] in unique_days:\n return True\n\n return False \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1666,"func_code":"def unique_day(date, possible_birthdays):\n tpl = ()\n for i in possible_birthdays:\n tpl += (i[1],)\n if tpl.count(date) > 1:\n return False\n return True \n\ndef unique_month(month, possible_birthdays):\n tpl = ()\n for j in possible_birthdays:\n tpl += (j[0],)\n if tpl.count(month) > 1:\n return False\n return True \n\ndef contains_unique_day(month, possible_birthdays):\n tpl = ()\n for k in possible_birthdays:\n if k[0] == month:\n tpl += (k[1],)\n for l in tpl:\n if unique_day(l, possible_birthdays) == True:\n return True\n return False \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1667,"func_code":"def unique_day(date, possible_birthdays):\n tpl = ()\n for i in possible_birthdays:\n tpl += (i[1],)\n if tpl.count(date) > 1:\n return False\n return True \n\ndef unique_month(month, possible_birthdays):\n return\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1668,"func_code":"def unique_day(date, possible_birthdays):\n tpl = ()\n for i in possible_birthdays:\n tpl += (i[1],)\n if tpl.count(date) > 1:\n return False\n return True \n\ndef unique_month(month, possible_birthdays):\n tpl = ()\n for j in possible_birthdays:\n tpl += (i[0],)\n if tpl.count(month) > 1:\n return False\n return True \n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1669,"func_code":"def unique_day(date, possible_birthdays):\n tpl = ()\n for i in possible_birthdays:\n tpl += (i[1],)\n if tpl.count(date) > 1:\n return False\n return True \n\ndef unique_month(month, possible_birthdays):\n tpl = ()\n for j in possible_birthdays:\n tpl += (i[0],)\n if tpl.count(month) > 1:\n return False\n return True \n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1670,"func_code":"def unique_day(date, possible_birthdays):\n tpl = ()\n for i in possible_birthdays:\n tpl += (i[1],)\n if tpl.count(date) > 1:\n return False\n return True \n\ndef unique_month(month, possible_birthdays):\n tpl = ()\n for j in possible_birthdays:\n tpl += (j[0],)\n if tpl.count(month) > 1:\n return False\n return True \n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1671,"func_code":"def unique_day(date, possible_birthdays):\n tpl = ()\n for i in possible_birthdays:\n tpl += (i[1],)\n if tpl.count(date) > 1:\n return False\n return True \n\ndef unique_month(month, possible_birthdays):\n tpl = ()\n for j in possible_birthdays:\n tpl += (j[0],)\n if tpl.count(month) > 1:\n return False\n return True \n\ndef contains_unique_day(month, possible_birthdays):\n tpl = ()\n for k in possible_birthdays:\n if k[0] == month:\n tpl += (k[1],)\n for l in tpl:\n if unique_day(l, possible_birthdays) == True:\n return True\n return False \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1672,"func_code":"def unique_day(day, possible_birthdays):\n a=''\n for date in possible_birthdays:\n if a== date[1]:\n return False\n elif day ==date[1]:\n a=day\n \n return True\n\n\ndef unique_month(month, possible_birthdays):\n a=''\n for date in possible_birthdays:\n if a== date[0]:\n return False\n elif month ==date[0]:\n a=month\n \n return True\n\ndef contains_unique_day(month, possible_birthdays):\n for date in possible_birthdays:\n if month==date[0]:\n if unique_day(date[1], possible_birthdays):\n return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1673,"func_code":"def unique_day(day, possible_birthdays):\n a=''\n for date in possible_birthdays:\n if a== date[1]:\n return False\n elif day ==date[1]:\n a=day\n \n return True\n\n\ndef unique_month(month, possible_birthdays):\n a=''\n for date in possible_birthdays:\n if a== date[0]:\n return False\n elif month ==date[0]:\n a=month\n \n return True\n\ndef contains_unique_day(month, possible_birthdays):\n for date in possible_birthdays:\n if month==date[0]:\n if unique_day(date[1], possible_birthdays):\n return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1674,"func_code":"def unique_day(date, possible_birthdays):\n tup = ()\n for i in possible_birthdays:\n if i[1] == day:\n tup += (i[1],)\n if len(tup) == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n tup = ()\n for i in possible_birthdays:\n if i[0] == month:\n tup += (i[0],)\n if len(tup) == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n tup = ()\n for date in possible_birthdays:\n if date[0] == month:\n tup += (date,)\n for bday in tup:\n if unique_day(bday[1], possible_birthdays):\n return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1675,"func_code":"def unique_day(date, possible_birthdays):\n tup = ()\n for i in possible_birthdays:\n if i[1] == day:\n tup += (i[1],)\n if len(tup) == 1:\n return True\n elif len(tup) > 1:\n return False\n elif len(tup) == 0:\n return None\n\ndef unique_month(month, possible_birthdays):\n tup = ()\n for i in possible_birthdays:\n if i[0] == month:\n tup += (i[0],)\n if len(tup) == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n tup = ()\n for date in possible_birthdays:\n if date[0] == month:\n tup += (date,)\n for bday in tup:\n if unique_day(bday[1], possible_birthdays):\n return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1676,"func_code":"def unique_day(day, possible_birthdays):\n tup = ()\n for i in possible_birthdays:\n if i[1] == day:\n tup += (i[1],)\n if len(tup) == 1:\n return True\n elif len(tup) > 1:\n return False\n elif len(tup) == 0:\n return None\n\ndef unique_month(month, possible_birthdays):\n tup = ()\n for i in possible_birthdays:\n if i[0] == month:\n tup += (i[0],)\n if len(tup) == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n tup = ()\n for date in possible_birthdays:\n if date[0] == month:\n tup += (date,)\n for bday in tup:\n if unique_day(bday[1], possible_birthdays):\n return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1677,"func_code":"def unique_day(date, possible_birthdays):\n num = 0\n for birthday in possible_birthdays:\n if day == birthday[1]:\n num += 1\n return num == 1\n\ndef unique_month(month, possible_birthdays):\n num = 0\n for birthday in possible_birthdays:\n if month == birthday[0]:\n num += 1\n return num == 1\n\ndef contains_unique_day(month, possible_birthdays):\n for birthday in possible_birthdays:\n if month == birthday[0]:\n if unique_day(birthday[1], possible_birthdays):\n return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1678,"func_code":"def unique_day(day, possible_birthdays):\n days = ()\n for birthdays in possible_birthdays:\n days += (birthdays[1],)\n a = 0\n for dates in days:\n if day == dates:\n a +=1\n if a !=1:\n return False\n return True\n\ndef unique_month(month, possible_birthdays):\n return\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1679,"func_code":"def unique_day(day, possible_birthdays):\n days = ()\n for birthdays in possible_birthdays:\n days += (birthdays[1],)\n a = 0\n for dates in days:\n if day == dates:\n a +=1\n if a !=1:\n return False\n return True\n\ndef unique_month(month, possible_birthdays):\n months = ()\n for birthdays in possible_birthdays:\n months += (birthdays[0],)\n a = 0\n for dates in months:\n if month == dates:\n a +=1\n if a !=1:\n return False\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1680,"func_code":"\ndef unique_day(day, possible_birthdays):\n \n count=0\n for birthday in possible_birthdays:\n if day in birthday[1]:\n count+=1\n if count==1:\n return True\n else:\n return False \n\n\ndef unique_month(month, possible_birthdays):\n count=0\n for birthday_month in possible_birthdays:\n if month in birthday_month[0]:\n count+=1\n if count==1:\n return True\n else:\n return False\n \n\n\ndef contains_unique_day(month, possible_birthdays):\n month_tuple=()\n for birthday in possible_birthdays:\n if month==birthday[0]:\n month_tuple+=(birthday,)\n else:\n continue\n for day in month_tuple:\n \n if unique_day(day[1], possible_birthdays)== True :\n return True\n return False\n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1681,"func_code":"\ndef unique_day(day, possible_birthdays):\n \n count=0\n for birthday in possible_birthdays:\n if day in birthday[1]:\n count+=1\n if count==1:\n return True\n else:\n return False \n\ndef unique_month(month, possible_birthdays):\n return\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1682,"func_code":"\ndef unique_day(day, possible_birthdays):\n \n count=0\n for birthday in possible_birthdays:\n if day in birthday[1]:\n count+=1\n if count==1:\n return True\n else:\n return False \n\n\ndef unique_month(month, possible_birthdays):\n count=0\n for birthday_month in possible_birthdays:\n if month in birthday_month[0]:\n count+=1\n if count==1:\n return True\n else:\n return False\n \n\n\ndef contains_unique_day(month, possible_birthdays):\n month_tuple=()\n for birthday in possible_birthdays:\n if month==birthday[0]:\n month_tuple+=(birthday,)\n else:\n continue\n for day in month_tuple:\n \n if unique_day(day[1], possible_birthdays)== True :\n return True\n return False\n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1683,"func_code":"def unique_day(day, possible_birthdays):\n\tnum=0\n\tfor i in possible_birthdays:\n\t\tif day==i[1]:\n\t\t\tnum=num+1\n\tif num==1:\n\t\treturn True\n\n\telse:\n\t\treturn False\n\t\t\ndef unique_month(month, possible_birthdays):\n\tnum=0\n\tfor i in possible_birthdays:\n\t\tif month==i[0]:\n\t\t\tnum=num+1\n\tif num==1:\n\t\treturn True\n\n\telse:\n\t\treturn False\n\ndef contains_unique_day(month, possible_birthdays):\n\tresult=()\n\tfor i in possible_birthdays:\n\t\tif unique_day(i[1],possible_birthdays)==True:\n\t\t\tresult=result+(i[0],)\n\tnum=0\n\tfor j in result:\n\t\tif month==j:\n\t\t\tnum=num+1\n\tif num==1:\n\t\treturn True\n\telse:\n\t\treturn False\n\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1684,"func_code":"def unique_day(day, possible_birthdays):\n day_count = 0\n for i in possible_birthdays:\n if day in i:\n day_count += 1\n if day_count > 1:\n return False\n return True\n\n\ndef unique_month(month, possible_birthdays):\n month_count = 0\n for i in possible_birthdays:\n if month in i:\n month_count += 1\n if month_count > 1:\n return False\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n days_in_month = ()\n for i in possible_birthdays:\n if month in i:\n days_in_month += (i[1],)\n for i in days_in_month:\n if unique_day(i, possible_birthdays):\n return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1685,"func_code":"def unique_day(day, possible_birthdays):\n counter = 0\n result = 0\n while counter < len(possible_birthdays):\n date = possible_birthdays[counter][1]\n if date == day:\n result = result + 1\n counter = counter + 1\n if result > 1:\n return False\n return True\n\ndef unique_month(month, possible_birthdays):\n counter = 0\n result = 0\n while counter < len(possible_birthdays):\n chosen_month = possible_birthdays[counter][0]\n if chosen_month == month:\n result = result + 1\n counter = counter + 1\n if result > 1:\n return False\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n counter = 0\n while counter < len(possible_birthdays):\n get_month = possible_birthdays[counter][0]\n if get_month == month:\n test_date = possible_birthdays[counter][1]\n if unique_day(test_date, possible_birthdays) == True:\n return True\n counter = counter + 1\n return False \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1686,"func_code":"def unique_day(date, possible_birthdays):\n for x in range(len(1,possible_birthdays + 1)):\n for i in possible_birthdays[x][1]:\n if i == possible_birthdays[0][1]:\n return False\n else:\n return i == unique_day(date,possible_birthdays[1:][1])\n\ndef unique_month(month, possible_birthdays):\n return\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1687,"func_code":"def unique_day(date, possible_birthdays):\n for x in range(len(1,possible_birthdays + 1)):\n for i in possible_birthdays[x][1]:\n if i == possible_birthdays[0][1]:\n return False\n else:\n return i == unique_day(date,possible_birthdays[2:][1])\n\ndef unique_month(month, possible_birthdays):\n return\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1688,"func_code":"def unique_day(date, possible_birthdays):\n for x in range(1,len(possible_birthdays)):\n for i in possible_birthdays[x][1]:\n if possible_birthdays[0][1] == possible_birthdays[i][1]:\n return False\n else:\n return unique_day(date,possible_birthdays[1:])\ndef unique_month(month, possible_birthdays):\n return\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1689,"func_code":"def unique_day(day, possible_birthdays):\n counter = 0\n result = 0\n while counter < len(possible_birthdays):\n date = possible_birthdays[counter][1]\n if date == day:\n result = result + 1\n counter = counter + 1\n if result > 1:\n return False\n return True\n\ndef unique_month(month, possible_birthdays):\n counter = 0\n result = 0\n while counter < len(possible_birthdays):\n chosen_month = possible_birthdays[counter][0]\n if chosen_month == month:\n result = result + 1\n counter = counter + 1\n if result > 1:\n return False\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n counter = 0\n while counter < len(possible_birthdays):\n get_month = possible_birthdays[counter][0]\n if get_month == month:\n test_date = possible_birthdays[counter][1]\n if unique_day(test_date, possible_birthdays) == True:\n return True\n counter = counter + 1\n return False \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1690,"func_code":"def unique_day(date, possible_birthdays):\n for i in range(0,len(possible_birthdays)):\n list = [x for x in possible_birthdays[i][1]]\n list = sorted(list)\n if date == list[i] and date != list[i+1] and date != list[i-1]:\n return True\n else:\n return False\n \ndef unique_month(month, possible_birthdays):\n return\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1691,"func_code":"def unique_day(date, possible_birthdays):\n for i in range(0,len(possible_birthdays)):\n list = [x for x in possible_birthdays[i][1]]\n list = sorted(list)\n if date == list[i] and date != list[i+1] and date != list[i-1]:\n return True\n else:\n return False\n \ndef unique_month(month, possible_birthdays):\n for i in range(0,len(possible_birthdays)):\n list = [x for x in possible_birthdays[i][0]]\n list = sorted(list)\n if month == list[i] and month != list[i+1] and month != list[i-1]:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1692,"func_code":"def unique_day(date, possible_birthdays):\n for i in range(0,len(possible_birthdays)):\n list = [x for x in possible_birthdays[i][1]]\n list = sorted(list)\n if date == list[i] and date != list[i+1] and date != list[i-1]:\n return True\n else:\n return False\n \ndef unique_month(month, possible_birthdays):\n for i in range(0,len(possible_birthdays)):\n list = [x for x in possible_birthdays[i][0]]\n list = sorted(list)\n if month == list[i] and month != list[i+1] and month != list[i-1]:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n month_tuple = ()\n for i in range(0,len(possible_birthdays)):\n if possible_birthdays[i][0] == month:\n month_tuple = month_tuple + (possible_birthdays[i][1],)\n for x in month_tuple:\n for i in range(0,len(possible_birthdays)):\n if x == possible_birthdays[i][1]:\n return False\n else:\n return True\n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1693,"func_code":"def unique_day(date, possible_birthdays):\n for i in range(0,len(possible_birthdays)):\n list_final = [x for x in possible_birthdays[i][1]]\n list_final = sorted(list_final)\n if date == list_final[i] and date != list_final[i+1] and date != list_final[i-1]:\n return True\n else:\n return False\n \ndef unique_month(month, possible_birthdays):\n for i in range(0,len(possible_birthdays)):\n list = [x for x in possible_birthdays[i][0]]\n list = sorted(list)\n if month == list[i] and month != list[i+1] and month != list[i-1]:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n month_tuple = ()\n for i in range(0,len(possible_birthdays)):\n if possible_birthdays[i][0] == month:\n month_tuple = month_tuple + (possible_birthdays[i][1],)\n for x in month_tuple:\n for i in range(0,len(possible_birthdays)):\n if x == possible_birthdays[i][1]:\n return False\n else:\n return True\n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1694,"func_code":"def filter(pred, seq):\n if seq == ():\n return ()\n elif pred(seq[0]):\n return (seq[0],) + filter(pred, seq[1:])\n else:\n return filter(pred, seq[1:])\n\ndef unique_day(date, possible_birthdays):\n counter = 0\n for bday in possible_birthdays:\n if date == bday[1]:\n counter += 1\n if counter > 1:\n return False\n return True\n\ndef unique_month(month, possible_birthdays):\n counter = 0\n for bday in possible_birthdays:\n if month == bday[0]:\n counter += 1\n if counter > 1:\n return False\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n bdays_in_month = filter(lambda bday: bday[0] == month, possible_birthdays)\n for bday in bdays_in_month:\n if unique_day(bday[1], possible_birthdays):\n return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1695,"func_code":"def unique_day(day, possible_birthdays):\n total_day = 0\n for birthday in possible_birthdays:\n if birthday[1] == day:\n total_day += 1\n if total_day == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n total_month = 0\n for birthday in possible_birthdays:\n if birthday[0] == month:\n total_month += 1\n if total_month == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1696,"func_code":"def unique_day(day, pb):\n n = len(pb)\n for i in range(n):\n if day == pb[i][1]:\n k = pb[i+1:]\n for j in range(len(k)):\n if day == k[j][1]:\n return False\n return True\n\ndef unique_month(month, pb):\n n = len(pb)\n for i in range(n):\n if month == pb[i][0]:\n k = pb[i+1:]\n for j in range(len(k)):\n if month == k[j][0]:\n return False\n return True\n\ndef contains_unique_day(month, pb):\n new_pb = tuple(filter( lambda x: x[0] == month, pb))\n n = len(new_pb)\n for i in range(n):\n day = new_pb[i][1]\n if unique_day( day, pb):\n return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1697,"func_code":"def unique_day(day, possible_birthdays):\n result = ()\n for p in possible_birthdays:\n pd = p[1]\n if day == pd:\n result = result + (day,)\n if len(result) > 1:\n return False\n return True\n\ndef unique_month(month, possible_birthdays):\n result = ()\n for p in possible_birthdays:\n pm = p[0]\n if month == pm:\n result = result + (month,)\n if len(result) > 1:\n return False\n return True\n \n \ndef contains_unique_day(month, possible_birthdays):\n result = ()\n for p in possible_birthdays:\n if month == p[0]:\n result = result + (p,)\n for r in result:\n if unique_day(r[1], possible_birthdays) == True:\n return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1698,"func_code":"def unique_day(day, possible_birthdays):\n days = tuple(filter(lambda x: x[1] == day, possible_birthdays))\n if len(days) <= 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n months = tuple(filter(lambda x: x[0] == month, possible_birthdays))\n if len(months) <= 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n dates = ()\n for date in possible_birthdays:\n if date[0] == month:\n dates += (date,)\n for dated in dates:\n if unique_day(dated[1], possible_birthdays) == True:\n return True\n else:\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1699,"func_code":"def filter(pred, seq):\n res = ()\n\n for ele in seq:\n if pred(ele):\n res = res + (ele, )\n return res\n\ndef unique_day(day, possible_birthdays):\n store = ()\n for birthday in possible_birthdays:\n if birthday[1] == day:\n store += (birthday[1],)\n n = len(store)\n if n >1:\n return False\n return True\n\ndef unique_month(month, possible_birthdays):\n store= ()\n for birthday in possible_birthdays:\n if birthday[0] == month:\n store += (birthday[0],)\n n = len(store)\n if n >1:\n return False\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n month1 = filter(lambda x: x[0] == month, possible_birthdays)\n for birthday in month1:\n x = unique_day(birthday[1], possible_birthdays)\n if x == True:\n return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1700,"func_code":"def unique_day(day, possible_birthdays):\n bag = ()\n for date in possible_birthdays:\n if date[1] == day:\n bag += (date[1],)\n if len(bag) >= 2:\n return False\n return True\n\ndef unique_month(month, possible_birthdays):\n bag = ()\n for date in possible_birthdays:\n if date[0] == month:\n bag += (date[0],)\n if len(bag) >= 2:\n return False\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n for date in possible_birthdays:\n if date[0] == month:\n day = date[1]\n if unique_day(day, possible_birthdays):\n return True\n else:\n continue\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1701,"func_code":"def unique_day(day, possible_birthdays):\n unique = False\n for i in possible_birthdays:\n if day == i[1]:\n if unique:\n return False\n else:\n unique = True\n return True\n\ndef unique_month(month, possible_birthdays):\n unique = False\n for i in possible_birthdays:\n if month == i[0]:\n if unique:\n return False\n else:\n unique = True\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n for i in possible_birthdays:\n if month == i[0]:\n if unique_day(i[1],possible_birthdays):\n return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1702,"func_code":"def unique_day(day, possible_birthdays):\n count = 0\n for birthday in possible_birthdays:\n if day == birthday[1]:\n count += 1\n return True if count == 1 else False\n \ndef unique_month(month, possible_birthdays):\n count = 0\n for birthday in possible_birthdays:\n if month == birthday[0]:\n count += 1\n return True if count == 1 else False\n\ndef contains_unique_day(month, possible_birthdays):\n tup = ()\n for birthday in possible_birthdays:\n if month == birthday[0]:\n tup += (birthday,)\n for each in tup:\n if each[1] == '18' or each[1] == '19':\n return True\n return False \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1703,"func_code":"def unique_day(day, possible_birthdays):\n counted = ()\n for birthdays in possible_birthdays:\n if birthdays[1] == day:\n if day not in counted:\n counted += (day,)\n else:\n return False\n \n return True\n \ndef unique_month(month, possible_birthdays):\n day = month\n counted = ()\n for birthdays in possible_birthdays:\n if birthdays[0] == day:\n if day not in counted:\n counted += (day,)\n else:\n return False\n \n return True\n \ndef contains_unique_day(month, possible_birthdays):\n for possiblemonth in possible_birthdays:\n if possiblemonth[0] == month:\n if unique_day(possiblemonth[1],possible_birthdays) == True:\n return True\n else:\n continue\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1704,"func_code":"def unique_day(day, possible_birthdays):\n counter=0\n for i in possible_birthdays:\n if i[1]==day:\n counter=counter+1\n if counter<=1:\n return True\n else:\n return False\n return True\n\ndef unique_month(month, possible_birthdays):\n counter=0\n for i in possible_birthdays:\n if i[0]==month:\n counter=counter+1\n if counter<=1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n temp=()\n for i in possible_birthdays:\n if i[0]==month:\n temp=temp+(i,)\n for i in temp:\n if unique_day(i[1],possible_birthdays):\n return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1705,"func_code":"def unique_day(date, possible_birthdays):\n count = 0\n for i in range(len(possible_birthdays)):\n if possible_birthdays[i][1] == day:\n count += 1\n if count == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n count = 0\n for i in range(len(possible_birthdays)):\n if possible_birthdays[i][0] == month:\n count += 1\n if count == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n for i in range(len(possible_birthdays)):\n if possible_birthdays[i][0] == month and unique_day(possible_birthdays[i][1], possible_birthdays) == True:\n return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1706,"func_code":"def unique_day(day, possible_birthdays):\n result=()\n counter=0\n for i in possible_birthdays:\n if day==i[1]:\n result=result+(possible_birthdays[:counter]+possible_birthdays[counter+1:])\n break\n else:\n counter+=1\n continue\n for i in result:\n if day==i[1]:\n return False\n return True\n\ndef unique_month(month, possible_birthdays):\n result=()\n counter=0\n for i in possible_birthdays:\n if month==i[0]:\n result=result+(possible_birthdays[:counter]+possible_birthdays[counter+1:])\n break\n else:\n counter+=1\n continue\n for i in result:\n if month==i[0]:\n return False\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n result=()\n for i in possible_birthdays:\n if i[0]==month:\n result+=(i,) #result should contain all the birthdays with the specified month.\n for i in result:\n if unique_day(i[1],possible_birthdays)==True:\n return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1707,"func_code":"def unique_day(day, possible_birthdays):\n unique = False\n for i in possible_birthdays:\n if day == i[1]:\n if unique:\n return False\n else:\n unique = True\n return True\n\ndef unique_month(month, possible_birthdays):\n unique = False\n for i in possible_birthdays:\n if month == i[0]:\n if unique:\n return False\n else:\n unique = True\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n for i in possible_birthdays:\n if month == i[0]:\n if unique_day(i[1],possible_birthdays):\n return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1708,"func_code":"def unique_day(day, possible_birthdays):\n counter = 0\n for i in possible_birthdays:\n if str(day) == i[1]:\n counter = counter + 1\n if counter > 1:\n return False\n else:\n return True\n\ndef unique_month(month, possible_birthdays):\n counter = 0\n for i in possible_birthdays:\n if str(month) == i[0]:\n counter = counter + 1\n if counter > 1:\n return False\n else:\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n list_d = ()\n for i in range(16,20):\n i_string = str(i)\n if unique_day(i_string, possible_birthdays) is True:\n list_d = list_d + (str(i),)\n for i in possible_birthdays:\n for j in list_d:\n if i[1] == j:\n if i[0] == month:\n return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1709,"func_code":"def unique_day(day, possible_birthdays):\n count = 0\n for birthday in possible_birthdays:\n if day == birthday[1]:\n count += 1\n return True if count == 1 else False\n \ndef unique_month(month, possible_birthdays):\n count = 0\n for birthday in possible_birthdays:\n if month == birthday[0]:\n count += 1\n return True if count == 1 else False\n\ndef contains_unique_day(month, possible_birthdays):\n tup = ()\n for birthday in possible_birthdays:\n if month == birthday[0]:\n tup += (birthday,)\n for each in tup:\n if each[1] == '18' or each[1] == '19':\n return True\n return False \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1710,"func_code":"def unique_day(date, possible_birthdays):\n no_of_days = 0\n for i in possible_birthdays:\n if i[1] == date:\n no_of_days += 1\n if no_of_days != 1:\n return False\n return True\n \ndef unique_month(month, possible_birthdays):\n no_of_months = 0\n for i in possible_birthdays:\n if i[0] == month:\n no_of_months += 1\n if no_of_months != 1:\n return False\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n birthdays_with_month = ()\n for i in possible_birthdays:\n if i[0] == month:\n birthdays_with_month += (i[1],)\n counter = 0\n for i in birthdays_with_month:\n if unique_day(i, possible_birthdays) == True:\n counter += 1\n if counter == 1:\n return True\n else:\n return False \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1711,"func_code":"def unique_day(date, possible_birthdays):\n no_of_days = 0\n for i in possible_birthdays:\n if i[1] == day:\n no_of_days += 1\n if no_of_days != 1:\n return False\n return True\n \ndef unique_month(month, possible_birthdays):\n no_of_months = 0\n for i in possible_birthdays:\n if i[0] == month:\n no_of_months += 1\n if no_of_months != 1:\n return False\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n birthdays_with_month = ()\n for i in possible_birthdays:\n if i[0] == month:\n birthdays_with_month += (i[1],)\n counter = 0\n for i in birthdays_with_month:\n if unique_day(i, possible_birthdays) == True:\n counter += 1\n if counter == 1:\n return True\n else:\n return False \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1712,"func_code":"def unique_day(date, possible_birthdays):\n no_of_days = 0\n for i in possible_birthdays:\n if i[1] == date:\n no_of_days += 1\n if no_of_days != 1:\n return False\n return True\n \ndef unique_month(month, possible_birthdays):\n no_of_months = 0\n for i in possible_birthdays:\n if i[0] == month:\n no_of_months += 1\n if no_of_months != 1:\n return False\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n birthdays_with_month = ()\n for i in possible_birthdays:\n if i[0] == month:\n birthdays_with_month += (i[1],)\n counter = 0\n for i in birthdays_with_month:\n if unique_day(i, possible_birthdays) == True:\n counter += 1\n if counter == 1:\n return True\n else:\n return False \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1713,"func_code":"def unique_day(date, possible_birthdays):\n count = 0\n for possible_birthday in possible_birthdays:\n if day == possible_birthday[1]:\n count += 1\n return count == 1\n\ndef unique_month(month, possible_birthdays):\n count = 0\n for possible_birthday in possible_birthdays:\n if month == possible_birthday[0]:\n count += 1\n return count == 1\n\ndef contains_unique_day(month, possible_birthdays):\n for possible_birthday in possible_birthdays:\n if month == possible_birthday[0] and unique_day(possible_birthday[1], possible_birthdays):\n return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1714,"func_code":"def unique_day(day, possible_birthdays):\n counter = 0\n for i in possible_birthdays:\n if str(day) == i[1]:\n counter = counter + 1\n if counter > 1:\n return False\n else:\n return True\n\ndef unique_month(month, possible_birthdays):\n counter = 0\n for i in possible_birthdays:\n if str(month) == i[0]:\n counter = counter + 1\n if counter > 1:\n return False\n else:\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n list_d = ()\n for i in range(16,20):\n i_string = str(i)\n if unique_day(i_string, possible_birthdays) is True:\n list_d = list_d + (str(i),)\n for i in possible_birthdays:\n for j in list_d:\n if i[1] == j:\n if i[0] == month:\n return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1715,"func_code":"def unique_day(day, possible_birthdays):\n total = 0\n for i in possible_birthdays:\n if i[1] == day:\n total += 1\n if total > 1:\n return False\n return True\n\ndef unique_month(month, possible_birthdays):\n total = 0\n for i in possible_birthdays:\n if i[0] == month:\n total += 1\n if total > 1:\n return False\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n for i in possible_birthdays:\n if i[0] == month:\n if unique_day(i[1],possible_birthdays):\n return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1716,"func_code":"def unique_day(day, possible_birthdays):\n total = 0\n for i in possible_birthdays:\n if i[1] == day:\n total += 1\n if total > 1:\n return False\n return True\n\ndef unique_month(month, possible_birthdays):\n total = 0\n for i in possible_birthdays:\n if i[0] == month:\n total += 1\n if total > 1:\n return False\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n for i in possible_birthdays:\n if i[0] == month:\n if unique_day(i[1],possible_birthdays):\n return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1717,"func_code":"def unique_day(date, possible_birthdays):\n result=()\n counter=0\n for i in possible_birthdays:\n if day==i[1]:\n result=result+(possible_birthdays[:counter]+possible_birthdays[counter+1:])\n break\n else:\n counter+=1\n continue\n for i in result:\n if day==i[1]:\n return False\n return True\n\ndef unique_month(month, possible_birthdays):\n result=()\n counter=0\n for i in possible_birthdays:\n if month==i[0]:\n result=result+(possible_birthdays[:counter]+possible_birthdays[counter+1:])\n break\n else:\n counter+=1\n continue\n for i in result:\n if month==i[0]:\n return False\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n result=()\n for i in possible_birthdays:\n if i[0]==month:\n result+=(i,) #result should contain all the birthdays with the specified month.\n for i in result:\n if unique_day(i[1],possible_birthdays)==True:\n return True\n return False \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1718,"func_code":"def unique_day(date, possible_birthdays):\n result=()\n counter=0\n for i in possible_birthdays:\n if day==i[1]:\n result=result+(possible_birthdays[:counter]+possible_birthdays[counter+1:])\n break\n else:\n counter+=1\n continue\n for i in result:\n if day==i[1]:\n return False\n return True\n\ndef unique_month(month, possible_birthdays):\n result=()\n counter=0\n for i in possible_birthdays:\n if month==i[0]:\n result=result+(possible_birthdays[:counter]+possible_birthdays[counter+1:])\n break\n else:\n counter+=1\n continue\n for i in result:\n if month==i[0]:\n return False\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n result=()\n for i in possible_birthdays:\n if i[0]==month:\n result+=(i,) #result should contain all the birthdays with the specified month.\n for i in result:\n if unique_day(i[1],possible_birthdays)==True:\n return True\n return False \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1719,"func_code":"def unique_day(day, possible_birthdays):\n result=()\n counter=0\n for i in possible_birthdays:\n if day==i[1]:\n result=result+(possible_birthdays[:counter]+possible_birthdays[counter+1:])\n break\n else:\n counter+=1\n continue\n for i in result:\n if day==i[1]:\n return False\n return True\n\ndef unique_month(month, possible_birthdays):\n result=()\n counter=0\n for i in possible_birthdays:\n if month==i[0]:\n result=result+(possible_birthdays[:counter]+possible_birthdays[counter+1:])\n break\n else:\n counter+=1\n continue\n for i in result:\n if month==i[0]:\n return False\n return True\n\n\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1720,"func_code":"def unique_day(day, possible_birthdays):\n result=()\n counter=0\n for i in possible_birthdays:\n if day==i[1]:\n result=result+(possible_birthdays[:counter]+possible_birthdays[counter+1:])\n break\n else:\n counter+=1\n continue\n for i in result:\n if day==i[1]:\n return False\n return True\n\ndef unique_month(month, possible_birthdays):\n result=()\n counter=0\n for i in possible_birthdays:\n if month==i[0]:\n result=result+(possible_birthdays[:counter]+possible_birthdays[counter+1:])\n break\n else:\n counter+=1\n continue\n for i in result:\n if month==i[0]:\n return False\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n result=()\n for i in possible_birthdays:\n if i[0]==month:\n result+=(i,) #result should contain all the birthdays with the specified month.\n for i in result:\n if unique_day(i[1],possible_birthdays)==True:\n return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1721,"func_code":"def unique_day(day, possible_birthdays):\n days = ()\n for birthday in possible_birthdays:\n if birthday[1] != day:\n continue\n elif birthday[1] not in days:\n days += (birthday[1],)\n else:\n return False\n return True\n\ndef unique_month(month, possible_birthdays):\n days = ()\n for birthday in possible_birthdays:\n if birthday[0] != month:\n continue\n elif birthday[0] not in days:\n days += (birthday[0],)\n else:\n return False\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n for birthday in possible_birthdays:\n if birthday[0] != month:\n continue\n else:\n if unique_day(birthday[1],possible_birthdays) == True:\n return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1722,"func_code":"def unique_day(day, possible_birthdays):\n days = ()\n for birthday in possible_birthdays:\n if birthday[1] != day:\n continue\n elif birthday[1] not in days:\n days += (birthday[1],)\n else:\n return False\n return True\n\ndef unique_month(month, possible_birthdays):\n days = ()\n for birthday in possible_birthdays:\n if birthday[0] != month:\n continue\n elif birthday[0] not in days:\n days += (birthday[0],)\n else:\n return False\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n for birthday in possible_birthdays:\n if birthday[0] != month:\n continue\n else:\n if unique_day(birthday[1],possible_birthdays) == True:\n return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1723,"func_code":"def unique_day(day, possible_birthdays):\n counted = ()\n for birthdays in possible_birthdays:\n if birthdays[1] == day:\n if day not in counted:\n counted += (day,)\n else:\n return False\n \n return True\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1724,"func_code":"def unique_day(day, possible_birthdays):\n counted = ()\n for birthdays in possible_birthdays:\n if birthdays[1] == day:\n if day not in counted:\n counted += (day,)\n else:\n return False\n \n return True\n \ndef unique_month(month, possible_birthdays):\n day = month\n counted = ()\n for birthdays in possible_birthdays:\n if birthdays[0] == day:\n if day not in counted:\n counted += (day,)\n else:\n return False\n \n return True\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1725,"func_code":"def unique_day(day, possible_birthdays):\n counted = ()\n for birthdays in possible_birthdays:\n if birthdays[1] == day:\n if day not in counted:\n counted += (day,)\n else:\n return False\n \n return True\n \ndef unique_month(month, possible_birthdays):\n day = month\n counted = ()\n for birthdays in possible_birthdays:\n if birthdays[0] == day:\n if day not in counted:\n counted += (day,)\n else:\n return False\n \n return True\n \ndef contains_unique_day(month, possible_birthdays):\n for possiblemonth in possible_birthdays:\n if possiblemonth[0] == month:\n if unique_day(possiblemonth[1],possible_birthdays) == True:\n return True\n else:\n continue\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1726,"func_code":"def unique_day(day, possible_birthdays):\n counter = 0\n for dates in possible_birthdays:\n if day == dates[1]:\n possible_birthdays = possible_birthdays[1:]\n counter = counter + 1 \n if counter == 1:\n return True\n else:\n return False \n return\n\ndef unique_month(month, possible_birthdays):\n return\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1727,"func_code":"def unique_day(day, possible_birthdays):\n counter = 0\n for dates in possible_birthdays:\n if day == dates[1]:\n possible_birthdays = possible_birthdays[1:]\n counter = counter + 1 \n if counter == 1:\n return True\n else:\n return False \n return\n\ndef unique_month(month, possible_birthdays):\n counter = 0\n for dates in possible_birthdays:\n if month == dates[0]:\n possible_birthdays = possible_birthdays[1:]\n counter = counter + 1 \n if counter == 1:\n return True\n else:\n return False \n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1728,"func_code":"def unique_day(day, possible_birthdays):\n days = ()\n for all_days in possible_birthdays:\n days = days + (all_days[1],)\n i = 0\n for all_days in days:\n if all_days == day:\n i = i+1\n if i == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n months = ()\n for all_months in possible_birthdays:\n months = months + (all_months[0],)\n i = 0\n for all_months in months:\n if all_months == month:\n i = i+1\n if i == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n May_days = ()\n June_days = ()\n July_days = ()\n August_days = ()\n May_dates = possible_birthdays[:3]\n for all_days in May_dates:\n May_days = May_days + (all_days[1],)\n June_dates = possible_birthdays[3:5]\n for all_days in June_dates:\n June_days = June_days + (all_days[1],)\n July_dates = possible_birthdays[5:7]\n for all_days in July_dates:\n July_days = July_days + (all_days[1],)\n August_dates = possible_birthdays[7:]\n for all_days in August_dates:\n August_days = August_days + (all_days[1],)\n if month == 'May': \n for days in May_days:\n found_repeated = 0\n for check_day in June_days:\n if days == check_day:\n found_repeated = 1\n break\n if found_repeated == 0:\n for check_day in July_days:\n if days == check_day:\n found_repeated = 1\n break\n if found_repeated == 0:\n for check_day in August_days:\n if days == check_day:\n found_repeated = 1\n break\n elif month == 'June':\n for days in June_days:\n found_repeated = 0\n for check_day in May_days:\n if days == check_day:\n found_repeated = 1\n break\n if found_repeated == 0:\n for check_day in July_days:\n if days == check_day:\n found_repeated = 1\n break\n if found_repeated == 0:\n for check_day in August_days:\n if days == check_day:\n found_repeated = 1\n break\n elif month == 'July':\n for days in July_days:\n found_repeated = 0\n for check_day in May_days:\n if days == check_day:\n found_repeated = 1\n break\n if found_repeated == 0:\n for check_day in June_days:\n if days == check_day:\n found_repeated = 1\n break\n if found_repeated == 0:\n for check_day in August_days:\n if days == check_day:\n found_repeated = 1\n break\n else:\n for days in August_days:\n found_repeated = 0\n for check_day in May_days:\n if days == check_day:\n found_repeated = 1\n break\n if found_repeated == 0:\n for check_day in June_days:\n if days == check_day:\n found_repeated = 1\n break\n if found_repeated == 0:\n for check_day in July_days:\n if days == check_day:\n found_repeated = 1\n break\n if found_repeated == 0:\n return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1729,"func_code":"def unique_day(day, possible_birthdays):\n counter = 0\n for dates in possible_birthdays:\n if day == dates[1]:\n possible_birthdays = possible_birthdays[1:]\n counter = counter + 1 \n if counter == 1:\n return True\n else:\n return False \n return\n\ndef unique_month(month, possible_birthdays):\n counter = 0\n for dates in possible_birthdays:\n if month == dates[0]:\n possible_birthdays = possible_birthdays[1:]\n counter = counter + 1 \n if counter == 1:\n return True\n else:\n return False \n\ndef contains_unique_day(month, possible_birthdays):\n counter = 0\n new_list = keep_month(month,possible_birthdays)\n for i in new_list:\n if unique_day(i[1], possible_birthdays) == True:\n return True\n\n return False \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1730,"func_code":"def unique_day(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if date == i[1]:\n result += 1\n return result\n if result == 1:\n return True\n else:\n return False\n \n return\n\ndef unique_month(month, possible_birthdays):\n return\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1731,"func_code":"def unique_day(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if date == i[1]:\n result += 1\n return result\n if result == 1:\n return True\n else:\n return False\n \n\ndef unique_month(month, possible_birthdays):\n return\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1732,"func_code":"def unique_day(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if date == i[1]:\n count += 1\n return count\n if count == 1:\n return True\n else:\n return False\n \n\ndef unique_month(month, possible_birthdays):\n return\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1733,"func_code":"def unique_day(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if date == i[1]:\n count += 1\n return count\n if count == 1:\n return True\n else:\n return False\n \n\ndef unique_month(month, possible_birthdays):\n return\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1734,"func_code":"def unique_day(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if date == i[1]:\n count += 1\n return count\n if count == 1:\n return True\n else:\n return False\n \n\ndef unique_month(month, possible_birthdays):\n return\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1735,"func_code":"def unique_day(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if date == i[1]:\n count += 1\n return count\n if count == 1:\n return True\n else:\n return False\n \n\ndef unique_month(month, possible_birthdays):\n return\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1736,"func_code":"def unique_day(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if date == i[1]:\n count += 1\n return count\n if count == 1:\n return True\n else:\n return False\n \n\ndef unique_month(month, possible_birthdays):\n return\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1737,"func_code":"def unique_day(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if date == i[1]:\n count += 1\n return count\n if count == 1:\n return True\n else:\n return False\n \n\ndef unique_month(month, possible_birthdays):\n return\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1738,"func_code":"def unique_day(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if date == i[1]:\n count += 1\n return count\n if count == 1:\n return True\n return False\n \n\ndef unique_month(month, possible_birthdays):\n return\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1739,"func_code":"def unique_day(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n if count == 1:\n return True\n return False\n \n\ndef unique_month(month, possible_birthdays):\n return\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1740,"func_code":"def unique_day(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n if count == 1:\n return True\n else:\n return False\n \n\ndef unique_month(month, possible_birthdays):\n return\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1741,"func_code":"def unique_day(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n if count == 1:\n return True\n else:\n return False\n \n\ndef unique_month(month, possible_birthdays):\n return\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1742,"func_code":"def unique_day(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n if count == 1:\n return True\n else:\n return False\n \n\ndef unique_month(month, possible_birthdays):\n return\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1743,"func_code":"def unique_day(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n if count == 1:\n return True\n else:\n return False\n \n\ndef unique_month(month, possible_birthdays):\n return\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1744,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n\ndef unique_day(date, possible_birthdays):\n if count_dates == 1:\n return True\n else:\n return False\n \n\ndef unique_month(month, possible_birthdays):\n return\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1745,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n\ndef unique_day(date, possible_birthdays):\n if count_dates == 0:\n return True\n else:\n return False\n \n\ndef unique_month(month, possible_birthdays):\n return\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1746,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n\ndef unique_day(date, possible_birthdays):\n if count_dates == 2:\n return True\n else:\n return False\n \n\ndef unique_month(month, possible_birthdays):\n return\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1747,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n\ndef unique_day(date, possible_birthdays):\n if count_dates(date, possible_birthdays) == 1:\n return True\n else:\n return False\n \n\ndef unique_month(month, possible_birthdays):\n return\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1748,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n \ndef unique_day(date, possible_birthdays):\n if count_dates(date, possible_birthdays) == 1:\n return True\n else:\n return False\n \n\ndef unique_month(month, possible_birthdays):\n return\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1749,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n \ndef unique_day(date, possible_birthdays):\n if count_dates(date, possible_birthdays) == 1:\n return True\n else:\n return False\n \ndef count_months(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[2] == month:\n count += 1\n return count\n \n\ndef unique_month(month, possible_birthdays):\n if count_months(month, possible_birthdays) == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1750,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n \ndef unique_day(date, possible_birthdays):\n if count_dates(date, possible_birthdays) == 1:\n return True\n else:\n return False\n \ndef count_months(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n count += 1\n return count\n \ndef unique_month(month, possible_birthdays):\n if count_months(month, possible_birthdays) == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1751,"func_code":"def unique_day(day, possible_birthdays):\n\tcheck = 0\n\tfor birthday in possible_birthdays:\n\t\tif birthday[1] == day:\n\t\t\tcheck = check + 1\n\tif check > 1 :\n\t\treturn False\n\telse:\n\t\treturn True\n\n\ndef unique_month(month, possible_birthdays):\n\tcheck = 0\n\tfor birthday in possible_birthdays:\n\t\tif birthday[0] == month:\n\t\t\tcheck = check + 1\n\tif check > 1 :\n\t\treturn False\n\telse:\n\t\treturn True\n\t\t\ndef contains_unique_day(month, possible_birthdays):\n\tfor birthday in possible_birthdays:\n\t\tif month == birthday[0] and unique_day(birthday[1], possible_birthdays):\n\t\t\t\treturn True\n\telse:\n\t\treturn False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1752,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n \ndef unique_day(date, possible_birthdays):\n if count_dates(date, possible_birthdays) == 1:\n return True\n else:\n return False\n \ndef count_months(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n count += 1\n return count\n \ndef unique_month(month, possible_birthdays):\n if count_months(month, possible_birthdays) == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n \n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1753,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n \ndef unique_day(date, possible_birthdays):\n if count_dates(date, possible_birthdays) == 1:\n return True\n else:\n return False\n \ndef count_months(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n count += 1\n return count\n \ndef unique_month(month, possible_birthdays):\n if count_months(month, possible_birthdays) == 1:\n return True\n else:\n return False\n\ndef days_in_month(month, possible_birthdays):\n product = ()\n for i in possible_birthdays:\n if i[0] == month:\n product += (i[1], )\n return product\n \ndef contains_unique_day(month, possible_birthdays):\n for x in days_in_month(month, possible_birthdays):\n if unique_day(x, possible_birthdays):\n return True\n else:\n return False\n \n \n \n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1754,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n \ndef unique_day(date, possible_birthdays):\n if count_dates(date, possible_birthdays) == 1:\n return True\n else:\n return False\n \ndef count_months(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n count += 1\n return count\n \ndef unique_month(month, possible_birthdays):\n if count_months(month, possible_birthdays) == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n for i in possible_birthdays:\n if i[0] == month:\n if unique_day(x, possible_birthdays):\n return True\n else:\n return False\n \n \n \n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1755,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n \ndef unique_day(date, possible_birthdays):\n if count_dates(date, possible_birthdays) == 1:\n return True\n else:\n return False\n \ndef count_months(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n count += 1\n return count\n \ndef unique_month(month, possible_birthdays):\n if count_months(month, possible_birthdays) == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n for i in possible_birthdays:\n if i[0] == month:\n if unique_day(x, possible_birthdays):\n return True\n else:\n return False\n else:\n return False\n \n \n \n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1756,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n \ndef unique_day(date, possible_birthdays):\n if count_dates(date, possible_birthdays) == 1:\n return True\n else:\n return False\n \ndef count_months(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n count += 1\n return count\n \ndef unique_month(month, possible_birthdays):\n if count_months(month, possible_birthdays) == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n for i in possible_birthdays:\n if i[0] == month:\n if unique_day(i, possible_birthdays):\n return True\n else:\n return False\n else:\n return False\n \n \n \n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1757,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n \ndef unique_day(date, possible_birthdays):\n if count_dates(date, possible_birthdays) == 1:\n return True\n else:\n return False\n \ndef count_months(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n count += 1\n return count\n \ndef unique_month(month, possible_birthdays):\n if count_months(month, possible_birthdays) == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n for i in possible_birthdays:\n if i[0] == month:\n if unique_day(i[1], possible_birthdays):\n return True\n else:\n return False\n else:\n return False\n \n \n \n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1758,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n \ndef unique_day(date, possible_birthdays):\n if count_dates(date, possible_birthdays) == 1:\n return True\n else:\n return False\n \ndef count_months(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n count += 1\n return count\n \ndef unique_month(month, possible_birthdays):\n if count_months(month, possible_birthdays) == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n for i in possible_birthdays:\n if i[0] == month:\n if unique_day(i[1], possible_birthdays):\n return True\n else:\n return False\n else:\n continue\n \n \n \n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1759,"func_code":"def unique_day(date, possible_birthdays):\n count = 0\n for i in range (len(possible_birthdays)):\n if date == possible_birthdays[i][1]:\n count +=1\n if count == 1:\n return True\n else:\n return False \n\ndef unique_month(month, possible_birthdays):\n count = 0\n for i in range (len(possible_birthdays)):\n if month == possible_birthdays[i][0]:\n count +=1\n if count == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n if month == \"May\":\n return True\n if month == \"June\":\n return True\n else:\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1760,"func_code":"def unique_day(date, possible_birthdays):\n tester = 0\n for i in possible_birthdays:\n if date == i[1]:\n if tester:\n return False\n else:\n tester = 1\n return tester\n\ndef unique_month(month, possible_birthdays):\n return\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1761,"func_code":"def unique_day(date, possible_birthdays):\n tester = 0\n for i in possible_birthdays:\n if date == i[1]:\n if tester:\n return False\n else:\n tester = 1\n return tester\n\ndef unique_month(month, possible_birthdays):\n tester = 0\n for i in possible_birthdays:\n if date == i[0]:\n if tester:\n return False\n else:\n tester = 1\n return tester\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1762,"func_code":"def unique_day(date, possible_birthdays):\n tester = 0\n for i in possible_birthdays:\n if date == i[1]:\n if tester:\n return False\n else:\n tester = 1\n return tester\n\ndef unique_month(month, possible_birthdays):\n tester = 0\n for i in possible_birthdays:\n if month == i[0]:\n if tester:\n return False\n else:\n tester = 1\n return tester\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1763,"func_code":"def unique_day(date, possible_birthdays):\n count = 0\n for i in range (len(possible_birthdays)):\n if day == possible_birthdays[i][1]:\n count +=1\n if count == 1:\n return True\n else:\n return False \n\ndef unique_month(month, possible_birthdays):\n count = 0\n for i in range (len(possible_birthdays)):\n if month == possible_birthdays[i][0]:\n count +=1\n if count == 1:\n return True\n else:\n return False \n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1764,"func_code":"def unique_day(date, possible_birthdays):\n count = 0\n for i in range (len(possible_birthdays)):\n if day == possible_birthdays[i][1]:\n count +=1 \n if count == 1:\n return True\n else: \n return False\n\ndef unique_month(month, possible_birthdays):\n count = 0\n for i in range (len(possible_birthdays)):\n if month == possible_birthdays[i][0]:\n count +=1\n if count == 1:\n return True\n else:\n return False \n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1765,"func_code":"def unique_day(date, possible_birthdays):\n count = 0\n for i in range (len(possible_birthdays)):\n if day == possible_birthdays[i][1]:\n count +=1\n if count == 1:\n return True\n else:\n return False \n\ndef unique_month(month, possible_birthdays):\n count = 0\n for i in range (len(possible_birthdays)):\n if month == possible_birthdays[i][0]:\n count +=1\n if count == 1:\n return True\n else:\n return False \n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1766,"func_code":"def unique_day(day, possible_birthdays):\n counter = 0\n for i in possible_birthdays:\n if i[1] == day:\n counter = counter + 1\n if counter > 1:\n return False\n else:\n return True\n\ndef unique_month(month, possible_birthdays):\n counter = 0\n for i in possible_birthdays:\n if i[0] == month:\n counter = counter + 1\n if counter > 1:\n return False\n else:\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n x = ()\n for i in possible_birthdays:\n if i[0] == month:\n x = x + (i,)\n total = 0\n for i in x:\n total = total + unique_day(i[1], possible_birthdays)\n if total != 0:\n return True\n else:\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1767,"func_code":"def unique_day(day, possible_birthdays):\n counter = 0\n for i in possible_birthdays:\n if i[1] == day:\n counter = counter + 1\n if counter > 1:\n return False\n else:\n return True\n\ndef unique_month(month, possible_birthdays):\n counter = 0\n for i in possible_birthdays:\n if i[0] == month:\n counter = counter + 1\n if counter > 1:\n return False\n else:\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n x = ()\n for i in possible_birthdays:\n if i[0] == month:\n x = x + (i,)\n total = 0\n for i in x:\n total = total + unique_day(i[1], possible_birthdays)\n if total != 0:\n return True\n else:\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1768,"func_code":"def unique_day(day, possible_birthdays):\n days = ()\n for all_days in possible_birthdays:\n days = days + (all_days[1],)\n i = 0\n for all_days in days:\n if all_days == day:\n i = i+1\n if i == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n months = ()\n for all_months in possible_birthdays:\n months = months + (all_months[0],)\n i = 0\n for all_months in months:\n if all_months == month:\n i = i+1\n if i == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n May_days = ()\n June_days = ()\n July_days = ()\n August_days = ()\n May_dates = possible_birthdays[:3]\n for all_days in May_dates:\n May_days = May_days + (all_days[1],)\n June_dates = possible_birthdays[3:5]\n for all_days in June_dates:\n June_days = June_days + (all_days[1],)\n July_dates = possible_birthdays[5:7]\n for all_days in July_dates:\n July_days = July_days + (all_days[1],)\n August_dates = possible_birthdays[7:]\n for all_days in August_dates:\n August_days = August_days + (all_days[1],)\n if month == 'May': \n for days in May_days:\n found_repeated = 0\n for check_day in June_days:\n if days == check_day:\n found_repeated = 1\n break\n if found_repeated == 0:\n for check_day in July_days:\n if days == check_day:\n found_repeated = 1\n break\n if found_repeated == 0:\n for check_day in August_days:\n if days == check_day:\n found_repeated = 1\n break\n elif month == 'June':\n for days in June_days:\n found_repeated = 0\n for check_day in May_days:\n if days == check_day:\n found_repeated = 1\n break\n if found_repeated == 0:\n for check_day in July_days:\n if days == check_day:\n found_repeated = 1\n break\n if found_repeated == 0:\n for check_day in August_days:\n if days == check_day:\n found_repeated = 1\n break\n elif month == 'July':\n for days in July_days:\n found_repeated = 0\n for check_day in May_days:\n if days == check_day:\n found_repeated = 1\n break\n if found_repeated == 0:\n for check_day in June_days:\n if days == check_day:\n found_repeated = 1\n break\n if found_repeated == 0:\n for check_day in August_days:\n if days == check_day:\n found_repeated = 1\n break\n else:\n for days in August_days:\n found_repeated = 0\n for check_day in May_days:\n if days == check_day:\n found_repeated = 1\n break\n if found_repeated == 0:\n for check_day in June_days:\n if days == check_day:\n found_repeated = 1\n break\n if found_repeated == 0:\n for check_day in July_days:\n if days == check_day:\n found_repeated = 1\n break\n if found_repeated == 0:\n return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1769,"func_code":"def unique_day(day, possible_birthdays):\n unique_day_counter = 0\n for i in possible_birthdays:\n if day == i[1]:\n unique_day_counter += 1\n if unique_day_counter != 1:\n return False\n return True\n\ndef unique_month(month, possible_birthdays):\n return\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1770,"func_code":"def unique_day(day, possible_birthdays):\n unique_day_counter = 0\n for i in possible_birthdays:\n if day == i[1]:\n unique_day_counter += 1\n if unique_day_counter != 1:\n return False\n return True\n\ndef unique_month(month, possible_birthdays):\n unique_month_counter = 0\n for i in possible_birthdays:\n if month == i[0]:\n unique_month_counter += 1\n if unique_month_counter != 1:\n return False\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1771,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n \ndef unique_day(date, possible_birthdays):\n if count_dates(date, possible_birthdays) == 1:\n return True\n else:\n return False\n \ndef count_months(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n count += 1\n return count\n \ndef unique_month(month, possible_birthdays):\n if count_months(month, possible_birthdays) == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n for i in possible_birthdays:\n if i[0] == month:\n if unique_day(i[1], possible_birthdays):\n return True\n else:\n continue\n else:\n return False\n \n \n \n \n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1772,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n \ndef unique_day(date, possible_birthdays):\n if count_dates(date, possible_birthdays) == 1:\n return True\n else:\n return False\n \ndef count_months(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n count += 1\n return count\n \ndef unique_month(month, possible_birthdays):\n if count_months(month, possible_birthdays) == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n for i in possible_birthdays:\n if i[0] == month:\n if unique_day(i[1], possible_birthdays):\n return True\n continue\n else:\n return False\n \n \n \n \n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1773,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n \ndef unique_day(date, possible_birthdays):\n if count_dates(date, possible_birthdays) == 1:\n return True\n else:\n return False\n \ndef count_months(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n count += 1\n return count\n \ndef unique_month(month, possible_birthdays):\n if count_months(month, possible_birthdays) == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n for i in possible_birthdays:\n if i[0] == month:\n if unique_day(i[1], possible_birthdays):\n return True\n continue\n else:\n return False\n \n \n \n \n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1774,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n \ndef unique_day(date, possible_birthdays):\n if count_dates(date, possible_birthdays) == 1:\n return True\n else:\n return False\n \ndef count_months(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n count += 1\n return count\n \ndef unique_month(month, possible_birthdays):\n if count_months(month, possible_birthdays) == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n for i in possible_birthdays:\n if i[0] == month:\n if unique_day(i[1], possible_birthdays):\n return True\n continue\n else:\n return False\n \n \n \n \n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1775,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n \ndef unique_day(date, possible_birthdays):\n if count_dates(date, possible_birthdays) == 1:\n return True\n else:\n return False\n \ndef count_months(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n count += 1\n return count\n \ndef unique_month(month, possible_birthdays):\n if count_months(month, possible_birthdays) == 1:\n return True\n else:\n return False\n\ndef days(month, possible_birthdays):\n days_in_month = ()\n for i in possible_birthdays:\n if i[0] == month:\n days_in_month += (i[1],)\n return days_in_month\n\ndef contains_unique_day(month, possible_birthdays):\n for x in days_in_month:\n if unique_day(x, possible_birthdays):\n return True\n else:\n return False\n \n \n \n \n \n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1776,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n \ndef unique_day(date, possible_birthdays):\n if count_dates(date, possible_birthdays) == 1:\n return True\n else:\n return False\n \ndef count_months(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n count += 1\n return count\n \ndef unique_month(month, possible_birthdays):\n if count_months(month, possible_birthdays) == 1:\n return True\n else:\n return False\n\ndef days(month, possible_birthdays):\n days_in_month = ()\n for i in possible_birthdays:\n if i[0] == month:\n days_in_month += (i[1],)\n return days_in_month\n\ndef contains_unique_day(month, possible_birthdays):\n for x in days:\n if unique_day(x, possible_birthdays):\n return True\n else:\n return False\n \n \n \n \n \n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1777,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n \ndef unique_day(date, possible_birthdays):\n if count_dates(date, possible_birthdays) == 1:\n return True\n else:\n return False\n \ndef count_months(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n count += 1\n return count\n \ndef unique_month(month, possible_birthdays):\n if count_months(month, possible_birthdays) == 1:\n return True\n else:\n return False\n\ndef days(month, possible_birthdays):\n days_in_month = ()\n for i in possible_birthdays:\n if i[0] == month:\n days_in_month += (i[1],)\n return days_in_month\n\ndef contains_unique_day(month, possible_birthdays):\n for x in days(month, possible_birthdays):\n if unique_day(x, possible_birthdays):\n return True\n else:\n return False\n \n \n \n \n \n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1778,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n \ndef unique_day(date, possible_birthdays):\n if count_dates(date, possible_birthdays) == 1:\n return True\n else:\n return False\n \ndef count_months(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n count += 1\n return count\n \ndef unique_month(month, possible_birthdays):\n if count_months(month, possible_birthdays) == 1:\n return True\n else:\n return False\n\ndef days(month, possible_birthdays):\n days_in_month = ()\n for i in possible_birthdays:\n if i[0] == month:\n days_in_month += (i[1],)\n return days_in_month\n\ndef contains_unique_day(month, possible_birthdays):\n for x in range(len(days(month, possible_birthdays))):\n if unique_day(x, possible_birthdays):\n return True\n else:\n return False\n \n \n \n \n \n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1779,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n \ndef unique_day(date, possible_birthdays):\n if count_dates(date, possible_birthdays) == 1:\n return True\n else:\n return False\n \ndef count_months(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n count += 1\n return count\n \ndef unique_month(month, possible_birthdays):\n if count_months(month, possible_birthdays) == 1:\n return True\n else:\n return False\n\ndef days(month, possible_birthdays):\n days_in_month = ()\n for i in possible_birthdays:\n if i[0] == month:\n days_in_month += (i[1],)\n return days_in_month\n\ndef contains_unique_day(month, possible_birthdays):\n for x in days(month, possible_birthdays):\n if unique_day(x, possible_birthdays):\n return True\n else:\n return False\n \n \n \n \n \n \n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1780,"func_code":"def unique_day(date, possible_birthdays):\n count = 0\n for birthday in possible_birthdays:\n if day == birthday[1]:\n count += 1\n return count == 1\n\ndef unique_month(month, possible_birthdays):\n count = 0\n for birthday in possible_birthdays:\n if month == birthday[0]:\n count += 1\n return count == 1\n \ndef contains_unique_day(month, possible_birthdays):\n singlemonthbirthday = ()\n for birthmonth in possible_birthdays:\n if month == birthmonth[0]:\n singlemonthbirthday += (birthmonth,)\n for birthday in singlemonthbirthday:\n if unique_day(birthday[1], possible_birthdays) == True:\n return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1781,"func_code":"def unique_day(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if day == i[1]:\n count += 1\n return count == 1\n\ndef unique_month(month, possible_birthdays):\n count = 0\n for birthday in possible_birthdays:\n if month == birthday[0]:\n count += 1\n return count == 1\n \ndef contains_unique_day(month, possible_birthdays):\n singlemonthbirthday = ()\n for birthmonth in possible_birthdays:\n if month == birthmonth[0]:\n singlemonthbirthday += (birthmonth,)\n for birthday in singlemonthbirthday:\n if unique_day(birthday[1], possible_birthdays) == True:\n return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1782,"func_code":"def unique_day(day, possible_birthdays):\n\n count = 0\n\n for i in possible_birthdays:\n if day in i:\n count += 1\n \n if count == 1:\n return True\n else:\n return False\n \n \ndef unique_month(month, possible_birthdays):\n return\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1783,"func_code":"def unique_day(day, possible_birthdays):\n count = 0\n for birthday in possible_birthdays:\n if day == birthday[1]:\n count += 1\n if count > 1:\n return False\n return True\n\ndef unique_month(month, possible_birthdays):\n count = 0\n for birthday in possible_birthdays:\n if month == birthday[0]:\n count += 1\n if count > 1:\n return False\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n birthdays_month = ()\n for birthday in possible_birthdays:\n if month == birthday[0]:\n birthdays_month += (birthday,)\n for birthday in birthdays_month:\n if unique_day(birthday[1], possible_birthdays):\n return True\n return False \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1784,"func_code":"def unique_day(day, possible_birthdays):\n a = 0\n for item in possible_birthdays:\n for i in item:\n if i == day:\n a += 1\n if a == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n a = 0\n for item in possible_birthdays:\n for i in item:\n if i == month:\n a += 1\n if a == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n a = 0\n b = 0\n for item in possible_birthdays:\n if month in item:\n a = item\n if unique_day(item[1],possible_birthdays) == True:\n b += 1\n if b == 1:\n return True\n else:\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1785,"func_code":"def unique_day(day, possible_birthdays):\n count = 0\n for birthday in possible_birthdays:\n if day == birthday[1]:\n count += 1\n if count > 1:\n return False\n return True\n\ndef unique_month(month, possible_birthdays):\n count = 0\n for birthday in possible_birthdays:\n if month == birthday[1]:\n count += 1\n if count > 1:\n return False\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1786,"func_code":"def unique_day(day, possible_birthdays):\n count = 0\n for birthday in possible_birthdays:\n if day == birthday[1]:\n count += 1\n if count > 1:\n return False\n return True\n\ndef unique_month(month, possible_birthdays):\n count = 0\n for birthday in possible_birthdays:\n if month == birthday[0]:\n count += 1\n if count > 1:\n return False\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1787,"func_code":"def unique_day(day, possible_birthdays):\n count = 0\n for birthday in possible_birthdays:\n if day == birthday[1]:\n count += 1\n if count > 1:\n return False\n return True\n\ndef unique_month(month, possible_birthdays):\n count = 0\n for birthday in possible_birthdays:\n if month == birthday[0]:\n count += 1\n if count > 1:\n return False\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n birthdays_month = ()\n for birthday in possible_birthdays:\n if month == birthday[0]:\n birthdays_month += (birthday,)\n for birthday in birthdays_month:\n if unique_day(birthday[1], birthdays_month):\n return True\n return False \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1788,"func_code":"def unique_day(day, possible_birthdays):\n count = 0\n for birthday in possible_birthdays:\n if day == birthday[1]:\n count += 1\n if count > 1:\n return False\n return True\n\ndef unique_month(month, possible_birthdays):\n count = 0\n for birthday in possible_birthdays:\n if month == birthday[0]:\n count += 1\n if count > 1:\n return False\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n birthdays_month = ()\n for birthday in possible_birthdays:\n if month == birthday[0]:\n birthdays_month += (birthday,)\n for birthday in birthdays_month:\n if unique_day(birthday[1], possible_birthdays):\n return True\n return False \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1789,"func_code":"def unique_day(day, possible_birthdays):\n a = 0\n for item in possible_birthdays:\n for i in item:\n if i == day:\n a += 1\n if a == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n a = 0\n for item in possible_birthdays:\n for i in item:\n if i == month:\n a += 1\n if a == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1790,"func_code":"def unique_day(day, possible_birthdays):\n count=0\n for i in possible_birthdays:\n if i[1]==day:\n count+=1\n if count>1:\n check=False\n else:\n check=True\n return check\n\ndef unique_month(month, possible_birthdays):\n count=0\n for i in possible_birthdays:\n if i[0]==month:\n count+=1\n if count>1:\n check=False\n else:\n check=True\n return check\n\n\ndef contains_unique_day(month, possible_birthdays):\n birthdays=()\n for i in possible_birthdays:\n if i[0]==month:\n birthdays+=(i,)\n for j in birthdays:\n if unique_day(j[1], possible_birthdays):\n return True\n return False\n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1791,"func_code":"def unique_day(day, possible_birthdays):\n counter=0\n for i in possible_birthdays:\n if i[1]==day:\n counter=counter+1\n if counter<=1:\n return true\n else:\n return False\n return True\n\ndef unique_month(month, possible_birthdays):\n return\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1792,"func_code":"def unique_day(day, possible_birthdays):\n counter=0\n for i in possible_birthdays:\n if i[1]==day:\n counter=counter+1\n if counter<=1:\n return true\n else:\n return False\n return True\n\ndef unique_month(month, possible_birthdays):\n for i in possible_birthdays:\n if i[0]==month:\n counter=counter+1\n if counter<=1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1793,"func_code":"def unique_day(day, possible_birthdays):\n counter=0\n for i in possible_birthdays:\n if i[1]==day:\n counter=counter+1\n if counter<=1:\n return true\n else:\n return False\n return True\n\ndef unique_month(month, possible_birthdays):\n counter=0\n for i in possible_birthdays:\n if i[0]==month:\n counter=counter+1\n if counter<=1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1794,"func_code":"def unique_day(date, possible_birthdays):\n counter=0\n for date in possible_birthdays:\n if date[1]==day:\n counter+=1\n else:\n counter=counter\n if counter==1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n counter=0\n for date in possible_birthdays:\n if date[0]==month:\n counter+=1\n else:\n counter=counter\n if counter==1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n date=()\n for mon in possible_birthdays:\n if month ==mon[0]:\n date+=(mon,)\n else:\n date=date\n days=()\n for day in date:\n days+=(day[1],)\n y=()\n for x in days:\n if unique_day(x, possible_birthdays)==True:\n y+=(x,)\n else:\n y=y\n if y==():\n return False\n else:\n return True \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1795,"func_code":"def unique_day(date, possible_birthdays):\n counter=0\n for date in possible_birthdays:\n if date[1]==day:\n counter+=1\n else:\n counter=counter\n if counter==1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n counter=0\n for date in possible_birthdays:\n if date[0]==month:\n counter+=1\n else:\n counter=counter\n if counter==1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n date=()\n for mon in possible_birthdays:\n if month ==mon[0]:\n date+=(mon,)\n else:\n date=date\n days=()\n for day in date:\n days+=(day[1],)\n y=()\n for x in days:\n if unique_day(x, possible_birthdays)==True:\n y+=(x,)\n else:\n y=y\n if y==():\n return False\n else:\n return True \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1796,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n \ndef unique_day(date, possible_birthdays):\n if count_dates(date, possible_birthdays) == 1:\n return True\n else:\n return False\n \ndef count_months(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n count += 1\n return count\n \ndef unique_month(month, possible_birthdays):\n if count_months(month, possible_birthdays) == 1:\n return True\n else:\n return False\n\ndef days(month, possible_birthdays):\n days_in_month = ()\n for i in possible_birthdays:\n if i[0] == month:\n days_in_month += (i[1],)\n return days_in_month\n\ndef contains_unique_day(month, possible_birthdays):\n for x in days(month, possible_birthdays):\n if unique_day(x, possible_birthdays) == True:\n return True\n else:\n return False\n \n \n \n \n \n \n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1797,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n \ndef unique_day(date, possible_birthdays):\n if count_dates(date, possible_birthdays) == 1:\n return True\n else:\n return False\n \ndef count_months(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n count += 1\n return count\n \ndef unique_month(month, possible_birthdays):\n if count_months(month, possible_birthdays) == 1:\n return True\n else:\n return False\n\ndef days(month, possible_birthdays):\n days_in_month = ()\n for i in possible_birthdays:\n if i[0] == month:\n days_in_month += (i[1],)\n return days_in_month\n\ndef contains_unique_day(month, possible_birthdays):\n for x in range(days(month, possible_birthdays)):\n if unique_day(x, possible_birthdays):\n return True\n else:\n return False\n \n \n \n \n \n \n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1798,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n \ndef unique_day(date, possible_birthdays):\n if count_dates(date, possible_birthdays) == 1:\n return True\n else:\n return False\n \ndef count_months(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n count += 1\n return count\n \ndef unique_month(month, possible_birthdays):\n if count_months(month, possible_birthdays) == 1:\n return True\n else:\n return False\n\ndef days(month, possible_birthdays):\n days_in_month = ()\n for i in possible_birthdays:\n if i[0] == month:\n days_in_month += (i[1],)\n return days_in_month\n\ndef contains_unique_day(month, possible_birthdays):\n for x in range(len(days(month, possible_birthdays))):\n if unique_day(x, possible_birthdays):\n return True\n else:\n return False\n \n \n \n \n \n \n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1799,"func_code":"def unique_day(day, possible_birthdays):\n a = 0\n for item in possible_birthdays:\n for i in item:\n if i == day:\n a += 1\n if a == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n a = 0\n for item in possible_birthdays:\n for i in item:\n if i == month:\n a += 1\n if a == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n a = 0\n b = 0\n for item in possible_birthdays:\n if month in item:\n a = item\n if unique_day(item[1],possible_birthdays) == True:\n b += 1\n if b == 1:\n return True\n else:\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1800,"func_code":"def unique_day(day, possible_birthdays):\n count=0\n for i in possible_birthdays:\n if i[1]==day:\n count+=1\n if count>1:\n check=False\n else:\n check=True\n return check\n\ndef unique_month(month, possible_birthdays):\n count=0\n for i in possible_birthdays:\n if i[0]==month:\n count+=1\n if count>1:\n check=False\n else:\n check=True\n return check\n\n\ndef contains_unique_day(month, possible_birthdays):\n birthdays=()\n for i in possible_birthdays:\n if i[0]==month:\n birthdays+=(i,)\n for j in birthdays:\n if unique_day(j[1], possible_birthdays):\n return True\n return False\n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1801,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n \ndef unique_day(date, possible_birthdays):\n if count_dates(date, possible_birthdays) == 1:\n return True\n else:\n return False\n \ndef count_months(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n count += 1\n return count\n \ndef unique_month(month, possible_birthdays):\n if count_months(month, possible_birthdays) == 1:\n return True\n else:\n return False\n\ndef days(month, possible_birthdays):\n days_in_month = ()\n for i in possible_birthdays:\n if i[0] == month:\n days_in_month += (i[1],)\n return days_in_month\n\ndef contains_unique_day(month, possible_birthdays):\n for x in range(len(days(month, possible_birthdays))):\n if unique_day(x, possible_birthdays) == False:\n return True\n else:\n return False\n \n \n \n \n \n \n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1802,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n \ndef unique_day(date, possible_birthdays):\n if count_dates(date, possible_birthdays) == 1:\n return True\n else:\n return False\n \ndef count_months(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n count += 1\n return count\n \ndef unique_month(month, possible_birthdays):\n if count_months(month, possible_birthdays) == 1:\n return True\n else:\n return False\n\ndef days(month, possible_birthdays):\n days_in_month = ()\n for i in possible_birthdays:\n if i[0] == month:\n days_in_month += (i[1],)\n return days_in_month\n\ndef contains_unique_day(month, possible_birthdays):\n for x in range(len(days(month, possible_birthdays))):\n if unique_day(x, possible_birthdays):\n return True\n elif unique_day(days(month, possible_birthdays)[-1], possible_birthdays):\n return False\n \n \n \n \n \n \n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1803,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n \ndef unique_day(date, possible_birthdays):\n if count_dates(date, possible_birthdays) == 1:\n return True\n else:\n return False\n \ndef count_months(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n count += 1\n return count\n \ndef unique_month(month, possible_birthdays):\n if count_months(month, possible_birthdays) == 1:\n return True\n else:\n return False\n\ndef days(month, possible_birthdays):\n days_in_month = ()\n for i in possible_birthdays:\n if i[0] == month:\n days_in_month += (i[1],)\n return days_in_month\n\ndef contains_unique_day(month, possible_birthdays):\n for x in range(len(days(month, possible_birthdays))):\n if unique_day(days(month, possible_birthday)[x], possible_birthdays):\n return True\n else:\n return False\n \n \n \n \n \n \n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1804,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n \ndef unique_day(date, possible_birthdays):\n if count_dates(date, possible_birthdays) == 1:\n return True\n else:\n return False\n \ndef count_months(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n count += 1\n return count\n \ndef unique_month(month, possible_birthdays):\n if count_months(month, possible_birthdays) == 1:\n return True\n else:\n return False\n\ndef days(month, possible_birthdays):\n days_in_month = ()\n for i in possible_birthdays:\n if i[0] == month:\n days_in_month += (i[1],)\n return days_in_month\n\ndef contains_unique_day(month, possible_birthdays):\n for x in days(month, possible_birthdays):\n if unique_day(days(month, possible_birthday)[x], possible_birthdays):\n return True\n else:\n return False\n \n \n \n \n \n \n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1805,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n \ndef unique_day(date, possible_birthdays):\n if count_dates(date, possible_birthdays) == 1:\n return True\n else:\n return False\n \ndef count_months(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n count += 1\n return count\n \ndef unique_month(month, possible_birthdays):\n if count_months(month, possible_birthdays) == 1:\n return True\n else:\n return False\n\ndef days(month, possible_birthdays):\n days_in_month = ()\n for i in possible_birthdays:\n if i[0] == month:\n days_in_month += (i[1],)\n return days_in_month\n\ndef contains_unique_day(month, possible_birthdays):\n for x in len(days(month, possible_birthdays)):\n if unique_day(days(month, possible_birthday)[x], possible_birthdays):\n return True\n else:\n return False\n \n \n \n \n \n \n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1806,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n \ndef unique_day(date, possible_birthdays):\n if count_dates(date, possible_birthdays) == 1:\n return True\n else:\n return False\n \ndef count_months(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n count += 1\n return count\n \ndef unique_month(month, possible_birthdays):\n if count_months(month, possible_birthdays) == 1:\n return True\n else:\n return False\n\ndef days(month, possible_birthdays):\n days_in_month = ()\n for i in possible_birthdays:\n if i[0] == month:\n days_in_month += (i[1],)\n return days_in_month\n\ndef contains_unique_day(month, possible_birthdays):\n for x in len(days(month, possible_birthdays)):\n if unique_day(days(month, possible_birthdays)[x], possible_birthdays):\n return True\n else:\n return False\n \n \n \n \n \n \n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1807,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n \ndef unique_day(date, possible_birthdays):\n if count_dates(date, possible_birthdays) == 1:\n return True\n else:\n return False\n \ndef count_months(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n count += 1\n return count\n \ndef unique_month(month, possible_birthdays):\n if count_months(month, possible_birthdays) == 1:\n return True\n else:\n return False\n\ndef days(month, possible_birthdays):\n days_in_month = ()\n for i in possible_birthdays:\n if i[0] == month:\n days_in_month += (i[1],)\n return days_in_month\n\ndef contains_unique_day(month, possible_birthdays):\n for x in days(month, possible_birthdays):\n if unique_day(days(month, possible_birthdays)[x], possible_birthdays):\n return True\n else:\n return False\n \n \n \n \n \n \n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1808,"func_code":"def unique_day(day, possible_birthdays):\n result = tuple(filter(lambda x: x[1] == day, possible_birthdays))\n if len(result) == 1:\n return True \n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n result = tuple(filter(lambda x: x[0] == month, possible_birthdays))\n if len(result) == 1:\n return True \n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n months = tuple(filter(lambda x: x[0] == month, possible_birthdays))\n result = tuple(filter(lambda y: unique_day(y[1], possible_birthdays), months))\n if len(result) == 1:\n return True\n else:\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1809,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n \ndef unique_day(date, possible_birthdays):\n if count_dates(date, possible_birthdays) == 1:\n return True\n else:\n return False\n \ndef count_months(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n count += 1\n return count\n \ndef unique_month(month, possible_birthdays):\n if count_months(month, possible_birthdays) == 1:\n return True\n else:\n return False\n\ndef days(month, possible_birthdays):\n days_in_month = ()\n for i in possible_birthdays:\n if i[0] == month:\n days_in_month += (i[1],)\n return days_in_month\n\ndef contains_unique_day(month, possible_birthdays):\n for x in range(len(days(month, possible_birthdays))):\n if unique_day(days(month, possible_birthdays)[x], possible_birthdays):\n return True\n else:\n return False\n \n \n \n \n \n \n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1810,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n \ndef unique_day(date, possible_birthdays):\n if count_dates(date, possible_birthdays) == 1:\n return True\n else:\n return False\n \ndef count_months(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n count += 1\n return count\n \ndef unique_month(month, possible_birthdays):\n if count_months(month, possible_birthdays) == 1:\n return True\n else:\n return False\n\ndef days(month, possible_birthdays):\n days_in_month = ()\n for i in possible_birthdays:\n if i[0] == month:\n days_in_month += (i[1],)\n return days_in_month\n\ndef contains_unique_day(month, possible_birthdays):\n days_in_month = ()\n for i in possible_birthdays:\n if i[0] == month:\n days_in_month += (i[1],)\n for x in range(len(days(month, possible_birthdays))):\n if unique_day(days(month, possible_birthdays)[x], possible_birthdays):\n return True\n else:\n return False\n \n \n \n \n \n \n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1811,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n \ndef unique_day(date, possible_birthdays):\n if count_dates(date, possible_birthdays) == 1:\n return True\n else:\n return False\n \ndef count_months(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n count += 1\n return count\n \ndef unique_month(month, possible_birthdays):\n if count_months(month, possible_birthdays) == 1:\n return True\n else:\n return False\n\n\ndef contains_unique_day(month, possible_birthdays):\n days_in_month = ()\n for i in possible_birthdays:\n if i[0] == month:\n days_in_month += (i[1],)\n for x in days(month, possible_birthdays):\n if unique_day(x, possible_birthdays):\n return True\n else:\n return False\n \n \n \n \n \n \n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1812,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n \ndef unique_day(date, possible_birthdays):\n if count_dates(date, possible_birthdays) == 1:\n return True\n else:\n return False\n \ndef count_months(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n count += 1\n return count\n \ndef unique_month(month, possible_birthdays):\n if count_months(month, possible_birthdays) == 1:\n return True\n else:\n return False\n\n\ndef contains_unique_day(month, possible_birthdays):\n days_in_month = ()\n for i in possible_birthdays:\n if i[0] == month:\n days_in_month += (i[1],)\n for i in days(month, possible_birthdays):\n if unique_day(i, possible_birthdays):\n return True\n else:\n return False\n \n \n \n \n \n \n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1813,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n \ndef unique_day(date, possible_birthdays):\n if count_dates(date, possible_birthdays) == 1:\n return True\n else:\n return False\n \ndef count_months(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n count += 1\n return count\n \ndef unique_month(month, possible_birthdays):\n if count_months(month, possible_birthdays) == 1:\n return True\n else:\n return False\n\n\ndef contains_unique_day(month, possible_birthdays):\n days_in_month = ()\n for i in possible_birthdays:\n if i[0] == month:\n days_in_month += (i[1],)\n for i in range(len(days(month, possible_birthdays))):\n if unique_day(i, possible_birthdays):\n return True\n else:\n return False\n \n \n \n \n \n \n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1814,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n \ndef unique_day(date, possible_birthdays):\n if count_dates(date, possible_birthdays) == 1:\n return True\n else:\n return False\n \ndef count_months(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n count += 1\n return count\n \ndef unique_month(month, possible_birthdays):\n if count_months(month, possible_birthdays) == 1:\n return True\n else:\n return False\n\n\ndef contains_unique_day(month, possible_birthdays):\n days_in_month = ()\n for i in possible_birthdays:\n if i[0] == month:\n days_in_month += (i[1],)\n for i in range(len(days(month, possible_birthdays))):\n if unique_day(days(month, possible_birthdays)[i], possible_birthdays):\n return True\n else:\n return False\n \n \n \n \n \n \n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1815,"func_code":"def unique_day(day, possible_birthdays):\n counter = 0\n for i in possible_birthdays:\n if i[1] == day:\n if counter >= 1:\n return False\n else:\n counter += 1\n return True\n\ndef unique_month(month, possible_birthdays):\n counter = 0\n for i in possible_birthdays:\n if i[0] == month:\n if counter >= 1:\n return False\n else:\n counter += 1\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n filtered = tuple(filter(lambda x: x[0] == month, possible_birthdays))\n tup1 = tuple(filter(lambda x: x[0] != month, possible_birthdays)) # Remaining dates\n tup2 = tuple(map(lambda x: x[1], tup1)) # Day of the remaining dates\n def unique(tup):\n output = ()\n for i in tup:\n if i not in output:\n output += (i,)\n return output\n dates = unique(tup2)\n \n for i in filtered:\n if i[1] not in dates:\n return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1816,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n \ndef unique_day(date, possible_birthdays):\n if count_dates(date, possible_birthdays) == 1:\n return True\n else:\n return False\n \ndef count_months(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n count += 1\n return count\n \ndef unique_month(month, possible_birthdays):\n if count_months(month, possible_birthdays) == 1:\n return True\n else:\n return False\n\n\ndef contains_unique_day(month, possible_birthdays):\n days_in_month = ()\n for i in possible_birthdays:\n if i[0] == month:\n days_in_month += (i[1],)\n for i in range(len(days_in_month)):\n if unique_day(days_in_month[i], possible_birthdays):\n return True\n else:\n return False\n \n \n \n \n \n \n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1817,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n \ndef unique_day(date, possible_birthdays):\n if count_dates(date, possible_birthdays) == 1:\n return True\n else:\n return False\n \ndef count_months(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n count += 1\n return count\n \ndef unique_month(month, possible_birthdays):\n if count_months(month, possible_birthdays) == 1:\n return True\n else:\n return False\n\n\ndef contains_unique_day(month, possible_birthdays):\n days_in_month = ()\n for i in possible_birthdays:\n if i[0] == month:\n days_in_month += (i[1],)\n for x in range(len(days_in_month)):\n if unique_day(days_in_month[x], possible_birthdays):\n return True\n else:\n return False\n \n \n \n \n \n \n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1818,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n \ndef unique_day(date, possible_birthdays):\n if count_dates(date, possible_birthdays) == 1:\n return True\n else:\n return False\n \ndef count_months(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n count += 1\n return count\n \ndef unique_month(month, possible_birthdays):\n if count_months(month, possible_birthdays) == 1:\n return True\n else:\n return False\n\n\ndef contains_unique_day(month, possible_birthdays):\n days_in_month = ()\n for i in possible_birthdays:\n if i[0] == month:\n days_in_month += (i,)\n for x in range(len(days_in_month)):\n if unique_day(days_in_month[x][1], possible_birthdays):\n return True\n else:\n return False\n \n \n \n \n \n \n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1819,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n \ndef unique_day(date, possible_birthdays):\n if count_dates(date, possible_birthdays) == 1:\n return True\n else:\n return False\n \ndef count_months(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n count += 1\n return count\n \ndef unique_month(month, possible_birthdays):\n if count_months(month, possible_birthdays) == 1:\n return True\n else:\n return False\n\n\ndef contains_unique_day(month, possible_birthdays):\n days_in_month = ()\n for i in possible_birthdays:\n if i[0] == month:\n days_in_month += (i,)\n for x in range(len(days_in_month)):\n if unique_day(days_in_month[x][1], possible_birthdays):\n return True\n else:\n return False\n \n \n \n \n \n \n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1820,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n \ndef unique_day(date, possible_birthdays):\n if count_dates(date, possible_birthdays) == 1:\n return True\n else:\n return False\n \ndef count_months(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n count += 1\n return count\n \ndef unique_month(month, possible_birthdays):\n if count_months(month, possible_birthdays) == 1:\n return True\n else:\n return False\n\n\ndef contains_unique_day(month, possible_birthdays):\n days_in_month = ()\n for i in possible_birthdays:\n if i[0] == month:\n days_in_month += (i,)\n for x in range(len(days_in_month)):\n if unique_day(days_in_month[x][1], possible_birthdays) == True:\n return True\n else:\n return False\n \n \n \n \n \n \n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1821,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n \ndef unique_day(date, possible_birthdays):\n if count_dates(date, possible_birthdays) == 1:\n return True\n else:\n return False\n \ndef count_months(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n count += 1\n return count\n \ndef unique_month(month, possible_birthdays):\n if count_months(month, possible_birthdays) == 1:\n return True\n else:\n return False\n\n\ndef contains_unique_day(month, possible_birthdays):\n days_in_month = ()\n for i in possible_birthdays:\n if i[0] == month:\n days_in_month += (i,)\n for x in range(len(days_in_month)):\n if unique_day(days_in_month[x][1], possible_birthdays) == False:\n return True\n else:\n return False\n \n \n \n \n \n \n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1822,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n \ndef unique_day(date, possible_birthdays):\n if count_dates(date, possible_birthdays) == 1:\n return True\n else:\n return False\n \ndef count_months(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n count += 1\n return count\n \ndef unique_month(month, possible_birthdays):\n if count_months(month, possible_birthdays) == 1:\n return True\n else:\n return False\n\n\ndef contains_unique_day(month, possible_birthdays):\n days_in_month = ()\n for i in possible_birthdays:\n if i[0] == month:\n days_in_month += (i,)\n for x in range(len(days_in_month)):\n if unique_day(days_in_month[x][1], possible_birthdays) == False:\n return True\n else:\n return True\n \n \n \n \n \n \n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1823,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n \ndef unique_day(date, possible_birthdays):\n if count_dates(date, possible_birthdays) == 1:\n return True\n else:\n return False\n \ndef count_months(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n count += 1\n return count\n \ndef unique_month(month, possible_birthdays):\n if count_months(month, possible_birthdays) == 1:\n return True\n else:\n return False\n\n\ndef contains_unique_day(month, possible_birthdays):\n days_in_month = ()\n for i in possible_birthdays:\n if i[0] == month:\n days_in_month += (i,)\n for x in range(len(days_in_month)):\n if unique_day(days_in_month[x][1], possible_birthdays) == False:\n return True\n else:\n return False\n \n \n \n \n \n \n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1824,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n \ndef unique_day(date, possible_birthdays):\n if count_dates(date, possible_birthdays) == 1:\n return True\n else:\n return False\n \ndef count_months(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n count += 1\n return count\n \ndef unique_month(month, possible_birthdays):\n if count_months(month, possible_birthdays) == 1:\n return True\n else:\n return False\n\n\ndef contains_unique_day(month, possible_birthdays):\n days_in_month = ()\n for i in possible_birthdays:\n if i[0] == month:\n days_in_month += (i,)\n for x in days_in_month:\n if unique_day(x[1], possible_birthdays) == False:\n return True\n else:\n return False\n \n \n \n \n \n \n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1825,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n \ndef unique_day(date, possible_birthdays):\n if count_dates(date, possible_birthdays) == 1:\n return True\n else:\n return False\n \ndef count_months(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n count += 1\n return count\n \ndef unique_month(month, possible_birthdays):\n if count_months(month, possible_birthdays) == 1:\n return True\n else:\n return False\n\n\ndef contains_unique_day(month, possible_birthdays):\n days_in_month = ()\n for i in possible_birthdays:\n if i[0] == month:\n days_in_month += (i,)\n for x in days_in_month:\n if unique_day(x[1], possible_birthdays):\n return True\n else:\n return False\n \n \n \n \n \n \n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1826,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n \ndef unique_day(date, possible_birthdays):\n if count_dates(date, possible_birthdays) == 1:\n return True\n else:\n return False\n \ndef count_months(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n count += 1\n return count\n \ndef unique_month(month, possible_birthdays):\n if count_months(month, possible_birthdays) == 1:\n return True\n else:\n return False\n\ndef days(month, possible_birthdays):\n days_in_month = ()\n for i in range(len(possible_birthdays)):\n if possible_birthdays[i][0] == month:\n days_in_month += (possible_birthdays[i],)\n return days_in_month\n\ndef contains_unique_day(month, possible_birthdays):\n for x in range(len(days(month, possible_birthdays))):\n if unique_day(days(month, possible_birthdays)[x][1], possible_birthdays):\n return True\n else:\n return False\n \n \n \n \n \n \n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1827,"func_code":"def unique_day(date, possible_birthdays):\n counter = 0\n for i in range(0,len(possible_birthdays)):\n if possible_birthdays[i][1] == date:\n counter = counter + 1\n if counter == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n return\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1828,"func_code":"def unique_day(date, possible_birthdays):\n counter = 0\n for i in range(0,len(possible_birthdays)):\n if possible_birthdays[i][1] == date:\n counter = counter + 1\n if counter == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n counter = 0\n for i in range(0,len(possible_birthdays)):\n if possible_birthdays[i][0] == month:\n counter = counter + 1\n if counter == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1829,"func_code":"def unique_day(day, possible_birthdays):\n i=0\n for birthday in possible_birthdays:\n if day == birthday[1]:\n i+=1\n if i == 2:\n return False\n return True\n\ndef unique_month(month, possible_birthdays):\n i=0\n for birthday in possible_birthdays:\n if month == birthday[0]:\n i+=1\n if i == 2:\n return False\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n bday_list=()\n for birthday in possible_birthdays:\n if month == birthday[0]:\n bday_list+=(birthday,)\n for birthday in bday_list:\n if unique_day(birthday[1], possible_birthdays):\n return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1830,"func_code":"def unique_day(day, possible_birthdays):\n days = ()\n unique = ()\n for i in possible_birthdays:\n days += (i[1],)\n for i in days:\n if i == day:\n unique += (i,)\n else:\n continue\n if len(unique) == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n return\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1831,"func_code":"def unique_day(day, possible_birthdays):\n x = 1\n for i in possible_birthdays:\n if day == i[1]:\n x = x + 1\n else:\n x = x\n if x > 2:\n return False\n else:\n return True\n \ndef unique_month(month, possible_birthdays):\n x = 1\n for i in possible_birthdays:\n if month == i[0]:\n x = x + 1\n else:\n x = x\n if x > 2:\n return False\n else:\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n y = ()\n for i in possible_birthdays:\n if i[0] == month:\n y = y + (i, )\n for a in y:\n if unique_day(a[1], possible_birthdays):\n return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1832,"func_code":"def unique_day(date, possible_birthdays):\n counter = 0\n for j in possible_birthdays:\n if day == j[1]:\n counter += 1\n if counter != 1:\n return False\n else:\n return True\n\ndef unique_month(month, possible_birthdays):\n counter = 0\n for j in possible_birthdays:\n if month == j[0]:\n counter +=1\n if counter != 1:\n return False\n else:\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n for j in possible_birthdays:\n if month != j[0]:\n continue\n else:\n if unique_day(j[1],possible_birthdays):\n return True\n return False\n\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1833,"func_code":"def unique_day(day, possible_birthdays):\n x = 0\n for birthday in possible_birthdays:\n if day in birthday:\n x += 1\n if x > 1:\n return False\n else:\n return True\n\ndef unique_month(month, possible_birthdays):\n x = 0\n for birthday in possible_birthdays:\n if month in birthday:\n x += 1\n if x > 1:\n return False\n else:\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n results = ()\n for birthday in possible_birthdays:\n if month == birthday[0]:\n results += (unique_day(birthday[1], possible_birthdays),)\n if True in results:\n return True\n else:\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1834,"func_code":"def unique_day(day, possible_birthdays):\n x = 0\n for birthday in possible_birthdays:\n if day in birthday:\n x += 1\n if x > 1:\n return False\n else:\n return True\n\ndef unique_month(month, possible_birthdays):\n x = 0\n for birthday in possible_birthdays:\n if month in birthday:\n x += 1\n if x > 1:\n return False\n else:\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n results = ()\n for birthday in possible_birthdays:\n if month == birthday[0]:\n results += (unique_day(birthday[1], possible_birthdays),)\n if True in results:\n return True\n else:\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1835,"func_code":"def unique_day(day, possible_birthdays):\n checker=True\n for k in possible_birthdays:\n if k[1]==day:\n checker=False\n return checker\n\ndef unique_month(day, possible_birthdays):\n checker=True\n for k in possible_birthdays:\n if k[0]==day:\n checker=False\n return checker\n \ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1836,"func_code":"def unique_day(day, possible_birthdays):\n checker=0\n for k in possible_birthdays:\n if k[1]==day:\n checker+=1\n return checker==1\n \ndef unique_month(day, possible_birthdays):\n checker=0\n for k in possible_birthdays:\n if k[0]==day:\n checker+=1\n return checker==1\n \ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1837,"func_code":"def unique_day(day, possible_birthdays):\n total = ()\n for i in possible_birthdays:\n total += (i[1],)\n if total.count(day) > 1: \n return False\n else:\n return True\n\ndef unique_month(month, possible_birthdays):\n total = ()\n for i in possible_birthdays:\n total += (i[0],)\n if total.count(month) > 1: \n return False\n else:\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n uniquedays = ()\n daysinmonth = ()\n for i in possible_birthdays:\n if unique_day(i[1], possible_birthdays)== True:\n uniquedays += (i[1],)\n for i in possible_birthdays:\n if i[0] == month:\n daysinmonth += (i[1],)\n for each in uniquedays:\n if each in daysinmonth:\n return True\n else:\n continue\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1838,"func_code":"def unique_day(day, possible_birthdays):\n counter=0\n for i in possible_birthdays:\n if i[1]==day:\n counter=counter+1\n if counter<=1:\n return true\n else:\n return False\n return True\n\ndef unique_month(month, possible_birthdays):\n counter=0\n for i in possible_birthdays:\n if i[0]==month:\n counter=counter+1\n if counter<=1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n temp=()\n for i in possible_birthdays:\n if i[0]==month:\n temp=temp+(i,)\n for i in temp:\n if unique_day(i[1], possible_birthdays):\n return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1839,"func_code":"def unique_day(day, possible_birthdays):\n counter=0\n for i in possible_birthdays:\n if i[1]==day:\n counter=counter+1\n if counter<=1:\n return true\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n counter=0\n for i in possible_birthdays:\n if i[0]==month:\n counter=counter+1\n if counter<=1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n temp=()\n for i in possible_birthdays:\n if i[0]==month:\n temp=temp+(i,)\n for i in temp:\n if unique_day(i[1], possible_birthdays):\n return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1840,"func_code":"def unique_day(day, possible_birthdays):\n counter=0\n for i in possible_birthdays:\n if i[1]==day:\n counter=counter+1\n if counter<=1:\n return true\n else:\n return False\n return True\n\ndef unique_month(month, possible_birthdays):\n counter=0\n for i in possible_birthdays:\n if i[0]==month:\n counter=counter+1\n if counter<=1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n temp=()\n for i in possible_birthdays:\n if i[0]==month:\n temp=temp+(i,)\n for i in temp:\n if unique_day(i[1], possible_birthdays):\n return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1841,"func_code":"def unique_day(day, possible_birthdays):\n counter=0\n for i in possible_birthdays:\n if i[1]==day:\n counter=counter+1\n if counter<=1:\n return true\n else:\n return False\n return True\n\ndef unique_month(month, possible_birthdays):\n counter=0\n for i in possible_birthdays:\n if i[0]==month:\n counter=counter+1\n if counter<=1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n temp=()\n for i in possible_birthdays:\n if i[0]==month:\n temp=temp+(i,)\n for i in temp:\n if unique_day(i[1],possible_birthdays):\n return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1842,"func_code":"def unique_day(day, possible_birthdays):\n counter=0\n for i in possible_birthdays:\n if i[1]==day:\n counter=counter+1\n if counter<=1:\n return true\n else:\n return False\n return True\n\ndef unique_month(month, possible_birthdays):\n counter=0\n for i in possible_birthdays:\n if i[0]==month:\n counter=counter+1\n if counter<=1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n temp=()\n for i in possible_birthdays:\n if i[0]==month:\n temp=temp+(i,)\n for i in temp:\n if unique_day(i[1],possible_birthdays):\n return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1843,"func_code":"def unique_day(day, possible_birthdays):\n counter=0\n for i in possible_birthdays:\n if i[1]==day:\n counter=counter+1\n if counter<=1:\n return true\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n counter=0\n for i in possible_birthdays:\n if i[0]==month:\n counter=counter+1\n if counter<=1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n temp=()\n for i in possible_birthdays:\n if i[0]==month:\n temp=temp+(i,)\n for i in temp:\n if unique_day(i[1],possible_birthdays):\n return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1844,"func_code":"def unique_day(day, possible_birthdays):\n counter=0\n for i in possible_birthdays:\n if i[1]==day:\n counter=counter+1\n if counter<=1:\n return true\n else:\n return False\n return True\n\ndef unique_month(month, possible_birthdays):\n counter=0\n for i in possible_birthdays:\n if i[0]==month:\n counter=counter+1\n if counter<=1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n temp=()\n for i in possible_birthdays:\n if i[0]==month:\n temp=temp+(i,)\n for i in temp:\n if unique_day(i[1],possible_birthdays):\n return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1845,"func_code":"def unique_day(day, possible_birthdays):\n counter=0\n for i in possible_birthdays:\n if i[1]==day:\n counter=counter+1\n if counter<=1:\n return True\n else:\n return False\n return True\n\ndef unique_month(month, possible_birthdays):\n counter=0\n for i in possible_birthdays:\n if i[0]==month:\n counter=counter+1\n if counter<=1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n temp=()\n for i in possible_birthdays:\n if i[0]==month:\n temp=temp+(i,)\n for i in temp:\n if unique_day(i[1],possible_birthdays):\n return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1846,"func_code":"def unique_day(date, possible_birthdays):\n counter = 0\n for i in possible_birthdays:\n if i[1] == date:\n counter += 1\n else:\n continue\n if counter == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n counter = 0\n for i in possible_birthdays:\n if i[1] == month:\n counter += 1\n else:\n continue\n if counter == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n tup = ()\n for i in possible_birthdays:\n if i[0] == month:\n tup += ((i),)\n else:\n continue\n for i in tup:\n if unique_day(i[1], possible_birthdays) == True:\n return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1847,"func_code":"def unique_day(day, possible_birthdays):\n x = 1\n for i in possible_birthdays:\n if day == i[1]:\n x = x + 1\n else:\n x = x\n if x > 2:\n return False\n else:\n return True\n \ndef unique_month(month, possible_birthdays):\n return\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1848,"func_code":"def unique_day(day, possible_birthdays):\n result = 0\n for i in possible_birthdays:\n if day == i[1]:\n result = result + 1\n\n if result == 1:\n return True\n\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n result = 0\n for i in possible_birthdays:\n if month == i[0]:\n result = result + 1\n\n if result == 1:\n return True\n \n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1849,"func_code":"def unique_day(date, possible_birthdays):\n count=0\n for i in range(len(possible_birthdays)):\n if date==possible_birthdays[i][1]:\n count=count+1\n if count>=2:\n return False\n return True\n\ndef unique_month(month, possible_birthdays):\n count=0\n for i in range(len(possible_birthdays)):\n if month==possible_birthdays[i][0]:\n count=count+1\n if count>=2:\n return False\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n for i in range(len(possible_birthdays)):\n if month==possible_birthdays[i][0]:\n if unique_day(possible_birthdays[i][1], possible_birthdays):\n return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1850,"func_code":"def unique_day(date, possible_birthdays):\n count=0\n for i in range(len(possible_birthdays)):\n if date==possible_birthdays[i][1]:\n count=count+1\n if count>=2:\n return False\n return True\n\ndef unique_month(month, possible_birthdays):\n return\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1851,"func_code":"def unique_day(date, possible_birthdays):\n count=0\n for i in range(len(possible_birthdays)):\n if date==possible_birthdays[i][1]:\n count=count+1\n if count>=2:\n return False\n return True\n\ndef unique_month(month, possible_birthdays):\n count=0\n for i in range(len(possible_birthdays)):\n if month==possible_birthdays[i][0]:\n count=count+1\n if count>=2:\n return False\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n for i in range(len(possible_birthdays)):\n if month==possible_birthdays[i][0]:\n if unique_day(possible_birthdays[i][1], possible_birthdays):\n return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1852,"func_code":"def map(fn, seq):\n res = ()\n\n for ele in seq:\n res = res + (fn(ele), )\n return res\n\ndef filter(pred, seq):\n res = ()\n\n for ele in seq:\n if pred(ele):\n res = res + (ele, )\n return res\n\ndef unique_day(day, possible_birthdays):\n a = map(lambda x : x[1], possible_birthdays)\n for i in a:\n if i == day:\n b = filter(lambda x: x == i, a)\n if len(b) > 1:\n return False\n else:\n return True\n\ndef unique_month(month, possible_birthdays):\n a = map(lambda x : x[0], possible_birthdays)\n for i in a:\n if i == month:\n b = filter(lambda x: x == i, a)\n if len(b) > 1:\n return False\n else:\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n a = map(lambda x : x[0], possible_birthdays)\n b = map(lambda x : x[1], possible_birthdays)\n k = ()\n for i in range(len(a)):\n if month == a[i]:\n k += (b[i],)\n for f in range(len(k)):\n if len(filter(lambda x: x == k[f],b)) == 1:\n return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1853,"func_code":"def unique_day(day, possible_birthdays):\n count = 0\n for element in possible_birthdays:\n if element[1] == day:\n count += 1\n if count != 1:\n return False\n return True\n\ndef unique_month(month, possible_birthdays):\n return\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1854,"func_code":"def unique_day(date, possible_birthdays):\n j = 0\n for i in possible_birthdays:\n if day == i[2]:\n j = j+1\n else:\n j = j\n if j == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n return\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1855,"func_code":"def unique_day(date, possible_birthdays):\n j = 0\n for i in possible_birthdays:\n if day == i[1]:\n j = j+1\n else:\n j = j\n if j == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n return\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1856,"func_code":"def unique_day(date, possible_birthdays):\n j = 0\n for i in possible_birthdays:\n if date == i[1]:\n j = j+1\n else:\n j = j\n if j == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n return\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1857,"func_code":"def unique_day(date, possible_birthdays):\n j = 0\n for i in possible_birthdays:\n if date == i[1]:\n j = j+1\n else:\n j = j\n if j == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n j = 0\n for i in possible_birthdays:\n if month == i[0]:\n j = j+1\n else:\n j = j\n if j == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1858,"func_code":"def unique_day(day, possible_birthdays):\n counter=0\n for date in possible_birthdays:\n if day in date:\n counter+=1\n if counter>1:\n return False \n return True\n\n\ndef unique_month(month, possible_birthdays):\n counter=0\n for date in possible_birthdays:\n if month in date:\n counter+=1\n if counter>1:\n return False \n return True\n\ndef contains_unique_day(month, possible_birthdays):\n dates=()\n for date in possible_birthdays:\n months,day=date\n if unique_day(day, possible_birthdays):\n dates+=(months,)\n return month in dates\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1859,"func_code":"def unique_day(day, possible_birthdays):\n count = 0\n for date in possible_birthdays:\n if date[1] == day:\n count += 1\n return count == 1\n\ndef unique_month(month, possible_birthdays):\n count = 0\n for mon in possible_birthdays:\n if date[0] == month:\n count += 1\n return count == 1\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1860,"func_code":"def unique_day(day, possible_birthdays):\n count = 0\n for date in possible_birthdays:\n if date[1] == day:\n count += 1\n return count == 1\n\ndef unique_month(month, possible_birthdays):\n count = 0\n for mon in possible_birthdays:\n if mon[0] == month:\n count += 1\n return count == 1\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1861,"func_code":"def unique_day(day, possible_birthdays):\n count = 0\n for date in possible_birthdays:\n if date[1] == day:\n count += 1\n return count == 1\n\ndef unique_month(month, possible_birthdays):\n count = 0\n for mon in possible_birthdays:\n if mon[0] == month:\n count += 1\n return count == 1\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1862,"func_code":"def unique_day(day, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n birthday = i[1]\n if day == birthday:\n count = count + 1\n else:\n count = count\n if count > 1:\n return False\n elif count <= 1:\n return True\n\ndef unique_month(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n birthday = i[0]\n if month == birthday:\n count = count + 1\n else:\n count = count\n if count > 1:\n return False\n elif count <= 1:\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n tup_month_1 = ()\n tup_month_2 = ()\n for i in possible_birthdays:\n if month == i[0]:\n tup_month_1 = tup_month_1 + (i,)\n else:\n tup_month_2 = tup_month_2 + (i[1],)\n for j in tup_month_1:\n day = j[1]\n if day in tup_month_2:\n continue\n elif day not in tup_month_2:\n return True\n else:\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1863,"func_code":"def unique_day(date, possible_birthdays):\n count = 0\n for bday in possible_birthdays:\n if day == bday[1]:\n count += 1\n return count == 1\n\ndef unique_month(month, possible_birthdays):\n count = 0\n for bday in possible_birthdays:\n if month == bday[0]:\n count += 1\n return count == 1\n\ndef contains_unique_day(month, possible_birthdays):\n for bday in possible_birthdays:\n if month == bday[0]:\n if unique_day(bday[1], possible_birthdays):\n return True\n return False \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1864,"func_code":"def unique_day(day, possible_birthdays):\n counter=0\n for date in possible_birthdays:\n if day == date[1]:\n counter+=1\n return counter==1\n\ndef unique_month(month, possible_birthdays):\n return\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1865,"func_code":"def unique_day(day, possible_birthdays):\n result = ()\n for p in possible_birthdays:\n pd = p[1]\n if day == pd:\n result = result + (day,)\n if len(result) > 1:\n return False\n return True\n\ndef unique_month(month, possible_birthdays):\n return\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1866,"func_code":"def unique_day(day, possible_birthdays):\n flat_possible_birthdays=enumerate_tree(possible_birthdays)\n if flat_possible_birthdays.count(day) == 1:\n return True\n else:\n return False\n\ndef enumerate_tree(tree):\n if tree == ():\n return ()\n elif is_leaf(tree):\n return (tree,)\n else:\n return enumerate_tree(tree[0])+enumerate_tree(tree[1:])\ndef is_leaf(item):\n return type(item) != tuple\n\ndef unique_month(month, possible_birthdays):\n flat_possible_birthdays=enumerate_tree(possible_birthdays)\n if flat_possible_birthdays.count(month) == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n for each_day_in_month in filter(lambda x: x[0] == month, possible_birthdays):\n if unique_day(each_day_in_month[1], possible_birthdays) == True:\n res = True\n else:\n res = False\n return res\n\ndef filter(pred,seq):\n if seq ==():\n return ()\n elif pred(seq[0]):\n return (seq[0],)+filter(pred,seq[1:])\n else:\n return filter(pred,seq[1:])\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1867,"func_code":"def unique_day(date, possible_birthdays):\n return\n\ndef unique_month(month, possible_birthdays):\n return\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1868,"func_code":"def unique_day(day, possible_birthdays):\n result = ()\n for p in possible_birthdays:\n pd = p[1]\n if day == pd:\n result = result + (day,)\n if len(result) > 1:\n return False\n return True\n\ndef unique_month(month, possible_birthdays):\n result = ()\n for p in possible_birthdays:\n pm = p[0]\n if month == pm:\n result = result + (month,)\n if len(result) > 1:\n return False\n return True\n \n \ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1869,"func_code":"def unique_day(day, possible_birthdays):\n result = ()\n for p in possible_birthdays:\n pd = p[1]\n if day == pd:\n result = result + (day,)\n if len(result) > 1:\n return False\n return True\n\ndef unique_month(month, possible_birthdays):\n result = ()\n for p in possible_birthdays:\n pm = p[0]\n if month == pm:\n result = result + (month,)\n if len(result) > 1:\n return False\n return True\n \n \ndef contains_unique_day(month, possible_birthdays):\n result = ()\n for p in possible_birthdays:\n if month == p[0]:\n result = result + (p,)\n for r in result:\n if unique_day(r[1], possible_birthdays) == True:\n return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1870,"func_code":"def unique_day(day, possible_birthdays):\n days = [possible_birthdays[i][1] for i in range(len(possible_birthdays))]\n if days.count(day) > 1:\n return False\n return True\n\ndef unique_month(month, possible_birthdays):\n months = [possible_birthdays[i][0] for i in range(len(possible_birthdays))]\n if months.count(month) > 1:\n return False\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n days_in_month = []\n for i in range(len(possible_birthdays)):\n curr_month = possible_birthdays[i][0]\n curr_day = possible_birthdays[i][1]\n if curr_month == month:\n days_in_month.append(curr_day)\n for day in days_in_month:\n if unique_day(day, possible_birthdays):\n return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1871,"func_code":"def unique_day(day, possible_birthdays):\n result = ()\n for p in possible_birthdays:\n pd = p[1]\n if day == pd:\n result = result + (day,)\n if len(result) > 1:\n return False\n return True\n\ndef unique_month(month, possible_birthdays):\n result = ()\n for p in possible_birthdays:\n pm = p[0]\n if month == pm:\n result = result + (month,)\n if len(result) > 1:\n return False\n return True\n \n \ndef contains_unique_day(month, possible_birthdays):\n result = ()\n for p in possible_birthdays:\n if month == p[0]:\n result = result + (p,)\n for r in result:\n if unique_day(r[1], possible_birthdays) == True:\n return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1872,"func_code":"def unique_day(date, possible_birthdays):\n count = 0\n for birthday in possible_birthdays:\n if date == birthday[1]:\n count = count + 1\n if count>1:\n return False\n else:\n return True \n\ndef unique_month(month, possible_birthdays):\n count = 0\n for birthday in possible_birthdays:\n if month == birthday[0]:\n count = count + 1\n if count>1:\n return False\n else:\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n for birthday in possible_birthdays:\n if month == birthday[0]:\n if unique_day(birthday[1], possible_birthdays) == True:\n return True\n return False\n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1873,"func_code":"def unique_day(day, possible_birthdays):\n days = [possible_birthdays[i][1] for i in range(len(possible_birthdays))]\n if days.count(day) > 1:\n return False\n return True\n\ndef unique_month(month, possible_birthdays):\n months = [possible_birthdays[i][0] for i in range(len(possible_birthdays))]\n if months.count(month) > 1:\n return False\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n days_in_month = []\n for i in range(len(possible_birthdays)):\n curr_month = possible_birthdays[i][0]\n curr_day = possible_birthdays[i][1]\n if curr_month == month:\n days_in_month.append(curr_day)\n for day in days_in_month:\n if unique_day(day, possible_birthdays):\n return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1874,"func_code":"def unique_day(date, possible_birthdays):\n if day == 18 or 19:\n return True\n\ndef unique_month(month, possible_birthdays):\n return\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1875,"func_code":"def unique_day(date, possible_birthdays):\n if day == '18' or '19':\n return True\n\ndef unique_month(month, possible_birthdays):\n return\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1876,"func_code":"def unique_day(day, possible_birthdays):\n counter=0\n for i in possible_birthdays:\n if i[1]==day:\n counter+=1\n return counter<=1\n \ndef unique_month(month, possible_birthdays):\n counter=0\n for i in possible_birthdays:\n if i[0]==month:\n counter+=1\n return counter<=1\n \ndef contains_unique_day(month, possible_birthdays):\n value=()\n for i in possible_birthdays:\n if i[0]==month:\n value+=(i,)\n for i in value:\n if unique_day(i[1],possible_birthdays):\n return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1877,"func_code":"def unique_day(day, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == day:\n count += 1\n if count > 1:\n return False\n return True\n\ndef unique_month(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n count += 1\n if count > 1:\n return False\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n unique_day_tuple = tuple(filter(lambda x: unique_day(x[1],possible_birthdays),possible_birthdays))\n for i in unique_day_tuple:\n if i[0] == month:\n return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1878,"func_code":"def unique_day(day, possible_birthdays):\n days = ()\n for i in possible_birthdays:\n days += (i[1],)\n count = 0\n for ele in days:\n if ele == day:\n count += 1\n if count == 1:\n return True\n else:\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1879,"func_code":"def unique_day(day, possible_birthdays):\n days = ()\n for i in possible_birthdays:\n days += (i[1],)\n count = 0\n for ele in days:\n if ele == day:\n count += 1\n if count == 1:\n return True\n else:\n return False\n \ndef unique_month(month, possible_birthdays):\n months = ()\n for i in possible_birthdays:\n months += (i[0],)\n count = 0\n for ele in months:\n if ele == month:\n count += 1\n if count == 1:\n return True\n else:\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1880,"func_code":"def unique_day(day, possible_birthdays):\n count = 0\n for month_day in possible_birthdays:\n date = month_day[1]\n if day == date:\n count+= 1\n return count == 1\n\ndef unique_month(month, possible_birthdays):\n count = 0\n for month_day in possible_birthdays:\n mont = month_day[0]\n if month == mont:\n count+= 1\n return count == 1\n\ndef contains_unique_day(month, possible_birthdays):\n condition = False\n for month_day in possible_birthdays:\n if month == month_day[0]:\n condition = unique_day(month_day[1],possible_birthdays)\n return condition\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1881,"func_code":"def unique_day(day, possible_birthdays):\n x = 1\n for i in possible_birthdays:\n if day == i[1]:\n x = x + 1\n else:\n x = x\n if x > 2:\n return False\n else:\n return True\n \ndef unique_month(month, possible_birthdays):\n x = 1\n for i in possible_birthdays:\n if month == i[0]:\n x = x + 1\n else:\n x = x\n if x > 2:\n return False\n else:\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1882,"func_code":"def unique_day(day, possible_birthdays):\n x = 1\n for i in possible_birthdays:\n if day == i[1]:\n x = x + 1\n else:\n x = x\n if x > 2:\n return False\n else:\n return True\n \ndef unique_month(month, possible_birthdays):\n x = 1\n for i in possible_birthdays:\n if month == i[0]:\n x = x + 1\n else:\n x = x\n if x > 2:\n return False\n else:\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n x = ()\n for i in possible_birthdays:\n if month == i[0]:\n x = x + (i, )\n for a in x:\n if unique_day(a[1], possible_birthdays):\n return True\n else:\n return False \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1883,"func_code":"def unique_day(day, possible_birthdays):\n x = 1\n for i in possible_birthdays:\n if day == i[1]:\n x = x + 1\n else:\n x = x\n if x > 2:\n return False\n else:\n return True\n \ndef unique_month(month, possible_birthdays):\n x = 1\n for i in possible_birthdays:\n if month == i[0]:\n x = x + 1\n else:\n x = x\n if x > 2:\n return False\n else:\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n x = ()\n for i in possible_birthdays:\n if i[0] == month:\n x = x + (i, )\n for a in x:\n if unique_day(a[1], possible_birthdays):\n return True\n else:\n return False \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1884,"func_code":"def unique_day(day, possible_birthdays):\n x = 1\n for i in possible_birthdays:\n if day == i[1]:\n x = x + 1\n else:\n x = x\n if x > 2:\n return False\n else:\n return True\n \ndef unique_month(month, possible_birthdays):\n x = 1\n for i in possible_birthdays:\n if month == i[0]:\n x = x + 1\n else:\n x = x\n if x > 2:\n return False\n else:\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n y = ()\n for i in possible_birthdays:\n if i[0] == month:\n y = y + (i, )\n for a in y:\n if unique_day(a[1], possible_birthdays):\n return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1885,"func_code":"def unique_day(day, possible_birthdays):\n unique = 0\n for i in possible_birthdays:\n if i[1] == day:\n unique += 1\n if unique > 1:\n return False\n return True\n \ndef unique_month(month, possible_birthdays):\n unique = 0\n for i in possible_birthdays:\n if i[0] == month:\n unique += 1\n if unique > 1:\n return False\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n bd = ()\n tru = 0\n for i in possible_birthdays:\n if i[0] == month:\n bd += (i),\n for i in bd:\n if unique_day(i[1], possible_birthdays) == True:\n tru += 1\n if tru > 0:\n return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1886,"func_code":"def unique_day(day, possible_birthdays):\n counter = 0\n for days in range(len(possible_birthdays)):\n if str(day) == possible_birthdays[days][1]:\n counter += 1\n return True if counter == 1 else False\n\ndef unique_month(month, possible_birthdays):\n counter = 0\n for mth in range(len(possible_birthdays)):\n if month == possible_birthdays[mth][0]:\n counter += 1\n return True if counter == 1 else False\n\ndef contains_unique_day(month, possible_birthdays):\n daystoconsider = ()\n i = 0\n while i < len(possible_birthdays):\n if month == possible_birthdays[i][0]:\n daystoconsider += (possible_birthdays[i][1],)\n i += 1\n monthcontaininguniqueday = ()\n for a in range(len(possible_birthdays)):\n if possible_birthdays[a][1] in daystoconsider:\n monthcontaininguniqueday += (possible_birthdays[a][0],)\n for mth in range(len(monthcontaininguniqueday)):\n if monthcontaininguniqueday[mth] == month:\n return True\n break\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1887,"func_code":"def unique_day(day, possible_birthdays):\n value = 0\n for i in range(0, len(possible_birthdays)):\n if (day == possible_birthdays[i][1]):\n value += 1\n if (value > 1) or (value == 0):\n return False\n else:\n return True\n\ndef unique_month(month, possible_birthdays):\n return\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1888,"func_code":"def unique_day(day, possible_birthdays):\n counter = 0\n for birthday in possible_birthdays:\n if birthday[1] == day:\n counter = counter + 1\n if counter <= 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n counter = 0\n for birthday in possible_birthdays:\n if birthday[0]== month:\n counter = counter + 1\n if counter <= 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n a =()\n for birthday in possible_birthdays:\n if birthday[0] == month:\n a = a + (birthday,)\n for birthday in a:\n if unique_day(birthday[1], possible_birthdays):\n return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1889,"func_code":"def unique_day(date, possible_birthdays):\n counter = 0\n for i in range(len(possible_birthdays)):\n if possible_birthdays[i][1] == day:\n counter += 1\n if counter == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n counter = 0\n for i in range(len(possible_birthdays)):\n if possible_birthdays[i][0] == month:\n counter += 1\n if counter == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n monies = ()\n for i in range(len(possible_birthdays)):\n if possible_birthdays[i][0] == month:\n monies += (possible_birthdays[i][1],)\n for i in range(len(monies)):\n if unique_day(monies[i], possible_birthdays):\n return True\n return False \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1890,"func_code":"def unique_day(date, possible_birthdays):\n counter = 0\n for birthday in possible_birthdays:\n if birthday[1]== day:\n counter = counter + 1\n if counter <= 1:\n return True\n else:\n return False\n return True\n\n\ndef unique_month(month, possible_birthdays):\n counter = 0\n for birthday in possible_birthdays:\n if birthday[0]== month:\n counter = counter + 1\n if counter <= 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n a =()\n for birthday in possible_birthdays:\n if birthday[0] == month:\n a = a + (birthday,)\n for birthday in a:\n if unique_day(birthday[1], possible_birthdays):\n return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1891,"func_code":"def unique_day(date, possible_birthdays):\n counter = 0\n for birthday in possible_birthdays:\n if birthday[1]== day:\n counter = counter + 1\n if counter <= 1:\n return True\n else:\n return False\n \n\n\ndef unique_month(month, possible_birthdays):\n counter = 0\n for birthday in possible_birthdays:\n if birthday[0]== month:\n counter = counter + 1\n if counter <= 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n a =()\n for birthday in possible_birthdays:\n if birthday[0] == month:\n a = a + (birthday,)\n for birthday in a:\n if unique_day(birthday[1], possible_birthdays):\n return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1892,"func_code":"def unique_day(day, possible_birthdays):\n count = 0\n for element in possible_birthdays:\n if day == element[1]:\n count += 1\n if count > 1:\n return False\n else:\n return True\n\ndef unique_month(month, possible_birthdays):\n \"\"\"Your solution here\"\"\"\n count = 0\n for element in possible_birthdays:\n if month == element[0]:\n count += 1\n if count > 1:\n return False\n else:\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n \"\"\"Your solution here\"\"\"\n for date in possible_birthdays:\n if unique_day(date[1], possible_birthdays) and date[0] == month:\n return True\n else:\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1893,"func_code":"def unique_day(day, possible_birthdays):\n days = ()\n unique = ()\n for i in possible_birthdays:\n days += (i[1],)\n for i in days:\n if i == day:\n unique += (i,)\n else:\n continue\n if len(unique) == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n months = ()\n unique = ()\n for i in possible_birthdays:\n months += (i[0],)\n for i in months:\n if i == month:\n unique += (i,)\n else:\n continue\n if len(unique) == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1894,"func_code":"def unique_day(date, possible_birthdays):\n if date in possible_birthdays[1]: \n return False\n else:\n return True\n\ndef unique_month(month, possible_birthdays):\n if month in possible_birthdays[0]:\n return False\n else:\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n if x and y:\n return False\n else: \n return True \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1895,"func_code":"def unique_day(date, possible_birthdays):\n if date in possible_birthdays[1]: \n return False\n else:\n return True\n\ndef unique_month(month, possible_birthdays):\n if month in possible_birthdays[0]:\n return False\n else:\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n if not unique_day and not unique_month: \n return False\n else: \n return True \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1896,"func_code":"def unique_day(date, possible_birthdays):\n if int(date) in possible_birthdays: \n return False\n else:\n return True\n\ndef unique_month(month, possible_birthdays):\n if month in possible_birthdays:\n return False\n else:\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n if not unique_day and not unique_month: \n return False\n else: \n return True \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1897,"func_code":"def unique_day(date, possible_birthdays):\n if int(date) in possible_birthdays[1]: \n return False\n else:\n return True\n\ndef unique_month(month, possible_birthdays):\n if month in possible_birthdays[0]:\n return False\n else:\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n if not unique_day and not unique_month: \n return False\n else: \n return True \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1898,"func_code":"def unique_day(date, possible_birthdays):\n if date in possible_birthdays[1]: \n return False\n else:\n return True\n\ndef unique_month(month, possible_birthdays):\n if month in possible_birthdays[0]:\n return False\n else:\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n if not unique_day and not unique_month: \n return False\n else: \n return True \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1899,"func_code":"def unique_day(date, possible_birthdays):\n if date in possible_birthdays[1:]: \n return False\n else:\n return True\n\ndef unique_month(month, possible_birthdays):\n if month in possible_birthdays[0]:\n return False\n else:\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n if not unique_day and not unique_month: \n return False\n else: \n return True \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1900,"func_code":"def unique_day(date, possible_birthdays):\n if date in possible_birthdays[1]: \n return False\n else:\n return True\n\ndef unique_month(month, possible_birthdays):\n if month in possible_birthdays[0]:\n return False\n else:\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n if not unique_day and not unique_month: \n return False\n else: \n return True \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1901,"func_code":"def unique_day(day, possible_birthdays):\n counter=0\n for i in possible_birthdays:\n if day==i[1]:\n counter=counter+1\n else:\n pass\n return counter<=1\n\ndef unique_month(month, possible_birthdays):\n counter=0\n for i in possible_birthdays:\n if month==i[0]:\n counter=counter+1\n else:\n pass\n return counter<=1\n\ndef contains_unique_day(month,possible_birthdays):\n tup=()\n for i in possible_birthdays:\n if unique_day(i[1],possible_birthdays):\n tup=tup+(i[0],)\n else:\n pass\n for k in range(0,len(tup)):\n if tup[k]==month:\n return True\n else:\n pass\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1902,"func_code":"def unique_day(day, possible_birthdays):\n counter = 0\n for possible_birthday in possible_birthdays:\n if possible_birthday[1] == day:\n counter += 1\n if counter > 1:\n return False\n return True\n\ndef unique_month(month, possible_birthdays):\n counter = 0\n for possible_birthday in possible_birthdays:\n if possible_birthday[0] == month:\n counter += 1\n if counter > 1:\n return False\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n filtered_birthdays = tuple(filter(lambda x: x[0] == month,possible_birthdays))\n for day in tuple(map(lambda x: x[1], filtered_birthdays)):\n if unique_day(day, possible_birthdays):\n return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1903,"func_code":"def unique_day(day, possible_birthdays):\n counter=0\n for i in possible_birthdays:\n if day==i[1]:\n counter=counter+1\n else:\n pass\n return counter<=1\n\ndef unique_month(month, possible_birthdays):\n counter=0\n for i in possible_birthdays:\n if month==i[0]:\n counter=counter+1\n else:\n pass\n return counter<=1\n\ndef contains_unique_day(month,possible_birthdays):\n tup=()\n for i in possible_birthdays:\n if unique_day(i[1],possible_birthdays):\n tup=tup+(i[0],)\n else:\n pass\n for k in range(0,len(tup)):\n if tup[k]==month:\n return True\n else:\n pass\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1904,"func_code":"def unique_day(day, possible_birthdays):\n count = 0\n for i in range(len(possible_birthdays)):\n check = possible_birthdays[i][1]\n if check == day:\n count = count+1\n if count >1:\n return False\n return True\n\ndef unique_month(month, possible_birthdays):\n count = 0\n for i in range(len(possible_birthdays)):\n check = possible_birthdays[i][0]\n if check == month:\n count = count+1\n if count >1:\n return False\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n for i in range(len(possible_birthdays)):\n if month == possible_birthdays[i][0]: \n day = possible_birthdays[i][1]\n check = unique_day(day, possible_birthdays)\n if check == True:\n return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1905,"func_code":"def unique_day(day, possible_birthdays):\n count = 0\n for i in range(len(possible_birthdays)):\n check = possible_birthdays[i][1]\n if check == day:\n count = count+1\n if count >1:\n return False\n return True\n\ndef unique_month(month, possible_birthdays):\n count = 0\n for i in range(len(possible_birthdays)):\n check = possible_birthdays[i][0]\n if check == month:\n count = count+1\n if count >1:\n return False\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n for i in range(len(possible_birthdays)):\n if month == possible_birthdays[i][0]: \n day = possible_birthdays[i][1]\n check = unique_day(day, possible_birthdays)\n if check == True:\n return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1906,"func_code":"def unique_day(day, possible_birthdays):\n total = ()\n for i in possible_birthdays:\n total += (i[1],)\n if total.count(day) > 1: \n return False\n else:\n return True\n\ndef unique_month(month, possible_birthdays):\n total = ()\n for i in possible_birthdays:\n total += (i[0],)\n if total.count(month) > 1: \n return False\n else:\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n uniquedays = ()\n daysinmonth = ()\n for i in possible_birthdays:\n if unique_day(i[1], possible_birthdays)== True:\n uniquedays += (i[1],)\n for i in possible_birthdays:\n if i[0] == month:\n daysinmonth += (i[1],)\n for each in uniquedays:\n if each in daysinmonth:\n return True\n else:\n continue\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1907,"func_code":"def unique_day(day, possible_birthdays):\n counter = 0\n for birthday in possible_birthdays:\n if birthday[1] == day:\n counter = counter + 1\n if counter <= 1:\n return True\n else:\n return False\n \n \n\n\ndef unique_month(month, possible_birthdays):\n counter = 0\n for birthday in possible_birthdays:\n if birthday[0]== month:\n counter = counter + 1\n if counter <= 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n a =()\n for birthday in possible_birthdays:\n if birthday[0] == month:\n a = a + (birthday,)\n for birthday in a:\n if unique_day(birthday[1], possible_birthdays):\n return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1908,"func_code":"def unique_day(day, possible_birthdays):\n counter = 0\n for birthday in possible_birthdays:\n if birthday[1] == day:\n counter = counter + 1\n if counter <= 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n counter = 0\n for birthday in possible_birthdays:\n if birthday[0]== month:\n counter = counter + 1\n if counter <= 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n a =()\n for birthday in possible_birthdays:\n if birthday[0] == month:\n a = a + (birthday,)\n for birthday in a:\n if unique_day(birthday[1], possible_birthdays):\n return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1909,"func_code":"def unique_day(day, possible_birthdays):\n counter = 0\n for birthday in possible_birthdays:\n if birthday[1] == day:\n counter = counter + 1\n if counter <= 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n counter = 0\n for birthday in possible_birthdays:\n if birthday[0]== month:\n counter = counter + 1\n if counter <= 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n a =()\n for birthday in possible_birthdays:\n if birthday[0] == month:\n a = a + (birthday,)\n for birthday in a:\n if unique_day(birthday[1], possible_birthdays):\n return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1910,"func_code":"def unique_day(day, possible_birthdays):\n num=0\n for i in possible_birthdays:\n if i[1]==day: num+=1\n return num==1\n\n\ndef unique_month(month, possible_birthdays):\n num=0\n for i in possible_birthdays:\n if i[1]==month: num+=1\n return num==1\n\ndef contains_unique_day(month, possible_birthdays):\n for i in possible_birthdays:\n if i[0]==month and unique_day(i[1],possible_birthdays):\n return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1911,"func_code":"def unique_day(day, possible_birthdays):\n counter = 0\n for birthday in possible_birthdays:\n if birthday[1] == day:\n counter = counter + 1\n if counter <= 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n counter = 0\n for birthday in possible_birthdays:\n if birthday[0]== month:\n counter = counter + 1\n if counter <= 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n a =()\n for birthday in possible_birthdays:\n if birthday[0] == month:\n a = a + (birthday,)\n for birthday in a:\n if unique_day(birthday[1], possible_birthdays):\n return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1912,"func_code":"def unique_day(day, possible_birthdays):\n counter = 0\n for birthday in possible_birthdays:\n if birthday[1] == day:\n counter = counter + 1\n if counter <= 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n counter = 0\n for birthday in possible_birthdays:\n if birthday[0]== month:\n counter = counter + 1\n if counter <= 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n a =()\n for birthday in possible_birthdays:\n if birthday[0] == month:\n a = a + (birthday,)\n for birthday in a:\n if unique_day(birthday[1], possible_birthdays):\n return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1913,"func_code":"def unique_day(date, possible_birthdays):\n only_date = ()\n for i in possible_birthdays:\n if date in i:\n only_date = only_date + (i,)\n if len(only_date) == 1:\n return True\n else:\n return Flase\n\ndef unique_month(month, possible_birthdays):\n only_month = ()\n for i in possible_birthdays:\n if month in i:\n only_month = only_month + (i,)\n if len(only_month) == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1914,"func_code":"def unique_day(date, possible_birthdays):\n if day in possible_birthdays:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n return\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1915,"func_code":"def unique_day(day, possible_birthdays):\n count = 0\n for i in range(len(possible_birthdays)):\n if day == possible_birthdays[i][1]:\n count += 1\n if count > 1:\n return False\n else:\n return True\n\ndef unique_month(month, possible_birthdays):\n count = 0\n for i in range(len(possible_birthdays)):\n if month == possible_birthdays[i][0]:\n count += 1\n if count > 1:\n return False\n else:\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n for day in possible_birthdays:\n if unique_day(day[1], possible_birthdays) == True and month == day[0]:\n return True\n else:\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1916,"func_code":"def unique_day(day, possible_birthdays):\n count = 0\n for i in range(len(possible_birthdays)):\n if day == possible_birthdays[i][1]:\n count += 1\n if count > 1:\n return False\n else:\n return True\n\ndef unique_month(month, possible_birthdays):\n count = 0\n for i in range(len(possible_birthdays)):\n if month == possible_birthdays[i][0]:\n count += 1\n if count > 1:\n return False\n else:\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n for day in possible_birthdays:\n if unique_day(day[1], possible_birthdays) == True and month == day[0]:\n return True\n else:\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1917,"func_code":"def unique_day(day, possible_birthdays):\n counter = 0\n for i in possible_birthdays:\n if day == i[1]:\n counter += 1\n if counter == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n counter = 0\n for i in possible_birthdays:\n if month == i[0]:\n counter += 1\n if counter == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n focus = ()\n unique_days = ()\n for i in possible_birthdays:\n if month == i[0]:\n focus += (i,)\n for j in focus:\n testday = j[1]\n if unique_day(testday, possible_birthdays) == True:\n unique_days += (testday,)\n for k in unique_days:\n for l in focus:\n if k == l[1]:\n break\n return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1918,"func_code":"def unique_day(day, possible_birthdays):\n counter = 0\n for i in possible_birthdays:\n if day == i[1]:\n counter += 1\n if counter == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n counter = 0\n for i in possible_birthdays:\n if month == i[0]:\n counter += 1\n if counter == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n focus = ()\n unique_days = ()\n for i in possible_birthdays:\n if month == i[0]:\n focus += (i,)\n for j in focus:\n testday = j[1]\n if unique_day(testday, possible_birthdays) == True:\n unique_days += (testday,)\n for k in unique_days:\n for l in focus:\n if k == l[1]:\n break\n return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1919,"func_code":"def unique_day(date, possible_birthdays):\n a = ()\n for i in possible_birthdays:\n a += (i[1],)\n return a.count(date) == 1\n\ndef unique_month(month, possible_birthdays):\n a = ()\n for i in possible_birthdays:\n a += (i[1],)\n return a.count(month) == 1\n \ndef contains_unique_day(month, possible_birthdays):\n a = ()\n b = False\n for i in possible_birthdays:\n if month == i[0]:\n a += (i,)\n for i in a:\n b = b or unique_day(i[1], possible_birthdays)\n return b\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1920,"func_code":"def unique_day(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count = count + 1\n if count == 1:\n return True \n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n count = count + 1\n if count == 1:\n return True\n else:\n return False\n \ndef contains_unique_day(month, possible_birthdays):\n same_month_tuple = ()\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n same_month_tuple = same_month_tuple + (i,)\n for i in same_month_tuple:\n if unique_day(i[0], possible_birthdays):\n return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1921,"func_code":"def unique_day(date, possible_birthdays):\n counter = 0\n for i in possible_birthdays:\n if i[1] == day:\n counter += 1\n else:\n continue\n if counter == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n counter = 0\n for i in possible_birthdays:\n if i[0] == month:\n counter += 1\n else:\n continue\n if counter == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n tup = ()\n for i in possible_birthdays:\n if i[0] == month:\n tup += ((i),)\n else:\n continue\n for i in tup:\n if unique_day(i[1], possible_birthdays) == True:\n return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1922,"func_code":"def unique_day(date, possible_birthdays):\n counter = 0\n for i in possible_birthdays:\n if i[1] == day:\n counter += 1\n else:\n continue\n if counter == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n counter = 0\n for i in possible_birthdays:\n if i[1] == day:\n counter += 1\n else:\n continue\n if counter == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n tup = ()\n for i in possible_birthdays:\n if i[0] == month:\n tup += ((i),)\n else:\n continue\n for i in tup:\n if unique_day(i[1], possible_birthdays) == True:\n return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1923,"func_code":"def unique_day(date, possible_birthdays):\n counter = 0\n for i in possible_birthdays:\n if i[1] == date:\n counter += 1\n else:\n continue\n if counter == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n counter = 0\n for i in possible_birthdays:\n if i[1] == day:\n counter += 1\n else:\n continue\n if counter == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n tup = ()\n for i in possible_birthdays:\n if i[0] == month:\n tup += ((i),)\n else:\n continue\n for i in tup:\n if unique_day(i[1], possible_birthdays) == True:\n return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1924,"func_code":"def unique_day(date, possible_birthdays):\n counter = 0\n for i in possible_birthdays:\n if i[1] == date:\n counter += 1\n else:\n continue\n if counter == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n counter = 0\n for i in possible_birthdays:\n if i[1] == month:\n counter += 1\n else:\n continue\n if counter == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n tup = ()\n for i in possible_birthdays:\n if i[0] == month:\n tup += ((i),)\n else:\n continue\n for i in tup:\n if unique_day(i[1], possible_birthdays) == True:\n return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1925,"func_code":"def unique_day(day, possible_birthdays):\n counter=0\n for date in possible_birthdays:\n if date[1]==day:\n conter+=1\n else:\n counter=counter\n if counter==1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n counter=0\n for date in possible_birthdays:\n if date[1]==month:\n conter+=1\n else:\n counter=counter\n if counter==1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1926,"func_code":"def unique_day(date, possible_birthdays):\n a = ()\n for i in possible_birthdays:\n a += (i[1],)\n return a.count(day) == 1\n\ndef unique_month(month, possible_birthdays):\n a = ()\n for i in possible_birthdays:\n a += (i[1],)\n return a.count(month) == 1\n \ndef contains_unique_day(month, possible_birthdays):\n a = ()\n b = False\n for i in possible_birthdays:\n if month == i[0]:\n a += (i,)\n for i in a:\n b = b or unique_day(i[1], possible_birthdays)\n return b\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1927,"func_code":"def unique_day(date, possible_birthdays):\n a = ()\n for i in possible_birthdays:\n a += (i[1],)\n return a.count(date) == 1\n\ndef unique_month(month, possible_birthdays):\n a = ()\n for i in possible_birthdays:\n a += (i[1],)\n return a.count(month) == 1\n \ndef contains_unique_day(month, possible_birthdays):\n a = ()\n b = False\n for i in possible_birthdays:\n if month == i[0]:\n a += (i,)\n for i in a:\n b = b or unique_day(i[1], possible_birthdays)\n return b\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1928,"func_code":"def unique_day(day, possible_birthdays):\n the_day = ()\n for i in possible_birthdays:\n if i[1] == day:\n the_day += (day,)\n return len(the_day) == 1\n\ndef unique_month(month, possible_birthdays):\n return\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1929,"func_code":"def unique_day(day, possible_birthdays):\n the_day = ()\n for i in possible_birthdays:\n if i[1] == day:\n the_day += (day,)\n return len(the_day) == 1\n\ndef unique_month(month, possible_birthdays):\n the_month = ()\n for i in possible_birthdays:\n if i[0] == month:\n the_month += (month,)\n return len(the_month) == 1\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1930,"func_code":"def unique_day(day, possible_birthdays):\n bdaylist = possible_birthdays\n count = 0\n while len(bdaylist) > 0:\n single = bdaylist[0]\n if single[1] == day:\n count = count + 1\n if count == 2:\n return False\n break\n bdaylist = bdaylist[1:]\n return True\n\ndef unique_month(month, possible_birthdays):\n bdaylist = possible_birthdays\n count = 0\n while len(bdaylist) > 0:\n single = bdaylist[0]\n if single[0] == month:\n count = count + 1\n if count == 2:\n return False\n break\n bdaylist = bdaylist[1:]\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n month_list = ()\n bday_list = possible_birthdays\n while len(bday_list)>0:\n if bday_list[0][0]==month:\n month_list = month_list + (bday_list[0],)\n bday_list = bday_list[1:]\n \n while len(month_list)>0:\n if unique_day(month_list[0][1],possible_birthdays):\n return True\n month_list = month_list[1:]\n return False\n\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1931,"func_code":"def unique_day(date, possible_birthdays):\n total= 0\n for i in possible_birthdays:\n if day == i[1]:\n total= total + 1\n return total == 1\n\ndef unique_month(month, possible_birthdays):\n return\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1932,"func_code":"def unique_day(date, possible_birthdays):\n total= 0\n for i in possible_birthdays:\n if date == i[1]:\n total= total + 1\n return total == 1\n\ndef unique_month(month, possible_birthdays):\n return\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1933,"func_code":"def unique_day(date, possible_birthdays):\n total= 0\n for i in possible_birthdays:\n if date == i[1]:\n total= total + 1\n return total == 1\n\ndef unique_month(month, possible_birthdays):\n return\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1934,"func_code":"def unique_day(date, possible_birthdays):\n total= 0\n for i in possible_birthdays:\n if date == i[1]:\n total= total + 1\n return total == 1\n\ndef unique_month(month, possible_birthdays):\n total= 0\n for i in possible_birthdays:\n if month == i[0]:\n total= total + 1\n return total == 1\n\ndef contains_unique_day(month, possible_birthdays):\n for i in possible_birthdays:\n if unique_day(i[1], possible_birthdays):\n return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1935,"func_code":"def unique_day(day, possible_birthdays):\n count, result = 0, 0\n for count in range(0, len(possible_birthdays)):\n if day == possible_birthdays[count][1]:\n result = result + 1\n else:\n continue\n if result == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n count, result = 0, 0\n for count in range(0, len(possible_birthdays)):\n if month == possible_birthdays[count][0]:\n result = result + 1\n else:\n continue\n if result == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1936,"func_code":"def unique_day(day, possible_birthdays):\n counter=0\n for dates in possible_birthdays:\n if day==dates[1]:\n counter=counter+1\n else:\n continue\n if counter>1:\n return False\n else:\n return True \n \n\ndef unique_month(month, possible_birthdays):\n return\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1937,"func_code":"def unique_day(date, possible_birthdays):\n result = 0\n for i in possible_birthdays:\n if i[1] == day:\n result += 1\n elif i[1] != day:\n result += 0\n if result == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n result = 0\n for i in possible_birthdays:\n if i[0] == month:\n result += 1\n elif i[0] != month:\n result += 0\n if result == 1:\n return True\n else:\n return False\n\n\ndef contains_unique_day(month, possible_birthdays):\n for i in possible_birthdays:\n if i[0] != month:\n continue\n elif unique_day(i[1],possible_birthdays):\n return True\n return False\n\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1938,"func_code":"def unique_day(date, possible_birthdays):\n count=0\n for i in range(len(possible_birthdays)):\n if possible_birthdays[i][1]==date:\n count+=1\n if count==1:\n return True\n else:\n return False\n \ndef unique_month(month, possible_birthdays):\n count=0\n for i in range(len(possible_birthdays)):\n if possible_birthdays[i][0]==month:\n count+=1\n if count==1:\n return True\n else:\n return False\n \ndef contains_unique_day(month, possible_birthdays):\n if month=='June':\n return True\n elif month=='May':\n return True\n else:\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1939,"func_code":"def unique_day(day, possible_birthdays):\n num=0\n for i in possible_birthdays:\n if i[1]==day: num+=1\n return num==1\n\n\ndef unique_month(month, possible_birthdays):\n num=0\n for i in possible_birthdays:\n if i[1]==month: num+=1\n return num==1\n\ndef contains_unique_day(month, possible_birthdays):\n for i in possible_birthdays:\n if i[0]==month and unique_day(i[1],possible_birthdays):\n return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1940,"func_code":"def unique_day(date, possible_birthdays):\n count=0\n for i in possible_birthdays: \n if i[0]==possile_birthdays[1]:\n count+=1\n if count==possible_birthdays[1]:\n return False\n else:\n return True\n\ndef unique_month(month, possible_birthdays):\n if month in possible_birthdays[0]:\n return False\n else:\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n if not unique_day and not unique_month: \n return False\n else: \n return True \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1941,"func_code":"def unique_day(date, possible_birthdays):\n count=0\n for i in possible_birthdays: \n if i[1]==date:\n count+=1\n if count!=1:\n return False\n else:\n return True\n\ndef unique_month(month, possible_birthdays):\n if month in possible_birthdays[0]:\n return False\n else:\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n if not unique_day and not unique_month: \n return False\n else: \n return True \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1942,"func_code":"def unique_day(date, possible_birthdays):\n count=0\n for i in possible_birthdays: \n if i[1]==date:\n count+=1\n if count==1:\n return True\n \n\ndef unique_month(month, possible_birthdays):\n if month in possible_birthdays[0]:\n return False\n else:\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n if not unique_day and not unique_month: \n return False\n else: \n return True \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1943,"func_code":"def unique_day(date, possible_birthdays):\n unique_day = ()\n days = ()\n for i in possible_birthdays:\n days += (i[1],)\n for i in days:\n if i == date:\n unique_day += (i,)\n else:\n continue\n \n if len(unique_day) == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n return\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1944,"func_code":"def unique_day(date, possible_birthdays):\n count=0\n for date in birthday[(len(possible_birthdays))-1][1]:\n count += 1\n possible_birthday=possible_birthday[:(len(possible_birthdays))-1]\n if count==1:\n return True\n else:\n return False\n \n\ndef unique_month(month, possible_birthdays):\n return\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1945,"func_code":"def unique_day(date, possible_birthdays):\n count=0\n for i in possible_birthdays: \n if i[1]==date:\n count+=1\n if count!=1: #if not can put count==1\n return False\n else:\n return True\n \n\ndef unique_month(month, possible_birthdays):\n count=0\n for i in possible_birthdays:\n if i[0]==month:\n count+=1\n if count!= 1:\n return False \n else:\n return True\n \n\ndef contains_unique_day(month, possible_birthdays):\n pass\n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1946,"func_code":"def unique_day(day, possible_birthdays):\n new = ()\n for i in range (len(possible_birthdays)):\n new = new + (possible_birthdays[i][1],)\n if new.count(day) == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n new = ()\n for i in range (len(possible_birthdays)):\n new = new + (possible_birthdays[i][0],)\n if new.count(month) == 1:\n return True\n else:\n return False\n\n\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1947,"func_code":"def unique_day(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if date == i[1]:\n count += 1\n return count == 1\n\ndef unique_month(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if month == i[0]:\n count += 1\n return count == 1\n\ndef contains_unique_day(month, possible_birthdays):\n days = ()\n for i in possible_birthdays:\n if month == i[0]:\n days += (i[1],)\n for i in days:\n if unique_date(i, possible_birthdays):\n return True\n else:\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1948,"func_code":"def unique_day(day, possible_birthdays):\n counter=0\n for date in possible_birthdays:\n if date[1]==day:\n conter+=1\n else:\n counter=counter\n if counter==1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n return\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1949,"func_code":"def unique_day(day, possible_birthdays):\n counter=0\n for date in possible_birthdays:\n if date[1]==day:\n conter+=1\n else:\n counter=counter\n if counter==1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n counter=0\n for date in possible_birthdays:\n if date[1]==month:\n conter+=1\n else:\n counter=counter\n if counter==1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1950,"func_code":"def unique_day(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if date == i[1]:\n count += 1\n return count == 1\n\ndef unique_month(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if month == i[0]:\n count += 1\n return count == 1\n\ndef contains_unique_day(month, possible_birthdays):\n days = ()\n for i in possible_birthdays:\n if month == i[0]:\n days += (i[1],)\n for i in days:\n if unique_date(i, possible_birthdays):\n return True\n else:\n return false\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1951,"func_code":"def unique_day(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if date == i[1]:\n count += 1\n return count == 1\n\ndef unique_month(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if month == i[0]:\n count += 1\n return count == 1\n\ndef contains_unique_day(month, possible_birthdays):\n days = ()\n for i in possible_birthdays:\n if month == i[0]:\n days += (i[1],)\n for i in days:\n if unique_date(i, possible_birthdays):\n return True\n else:\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1952,"func_code":"def unique_day(day, possible_birthdays):\n counter = 0\n for i in possible_birthdays:\n if day == i[1]:\n counter = counter + 1\n if counter == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n counter = 0\n for i in possible_birthdays:\n if month == i[0]:\n counter = counter + 1\n if counter == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1953,"func_code":"def unique_day(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if day == i[1]:\n count += 1\n else:\n continue\n if count == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if month == i[0]:\n count += 1\n else:\n continue\n if count == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n months = ()\n for i in possible_birthdays:\n if i[0] == month:\n months = months + (i,)\n else:\n continue\n for i in months:\n if unique_day(i[1], possible_birthdays) == True:\n return True\n else:\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1954,"func_code":"def unique_day(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if date == i[1]:\n count += 1\n else:\n continue\n if count == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if month == i[0]:\n count += 1\n else:\n continue\n if count == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n months = ()\n for i in possible_birthdays:\n if i[0] == month:\n months = months + (i,)\n else:\n continue\n for i in months:\n if unique_day(i[1], possible_birthdays) == True:\n return True\n else:\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1955,"func_code":"def unique_day(day, possible_birthdays):\n counter = 0\n for days in range(len(possible_birthdays)):\n if str(day) == possible_birthdays[days][1]:\n counter += 1\n return True if counter == 1 else False\n\ndef unique_month(month, possible_birthdays):\n counter = 0\n for mth in range(len(possible_birthdays)):\n if month == possible_birthdays[mth][0]:\n counter += 1\n return True if counter == 1 else False\n\ndef contains_unique_day(month, possible_birthdays):\n daystoconsider = ()\n i = 0\n while i < len(possible_birthdays):\n if month == possible_birthdays[i][0]:\n daystoconsider += (possible_birthdays[i][1],)\n i += 1\n monthcontaininguniqueday = ()\n for a in range(len(possible_birthdays)):\n if possible_birthdays[a][1] in daystoconsider:\n monthcontaininguniqueday += (possible_birthdays[a][0],)\n for mth in range(len(monthcontaininguniqueday)):\n if monthcontaininguniqueday[mth] == month:\n return True\n break\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1956,"func_code":"def unique_day(day, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if day in i:\n count += 1\n if count > 1:\n return False\n return True\n\ndef unique_month(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if month in i:\n count += 1\n if count > 1:\n return False\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n days = ()\n for i in possible_birthdays:\n if month in i:\n days += (i[1],)\n for j in days:\n if unique_day(j, possible_birthdays):\n return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1957,"func_code":"def unique_day(day, possible_birthdays):\n counter = 0\n for i in possible_birthdays:\n if day == i[1]:\n counter = counter + 1\n if counter == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n counter = 0\n for i in possible_birthdays:\n if month == i[0]:\n counter = counter + 1\n if counter == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n month_day = ()\n for j in possible_birthdays:\n if j == possible_birthdays[0]:\n month_day = month_day + (j,)\n for t in month_day:\n return unique_day(t[1], month_day)\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1958,"func_code":"def unique_day(day, possible_birthdays):\n count = 0\n for birthday in possible_birthdays:\n if birthday[1] == day:\n count = count + 1\n if count > 1:\n return False\n return True\n\ndef unique_month(month, possible_birthdays):\n count = 0\n for birthday in possible_birthdays:\n if birthday[0] == month:\n count = count + 1\n if count > 1:\n return False\n return True\n\n\ndef contains_unique_day(month, possible_birthdays):\n unique_days = ()\n month_birthdays = ()\n for day in range(0, 32):\n if unique_day(str(day), possible_birthdays) == True:\n unique_days = unique_days + (day,)\n for birthday in possible_birthdays:\n if birthday[0] == month:\n month_birthdays = month_birthdays + (birthday,)\n for dates in month_birthdays:\n if int(dates[1]) in unique_days:\n return True\n else:\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1959,"func_code":"def unique_day(day, possible_birthdays):\n counter=0\n for dates in possible_birthdays:\n if day==dates[1]:\n counter=counter+1\n else:\n continue\n if counter>1:\n return False\n else:\n return True \n \n\ndef unique_month(month, possible_birthdays):\n counter=0\n for dates in possible_birthdays:\n if month==dates[0]:\n counter=counter+1\n else:\n continue\n if counter>1:\n return False\n else:\n return True \n\ndef contains_unique_day(month, possible_birthdays):\n \n def month_tuple(month,possible_birthdays):\n new_tuple=()\n for dates in possible_birthdays:\n if month==dates[0]:\n new_tuple=new_tuple+(dates,)\n else:\n continue\n \n return new_tuple\n new_tuple=month_tuple(month,possible_birthdays)\n for dates2 in new_tuple:\n counter=0\n for dates in possible_birthdays:\n if dates2[1]==dates[1]:\n counter=counter+1\n else:\n continue\n if counter>1:\n return False\n else:\n return True\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1960,"func_code":"def unique_day(date, possible_birthdays):\n count = 0 \n for i in range (len(possible_birthdays)):\n if date == possible_birthdays[i][1]:\n count += 1 \n if count == 1:\n return True\n else: \n return False \n\ndef unique_month(month, possible_birthdays):\n count = 0 \n for i in range (len(possible_birthdays)):\n if month == possible_birthdays[i][0]:\n count += 1\n if count == 1:\n return True\n else:\n return False \n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1961,"func_code":"def unique_day(date, possible_birthdays):\n count = 0 \n for i in range (len(possible_birthdays)):\n if date == possible_birthdays[i][1]:\n count += 1 \n if count == 1:\n return True\n else: \n return False \n\ndef unique_month(month, possible_birthdays):\n count = 0 \n for i in range (len(possible_birthdays)):\n if month == possible_birthdays[i][0]:\n count += 1\n if count == 1:\n return True\n else:\n return False \n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1962,"func_code":"def unique_day(date, possible_birthdays):\n count = 0\n for i in range (len(possible_birthdays)):\n if date == possible_birthdays[i][1]:\n count +=1\n if count == 1:\n return True\n else:\n return False \n\ndef unique_month(month, possible_birthdays):\n count = 0 \n for i in range (len(possible_birthdays)):\n if month == possible_birthdays[i][0]:\n count += 1\n if count == 1:\n return True\n else:\n return False \n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1963,"func_code":"def unique_day(date, possible_birthdays):\n count = 0\n for i in range (len(possible_birthdays)):\n if date == possible_birthdays[i][1]:\n count +=1\n if count == 1:\n return True\n else:\n return False \n\ndef unique_month(month, possible_birthdays):\n count = 0\n for i in range (len(possible_birthdays)):\n if month == possible_birthdays[i][0]:\n count +=1\n if count == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1964,"func_code":"def unique_day(date, possible_birthdays):\n count = 0\n for i in range (len(possible_birthdays)):\n if date == possible_birthdays[i][1]:\n count +=1\n if count == 1:\n return True\n else:\n return False \n\ndef unique_month(month, possible_birthdays):\n count = 0\n for i in range (len(possible_birthdays)):\n if month == possible_birthdays[i][0]:\n count +=1\n if count == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n if month == \"May\":\n return True\n if month == \"June\":\n return True\n else:\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1965,"func_code":"def unique_day(day, possible_birthdays):\n counter=0\n for date in possible_birthdays:\n if day in date:\n counter+=1\n if counter>1:\n return False \n return True\n\ndef unique_month(month, possible_birthdays):\n counter=0\n for date in possible_birthdays:\n if month in date:\n counter+=1\n if counter>1:\n return False \n return True\n\ndef contains_unique_day(month, possible_birthdays):\n dates=()\n for date in possible_birthdays:\n months,day=date\n if unique_day(day, possible_birthdays):\n return month==months\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1966,"func_code":"def unique_day(day, possible_birthdays):\n counter=0\n for date in possible_birthdays:\n if day in date:\n counter+=1\n if counter>1:\n return False\n else:\n return True\n\ndef unique_month(month, possible_birthdays):\n counter=0\n for date in possible_birthdays:\n if month in date:\n counter+=1\n if counter>1:\n return False \n return True\n\ndef contains_unique_day(month, possible_birthdays):\n dates=()\n for date in possible_birthdays:\n months,day=date\n if unique_day(day, possible_birthdays):\n return month==months\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1967,"func_code":"def unique_day(day, possible_birthdays):\n counter=0\n for date in possible_birthdays:\n if day in date:\n counter+=1\n if counter>1:\n return False \n return True\n\n\ndef unique_month(month, possible_birthdays):\n counter=0\n for date in possible_birthdays:\n if month in date:\n counter+=1\n if counter>1:\n return False \n return True\n\ndef contains_unique_day(month, possible_birthdays):\n dates=()\n for date in possible_birthdays:\n months,day=date\n if unique_day(day, possible_birthdays):\n return month==months\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1968,"func_code":"def unique_day(day, possible_birthdays):\n counter=0\n for date in possible_birthdays:\n if day in date:\n counter+=1\n if counter>1:\n return False \n return True\n\n\ndef unique_month(month, possible_birthdays):\n counter=0\n for date in possible_birthdays:\n if month in date:\n counter+=1\n if counter>1:\n return False \n return True\n\ndef contains_unique_day(month, possible_birthdays):\n for date in possible_birthdays:\n months,day=date\n if unique_day(day, possible_birthdays):\n return months==month\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1969,"func_code":"def unique_day(day, possible_birthdays):\n counter=0\n for date in possible_birthdays:\n if day in date:\n counter+=1\n if counter>1:\n return False \n return True\n\n\ndef unique_month(month, possible_birthdays):\n counter=0\n for date in possible_birthdays:\n if month in date:\n counter+=1\n if counter>1:\n return False \n return True\n\ndef contains_unique_day(month, possible_birthdays):\n dates=()\n for date in possible_birthdays:\n months,day=date\n if unique_day(day, possible_birthdays):\n dates+=(months,)\n return month in dates\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1970,"func_code":"def unique_day(date, possible_birthdays):\n count=0\n for i in possible_birthdays:\n if day == i[1]:\n count+=1\n else:\n continue\n if count==1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n count=0\n for i in possible_birthdays:\n if month == i[0]:\n count+=1\n else:\n continue\n if count==1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n for i in possible_birthdays:\n if i[0]==month:\n if unique_day(i[1],possible_birthdays):\n return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1971,"func_code":"def unique_day(date, possible_birthdays):\n bdaylist = possible_birthdays\n count = 0\n while len(bdaylist) > 0:\n single = bdaylist[0]\n if single[1] == day:\n count = count + 1\n if count == 2:\n return False\n break\n bdaylist = bdaylist[1:]\n return True\n\ndef unique_month(month, possible_birthdays):\n bdaylist = possible_birthdays\n count = 0\n while len(bdaylist) > 0:\n single = bdaylist[0]\n if single[0] == month:\n count = count + 1\n if count == 2:\n return False\n break\n bdaylist = bdaylist[1:]\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n month_list = ()\n bday_list = possible_birthdays\n while len(bday_list)>0:\n if bday_list[0][0]==month:\n month_list = month_list + (bday_list[0],)\n bday_list = bday_list[1:]\n \n while len(month_list)>0:\n if unique_day(month_list[0][1],possible_birthdays):\n return True\n month_list = month_list[1:]\n return False\n\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1972,"func_code":"def unique_day(date, possible_birthdays):\n bdaylist = possible_birthdays\n count = 0\n while len(bdaylist) > 0:\n single = bdaylist[0]\n if single[1] == day:\n count = count + 1\n if count == 2:\n return False\n break\n bdaylist = bdaylist[1:]\n return True\n\ndef unique_month(month, possible_birthdays):\n bdaylist = possible_birthdays\n count = 0\n while len(bdaylist) > 0:\n single = bdaylist[0]\n if single[0] == month:\n count = count + 1\n if count == 2:\n return False\n break\n bdaylist = bdaylist[1:]\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n month_list = ()\n bday_list = possible_birthdays\n while len(bday_list)>0:\n if bday_list[0][0]==month:\n month_list = month_list + (bday_list[0],)\n bday_list = bday_list[1:]\n \n while len(month_list)>0:\n if unique_day(month_list[0][1],possible_birthdays):\n return True\n month_list = month_list[1:]\n return False\n\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1973,"func_code":"def unique_day(date, possible_birthdays):\n count = 0\n for birthday in possible_birthdays:\n if day == birthday[1]:\n count = count + 1\n if count>1:\n return False\n else:\n return True \n\ndef unique_month(month, possible_birthdays):\n count = 0\n for birthday in possible_birthdays:\n if month == birthday[0]:\n count = count + 1\n if count>1:\n return False\n else:\n return True\n\n\ndef contains_unique_day(month, possible_birthdays):\n for birthday in possible_birthdays:\n if month == birthday[0]:\n if unique_day(birthday[1], possible_birthdays) == True:\n return True\n return False\n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1974,"func_code":"def unique_day(date, possible_birthdays):\n bdaylist = possible_birthdays\n count = 0\n while len(bdaylist) > 0:\n single = bdaylist[0]\n if single[1] == day:\n count = count + 1\n if count == 2:\n return False\n break\n bdaylist = bdaylist[1:]\n return True\n\ndef unique_month(month, possible_birthdays):\n bdaylist = possible_birthdays\n count = 0\n while len(bdaylist) > 0:\n single = bdaylist[0]\n if single[0] == month:\n count = count + 1\n if count == 2:\n return False\n break\n bdaylist = bdaylist[1:]\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n month_list = ()\n bday_list = possible_birthdays\n while len(bday_list)>0:\n if bday_list[0][0]==month:\n month_list = month_list + (bday_list[0],)\n bday_list = bday_list[1:]\n \n while len(month_list)>0:\n if unique_day(month_list[0][1],possible_birthdays):\n return True\n month_list = month_list[1:]\n return False\n\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1975,"func_code":"def unique_day(day, possible_birthdays):\n bdaylist = possible_birthdays\n count = 0\n while len(bdaylist) > 0:\n single = bdaylist[0]\n if single[1] == day:\n count = count + 1\n if count == 2:\n return False\n break\n bdaylist = bdaylist[1:]\n return True\n\ndef unique_month(month, possible_birthdays):\n bdaylist = possible_birthdays\n count = 0\n while len(bdaylist) > 0:\n single = bdaylist[0]\n if single[0] == month:\n count = count + 1\n if count == 2:\n return False\n break\n bdaylist = bdaylist[1:]\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n month_list = ()\n bday_list = possible_birthdays\n while len(bday_list)>0:\n if bday_list[0][0]==month:\n month_list = month_list + (bday_list[0],)\n bday_list = bday_list[1:]\n \n while len(month_list)>0:\n if unique_day(month_list[0][1],possible_birthdays):\n return True\n month_list = month_list[1:]\n return False\n\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1976,"func_code":"def unique_day(date, possible_birthdays):\n counter = 0\n for i in possible_birthdays:\n if date in i:\n counter +=1\n if counter >1:\n return False\n else:\n return True\n\ndef unique_month(month, possible_birthdays):\n counter = 0\n for i in possible_birthdays:\n if month in i:\n counter += 1\n if counter > 1:\n return False\n else:\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n birthdays = ()\n for i in possible_birthdays:\n if month in i:\n birthdays += (i,)\n for i in birthdays:\n if not unique_day(i[1], possible_birthdays):\n result = False\n else:\n result = True\n break\n return result\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1977,"func_code":"def unique_day(date, possible_birthdays):\n count = 0\n for birthday in possible_birthdays:\n if day == birthday[1]:\n count = count + 1\n if count>1:\n return False\n else:\n return True \n\ndef unique_month(month, possible_birthdays):\n count = 0\n for birthday in possible_birthdays:\n if month == birthday[0]:\n count = count + 1\n if count>1:\n return False\n else:\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n for birthday in possible_birthdays:\n if month == birthday[0]:\n if unique_day(birthday[1], possible_birthdays) == True:\n return True\n return False\n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1978,"func_code":"def unique_day(day, possible_birthdays):\n result = 0\n for birthdays in possible_birthdays:\n if birthdays[1] == day:\n result = result + 1\n if result == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n return\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1979,"func_code":"def unique_day(date, possible_birthdays):\n count = 0\n for birthday in possible_birthdays:\n if date == birthday[1]:\n count = count + 1\n if count>1:\n return False\n else:\n return True \n\ndef unique_month(month, possible_birthdays):\n count = 0\n for birthday in possible_birthdays:\n if month == birthday[0]:\n count = count + 1\n if count>1:\n return False\n else:\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n for birthday in possible_birthdays:\n if month == birthday[0]:\n if unique_day(birthday[1], possible_birthdays) == True:\n return True\n return False\n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1980,"func_code":"def unique_day(day, possible_birthdays):\n result = 0\n for birthdays in possible_birthdays:\n if birthdays[1] == day:\n result = result + 1\n if result == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n result = 0\n for months in possible_birthdays:\n if months[0] == month:\n result = result + 1\n if result == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1981,"func_code":"def unique_day(date, possible_birthdays):\n only_date = ()\n for i in possible_birthdays:\n if date in i:\n only_date = only_date + (i,)\n if len(only_date) == 1:\n return True\n else:\n return Flase\n\ndef unique_month(month, possible_birthdays):\n return\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1982,"func_code":"def unique_day(date, possible_birthdays):\n only_date = ()\n for i in possible_birthdays:\n if date in i:\n only_date = only_date + (i,)\n if len(only_date) == 1:\n return True\n else:\n return Flase\n\ndef unique_month(month, possible_birthdays):\n only_month = ()\n for i in possible_birthdays:\n if month in i:\n only_month = only_month + (i,)\n if len(only_month) == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1983,"func_code":"def unique_day(date, possible_birthdays):\n only_date = ()\n for i in possible_birthdays:\n if date in i:\n only_date = only_date + (i,)\n if len(only_date) == 1:\n return True\n else:\n return Flase\n\ndef unique_month(month, possible_birthdays):\n only_month = ()\n for i in possible_birthdays:\n if month in i:\n only_month = only_month + (i,)\n if len(only_month) == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1984,"func_code":"def unique_day(date, possible_birthdays):\n return date in possible_birthdays\n\ndef unique_month(month, possible_birthdays):\n return month in possible_birthdays\n\ndef contains_unique_day(month, possible_birthdays):\n birthday = ()\n for i in range(len(possible_birthdays)):\n if possible_birthdays[i][0] == month:\n birthday += possible_birthdays[i]\n \n for j in range(len(birthday)):\n return unique_day(birthday[i][1], possible_birthdays) \n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1985,"func_code":"def unique_day(day, possible_birthdays):\n b=() # list of dates\n for birthday in possible_birthdays:\n b.append(birthday[1])\n if b.count(day)==1:\n return True\n \n return False\n\ndef unique_month(month, possible_birthdays):\n b=() \n for birthday in possible_birthdays:\n b.append(birthday[0])\n if b.count(month)==1:\n return True\n \ndef contains_unique_day(month, possible_birthdays):\n b=()\n for birthday in possible_birthdays:\n if month == birthday[0]:\n b.append(birthday[1]) #add date to b\n for day in b:\n if unique_day(day,possible_birthdays)==True:\n return True\n \n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1986,"func_code":"def unique_day(day, possible_birthdays):\n b=[] # list of dates\n for birthday in possible_birthdays:\n b.append(birthday[1])\n if b.count(day)==1:\n return True\n \n return False\n\ndef unique_month(month, possible_birthdays):\n b=[] \n for birthday in possible_birthdays:\n b.append(birthday[0])\n if b.count(month)==1:\n return True\n \ndef contains_unique_day(month, possible_birthdays):\n b=[]\n for birthday in possible_birthdays:\n if month == birthday[0]:\n b.append(birthday[1]) #add date to b\n for day in b:\n if unique_day(day,possible_birthdays)==True:\n return True\n \n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1987,"func_code":"def unique_day(day, possible_birthdays):\n def enumerate_tree(tree):\n def is_leaf(tree):\n return type(tree)!= tuple\n if tree == ():\n return ()\n elif is_leaf(tree):\n return (tree, )\n else:\n return enumerate_tree(tree[0]) + enumerate_tree(tree[1:])\n\n flat_tree = enumerate_tree(possible_birthdays)\n if flat_tree.count(day) > 1:\n return False\n \n return True\n \ndef unique_month(month, possible_birthdays):\n def enumerate_tree(tree):\n def is_leaf(tree):\n return type(tree)!= tuple\n if tree == ():\n return ()\n elif is_leaf(tree):\n return (tree, )\n else:\n return enumerate_tree(tree[0]) + enumerate_tree(tree[1:])\n\n flat_tree = enumerate_tree(possible_birthdays)\n\n if flat_tree.count(month) >1:\n return False\n return True\n \ndef contains_unique_day(month, possible_birthdays):\n tuppy = ()\n for x in possible_birthdays:\n if unique_day(x[1], possible_birthdays):\n tuppy += (x, )\n \n for y in tuppy:\n if y[0] == month:\n return True\n return False\n\n\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1988,"func_code":"def unique_day(date, possible_birthdays):\n lenth=len(possible_birthdays)\n count=0\n for i in range(0,lenth):\n if date==possible_birthday[i][1]:\n count=count+1\n if count==1:\n return True\n else:\n return False\n \n\ndef unique_month(month, possible_birthdays):\n lenth=len(possible_birthdays)\n count=0\n for i in range(0,lenth):\n if date==possible_birthday[i][0]:\n count=count+1\n if count==1:\n return True\n else:\n return False\n \n\ndef contains_unique_day(month, possible_birthdays):\n count=()\n for i in possible_birthdays:\n if i[0]==month:\n count=count+i\n for j in count:\n if unique_day(j[1], possible_birthdays):\n return True\n else:\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1989,"func_code":"def unique_day(date, possible_birthdays):\n lenth=len(possible_birthdays)\n count=0\n for i in range(0,lenth):\n if date==possible_birthday[i][1]:\n count=count+1\n if count==1:\n return True\n else:\n return False\n \n\ndef unique_month(month, possible_birthdays):\n lenth=len(possible_birthdays)\n count=0\n for i in range(0,lenth):\n if month==possible_birthday[i][0]:\n count=count+1\n if count==1:\n return True\n else:\n return False\n \n\ndef contains_unique_day(month, possible_birthdays):\n count=()\n for i in possible_birthdays:\n if i[0]==month:\n count=count+i\n for j in count:\n if unique_day(j[1], possible_birthdays):\n return True\n else:\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1990,"func_code":"def unique_day(date, possible_birthdays):\n lenth=len(possible_birthdays)\n count=0\n for i in range(0,lenth):\n if date==possible_birthdays[i][1]:\n count=count+1\n if count==1:\n return True\n else:\n return False\n \n\ndef unique_month(month, possible_birthdays):\n lenth=len(possible_birthdays)\n count=0\n for i in range(0,lenth):\n if month==possible_birthdays[i][0]:\n count=count+1\n if count==1:\n return True\n else:\n return False\n \n\ndef contains_unique_day(month, possible_birthdays):\n count=()\n for i in possible_birthdays:\n if i[0]==month:\n count=count+i\n for j in count:\n if unique_day(j[1], possible_birthdays):\n return True\n else:\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1991,"func_code":"def unique_day(date, possible_birthdays):\n lenth=len(possible_birthdays)\n count=0\n for i in range(0,lenth):\n if date==possible_birthdays[i][1]:\n count=count+1\n if count==1:\n return True\n else:\n return False\n \n\ndef unique_month(month, possible_birthdays):\n lenth=len(possible_birthdays)\n count=0\n for i in range(0,lenth):\n if month==possible_birthdays[i][0]:\n count=count+1\n if count==1:\n return True\n else:\n return False\n \n\ndef contains_unique_day(month, possible_birthdays):\n count=()\n for i in possible_birthdays:\n if i[0]==month:\n count=count+i\n for j in count:\n if unique_day(j[1], possible_birthdays):\n return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1992,"func_code":"def unique_day(date, possible_birthdays):\n lenth=len(possible_birthdays)\n count=0\n for i in range(0,lenth):\n if date==possible_birthdays[i][1]:\n count=count+1\n if count==1:\n return True\n else:\n return False\n \n\ndef unique_month(month, possible_birthdays):\n lenth=len(possible_birthdays)\n count=0\n for i in range(0,lenth):\n if month==possible_birthdays[i][0]:\n count=count+1\n if count==1:\n return True\n else:\n return False\n \n\ndef contains_unique_day(month, possible_birthdays):\n count=()\n for i in possible_birthdays:\n if i[0]==month:\n if i not in count:\n count=count+i\n for j in count:\n if unique_day(j[1], possible_birthdays):\n return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1993,"func_code":"def unique_day(date, possible_birthdays):\n count=0\n for i in possible_birthdays:\n if i[1] == date:\n count+=1\n return count>=2\n\ndef unique_month(month, possible_birthdays):\n for i in possible_birthdays:\n if i[0] == month:\n count+=1\n return count>=2\n\ndef contains_unique_day(month, possible_birthdays):\n for i in possible_birthdays:\n if i[0]==month:\n tf=tf or unique_day(i[1],possible_birthdays)\n return tf\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1994,"func_code":"def unique_day(date, possible_birthdays):\n count=0\n for i in possible_birthdays:\n if i[1] == date:\n count+=1\n return count==1\n\ndef unique_month(month, possible_birthdays):\n for i in possible_birthdays:\n if i[0] == month:\n count+=1\n return count==1\n\ndef contains_unique_day(month, possible_birthdays):\n for i in possible_birthdays:\n if i[0]==month:\n tf=tf or unique_day(i[1],possible_birthdays)\n return tf\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1995,"func_code":"def unique_day(day, possible_birthdays):\n bag = ()\n for date in possible_birthdays:\n if date[1] == day:\n bag += (date[1],)\n if len(bag) >= 2:\n return False\n return True\n\ndef unique_month(month, possible_birthdays):\n bag = ()\n for date in possible_birthdays:\n if date[0] == month:\n bag += (date[0],)\n if len(bag) >= 2:\n return False\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n for date in possible_birthdays:\n if date[0] == month:\n day = date[1]\n return unique_day(day, possible_birthdays)\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1996,"func_code":"def unique_day(day, possible_birthdays):\n bag = ()\n for date in possible_birthdays:\n if date[1] == day:\n bag += (date[1],)\n if len(bag) >= 2:\n return False\n return True\n\ndef unique_month(month, possible_birthdays):\n bag = ()\n for date in possible_birthdays:\n if date[0] == month:\n bag += (date[0],)\n if len(bag) >= 2:\n return False\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n for date in possible_birthdays:\n if date[0] == month:\n day = date[1]\n if unique_day(day, possible_birthdays):\n return True\n else:\n continue\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1997,"func_code":"def unique_day(day, possible_birthdays):\n count = ()\n for i in range (len(possible_birthdays)):\n if day == possible_birthdays[i][1]:\n count = count + (possible_birthdays[i][1],)\n if len(count) < 2:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n count = ()\n for i in range (len(possible_birthdays)):\n if month == possible_birthdays[i][0]:\n count = count + (possible_birthdays[i][0],)\n if len(count) < 2:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n count = ()\n result = ()\n for i in range (len(possible_birthdays)):\n if month == possible_birthdays[i][0]:\n count = count + (possible_birthdays[i][1],)\n for j in count:\n result = result + (unique_day(j, possible_birthdays),)\n if True in result:\n return True\n else:\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1998,"func_code":"def unique_day(day, possible_birthdays):\n occur = 0\n for i in possible_birthdays:\n if day == i[1]:\n occur += 1\n if occur == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n occur = 0\n for i in possible_birthdays:\n if month == i[0]:\n occur += 1\n if occur == 1:\n return True\n else:\n return False\n\n\ndef contains_unique_day(month, possible_birthdays):\n occur = 0\n for i in possible_birthdays:\n if month == i[1]:\n occur += 1\n if occur == 1:\n return True\n else:\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":1999,"func_code":"def unique_day(day, possible_birthdays):\n occur = 0\n for i in possible_birthdays:\n if day == i[1]:\n occur += 1\n if occur == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n occur = 0\n for i in possible_birthdays:\n if month == i[0]:\n occur += 1\n if occur == 1:\n return True\n else:\n return False\n\n\ndef contains_unique_day(month, possible_birthdays):\n occur = 0\n for i in possible_birthdays:\n if month == i[0]:\n occur += 1\n if occur == 1:\n return True\n else:\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2000,"func_code":"def unique_day(day, possible_birthdays):\n i = 0\n for days in possible_birthdays:\n if int(day) == int(days[1]):\n i += 1\n else:\n i = i\n if counter == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n return\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2001,"func_code":"def unique_day(day, possible_birthdays):\n i = 0\n for days in possible_birthdays:\n if int(day) == int(days[1]):\n i += 1\n \n if counter == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n return\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2002,"func_code":"def unique_day(day, possible_birthdays):\n i = 0\n for days in possible_birthdays:\n if int(day) == int(days[1]):\n i += 1\n \n if counter == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n return\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2003,"func_code":"def unique_day(day, possible_birthdays):\n i = 0\n for days in possible_birthdays:\n if int(day) == int(days[1]):\n i += 1\n \n if i == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n return\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2004,"func_code":"def unique_day(day, possible_birthdays):\n i = 0\n for days in possible_birthdays:\n if int(day) == int(days[1]):\n i += 1\n if i == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n i = 0\n for months in possible_birthdays:\n if month == months[0]:\n i += 1\n if counter == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2005,"func_code":"def unique_day(day, possible_birthdays):\n i = 0\n for days in possible_birthdays:\n if int(day) == int(days[1]):\n i += 1\n if i == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n i = 0\n for months in possible_birthdays:\n if month == months[0]:\n i += 1\n if counter == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2006,"func_code":"def unique_day(day, possible_birthdays):\n i = 0\n for days in possible_birthdays:\n if int(day) == int(days[1]):\n i += 1\n if i == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n i = 0\n for months in possible_birthdays:\n if month == months[0]:\n i += 1\n if i == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2007,"func_code":"def unique_day(day, possible_birthdays):\n data=()\n for birthday in possible_birthdays:\n if day == birthday[1]:\n data += (birthday,)\n if len(data)==1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n return\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2008,"func_code":"def unique_day(day, possible_birthdays):\n result = 0\n for i in possible_birthdays:\n if day in i:\n result = result + 1\n if result > 1:\n return False\n elif result == 0:\n return False\n else:\n return True\n\ndef unique_month(month, possible_birthdays):\n result = 0\n for i in possible_birthdays:\n if month in i:\n result = result + 1\n if result > 1:\n return False\n elif result == 0:\n return False\n else:\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n month_tup = ()\n for i in possible_birthdays:\n if month in i:\n month_tup = month_tup + possible_birthdays[i]\n return unique_day(day, month_tup)\n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2009,"func_code":"def unique_day(day, possible_birthdays):\n result = 0\n for i in possible_birthdays:\n if day in i:\n result = result + 1\n if result > 1:\n return False\n elif result == 0:\n return False\n else:\n return True\n\ndef unique_month(month, possible_birthdays):\n result = 0\n for i in possible_birthdays:\n if month in i:\n result = result + 1\n if result > 1:\n return False\n elif result == 0:\n return False\n else:\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n month_tup = ()\n helper = 0\n for i in possible_birthdays:\n if month in i:\n month_tup = month_tup + possible_birthdays[helper]\n helper = helper + 1\n for i in range(1, 32):\n if unique_day(i, month_tup) == True:\n return True\n else:\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2010,"func_code":"def unique_day(date, possible_birthdays):\n count=0\n for i in possible_birthdays: \n if i[1]==date:\n count+=1\n if count!=1: #if not can put count==1\n return False\n else:\n return True\n \n\ndef unique_month(month, possible_birthdays):\n count=0\n for i in possible_birthdays:\n if i[0]==month:\n count+=1\n if count!= 1:\n return False \n else:\n return True\n \n\ndef contains_unique_day(month, possible_birthdays):\n new_possible_birthdays=()\n for i in range(len(possible_birthdays)):\n if month==possible_birthdays[i][0]:\n new_possible_birthdays+=(possible_birthdays[i],)\n new_day=\"\"\n counter=0\n for n in range(len(possible_birthdays)):\n if unique_day(new_day,possible_birthdays)==True:\n counter+=1\n if counter==0:\n return False\n else:\n return True \n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2011,"func_code":"def unique_day(day, possible_birthdays):\n datetup = ()\n for item in possible_birthdays:\n if item[1] == day:\n datetup = datetup + (item[1],)\n if len(datetup) == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n return\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2012,"func_code":"def unique_day(date, possible_birthdays):\n count=0\n for i in possible_birthdays: \n if i[1]==date:\n count+=1\n if count!=1: #if not can put count==1\n return False\n else:\n return True\n \n\ndef unique_month(month, possible_birthdays):\n count=0\n for i in possible_birthdays:\n if i[0]==month:\n count+=1\n if count!= 1:\n return False \n else:\n return True\n \n\ndef contains_unique_day(month, possible_birthdays):\n new_possible_birthdays=()\n for i in possible_birthdays[1]:\n if unique_day(date,possible_birthdays)==true:\n new_possible_birthdays+=(possible_birthdays[i],)\n new_month=()\n counter=0\n for n in possible_birthdays[0]:\n if month==possible_birthday[i][0]:\n counter+=1\n if counter==0:\n return False\n else: \n return True \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2013,"func_code":"def unique_day(date, possible_birthdays):\n count=0\n for i in possible_birthdays: \n if i[1]==date:\n count+=1\n if count!=1: #if not can put count==1\n return False\n else:\n return True\n \n\ndef unique_month(month, possible_birthdays):\n count=0\n for i in possible_birthdays:\n if i[0]==month:\n count+=1\n if count!= 1:\n return False \n else:\n return True\n \n\ndef contains_unique_day(month, possible_birthdays):\n new_possible_birthdays=()\n for i in possible_birthdays[1]:\n if unique_day(date,possible_birthdays)==true:\n new_possible_birthdays=(possible_birthdays[i],)\n new_month=()\n counter=0\n for n in possible_birthdays[0]:\n if month==possible_birthday[i][0]:\n counter+=1\n if counter==0:\n return False\n else: \n return True \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2014,"func_code":"def unique_day(date, possible_birthdays):\n counter = 0\n for birthdate in possible_birthdays:\n if str(date) == birthdate[1]:\n counter += 1\n if counter > 1:\n return False\n else:\n return True\n \n\ndef unique_month(month, possible_birthdays):\n counter = 0\n for birthdate in possible_birthdays:\n if month == birthdate[0]:\n counter += 1\n if counter > 1:\n return False\n else:\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n counter = 0\n for birthdate in possible_birthdays:\n if month == birthdate[0]:\n r = unique_day(birthdate[1], possible_birthdays)\n if r == True:\n counter += 1\n if counter >= 1:\n return True\n else:\n return False\n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2015,"func_code":"def statement1(birthday, possible_birthdays):\n x = unique_month(birthday[0],possible_birthdays)\n y = contains_unique_day(birthday[0], possible_birthdays)\n \n if x == False and y == False:\n return True\n \n else:\n return False\n\ndef statement2(birthday, possible_birthdays):\n z = unique_day(birthday[1],possible_birthdays)\n \n if z == True:\n return True\n \n else:\n return False \n\ndef statement3(birthday, possible_birthdays):\n q = unique_month(birthday[0],possible_birthdays)\n \n if q == True:\n return True\n \n else:\n return False \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2016,"func_code":"def statement1(birthday, possible_birthdays):\n x = unique_month(birthday[0],possible_birthdays)\n y = contains_unique_day(birthday[0], possible_birthdays)\n \n if x == False and y == False:\n return True\n \n return False\n\ndef statement2(birthday, possible_birthdays):\n z = unique_day(birthday[1],possible_birthdays)\n \n if z == True:\n return True\n \n\n return False \n\ndef statement3(birthday, possible_birthdays):\n q = unique_month(birthday[0],possible_birthdays)\n \n if q == True:\n return True\n \n return False \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2017,"func_code":"def statement1(birthday, possible_birthdays):\n x = unique_month(birthday[0],possible_birthdays)\n y = contains_unique_day(birthday[0], possible_birthdays)\n \n if x == False and y == False:\n return True\n \n return False\n\ndef statement2(birthday, possible_birthdays):\n z = unique_day(birthday[1],possible_birthdays)\n \n if z == True:\n return True\n \n\n return False \n\ndef statement3(birthday, possible_birthdays):\n q = unique_month(birthday[0],possible_birthdays)\n \n if q == True:\n return True\n \n return False \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2018,"func_code":"def unique_day(date, possible_birthdays):\n counter = 0\n for birthdate in possible_birthdays:\n if str(date) == birthdate[1]:\n counter += 1\n if counter > 1:\n return False\n else:\n return True\n \n\ndef unique_month(month, possible_birthdays):\n return\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2019,"func_code":"def statement1(birthday, possible_birthdays):\n A = unique_month(birthday[0],possible_birthdays)\n B = contains_unique_day(birthday[0], possible_birthdays)\n \n if A == False and B == False:\n return True\n \n return False\n\ndef statement2(birthday, possible_birthdays):\n C = unique_day(birthday[1],possible_birthdays)\n \n if C == True:\n return True\n \n return False \n\ndef statement3(birthday, possible_birthdays):\n D = unique_month(birthday[0],possible_birthdays)\n \n if D == True:\n return True\n \n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2020,"func_code":"def statement1(birthday, possible_birthdays):\n A = unique_month(birthday[0],possible_birthdays)\n B = contains_unique_day(birthday[0], possible_birthdays)\n \n if A == False and B == False:\n return True\n \n return False\n\ndef statement2(birthday, possible_birthdays):\n C = unique_day(birthday[1],possible_birthdays)\n \n if C == True:\n return True\n \n return False \n\ndef statement3(birthday, possible_birthdays):\n D = unique_month(birthday[0],possible_birthdays)\n \n if D == True:\n return True\n \n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2021,"func_code":"def unique_day(day, possible_birthdays):\n counter = 0\n for item in possible_birthdays:\n if item[1] == day:\n counter = counter + 1\n if counter !=1:\n return False\n return True\n\ndef unique_month(month, possible_birthdays):\n counter = 0\n for item in possible_birthdays:\n if item[0] == month:\n counter = counter + 1\n if counter != 1:\n return False\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2022,"func_code":"def unique_day(date, possible_birthdays):\n counter = 0\n for birthdate in possible_birthdays:\n if str(date) == birthdate[1]:\n counter += 1\n if counter > 1:\n return False\n else:\n return True\n \n\ndef unique_month(month, possible_birthdays):\n counter = 0\n for birthdate in possible_birthdays:\n if month == birthdate[0]:\n counter += 1\n if counter > 1:\n return False\n else:\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n for birthdate in possible_birthdays:\n if month == birthdate[0]:\n return unique_day(birthdate[1], possible_birthdays)\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2023,"func_code":"def unique_day(day, possible_birthdays):\n count = ()\n for i in range (len(possible_birthdays)):\n if day == possible_birthdays[i][1]:\n count = count + (possible_birthdays[i][1],)\n if len(count) < 2:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n count = ()\n for i in range (len(possible_birthdays)):\n if month == possible_birthdays[i][0]:\n count = count + (possible_birthdays[i][0],)\n if len(count) < 2:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2024,"func_code":"def unique_day(date, possible_birthdays):\n counter = 0\n for birthdate in possible_birthdays:\n if str(date) == birthdate[1]:\n counter += 1\n if counter > 1:\n return False\n else:\n return True\n \n\ndef unique_month(month, possible_birthdays):\n counter = 0\n for birthdate in possible_birthdays:\n if month == birthdate[0]:\n counter += 1\n if counter > 1:\n return False\n else:\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n counter = 0\n for birthdate in possible_birthdays:\n if month == birthdate[0]:\n tp = unique_day(birthdate[1], possible_birthdays)\n if tp == True:\n counter += 1\n if counter >= 1:\n return True\n else:\n return False\n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2025,"func_code":"def unique_day(day, possible_birthdays):\n count = 0\n for month_day in possible_birthdays:\n date = month_day[1]\n if day == date:\n count+= 1\n return count == 1\n\ndef unique_month(month, possible_birthdays):\n count = 0\n for month_day in possible_birthdays:\n mont = month_day[0]\n if month == mont:\n count+= 1\n return count == 1\n\ndef contains_unique_day(month, possible_birthdays):\n condition = False\n for month_day in possible_birthdays:\n if month == month_day[0]:\n condition = unique_day(month_day[1],possible_birthdays)\n return condition\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2026,"func_code":"def unique_day(day, possible_birthdays):\n count = 0\n for item in possible_birthdays:\n if day == item[1]:\n count +=1\n else:\n continue\n if count >=2:\n return False\n else:\n return True\n\ndef unique_month(month, possible_birthdays):\n count = 0\n for item in possible_birthdays:\n if motnh == item[0]:\n count +=1\n else:\n continue\n if count >=2:\n return False\n else:\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2027,"func_code":"def unique_day(day, possible_birthdays):\n unique = 0\n for i in possible_birthdays:\n if i[1] == day:\n unique += 1\n if unique > 1:\n return False\n return True\n \ndef unique_month(month, possible_birthdays):\n unique = 0\n for i in possible_birthdays:\n if i[0] == month:\n unique += 1\n if unique > 1:\n return False\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n bd = ()\n tru = 0\n for i in possible_birthdays:\n if i[0] == month:\n bd += (i),\n for i in bd:\n if unique_day(i[1], possible_birthdays) == True:\n tru += 1\n if tru > 0:\n return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2028,"func_code":"def unique_day(day, possible_birthdays):\n count = 0\n for item in possible_birthdays:\n if day == item[1]:\n count +=1\n else:\n continue\n if count >=2:\n return False\n else:\n return True\n\ndef unique_month(month, possible_birthdays):\n count = 0\n for item in possible_birthdays:\n if month == item[0]:\n count +=1\n else:\n continue\n if count >=2:\n return False\n else:\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2029,"func_code":"def unique_day(date, possible_birthdays):\n counter = 0\n for i in possible_birthdays:\n if date in i:\n counter +=1\n if counter >1:\n return False\n else:\n return True\n\ndef unique_month(month, possible_birthdays):\n counter = 0\n for i in possible_birthdays:\n if month in i:\n counter += 1\n if counter > 1:\n return False\n else:\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n birthdays = ()\n for i in possible_birthdays:\n if month in i:\n birthdays += (i,)\n for i in birthdays:\n if not unique_day(i[1], possible_birthdays):\n result = False\n else:\n result = True\n break\n return result\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2030,"func_code":"def unique_day(date, possible_birthdays):\n result = 0\n for n in possible_birthdays:\n if n[1] == date:\n result = result + 1\n if result != 1:\n return False\n else:\n return True\n\ndef unique_month(month, possible_birthdays):\n result = 0\n for n in possible_birthdays:\n if n[0] == month:\n result = result + 1\n if result != 1:\n return False\n else:\n return True\n \n\ndef contains_unique_day(month, possible_birthdays):\n new_possible_birthdays = ()\n for n in range(len(possible_birthdays)):\n if month == possible_birthdays[n][1]:\n new_possible_birthdays += (possible_birthdays[i], )\n new_day = \"\"\n counter = 0\n for i in range(len(new_possible_birthdays)):\n new_day = new_possible_birthdays[i][1]\n if unique_day(new_day, possible_birthdays) == True:\n counter = counter +1\n if counter == 0:\n return False\n else:\n return True\n \n\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2031,"func_code":"def unique_day(date, possible_birthdays):\n result = 0\n for n in possible_birthdays:\n if n[1] == date:\n result = result + 1\n if result != 1:\n return False\n else:\n return True\n\ndef unique_month(month, possible_birthdays):\n result = 0\n for n in possible_birthdays:\n if n[0] == month:\n result = result + 1\n if result != 1:\n return False\n else:\n return True\n \n\ndef contains_unique_day(month, possible_birthdays):\n new_possible_birthdays = ()\n for n in range(len(possible_birthdays)):\n if month == possible_birthdays[n][0]:\n new_possible_birthdays += (possible_birthdays[i], )\n new_day = \"\"\n counter = 0\n for i in range(len(new_possible_birthdays)):\n new_day = new_possible_birthdays[i][1]\n if unique_day(new_day, possible_birthdays) == True:\n counter = counter + 1\n if counter == 0:\n return False\n else:\n return True\n \n\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2032,"func_code":"def unique_day(date, possible_birthdays):\n result = 0\n for n in possible_birthdays:\n if n[1] == date:\n result = result + 1\n if result != 1:\n return False\n else:\n return True\n\ndef unique_month(month, possible_birthdays):\n result = 0\n for n in possible_birthdays:\n if n[0] == month:\n result = result + 1\n if result != 1:\n return False\n else:\n return True\n \n\ndef contains_unique_day(month, possible_birthdays):\n new_possible_birthdays = ()\n for n in range(len(possible_birthdays)):\n if month == possible_birthdays[n][0]:\n new_possible_birthdays += (possible_birthdays[i], )\n new_day = \"\"\n counter = 0\n for i in range(len(new_possible_birthdays)):\n new_day = new_possible_birthdays[i][1]\n if unique_day(new_day, possible_birthdays) == True:\n counter = counter + 1\n if counter == 0:\n return False\n else:\n return True\n \n\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2033,"func_code":"def unique_day(day, possible_birthdays):\n count = 0\n for item in possible_birthdays:\n if day == item[1]:\n count +=1\n else:\n continue\n if count >=2:\n return False\n else:\n return True\n\ndef unique_month(month, possible_birthdays):\n count = 0\n for item in possible_birthdays:\n if month == item[0]:\n count +=1\n else:\n continue\n if count >=2:\n return False\n else:\n return True\n\n\ndef contains_unique_day(month, possible_birthdays):\n day = filter(lambda x: x[0]== month, possible_birthdays)\n for item in tuple(day):\n if unique_day(item[1],possible_birthdays) == True:\n return True\n else:\n continue\n return False \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2034,"func_code":"def unique_day(date, possible_birthdays):\n count=0\n for i in range(len(possible_birthdays)):\n if possible_birthdays[i][1]==date:\n count+=1\n if count==1:\n return True\n else:\n return False\n \ndef unique_month(month, possible_birthdays):\n count=0\n for i in range(len(possible_birthdays)):\n if possible_birthdays[i][0]==month:\n count+=1\n if count==1:\n return True\n else:\n return False\n \ndef contains_unique_day(month, possible_birthdays):\n if month=='June':\n return True\n elif month=='May':\n return True\n else:\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2035,"func_code":"def unique_day(date, possible_birthdays):\n counter = 0\n for birthdate in possible_birthdays:\n if str(date) == birthdate[1]:\n counter += 1\n if counter > 1:\n return False\n else:\n return True\n \n\ndef unique_month(month, possible_birthdays):\n counter = 0\n for birthdate in possible_birthdays:\n if month == birthdate[0]:\n counter += 1\n if counter > 1:\n return False\n else:\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n counter = 0\n for birthdate in possible_birthdays:\n if month == birthdate[0]:\n r = unique_day(birthdate[1], possible_birthdays)\n if r == True:\n counter += 1\n if counter >= 1:\n return True\n else:\n return False\n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2036,"func_code":"def unique_day(day, possible_birthdays):\n n=0\n for i in range (len(possible_birthdays)):\n if day == possible_birthdays[i][1]:\n n+=1\n else:\n n=n\n return n == 1\n\ndef unique_month(month, possible_birthdays):\n n=0\n for i in range (len(possible_birthdays)):\n if month == possible_birthdays[i][0]:\n n+=1\n else:\n n=n\n return n == 1\n\ndef contains_unique_day(month, possible_birthdays):\n new_tup = ()\n edited_tup = ()\n for i in range (len(possible_birthdays)):\n if month == possible_birthdays [i][0]:\n new_tup = new_tup + ((possible_birthdays[i][0],possible_birthdays[i][1]),)\n\n for i in range (len(possible_birthdays)):\n if month != possible_birthdays [i][0]:\n edited_tup = edited_tup + ((possible_birthdays[i][0],possible_birthdays[i][1]),)\n #print(new_tup)\n #print(edited_tup)\n\n def checker (new_tup, edited_tup):\n result = False\n for j in range (len(new_tup)):\n inter_result = False\n for k in range (len(edited_tup)):\n bool_tup = (new_tup[j][1] == edited_tup[k][1])\n inter_result = inter_result or bool_tup\n result = result or inter_result\n result = not result\n return result\n return checker (new_tup, edited_tup)\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2037,"func_code":"def unique_day(day, possible_birthdays):\n store = 0\n for i in possible_birthdays:\n if i[1] == day:\n if store == 1:\n return False\n else:\n store += 1\n return True\n\ndef unique_month(month, possible_birthdays):\n store = 0\n for i in possible_birthdays:\n if i[0] == month:\n if store == 1:\n return False\n else:\n store += 1\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n def generate_unique_days(possible_birthdays):\n generate = ()\n for i in range(14, 20):\n if unique_day(str(i), possible_birthdays):\n generate += (str(i),)\n return generate\n for i in possible_birthdays:\n if i[0] == month:\n if str(i[1]) in generate_unique_days(possible_birthdays):\n return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2038,"func_code":"def unique_day(date, possible_birthdays):\n i=0\n count=0\n while i <= len(possible_birthdays):\n if possible_birthdays[i][1]==date:\n count+=1\n i+=1\n if count==1:\n return True\n else:\n return False\n \ndef unique_month(month, possible_birthdays):\n count=0\n for i in range(len(possible_birthdays)):\n if possible_birthdays[i][0]==month:\n count+=1\n if count==1:\n return True\n else:\n return False\n \ndef contains_unique_day(month, possible_birthdays):\n if month=='June':\n return True\n elif month=='May':\n return True\n else:\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2039,"func_code":"def unique_day(day, possible_birthdays):\n for x in possible_birthdays:\n if day in x:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n return\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2040,"func_code":"def unique_day(day, possible_birthdays):\n counter = 0\n for x in possible_birthdays:\n x_day = x[1]\n if day == x_day:\n counter += 1\n else:\n counter = counter\n if counter == 1:\n return True\n else:\n return False\n\n\ndef unique_month(month, possible_birthdays):\n return\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2041,"func_code":"def unique_day(date, possible_birthdays):\n count=0\n for i in range(len(possible_birthdays)):\n if possible_birthdays[i][1]==date:\n count+=1\n if count==1:\n return True\n else:\n return False\n \ndef unique_month(month, possible_birthdays):\n count=0\n for i in range(len(possible_birthdays)):\n if possible_birthdays[i][0]==month:\n count+=1\n if count==1:\n return True\n else:\n return False\n \ndef contains_unique_day(month, possible_birthdays):\n if month=='June':\n return True\n elif month=='May':\n return True\n else:\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2042,"func_code":"def unique_day(day, possible_birthdays):\n counter = 0\n for x in possible_birthdays:\n x_day = x[1]\n if day == x_day:\n counter += 1\n else:\n counter = counter\n if counter == 1:\n return True\n else:\n return False\n\n\ndef unique_month(month, possible_birthdays):\n counter = 0\n for x in possible_birthdays:\n x_month = x[0]\n if month == x_month:\n counter += 1\n else:\n counter = counter\n if counter == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2043,"func_code":"def unique_day(day, possible_birthdays):\n \n tupleofdays = ()\n for i in possible_birthdays:\n tupleofdays += (i[1],)\n\n count = 0\n for i in tupleofdays:\n if day == i:\n count += 1\n\n return count == 1\n\ndef unique_month(month, possible_birthdays):\n tupleofmonths = ()\n for i in possible_birthdays:\n tupleofmonths += (i[0],)\n\n count = 0\n\n for i in tupleofmonths:\n if month == i:\n count += 1\n\n return count ==1\n\ndef contains_unique_day(month, possible_birthdays):\n## for i in possible_birthdays:\n if unique_day(i[1], possible_birthdays) == True:\n ans = False\n if i[0] == month:\n ans = True\n break\n else:\n continue\n else:\n continue\n\n return ans\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2044,"func_code":"def unique_day(day, possible_birthdays):\n counter=0\n for i in possible_birthdays:\n if i[1]==day:\n counter+=1\n return counter<=1\n \ndef unique_month(month, possible_birthdays):\n counter=0\n for i in possible_birthdays:\n if i[0]==month:\n counter+=1\n if counter<=1:\n return True\n else:\n return False\ndef contains_unique_day(month, possible_birthdays):\n temp=()\n for i in possible_birthdays:\n if i[0]==month:\n temp+=(i,)\n for i in temp:\n if unique_day(i[1],possible_birthdays):\n return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2045,"func_code":"def unique_day(date, possible_birthdays):\n i=0\n count=0\n while i<=len(possible_birthdays):\n if possible_birthdays[i][1]==date:\n count+=1\n i+=1\n if count==1:\n return True\n else:\n return False\n \ndef unique_month(month, possible_birthdays):\n i=0\n count=0\n while i<=len(possible_birthdays):\n if possible_birthdays[i][0]==month:\n count+=1\n if count==1:\n return True\n else:\n return False\n \ndef contains_unique_day(month, possible_birthdays):\n if month=='June':\n return True\n elif month=='May':\n return True\n else:\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2046,"func_code":"def unique_day(day, possible_birthdays):\n counter=0\n for i in possible_birthdays:\n if i[1]==day:\n counter+=1\n return counter<=1\n \ndef unique_month(month, possible_birthdays):\n counter=0\n for i in possible_birthdays:\n if i[0]==month:\n counter+=1\n return counter<=1\n \ndef contains_unique_day(month, possible_birthdays):\n temp=()\n for i in possible_birthdays:\n if i[0]==month:\n temp+=(i,)\n for i in temp:\n if unique_day(i[1],possible_birthdays):\n return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2047,"func_code":"def unique_day(date, possible_birthdays):\n i=0\n count=0\n while i<=len(possible_birthdays):\n if possible_birthdays[i][1]==date:\n count+=1\n i+=1\n if count==1:\n return True\n else:\n return False\n \ndef unique_month(month, possible_birthdays):\n i=0\n count=0\n while i<=len(possible_birthdays):\n if possible_birthdays[i][0]==month:\n count+=1\n i+=1\n if count==1:\n return True\n else:\n return False\n \ndef contains_unique_day(month, possible_birthdays):\n if month=='June':\n return True\n elif month=='May':\n return True\n else:\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2048,"func_code":"def unique_day(day, possible_birthdays):\n counter=0\n for i in possible_birthdays:\n if i[1]==day:\n counter+=1\n return counter<=1\n \ndef unique_month(month, possible_birthdays):\n counter=0\n for i in possible_birthdays:\n if i[0]==month:\n counter+=1\n return counter<=1\n \ndef contains_unique_day(month, possible_birthdays):\n value=()\n for i in possible_birthdays:\n if i[0]==month:\n value+=(i,)\n for i in value:\n if unique_day(i[1],possible_birthdays):\n return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2049,"func_code":"def unique_day(date, possible_birthdays):\n count=0\n for i in range(len(possible_birthdays)):\n if possible_birthdays[i][1]==date:\n count+=1\n if count==1:\n return True\n else:\n return False\n \ndef unique_month(month, possible_birthdays):\n count=0\n for i in range(len(possible_birthdays)):\n if possible_birthdays[i][0]==month:\n count+=1\n if count==1:\n return True\n else:\n return False\n \ndef contains_unique_day(month, possible_birthdays):\n if month=='June':\n return True\n elif month=='May':\n return True\n else:\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2050,"func_code":"def unique_day(day, possible_birthdays):\n for x in possible_birthdays:\n if day in x:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n for dates in possible_birthdays:\n if month in dates:\n return False\n else:\n return True\n\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2051,"func_code":"def unique_day(day, possible_birthdays):\n count = ()\n for i in range (len(possible_birthdays)):\n if day == possible_birthdays[i][1]:\n count = count + (possible_birthdays[i][1],)\n if len(count) < 2:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n count = ()\n for i in range (len(possible_birthdays)):\n if month == possible_birthdays[i][0]:\n count = count + (possible_birthdays[i][0],)\n if len(count) < 2:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n count = ()\n result = ()\n for i in range (len(possible_birthdays)):\n if month == possible_birthdays[i][0]:\n count = count + (possible_birthdays[i][1],)\n for j in count:\n result = result + (unique_day(j, possible_birthdays),)\n if True in result:\n return True\n else:\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2052,"func_code":"def unique_day(day, possible_birthdays):\n count=0\n for i in possible_birthdays:\n if day==i[1]:\n count+=1\n if count>1:\n return False\n else:\n return True\n\ndef unique_month(month, possible_birthdays):\n count=0\n for i in possible_birthdays:\n if month==i[0]:\n count+=1\n if count>1:\n return False\n else:\n return True\n \ndef contains_unique_day(month, possible_birthdays):\n bday=()\n for i in possible_birthdays:\n if month==i[0]:\n bday+=(i,)\n for i in bday:\n if unique_day(i[1],possible_birthdays):\n return True\n else:\n return False\n\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2053,"func_code":"def unique_day(day, possible_birthdays):\n \n tupleofdays = ()\n for i in possible_birthdays:\n tupleofdays += (i[1],)\n\n count = 0\n for i in tupleofdays:\n if day == i:\n count += 1\n\n return count == 1\n\ndef unique_month(month, possible_birthdays):\n tupleofmonths = ()\n for i in possible_birthdays:\n tupleofmonths += (i[0],)\n\n count = 0\n\n for i in tupleofmonths:\n if month == i:\n count += 1\n\n return count ==1\n\ndef contains_unique_day(month, possible_birthdays):\n## for i in possible_birthdays:\n if unique_day(i[1], possible_birthdays) == True:\n ans = False\n if i[0] == month:\n ans = True\n break\n else:\n continue\n else:\n continue\n\n return ans\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2054,"func_code":"def unique_day(day, possible_birthdays):\n n=0\n for i in range (len(possible_birthdays)):\n if day == possible_birthdays[i][1]:\n n+=1\n else:\n n=n\n return n == 1\n\ndef unique_month(month, possible_birthdays):\n n=0\n for i in range (len(possible_birthdays)):\n if month == possible_birthdays[i][0]:\n n+=1\n else:\n n=n\n return n == 1\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2055,"func_code":"def unique_day(date, possible_birthdays):\n for i in range(len(possible_birthdays)):\n if date==possible_birthdays[i]:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n return\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2056,"func_code":"def unique_day(day, possible_birthdays):\n n=0\n for i in range (len(possible_birthdays)):\n if day == possible_birthdays[i][1]:\n n+=1\n else:\n n=n\n return n == 1\n\ndef unique_month(month, possible_birthdays):\n n=0\n for i in range (len(possible_birthdays)):\n if month == possible_birthdays[i][0]:\n n+=1\n else:\n n=n\n return n == 1\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2057,"func_code":"def unique_day(day, possible_birthdays):\n\n count=0\n\n for i in possible_birthdays:\n\n if day == i[1]:\n\n count+=1\n\n else:\n\n continue\n\n if count==1:\n\n return True\n\n else:\n\n return False\n\ndef unique_month(month, possible_birthdays):\n\n count=0\n\n for i in possible_birthdays:\n\n if month == i[0]:\n\n count+=1\n\n else:\n\n continue\n\n if count<=1:\n\n return True\n\n else:\n\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n\n for i in possible_birthdays:\n\n if i[0]==month:\n\n if unique_day(i[1],possible_birthdays):\n\n return True\n\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2058,"func_code":"def unique_day(day, possible_birthdays):\n\n count=0\n\n for i in possible_birthdays:\n\n if day == i[1]:\n\n count+=1\n\n else:\n\n continue\n\n if count<=1:\n\n return True\n\n else:\n\n return False\n\ndef unique_month(month, possible_birthdays):\n\n count=0\n\n for i in possible_birthdays:\n\n if month == i[0]:\n\n count+=1\n\n else:\n\n continue\n\n if count==1:\n\n return True\n\n else:\n\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n\n for i in possible_birthdays:\n\n if i[0]==month:\n\n if unique_day(i[1],possible_birthdays):\n\n return True\n\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2059,"func_code":"def unique_day(date, possible_birthdays):\n counter = 0\n for birthdate in possible_birthdays:\n if str(date) == birthdate[1]:\n counter += 1\n if counter > 1 or counter == 0:\n return False\n else:\n return True\n \ndef unique_month(month, possible_birthdays):\n counter = 0\n for birthdate in possible_birthdays:\n if month == birthdate[0]:\n counter += 1\n if counter > 1:\n return False\n else:\n return True\ndef contains_unique_day(month, possible_birthdays):\n counter = 0\n for birthdate in possible_birthdays:\n if month == birthdate[0]:\n r = unique_day(birthdate[1], possible_birthdays)\n if r == True:\n counter += 1\n if counter >= 1:\n return True\n else:\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2060,"func_code":"def unique_day(date, possible_birthdays):\n counter = 0\n for birthdate in possible_birthdays:\n if date == birthdate[1]:\n counter += 1\n if counter > 1 or counter == 0:\n return False\n else:\n return True\n \ndef unique_month(month, possible_birthdays):\n counter = 0\n for birthdate in possible_birthdays:\n if month == birthdate[0]:\n counter += 1\n if counter > 1:\n return False\n else:\n return True\ndef contains_unique_day(month, possible_birthdays):\n counter = 0\n for birthdate in possible_birthdays:\n if month == birthdate[0]:\n r = unique_day(birthdate[1], possible_birthdays)\n if r == True:\n counter += 1\n if counter >= 1:\n return True\n else:\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2061,"func_code":"def unique_day(date, possible_birthdays):\n counter = 0\n for birthdate in possible_birthdays:\n if date == birthdate[1]:\n counter += 1\n if counter > 1 or counter == 0:\n return False\n else:\n return True\n \ndef unique_month(month, possible_birthdays):\n counter = 0\n for birthdate in possible_birthdays:\n if month == birthdate[0]:\n counter += 1\n if counter > 1:\n return False\n else:\n return True\ndef contains_unique_day(month, possible_birthdays):\n counter = 0\n for birthdate in possible_birthdays:\n if month == birthdate[0]:\n r = unique_day(birthdate[1], possible_birthdays)\n if r == True:\n counter += 1\n if counter >= 1:\n return True\n else:\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2062,"func_code":"def unique_day(date, possible_birthdays):\n counter = 0\n for birthdate in possible_birthdays:\n if date == birthdate[1]:\n counter += 1\n if counter > 1:\n return False\n else:\n return True\n \ndef unique_month(month, possible_birthdays):\n counter = 0\n for birthdate in possible_birthdays:\n if month == birthdate[0]:\n counter += 1\n if counter > 1:\n return False\n else:\n return True\ndef contains_unique_day(month, possible_birthdays):\n counter = 0\n for birthdate in possible_birthdays:\n if month == birthdate[0]:\n r = unique_day(birthdate[1], possible_birthdays)\n if r == True:\n counter += 1\n if counter >= 1:\n return True\n else:\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2063,"func_code":"def unique_day(date, possible_birthdays):\n counter = 0\n for i in possible_birthdays:\n if i[1] == date:\n counter += 1\n if counter > 1:\n return False\n return True\n\ndef unique_month(month, possible_birthdays):\n counter = 0\n for i in possible_birthdays:\n if i[0] == month:\n counter += 1\n if counter > 1:\n return False\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n new_tuple = ()\n for i in possible_birthdays:\n if i[0] == month:\n new_tuple += (i,)\n print(new_tuple)\n for i in range(0,len(new_tuple)):\n if unique_day(new_tuple[i][1], possible_birthdays):\n return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2064,"func_code":"def unique_day(date, possible_birthdays):\n only_date = ()\n for i in possible_birthdays:\n if date in i:\n only_date = only_date + (i,)\n if len(only_date) == 1:\n return True\n else:\n return False\ndef unique_month(month, possible_birthdays):\n only_month = ()\n for i in possible_birthdays:\n if month in i:\n only_month = only_month + (i,)\n if len(only_month) == 1:\n return True\n else:\n return False\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2065,"func_code":"def unique_day(day, possible_birthdays):\n counter=0\n for date in possible_birthdays:\n if date[1]==day:\n counter+=1\n return counter==1\n \n\ndef unique_month(month, possible_birthdays):\n return\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2066,"func_code":"def unique_day(day, possible_birthdays):\n all_days = ()\n repeat_days =()\n for date in possible_birthdays:\n if date[1] not in all_days:\n all_days += (date[1],)\n else:\n repeat_days += (date[1],)\n return day not in repeat_days \n\ndef unique_month(month, possible_birthdays):\n all_month = ()\n repeat_month =()\n for date in possible_birthdays:\n if date[0] not in all_month:\n all_month += (date[0],)\n else:\n repeat_month += (date[0],)\n return month not in repeat_month \n\ndef contains_unique_day(month, possible_birthdays):\n for date in possible_birthdays:\n if unique_day(date[1],possible_birthdays):\n if month == date[0]:\n return True\n else:\n continue\n else:\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2067,"func_code":"def unique_day(day, possible_birthdays):\n\tunique_num = 0\n\tfor i in possible_birthdays:\n\t\tif i[1] == day:\n\t\t\tunique_num = unique_num + 1\n\t\telse:\n\t\t\tunique_num= unique_num + 0\n\tif unique_num > 1:\n\t\treturn False\n\telse:\n\t\treturn True\n\ndef unique_month(month, possible_birthdays):\n\tunique_num = 0\n\tfor i in possible_birthdays:\n\t\tif i[0] == month:\n\t\t\tunique_num = unique_num + 1\n\t\telse:\n\t\t\tunique_num= unique_num + 0\n\tif unique_num > 1:\n\t\treturn False\n\telse:\n\t\treturn True\n\ndef contains_unique_day(month, possible_birthdays):\n\tdays_in_month = ()\n\tdays_not_in_month = ()\n\tunique_days = ()\n\tfor row in possible_birthdays:\n\t\tif row[0] == month:\n\t\t\tdays_in_month = days_in_month + (row[1],)\n\t\telse:\n\t\t\tdays_not_in_month = days_not_in_month + (row[1],)\n\t\n\tfor row2 in days_in_month:\n\t\tif row2 in days_not_in_month:\n\t\t\tcontinue\n\t\telse:\n\t\t\tunique_days = unique_days + (row2,)\n\tif unique_days == ():\n\t\treturn False\n\telse:\n\t\treturn True\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2068,"func_code":"def unique_day(date, possible_birthdays):\n counter = 0\n for i in possible_birthdays:\n if i[1] == date:\n counter += 1\n if counter > 1:\n return False\n return True\n\ndef unique_month(month, possible_birthdays):\n counter = 0\n for i in possible_birthdays:\n if i[0] == month:\n counter += 1\n if counter > 1:\n return False\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n new_tuple = ()\n for i in possible_birthdays:\n if i[0] == month:\n new_tuple += (i,)\n if len(new_tuple)>1:\n return False\n else:\n return unique_day(new_tupl[0][1], possible_birthdays)\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2069,"func_code":"def unique_day(date, possible_birthdays):\n counter = 0\n for i in possible_birthdays:\n if i[1] == date:\n counter += 1\n if counter > 1:\n return False\n return True\n\ndef unique_month(month, possible_birthdays):\n counter = 0\n for i in possible_birthdays:\n if i[0] == month:\n counter += 1\n if counter > 1:\n return False\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n new_tuple = ()\n for i in possible_birthdays:\n if i[0] == month:\n new_tuple += (i,)\n if len(new_tuple)>1:\n return False\n else:\n return unique_day(new_tuple[0][1], possible_birthdays)\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2070,"func_code":"def unique_day(date, possible_birthdays):\n counter = 0\n for i in possible_birthdays:\n if i[1] == date:\n counter += 1\n if counter > 1:\n return False\n return True\n\ndef unique_month(month, possible_birthdays):\n counter = 0\n for i in possible_birthdays:\n if i[0] == month:\n counter += 1\n if counter > 1:\n return False\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n new_tuple = ()\n for i in possible_birthdays:\n if i[0] == month:\n new_tuple += (i,)\n print(new_tuple)\n for i in range(0,len(new_tuple)):\n if unique_day(new_tuple[i][1], possible_birthdays):\n return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2071,"func_code":"def unique_day(date, possible_birthdays):\n return\n\ndef unique_month(month, possible_birthdays):\n return\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2072,"func_code":"def unique_day(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if date == i[1]:\n count += 1\n return count == 1\ndef unique_month(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if month == i[0]:\n count += 1\n return count == 1\ndef contains_unique_day(month, possible_birthdays):\n days = ()\n for i in possible_birthdays:\n if month == i[0]:\n days += (i[1],)\n for i in days:\n if unique_day(i, possible_birthdays):\n return True\n else:\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2073,"func_code":"def map(fn, seq):\n res = ()\n\n for ele in seq:\n res = res + (fn(ele), )\n return res\n\ndef unique_day(day, possible_birthdays):\n days = map(lambda x: x[1], possible_birthdays)\n times = 0\n for i in days:\n if i==day:\n times = times+1\n else:\n continue\n if times>1:\n return False\n else:\n return True\n\ndef unique_month(month, possible_birthdays):\n months = map(lambda x: x[0], possible_birthdays)\n times = 0\n for i in months:\n if i==month:\n times = times+1\n else:\n continue\n if times>1:\n return False\n else:\n return True\n\n\ndef filter(pred, seq):\n res = ()\n\n for ele in seq:\n if pred(ele):\n res = res + (ele, )\n return res\n\ndef contains_unique_day(month, possible_birthdays):\n relevant_dates= filter(lambda x: x[0] == month, possible_birthdays)\n days = map(lambda x: x[1], relevant_dates)\n times = 0\n for i in days:\n if unique_day(i, possible_birthdays):\n times = times+1\n else:\n continue\n if times==0:\n return False\n else:\n return True \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2074,"func_code":"def unique_day(day, possible_birthdays):\n count_day = 0\n for birthday in possible_birthdays:\n if day == birthday[1]:\n if count_day == 0: count_day += 1\n else: return False\n return True\n\ndef unique_month(month, possible_birthdays):\n count_month = 0\n for birthday in possible_birthdays:\n if month == birthday[0]:\n if count_month == 0: count_month += 1\n else: return False\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n for birthday in possible_birthdays:\n if month == birthday[0]:\n day = birthday[1]\n if unique_day(day, possible_birthdays): return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2075,"func_code":"def unique_day(day, possible_birthdays):\n count_day = 0\n for birthday in possible_birthdays:\n if day == birthday[1]:\n if count_day == 0: count_day += 1\n else: return False\n return True\n\ndef unique_month(month, possible_birthdays):\n count_month = 0\n for birthday in possible_birthdays:\n if month == birthday[0]:\n if count_month == 0: count_month += 1\n else: return False\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n for birthday in possible_birthdays:\n if month == birthday[0]:\n day = birthday[1]\n if unique_day(day, possible_birthdays): return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2076,"func_code":"def filter(pred, seq):\n if seq == ():\n return ()\n elif pred(seq[0]):\n return (seq[0],) + filter(pred, seq[1:])\n else:\n return filter(pred, seq[1:])\n\ndef unique_day(date, possible_birthdays):\n counter = 0\n for bday in possible_birthdays:\n if date == bday[1]:\n counter += 1\n if counter > 1:\n return False\n return True\n\ndef unique_month(month, possible_birthdays):\n counter = 0\n for bday in possible_birthdays:\n if month == bday[0]:\n counter += 1\n if counter > 1:\n return False\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n bdays_in_month = filter(lambda bday: bday[0] == month, possible_birthdays)\n for bday in bdays_in_month:\n if unique_day(bday[1], possible_birthdays):\n return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2077,"func_code":"def filter(pred, seq):\n res = ()\n\n for ele in seq:\n if pred(ele):\n res = res + (ele, )\n return res\n\ndef unique_day(day, possible_birthdays):\n store = ()\n for birthday in possible_birthdays:\n if birthday[1] == day:\n store += (birthday[1],)\n n = len(store)\n if n >1:\n return False\n return True\n\ndef unique_month(month, possible_birthdays):\n store= ()\n for birthday in possible_birthdays:\n if birthday[0] == month:\n store += (birthday[0],)\n n = len(store)\n if n >1:\n return False\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n month1 = filter(lambda x: x[0] == month, possible_birthdays)\n for birthday in month1:\n x = unique_day(birthday[1], possible_birthdays)\n if x == True:\n return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2078,"func_code":"def unique_day(day, possible_birthdays):\n unique = False\n for i in possible_birthdays:\n if day == i[1]:\n if unique:\n return False\n else:\n unique = True\n return True\n\ndef unique_month(month, possible_birthdays):\n unique = False\n for i in possible_birthdays:\n if month == i[0]:\n if unique:\n return False\n else:\n unique = True\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n for i in possible_birthdays:\n if month == i[0]:\n if unique_day(i[1],possible_birthdays):\n return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2079,"func_code":"def unique_day(day, possible_birthdays):\n counted = ()\n for birthdays in possible_birthdays:\n if birthdays[1] == day:\n if day not in counted:\n counted += (day,)\n else:\n return False\n \n return True\n \ndef unique_month(month, possible_birthdays):\n day = month\n counted = ()\n for birthdays in possible_birthdays:\n if birthdays[0] == day:\n if day not in counted:\n counted += (day,)\n else:\n return False\n \n return True\n \ndef contains_unique_day(month, possible_birthdays):\n for possiblemonth in possible_birthdays:\n if possiblemonth[0] == month:\n if unique_day(possiblemonth[1],possible_birthdays) == True:\n return True\n else:\n continue\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2080,"func_code":"def unique_day(day, possible_birthdays):\n unique = False\n for i in possible_birthdays:\n if day == i[1]:\n if unique:\n return False\n else:\n unique = True\n return True\n\ndef unique_month(month, possible_birthdays):\n unique = False\n for i in possible_birthdays:\n if month == i[0]:\n if unique:\n return False\n else:\n unique = True\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n for i in possible_birthdays:\n if month == i[0]:\n if unique_day(i[1],possible_birthdays):\n return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2081,"func_code":"def unique_day(day, possible_birthdays):\n counted = ()\n for birthdays in possible_birthdays:\n if birthdays[1] == day:\n if day not in counted:\n counted += (day,)\n else:\n return False\n \n return True\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2082,"func_code":"def unique_day(day, possible_birthdays):\n counted = ()\n for birthdays in possible_birthdays:\n if birthdays[1] == day:\n if day not in counted:\n counted += (day,)\n else:\n return False\n \n return True\n \ndef unique_month(month, possible_birthdays):\n day = month\n counted = ()\n for birthdays in possible_birthdays:\n if birthdays[0] == day:\n if day not in counted:\n counted += (day,)\n else:\n return False\n \n return True\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2083,"func_code":"def unique_day(day, possible_birthdays):\n counted = ()\n for birthdays in possible_birthdays:\n if birthdays[1] == day:\n if day not in counted:\n counted += (day,)\n else:\n return False\n \n return True\n \ndef unique_month(month, possible_birthdays):\n day = month\n counted = ()\n for birthdays in possible_birthdays:\n if birthdays[0] == day:\n if day not in counted:\n counted += (day,)\n else:\n return False\n \n return True\n \ndef contains_unique_day(month, possible_birthdays):\n for possiblemonth in possible_birthdays:\n if possiblemonth[0] == month:\n if unique_day(possiblemonth[1],possible_birthdays) == True:\n return True\n else:\n continue\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2084,"func_code":"def unique_day(day, possible_birthdays):\n days = ()\n for all_days in possible_birthdays:\n days = days + (all_days[1],)\n i = 0\n for all_days in days:\n if all_days == day:\n i = i+1\n if i == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n months = ()\n for all_months in possible_birthdays:\n months = months + (all_months[0],)\n i = 0\n for all_months in months:\n if all_months == month:\n i = i+1\n if i == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n May_days = ()\n June_days = ()\n July_days = ()\n August_days = ()\n May_dates = possible_birthdays[:3]\n for all_days in May_dates:\n May_days = May_days + (all_days[1],)\n June_dates = possible_birthdays[3:5]\n for all_days in June_dates:\n June_days = June_days + (all_days[1],)\n July_dates = possible_birthdays[5:7]\n for all_days in July_dates:\n July_days = July_days + (all_days[1],)\n August_dates = possible_birthdays[7:]\n for all_days in August_dates:\n August_days = August_days + (all_days[1],)\n if month == 'May': \n for days in May_days:\n found_repeated = 0\n for check_day in June_days:\n if days == check_day:\n found_repeated = 1\n break\n if found_repeated == 0:\n for check_day in July_days:\n if days == check_day:\n found_repeated = 1\n break\n if found_repeated == 0:\n for check_day in August_days:\n if days == check_day:\n found_repeated = 1\n break\n elif month == 'June':\n for days in June_days:\n found_repeated = 0\n for check_day in May_days:\n if days == check_day:\n found_repeated = 1\n break\n if found_repeated == 0:\n for check_day in July_days:\n if days == check_day:\n found_repeated = 1\n break\n if found_repeated == 0:\n for check_day in August_days:\n if days == check_day:\n found_repeated = 1\n break\n elif month == 'July':\n for days in July_days:\n found_repeated = 0\n for check_day in May_days:\n if days == check_day:\n found_repeated = 1\n break\n if found_repeated == 0:\n for check_day in June_days:\n if days == check_day:\n found_repeated = 1\n break\n if found_repeated == 0:\n for check_day in August_days:\n if days == check_day:\n found_repeated = 1\n break\n else:\n for days in August_days:\n found_repeated = 0\n for check_day in May_days:\n if days == check_day:\n found_repeated = 1\n break\n if found_repeated == 0:\n for check_day in June_days:\n if days == check_day:\n found_repeated = 1\n break\n if found_repeated == 0:\n for check_day in July_days:\n if days == check_day:\n found_repeated = 1\n break\n if found_repeated == 0:\n return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2085,"func_code":"def unique_day(day, possible_birthdays):\n counter = 0\n for dates in possible_birthdays:\n if day == dates[1]:\n possible_birthdays = possible_birthdays[1:]\n counter = counter + 1 \n if counter == 1:\n return True\n else:\n return False \n return\n\ndef unique_month(month, possible_birthdays):\n counter = 0\n for dates in possible_birthdays:\n if month == dates[0]:\n possible_birthdays = possible_birthdays[1:]\n counter = counter + 1 \n if counter == 1:\n return True\n else:\n return False \n\ndef contains_unique_day(month, possible_birthdays):\n counter = 0\n new_list = keep_month(month,possible_birthdays)\n for i in new_list:\n if unique_day(i[1], possible_birthdays) == True:\n return True\n\n return False \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2086,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n\ndef unique_day(date, possible_birthdays):\n if count_dates == 1:\n return True\n else:\n return False\n \n\ndef unique_month(month, possible_birthdays):\n return\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2087,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n\ndef unique_day(date, possible_birthdays):\n if count_dates == 0:\n return True\n else:\n return False\n \n\ndef unique_month(month, possible_birthdays):\n return\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2088,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n\ndef unique_day(date, possible_birthdays):\n if count_dates == 2:\n return True\n else:\n return False\n \n\ndef unique_month(month, possible_birthdays):\n return\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2089,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n\ndef unique_day(date, possible_birthdays):\n if count_dates(date, possible_birthdays) == 1:\n return True\n else:\n return False\n \n\ndef unique_month(month, possible_birthdays):\n return\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2090,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n \ndef unique_day(date, possible_birthdays):\n if count_dates(date, possible_birthdays) == 1:\n return True\n else:\n return False\n \n\ndef unique_month(month, possible_birthdays):\n return\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2091,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n \ndef unique_day(date, possible_birthdays):\n if count_dates(date, possible_birthdays) == 1:\n return True\n else:\n return False\n \ndef count_months(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[2] == month:\n count += 1\n return count\n \n\ndef unique_month(month, possible_birthdays):\n if count_months(month, possible_birthdays) == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2092,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n \ndef unique_day(date, possible_birthdays):\n if count_dates(date, possible_birthdays) == 1:\n return True\n else:\n return False\n \ndef count_months(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n count += 1\n return count\n \ndef unique_month(month, possible_birthdays):\n if count_months(month, possible_birthdays) == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2093,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n \ndef unique_day(date, possible_birthdays):\n if count_dates(date, possible_birthdays) == 1:\n return True\n else:\n return False\n \ndef count_months(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n count += 1\n return count\n \ndef unique_month(month, possible_birthdays):\n if count_months(month, possible_birthdays) == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n \n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2094,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n \ndef unique_day(date, possible_birthdays):\n if count_dates(date, possible_birthdays) == 1:\n return True\n else:\n return False\n \ndef count_months(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n count += 1\n return count\n \ndef unique_month(month, possible_birthdays):\n if count_months(month, possible_birthdays) == 1:\n return True\n else:\n return False\n\ndef days_in_month(month, possible_birthdays):\n product = ()\n for i in possible_birthdays:\n if i[0] == month:\n product += (i[1], )\n return product\n \ndef contains_unique_day(month, possible_birthdays):\n for x in days_in_month(month, possible_birthdays):\n if unique_day(x, possible_birthdays):\n return True\n else:\n return False\n \n \n \n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2095,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n \ndef unique_day(date, possible_birthdays):\n if count_dates(date, possible_birthdays) == 1:\n return True\n else:\n return False\n \ndef count_months(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n count += 1\n return count\n \ndef unique_month(month, possible_birthdays):\n if count_months(month, possible_birthdays) == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n for i in possible_birthdays:\n if i[0] == month:\n if unique_day(x, possible_birthdays):\n return True\n else:\n return False\n \n \n \n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2096,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n \ndef unique_day(date, possible_birthdays):\n if count_dates(date, possible_birthdays) == 1:\n return True\n else:\n return False\n \ndef count_months(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n count += 1\n return count\n \ndef unique_month(month, possible_birthdays):\n if count_months(month, possible_birthdays) == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n for i in possible_birthdays:\n if i[0] == month:\n if unique_day(x, possible_birthdays):\n return True\n else:\n return False\n else:\n return False\n \n \n \n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2097,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n \ndef unique_day(date, possible_birthdays):\n if count_dates(date, possible_birthdays) == 1:\n return True\n else:\n return False\n \ndef count_months(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n count += 1\n return count\n \ndef unique_month(month, possible_birthdays):\n if count_months(month, possible_birthdays) == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n for i in possible_birthdays:\n if i[0] == month:\n if unique_day(i, possible_birthdays):\n return True\n else:\n return False\n else:\n return False\n \n \n \n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2098,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n \ndef unique_day(date, possible_birthdays):\n if count_dates(date, possible_birthdays) == 1:\n return True\n else:\n return False\n \ndef count_months(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n count += 1\n return count\n \ndef unique_month(month, possible_birthdays):\n if count_months(month, possible_birthdays) == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n for i in possible_birthdays:\n if i[0] == month:\n if unique_day(i[1], possible_birthdays):\n return True\n else:\n return False\n else:\n return False\n \n \n \n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2099,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n \ndef unique_day(date, possible_birthdays):\n if count_dates(date, possible_birthdays) == 1:\n return True\n else:\n return False\n \ndef count_months(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n count += 1\n return count\n \ndef unique_month(month, possible_birthdays):\n if count_months(month, possible_birthdays) == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n for i in possible_birthdays:\n if i[0] == month:\n if unique_day(i[1], possible_birthdays):\n return True\n else:\n return False\n else:\n continue\n \n \n \n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2100,"func_code":"def unique_day(date, possible_birthdays):\n tester = 0\n for i in possible_birthdays:\n if date == i[1]:\n if tester:\n return False\n else:\n tester = 1\n return tester\n\ndef unique_month(month, possible_birthdays):\n return\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2101,"func_code":"def unique_day(date, possible_birthdays):\n tester = 0\n for i in possible_birthdays:\n if date == i[1]:\n if tester:\n return False\n else:\n tester = 1\n return tester\n\ndef unique_month(month, possible_birthdays):\n tester = 0\n for i in possible_birthdays:\n if date == i[0]:\n if tester:\n return False\n else:\n tester = 1\n return tester\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2102,"func_code":"def unique_day(date, possible_birthdays):\n tester = 0\n for i in possible_birthdays:\n if date == i[1]:\n if tester:\n return False\n else:\n tester = 1\n return tester\n\ndef unique_month(month, possible_birthdays):\n tester = 0\n for i in possible_birthdays:\n if month == i[0]:\n if tester:\n return False\n else:\n tester = 1\n return tester\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2103,"func_code":"def unique_day(day, possible_birthdays):\n days = ()\n for all_days in possible_birthdays:\n days = days + (all_days[1],)\n i = 0\n for all_days in days:\n if all_days == day:\n i = i+1\n if i == 1:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n months = ()\n for all_months in possible_birthdays:\n months = months + (all_months[0],)\n i = 0\n for all_months in months:\n if all_months == month:\n i = i+1\n if i == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n May_days = ()\n June_days = ()\n July_days = ()\n August_days = ()\n May_dates = possible_birthdays[:3]\n for all_days in May_dates:\n May_days = May_days + (all_days[1],)\n June_dates = possible_birthdays[3:5]\n for all_days in June_dates:\n June_days = June_days + (all_days[1],)\n July_dates = possible_birthdays[5:7]\n for all_days in July_dates:\n July_days = July_days + (all_days[1],)\n August_dates = possible_birthdays[7:]\n for all_days in August_dates:\n August_days = August_days + (all_days[1],)\n if month == 'May': \n for days in May_days:\n found_repeated = 0\n for check_day in June_days:\n if days == check_day:\n found_repeated = 1\n break\n if found_repeated == 0:\n for check_day in July_days:\n if days == check_day:\n found_repeated = 1\n break\n if found_repeated == 0:\n for check_day in August_days:\n if days == check_day:\n found_repeated = 1\n break\n elif month == 'June':\n for days in June_days:\n found_repeated = 0\n for check_day in May_days:\n if days == check_day:\n found_repeated = 1\n break\n if found_repeated == 0:\n for check_day in July_days:\n if days == check_day:\n found_repeated = 1\n break\n if found_repeated == 0:\n for check_day in August_days:\n if days == check_day:\n found_repeated = 1\n break\n elif month == 'July':\n for days in July_days:\n found_repeated = 0\n for check_day in May_days:\n if days == check_day:\n found_repeated = 1\n break\n if found_repeated == 0:\n for check_day in June_days:\n if days == check_day:\n found_repeated = 1\n break\n if found_repeated == 0:\n for check_day in August_days:\n if days == check_day:\n found_repeated = 1\n break\n else:\n for days in August_days:\n found_repeated = 0\n for check_day in May_days:\n if days == check_day:\n found_repeated = 1\n break\n if found_repeated == 0:\n for check_day in June_days:\n if days == check_day:\n found_repeated = 1\n break\n if found_repeated == 0:\n for check_day in July_days:\n if days == check_day:\n found_repeated = 1\n break\n if found_repeated == 0:\n return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2104,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n \ndef unique_day(date, possible_birthdays):\n if count_dates(date, possible_birthdays) == 1:\n return True\n else:\n return False\n \ndef count_months(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n count += 1\n return count\n \ndef unique_month(month, possible_birthdays):\n if count_months(month, possible_birthdays) == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n for i in possible_birthdays:\n if i[0] == month:\n if unique_day(i[1], possible_birthdays):\n return True\n else:\n continue\n else:\n return False\n \n \n \n \n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2105,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n \ndef unique_day(date, possible_birthdays):\n if count_dates(date, possible_birthdays) == 1:\n return True\n else:\n return False\n \ndef count_months(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n count += 1\n return count\n \ndef unique_month(month, possible_birthdays):\n if count_months(month, possible_birthdays) == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n for i in possible_birthdays:\n if i[0] == month:\n if unique_day(i[1], possible_birthdays):\n return True\n continue\n else:\n return False\n \n \n \n \n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2106,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n \ndef unique_day(date, possible_birthdays):\n if count_dates(date, possible_birthdays) == 1:\n return True\n else:\n return False\n \ndef count_months(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n count += 1\n return count\n \ndef unique_month(month, possible_birthdays):\n if count_months(month, possible_birthdays) == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n for i in possible_birthdays:\n if i[0] == month:\n if unique_day(i[1], possible_birthdays):\n return True\n continue\n else:\n return False\n \n \n \n \n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2107,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n \ndef unique_day(date, possible_birthdays):\n if count_dates(date, possible_birthdays) == 1:\n return True\n else:\n return False\n \ndef count_months(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n count += 1\n return count\n \ndef unique_month(month, possible_birthdays):\n if count_months(month, possible_birthdays) == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n for i in possible_birthdays:\n if i[0] == month:\n if unique_day(i[1], possible_birthdays):\n return True\n continue\n else:\n return False\n \n \n \n \n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2108,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n \ndef unique_day(date, possible_birthdays):\n if count_dates(date, possible_birthdays) == 1:\n return True\n else:\n return False\n \ndef count_months(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n count += 1\n return count\n \ndef unique_month(month, possible_birthdays):\n if count_months(month, possible_birthdays) == 1:\n return True\n else:\n return False\n\ndef days(month, possible_birthdays):\n days_in_month = ()\n for i in possible_birthdays:\n if i[0] == month:\n days_in_month += (i[1],)\n return days_in_month\n\ndef contains_unique_day(month, possible_birthdays):\n for x in days_in_month:\n if unique_day(x, possible_birthdays):\n return True\n else:\n return False\n \n \n \n \n \n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2109,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n \ndef unique_day(date, possible_birthdays):\n if count_dates(date, possible_birthdays) == 1:\n return True\n else:\n return False\n \ndef count_months(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n count += 1\n return count\n \ndef unique_month(month, possible_birthdays):\n if count_months(month, possible_birthdays) == 1:\n return True\n else:\n return False\n\ndef days(month, possible_birthdays):\n days_in_month = ()\n for i in possible_birthdays:\n if i[0] == month:\n days_in_month += (i[1],)\n return days_in_month\n\ndef contains_unique_day(month, possible_birthdays):\n for x in days:\n if unique_day(x, possible_birthdays):\n return True\n else:\n return False\n \n \n \n \n \n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2110,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n \ndef unique_day(date, possible_birthdays):\n if count_dates(date, possible_birthdays) == 1:\n return True\n else:\n return False\n \ndef count_months(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n count += 1\n return count\n \ndef unique_month(month, possible_birthdays):\n if count_months(month, possible_birthdays) == 1:\n return True\n else:\n return False\n\ndef days(month, possible_birthdays):\n days_in_month = ()\n for i in possible_birthdays:\n if i[0] == month:\n days_in_month += (i[1],)\n return days_in_month\n\ndef contains_unique_day(month, possible_birthdays):\n for x in days(month, possible_birthdays):\n if unique_day(x, possible_birthdays):\n return True\n else:\n return False\n \n \n \n \n \n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2111,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n \ndef unique_day(date, possible_birthdays):\n if count_dates(date, possible_birthdays) == 1:\n return True\n else:\n return False\n \ndef count_months(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n count += 1\n return count\n \ndef unique_month(month, possible_birthdays):\n if count_months(month, possible_birthdays) == 1:\n return True\n else:\n return False\n\ndef days(month, possible_birthdays):\n days_in_month = ()\n for i in possible_birthdays:\n if i[0] == month:\n days_in_month += (i[1],)\n return days_in_month\n\ndef contains_unique_day(month, possible_birthdays):\n for x in range(len(days(month, possible_birthdays))):\n if unique_day(x, possible_birthdays):\n return True\n else:\n return False\n \n \n \n \n \n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2112,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n \ndef unique_day(date, possible_birthdays):\n if count_dates(date, possible_birthdays) == 1:\n return True\n else:\n return False\n \ndef count_months(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n count += 1\n return count\n \ndef unique_month(month, possible_birthdays):\n if count_months(month, possible_birthdays) == 1:\n return True\n else:\n return False\n\ndef days(month, possible_birthdays):\n days_in_month = ()\n for i in possible_birthdays:\n if i[0] == month:\n days_in_month += (i[1],)\n return days_in_month\n\ndef contains_unique_day(month, possible_birthdays):\n for x in days(month, possible_birthdays):\n if unique_day(x, possible_birthdays):\n return True\n else:\n return False\n \n \n \n \n \n \n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2113,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n \ndef unique_day(date, possible_birthdays):\n if count_dates(date, possible_birthdays) == 1:\n return True\n else:\n return False\n \ndef count_months(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n count += 1\n return count\n \ndef unique_month(month, possible_birthdays):\n if count_months(month, possible_birthdays) == 1:\n return True\n else:\n return False\n\ndef days(month, possible_birthdays):\n days_in_month = ()\n for i in possible_birthdays:\n if i[0] == month:\n days_in_month += (i[1],)\n return days_in_month\n\ndef contains_unique_day(month, possible_birthdays):\n for x in days(month, possible_birthdays):\n if unique_day(x, possible_birthdays) == True:\n return True\n else:\n return False\n \n \n \n \n \n \n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2114,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n \ndef unique_day(date, possible_birthdays):\n if count_dates(date, possible_birthdays) == 1:\n return True\n else:\n return False\n \ndef count_months(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n count += 1\n return count\n \ndef unique_month(month, possible_birthdays):\n if count_months(month, possible_birthdays) == 1:\n return True\n else:\n return False\n\ndef days(month, possible_birthdays):\n days_in_month = ()\n for i in possible_birthdays:\n if i[0] == month:\n days_in_month += (i[1],)\n return days_in_month\n\ndef contains_unique_day(month, possible_birthdays):\n for x in range(days(month, possible_birthdays)):\n if unique_day(x, possible_birthdays):\n return True\n else:\n return False\n \n \n \n \n \n \n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2115,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n \ndef unique_day(date, possible_birthdays):\n if count_dates(date, possible_birthdays) == 1:\n return True\n else:\n return False\n \ndef count_months(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n count += 1\n return count\n \ndef unique_month(month, possible_birthdays):\n if count_months(month, possible_birthdays) == 1:\n return True\n else:\n return False\n\ndef days(month, possible_birthdays):\n days_in_month = ()\n for i in possible_birthdays:\n if i[0] == month:\n days_in_month += (i[1],)\n return days_in_month\n\ndef contains_unique_day(month, possible_birthdays):\n for x in range(len(days(month, possible_birthdays))):\n if unique_day(x, possible_birthdays):\n return True\n else:\n return False\n \n \n \n \n \n \n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2116,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n \ndef unique_day(date, possible_birthdays):\n if count_dates(date, possible_birthdays) == 1:\n return True\n else:\n return False\n \ndef count_months(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n count += 1\n return count\n \ndef unique_month(month, possible_birthdays):\n if count_months(month, possible_birthdays) == 1:\n return True\n else:\n return False\n\ndef days(month, possible_birthdays):\n days_in_month = ()\n for i in possible_birthdays:\n if i[0] == month:\n days_in_month += (i[1],)\n return days_in_month\n\ndef contains_unique_day(month, possible_birthdays):\n for x in range(len(days(month, possible_birthdays))):\n if unique_day(x, possible_birthdays) == False:\n return True\n else:\n return False\n \n \n \n \n \n \n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2117,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n \ndef unique_day(date, possible_birthdays):\n if count_dates(date, possible_birthdays) == 1:\n return True\n else:\n return False\n \ndef count_months(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n count += 1\n return count\n \ndef unique_month(month, possible_birthdays):\n if count_months(month, possible_birthdays) == 1:\n return True\n else:\n return False\n\ndef days(month, possible_birthdays):\n days_in_month = ()\n for i in possible_birthdays:\n if i[0] == month:\n days_in_month += (i[1],)\n return days_in_month\n\ndef contains_unique_day(month, possible_birthdays):\n for x in range(len(days(month, possible_birthdays))):\n if unique_day(x, possible_birthdays):\n return True\n elif unique_day(days(month, possible_birthdays)[-1], possible_birthdays):\n return False\n \n \n \n \n \n \n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2118,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n \ndef unique_day(date, possible_birthdays):\n if count_dates(date, possible_birthdays) == 1:\n return True\n else:\n return False\n \ndef count_months(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n count += 1\n return count\n \ndef unique_month(month, possible_birthdays):\n if count_months(month, possible_birthdays) == 1:\n return True\n else:\n return False\n\ndef days(month, possible_birthdays):\n days_in_month = ()\n for i in possible_birthdays:\n if i[0] == month:\n days_in_month += (i[1],)\n return days_in_month\n\ndef contains_unique_day(month, possible_birthdays):\n for x in range(len(days(month, possible_birthdays))):\n if unique_day(days(month, possible_birthday)[x], possible_birthdays):\n return True\n else:\n return False\n \n \n \n \n \n \n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2119,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n \ndef unique_day(date, possible_birthdays):\n if count_dates(date, possible_birthdays) == 1:\n return True\n else:\n return False\n \ndef count_months(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n count += 1\n return count\n \ndef unique_month(month, possible_birthdays):\n if count_months(month, possible_birthdays) == 1:\n return True\n else:\n return False\n\ndef days(month, possible_birthdays):\n days_in_month = ()\n for i in possible_birthdays:\n if i[0] == month:\n days_in_month += (i[1],)\n return days_in_month\n\ndef contains_unique_day(month, possible_birthdays):\n for x in days(month, possible_birthdays):\n if unique_day(days(month, possible_birthday)[x], possible_birthdays):\n return True\n else:\n return False\n \n \n \n \n \n \n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2120,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n \ndef unique_day(date, possible_birthdays):\n if count_dates(date, possible_birthdays) == 1:\n return True\n else:\n return False\n \ndef count_months(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n count += 1\n return count\n \ndef unique_month(month, possible_birthdays):\n if count_months(month, possible_birthdays) == 1:\n return True\n else:\n return False\n\ndef days(month, possible_birthdays):\n days_in_month = ()\n for i in possible_birthdays:\n if i[0] == month:\n days_in_month += (i[1],)\n return days_in_month\n\ndef contains_unique_day(month, possible_birthdays):\n for x in len(days(month, possible_birthdays)):\n if unique_day(days(month, possible_birthday)[x], possible_birthdays):\n return True\n else:\n return False\n \n \n \n \n \n \n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2121,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n \ndef unique_day(date, possible_birthdays):\n if count_dates(date, possible_birthdays) == 1:\n return True\n else:\n return False\n \ndef count_months(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n count += 1\n return count\n \ndef unique_month(month, possible_birthdays):\n if count_months(month, possible_birthdays) == 1:\n return True\n else:\n return False\n\ndef days(month, possible_birthdays):\n days_in_month = ()\n for i in possible_birthdays:\n if i[0] == month:\n days_in_month += (i[1],)\n return days_in_month\n\ndef contains_unique_day(month, possible_birthdays):\n for x in len(days(month, possible_birthdays)):\n if unique_day(days(month, possible_birthdays)[x], possible_birthdays):\n return True\n else:\n return False\n \n \n \n \n \n \n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2122,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n \ndef unique_day(date, possible_birthdays):\n if count_dates(date, possible_birthdays) == 1:\n return True\n else:\n return False\n \ndef count_months(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n count += 1\n return count\n \ndef unique_month(month, possible_birthdays):\n if count_months(month, possible_birthdays) == 1:\n return True\n else:\n return False\n\ndef days(month, possible_birthdays):\n days_in_month = ()\n for i in possible_birthdays:\n if i[0] == month:\n days_in_month += (i[1],)\n return days_in_month\n\ndef contains_unique_day(month, possible_birthdays):\n for x in days(month, possible_birthdays):\n if unique_day(days(month, possible_birthdays)[x], possible_birthdays):\n return True\n else:\n return False\n \n \n \n \n \n \n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2123,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n \ndef unique_day(date, possible_birthdays):\n if count_dates(date, possible_birthdays) == 1:\n return True\n else:\n return False\n \ndef count_months(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n count += 1\n return count\n \ndef unique_month(month, possible_birthdays):\n if count_months(month, possible_birthdays) == 1:\n return True\n else:\n return False\n\ndef days(month, possible_birthdays):\n days_in_month = ()\n for i in possible_birthdays:\n if i[0] == month:\n days_in_month += (i[1],)\n return days_in_month\n\ndef contains_unique_day(month, possible_birthdays):\n for x in range(len(days(month, possible_birthdays))):\n if unique_day(days(month, possible_birthdays)[x], possible_birthdays):\n return True\n else:\n return False\n \n \n \n \n \n \n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2124,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n \ndef unique_day(date, possible_birthdays):\n if count_dates(date, possible_birthdays) == 1:\n return True\n else:\n return False\n \ndef count_months(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n count += 1\n return count\n \ndef unique_month(month, possible_birthdays):\n if count_months(month, possible_birthdays) == 1:\n return True\n else:\n return False\n\ndef days(month, possible_birthdays):\n days_in_month = ()\n for i in possible_birthdays:\n if i[0] == month:\n days_in_month += (i[1],)\n return days_in_month\n\ndef contains_unique_day(month, possible_birthdays):\n days_in_month = ()\n for i in possible_birthdays:\n if i[0] == month:\n days_in_month += (i[1],)\n for x in range(len(days(month, possible_birthdays))):\n if unique_day(days(month, possible_birthdays)[x], possible_birthdays):\n return True\n else:\n return False\n \n \n \n \n \n \n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2125,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n \ndef unique_day(date, possible_birthdays):\n if count_dates(date, possible_birthdays) == 1:\n return True\n else:\n return False\n \ndef count_months(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n count += 1\n return count\n \ndef unique_month(month, possible_birthdays):\n if count_months(month, possible_birthdays) == 1:\n return True\n else:\n return False\n\n\ndef contains_unique_day(month, possible_birthdays):\n days_in_month = ()\n for i in possible_birthdays:\n if i[0] == month:\n days_in_month += (i[1],)\n for x in days(month, possible_birthdays):\n if unique_day(x, possible_birthdays):\n return True\n else:\n return False\n \n \n \n \n \n \n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2126,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n \ndef unique_day(date, possible_birthdays):\n if count_dates(date, possible_birthdays) == 1:\n return True\n else:\n return False\n \ndef count_months(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n count += 1\n return count\n \ndef unique_month(month, possible_birthdays):\n if count_months(month, possible_birthdays) == 1:\n return True\n else:\n return False\n\n\ndef contains_unique_day(month, possible_birthdays):\n days_in_month = ()\n for i in possible_birthdays:\n if i[0] == month:\n days_in_month += (i[1],)\n for i in days(month, possible_birthdays):\n if unique_day(i, possible_birthdays):\n return True\n else:\n return False\n \n \n \n \n \n \n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2127,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n \ndef unique_day(date, possible_birthdays):\n if count_dates(date, possible_birthdays) == 1:\n return True\n else:\n return False\n \ndef count_months(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n count += 1\n return count\n \ndef unique_month(month, possible_birthdays):\n if count_months(month, possible_birthdays) == 1:\n return True\n else:\n return False\n\n\ndef contains_unique_day(month, possible_birthdays):\n days_in_month = ()\n for i in possible_birthdays:\n if i[0] == month:\n days_in_month += (i[1],)\n for i in range(len(days(month, possible_birthdays))):\n if unique_day(i, possible_birthdays):\n return True\n else:\n return False\n \n \n \n \n \n \n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2128,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n \ndef unique_day(date, possible_birthdays):\n if count_dates(date, possible_birthdays) == 1:\n return True\n else:\n return False\n \ndef count_months(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n count += 1\n return count\n \ndef unique_month(month, possible_birthdays):\n if count_months(month, possible_birthdays) == 1:\n return True\n else:\n return False\n\n\ndef contains_unique_day(month, possible_birthdays):\n days_in_month = ()\n for i in possible_birthdays:\n if i[0] == month:\n days_in_month += (i[1],)\n for i in range(len(days(month, possible_birthdays))):\n if unique_day(days(month, possible_birthdays)[i], possible_birthdays):\n return True\n else:\n return False\n \n \n \n \n \n \n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2129,"func_code":"def unique_day(day, possible_birthdays):\n counter = 0\n for i in possible_birthdays:\n if i[1] == day:\n if counter >= 1:\n return False\n else:\n counter += 1\n return True\n\ndef unique_month(month, possible_birthdays):\n counter = 0\n for i in possible_birthdays:\n if i[0] == month:\n if counter >= 1:\n return False\n else:\n counter += 1\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n filtered = tuple(filter(lambda x: x[0] == month, possible_birthdays))\n tup1 = tuple(filter(lambda x: x[0] != month, possible_birthdays)) # Remaining dates\n tup2 = tuple(map(lambda x: x[1], tup1)) # Day of the remaining dates\n def unique(tup):\n output = ()\n for i in tup:\n if i not in output:\n output += (i,)\n return output\n dates = unique(tup2)\n \n for i in filtered:\n if i[1] not in dates:\n return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2130,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n \ndef unique_day(date, possible_birthdays):\n if count_dates(date, possible_birthdays) == 1:\n return True\n else:\n return False\n \ndef count_months(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n count += 1\n return count\n \ndef unique_month(month, possible_birthdays):\n if count_months(month, possible_birthdays) == 1:\n return True\n else:\n return False\n\n\ndef contains_unique_day(month, possible_birthdays):\n days_in_month = ()\n for i in possible_birthdays:\n if i[0] == month:\n days_in_month += (i[1],)\n for i in range(len(days_in_month)):\n if unique_day(days_in_month[i], possible_birthdays):\n return True\n else:\n return False\n \n \n \n \n \n \n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2131,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n \ndef unique_day(date, possible_birthdays):\n if count_dates(date, possible_birthdays) == 1:\n return True\n else:\n return False\n \ndef count_months(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n count += 1\n return count\n \ndef unique_month(month, possible_birthdays):\n if count_months(month, possible_birthdays) == 1:\n return True\n else:\n return False\n\n\ndef contains_unique_day(month, possible_birthdays):\n days_in_month = ()\n for i in possible_birthdays:\n if i[0] == month:\n days_in_month += (i[1],)\n for x in range(len(days_in_month)):\n if unique_day(days_in_month[x], possible_birthdays):\n return True\n else:\n return False\n \n \n \n \n \n \n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2132,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n \ndef unique_day(date, possible_birthdays):\n if count_dates(date, possible_birthdays) == 1:\n return True\n else:\n return False\n \ndef count_months(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n count += 1\n return count\n \ndef unique_month(month, possible_birthdays):\n if count_months(month, possible_birthdays) == 1:\n return True\n else:\n return False\n\n\ndef contains_unique_day(month, possible_birthdays):\n days_in_month = ()\n for i in possible_birthdays:\n if i[0] == month:\n days_in_month += (i,)\n for x in range(len(days_in_month)):\n if unique_day(days_in_month[x][1], possible_birthdays):\n return True\n else:\n return False\n \n \n \n \n \n \n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2133,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n \ndef unique_day(date, possible_birthdays):\n if count_dates(date, possible_birthdays) == 1:\n return True\n else:\n return False\n \ndef count_months(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n count += 1\n return count\n \ndef unique_month(month, possible_birthdays):\n if count_months(month, possible_birthdays) == 1:\n return True\n else:\n return False\n\n\ndef contains_unique_day(month, possible_birthdays):\n days_in_month = ()\n for i in possible_birthdays:\n if i[0] == month:\n days_in_month += (i,)\n for x in range(len(days_in_month)):\n if unique_day(days_in_month[x][1], possible_birthdays):\n return True\n else:\n return False\n \n \n \n \n \n \n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2134,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n \ndef unique_day(date, possible_birthdays):\n if count_dates(date, possible_birthdays) == 1:\n return True\n else:\n return False\n \ndef count_months(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n count += 1\n return count\n \ndef unique_month(month, possible_birthdays):\n if count_months(month, possible_birthdays) == 1:\n return True\n else:\n return False\n\n\ndef contains_unique_day(month, possible_birthdays):\n days_in_month = ()\n for i in possible_birthdays:\n if i[0] == month:\n days_in_month += (i,)\n for x in range(len(days_in_month)):\n if unique_day(days_in_month[x][1], possible_birthdays) == True:\n return True\n else:\n return False\n \n \n \n \n \n \n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2135,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n \ndef unique_day(date, possible_birthdays):\n if count_dates(date, possible_birthdays) == 1:\n return True\n else:\n return False\n \ndef count_months(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n count += 1\n return count\n \ndef unique_month(month, possible_birthdays):\n if count_months(month, possible_birthdays) == 1:\n return True\n else:\n return False\n\n\ndef contains_unique_day(month, possible_birthdays):\n days_in_month = ()\n for i in possible_birthdays:\n if i[0] == month:\n days_in_month += (i,)\n for x in range(len(days_in_month)):\n if unique_day(days_in_month[x][1], possible_birthdays) == False:\n return True\n else:\n return False\n \n \n \n \n \n \n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2136,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n \ndef unique_day(date, possible_birthdays):\n if count_dates(date, possible_birthdays) == 1:\n return True\n else:\n return False\n \ndef count_months(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n count += 1\n return count\n \ndef unique_month(month, possible_birthdays):\n if count_months(month, possible_birthdays) == 1:\n return True\n else:\n return False\n\n\ndef contains_unique_day(month, possible_birthdays):\n days_in_month = ()\n for i in possible_birthdays:\n if i[0] == month:\n days_in_month += (i,)\n for x in range(len(days_in_month)):\n if unique_day(days_in_month[x][1], possible_birthdays) == False:\n return True\n else:\n return True\n \n \n \n \n \n \n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2137,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n \ndef unique_day(date, possible_birthdays):\n if count_dates(date, possible_birthdays) == 1:\n return True\n else:\n return False\n \ndef count_months(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n count += 1\n return count\n \ndef unique_month(month, possible_birthdays):\n if count_months(month, possible_birthdays) == 1:\n return True\n else:\n return False\n\n\ndef contains_unique_day(month, possible_birthdays):\n days_in_month = ()\n for i in possible_birthdays:\n if i[0] == month:\n days_in_month += (i,)\n for x in range(len(days_in_month)):\n if unique_day(days_in_month[x][1], possible_birthdays) == False:\n return True\n else:\n return False\n \n \n \n \n \n \n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2138,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n \ndef unique_day(date, possible_birthdays):\n if count_dates(date, possible_birthdays) == 1:\n return True\n else:\n return False\n \ndef count_months(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n count += 1\n return count\n \ndef unique_month(month, possible_birthdays):\n if count_months(month, possible_birthdays) == 1:\n return True\n else:\n return False\n\n\ndef contains_unique_day(month, possible_birthdays):\n days_in_month = ()\n for i in possible_birthdays:\n if i[0] == month:\n days_in_month += (i,)\n for x in days_in_month:\n if unique_day(x[1], possible_birthdays) == False:\n return True\n else:\n return False\n \n \n \n \n \n \n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2139,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n \ndef unique_day(date, possible_birthdays):\n if count_dates(date, possible_birthdays) == 1:\n return True\n else:\n return False\n \ndef count_months(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n count += 1\n return count\n \ndef unique_month(month, possible_birthdays):\n if count_months(month, possible_birthdays) == 1:\n return True\n else:\n return False\n\n\ndef contains_unique_day(month, possible_birthdays):\n days_in_month = ()\n for i in possible_birthdays:\n if i[0] == month:\n days_in_month += (i,)\n for x in days_in_month:\n if unique_day(x[1], possible_birthdays):\n return True\n else:\n return False\n \n \n \n \n \n \n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2140,"func_code":"def count_dates(date, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[1] == date:\n count += 1\n return count\n \ndef unique_day(date, possible_birthdays):\n if count_dates(date, possible_birthdays) == 1:\n return True\n else:\n return False\n \ndef count_months(month, possible_birthdays):\n count = 0\n for i in possible_birthdays:\n if i[0] == month:\n count += 1\n return count\n \ndef unique_month(month, possible_birthdays):\n if count_months(month, possible_birthdays) == 1:\n return True\n else:\n return False\n\ndef days(month, possible_birthdays):\n days_in_month = ()\n for i in range(len(possible_birthdays)):\n if possible_birthdays[i][0] == month:\n days_in_month += (possible_birthdays[i],)\n return days_in_month\n\ndef contains_unique_day(month, possible_birthdays):\n for x in range(len(days(month, possible_birthdays))):\n if unique_day(days(month, possible_birthdays)[x][1], possible_birthdays):\n return True\n else:\n return False\n \n \n \n \n \n \n \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2141,"func_code":"def map(fn, seq):\n res = ()\n\n for ele in seq:\n res = res + (fn(ele), )\n return res\n\ndef filter(pred, seq):\n res = ()\n\n for ele in seq:\n if pred(ele):\n res = res + (ele, )\n return res\n\ndef unique_day(day, possible_birthdays):\n a = map(lambda x : x[1], possible_birthdays)\n for i in a:\n if i == day:\n b = filter(lambda x: x == i, a)\n if len(b) > 1:\n return False\n else:\n return True\n\ndef unique_month(month, possible_birthdays):\n a = map(lambda x : x[0], possible_birthdays)\n for i in a:\n if i == month:\n b = filter(lambda x: x == i, a)\n if len(b) > 1:\n return False\n else:\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n a = map(lambda x : x[0], possible_birthdays)\n b = map(lambda x : x[1], possible_birthdays)\n k = ()\n for i in range(len(a)):\n if month == a[i]:\n k += (b[i],)\n for f in range(len(k)):\n if len(filter(lambda x: x == k[f],b)) == 1:\n return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2142,"func_code":"def unique_day(day, possible_birthdays):\n flat_possible_birthdays=enumerate_tree(possible_birthdays)\n if flat_possible_birthdays.count(day) == 1:\n return True\n else:\n return False\n\ndef enumerate_tree(tree):\n if tree == ():\n return ()\n elif is_leaf(tree):\n return (tree,)\n else:\n return enumerate_tree(tree[0])+enumerate_tree(tree[1:])\ndef is_leaf(item):\n return type(item) != tuple\n\ndef unique_month(month, possible_birthdays):\n flat_possible_birthdays=enumerate_tree(possible_birthdays)\n if flat_possible_birthdays.count(month) == 1:\n return True\n else:\n return False\n\ndef contains_unique_day(month, possible_birthdays):\n for each_day_in_month in filter(lambda x: x[0] == month, possible_birthdays):\n if unique_day(each_day_in_month[1], possible_birthdays) == True:\n res = True\n else:\n res = False\n return res\n\ndef filter(pred,seq):\n if seq ==():\n return ()\n elif pred(seq[0]):\n return (seq[0],)+filter(pred,seq[1:])\n else:\n return filter(pred,seq[1:])\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2143,"func_code":"def unique_day(date, possible_birthdays):\n if date in possible_birthdays[1]: \n return False\n else:\n return True\n\ndef unique_month(month, possible_birthdays):\n if month in possible_birthdays[0]:\n return False\n else:\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n if x and y:\n return False\n else: \n return True \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2144,"func_code":"def unique_day(date, possible_birthdays):\n if date in possible_birthdays[1]: \n return False\n else:\n return True\n\ndef unique_month(month, possible_birthdays):\n if month in possible_birthdays[0]:\n return False\n else:\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n if not unique_day and not unique_month: \n return False\n else: \n return True \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2145,"func_code":"def unique_day(date, possible_birthdays):\n if int(date) in possible_birthdays: \n return False\n else:\n return True\n\ndef unique_month(month, possible_birthdays):\n if month in possible_birthdays:\n return False\n else:\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n if not unique_day and not unique_month: \n return False\n else: \n return True \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2146,"func_code":"def unique_day(date, possible_birthdays):\n if int(date) in possible_birthdays[1]: \n return False\n else:\n return True\n\ndef unique_month(month, possible_birthdays):\n if month in possible_birthdays[0]:\n return False\n else:\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n if not unique_day and not unique_month: \n return False\n else: \n return True \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2147,"func_code":"def unique_day(date, possible_birthdays):\n if date in possible_birthdays[1]: \n return False\n else:\n return True\n\ndef unique_month(month, possible_birthdays):\n if month in possible_birthdays[0]:\n return False\n else:\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n if not unique_day and not unique_month: \n return False\n else: \n return True \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2148,"func_code":"def unique_day(date, possible_birthdays):\n if date in possible_birthdays[1:]: \n return False\n else:\n return True\n\ndef unique_month(month, possible_birthdays):\n if month in possible_birthdays[0]:\n return False\n else:\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n if not unique_day and not unique_month: \n return False\n else: \n return True \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2149,"func_code":"def unique_day(date, possible_birthdays):\n if date in possible_birthdays[1]: \n return False\n else:\n return True\n\ndef unique_month(month, possible_birthdays):\n if month in possible_birthdays[0]:\n return False\n else:\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n if not unique_day and not unique_month: \n return False\n else: \n return True \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2150,"func_code":"def unique_day(date, possible_birthdays):\n if day in possible_birthdays:\n return True\n else:\n return False\n\ndef unique_month(month, possible_birthdays):\n return\n\ndef contains_unique_day(month, possible_birthdays):\n return \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2151,"func_code":"def unique_day(date, possible_birthdays):\n count=0\n for i in possible_birthdays: \n if i[0]==possile_birthdays[1]:\n count+=1\n if count==possible_birthdays[1]:\n return False\n else:\n return True\n\ndef unique_month(month, possible_birthdays):\n if month in possible_birthdays[0]:\n return False\n else:\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n if not unique_day and not unique_month: \n return False\n else: \n return True \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2152,"func_code":"def unique_day(date, possible_birthdays):\n count=0\n for i in possible_birthdays: \n if i[1]==date:\n count+=1\n if count!=1:\n return False\n else:\n return True\n\ndef unique_month(month, possible_birthdays):\n if month in possible_birthdays[0]:\n return False\n else:\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n if not unique_day and not unique_month: \n return False\n else: \n return True \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2153,"func_code":"def unique_day(date, possible_birthdays):\n count=0\n for i in possible_birthdays: \n if i[1]==date:\n count+=1\n if count==1:\n return True\n \n\ndef unique_month(month, possible_birthdays):\n if month in possible_birthdays[0]:\n return False\n else:\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n if not unique_day and not unique_month: \n return False\n else: \n return True \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2154,"func_code":"def unique_day(day, possible_birthdays):\n def enumerate_tree(tree):\n def is_leaf(tree):\n return type(tree)!= tuple\n if tree == ():\n return ()\n elif is_leaf(tree):\n return (tree, )\n else:\n return enumerate_tree(tree[0]) + enumerate_tree(tree[1:])\n\n flat_tree = enumerate_tree(possible_birthdays)\n if flat_tree.count(day) > 1:\n return False\n \n return True\n \ndef unique_month(month, possible_birthdays):\n def enumerate_tree(tree):\n def is_leaf(tree):\n return type(tree)!= tuple\n if tree == ():\n return ()\n elif is_leaf(tree):\n return (tree, )\n else:\n return enumerate_tree(tree[0]) + enumerate_tree(tree[1:])\n\n flat_tree = enumerate_tree(possible_birthdays)\n\n if flat_tree.count(month) >1:\n return False\n return True\n \ndef contains_unique_day(month, possible_birthdays):\n tuppy = ()\n for x in possible_birthdays:\n if unique_day(x[1], possible_birthdays):\n tuppy += (x, )\n \n for y in tuppy:\n if y[0] == month:\n return True\n return False\n\n\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2155,"func_code":"def statement1(birthday, possible_birthdays):\n x = unique_month(birthday[0],possible_birthdays)\n y = contains_unique_day(birthday[0], possible_birthdays)\n \n if x == False and y == False:\n return True\n \n else:\n return False\n\ndef statement2(birthday, possible_birthdays):\n z = unique_day(birthday[1],possible_birthdays)\n \n if z == True:\n return True\n \n else:\n return False \n\ndef statement3(birthday, possible_birthdays):\n q = unique_month(birthday[0],possible_birthdays)\n \n if q == True:\n return True\n \n else:\n return False \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2156,"func_code":"def statement1(birthday, possible_birthdays):\n x = unique_month(birthday[0],possible_birthdays)\n y = contains_unique_day(birthday[0], possible_birthdays)\n \n if x == False and y == False:\n return True\n \n return False\n\ndef statement2(birthday, possible_birthdays):\n z = unique_day(birthday[1],possible_birthdays)\n \n if z == True:\n return True\n \n\n return False \n\ndef statement3(birthday, possible_birthdays):\n q = unique_month(birthday[0],possible_birthdays)\n \n if q == True:\n return True\n \n return False \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2157,"func_code":"def statement1(birthday, possible_birthdays):\n x = unique_month(birthday[0],possible_birthdays)\n y = contains_unique_day(birthday[0], possible_birthdays)\n \n if x == False and y == False:\n return True\n \n return False\n\ndef statement2(birthday, possible_birthdays):\n z = unique_day(birthday[1],possible_birthdays)\n \n if z == True:\n return True\n \n\n return False \n\ndef statement3(birthday, possible_birthdays):\n q = unique_month(birthday[0],possible_birthdays)\n \n if q == True:\n return True\n \n return False \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2158,"func_code":"def statement1(birthday, possible_birthdays):\n A = unique_month(birthday[0],possible_birthdays)\n B = contains_unique_day(birthday[0], possible_birthdays)\n \n if A == False and B == False:\n return True\n \n return False\n\ndef statement2(birthday, possible_birthdays):\n C = unique_day(birthday[1],possible_birthdays)\n \n if C == True:\n return True\n \n return False \n\ndef statement3(birthday, possible_birthdays):\n D = unique_month(birthday[0],possible_birthdays)\n \n if D == True:\n return True\n \n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2159,"func_code":"def statement1(birthday, possible_birthdays):\n A = unique_month(birthday[0],possible_birthdays)\n B = contains_unique_day(birthday[0], possible_birthdays)\n \n if A == False and B == False:\n return True\n \n return False\n\ndef statement2(birthday, possible_birthdays):\n C = unique_day(birthday[1],possible_birthdays)\n \n if C == True:\n return True\n \n return False \n\ndef statement3(birthday, possible_birthdays):\n D = unique_month(birthday[0],possible_birthdays)\n \n if D == True:\n return True\n \n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2160,"func_code":"def unique_day(day, possible_birthdays):\n count = 0\n for item in possible_birthdays:\n if day == item[1]:\n count +=1\n else:\n continue\n if count >=2:\n return False\n else:\n return True\n\ndef unique_month(month, possible_birthdays):\n count = 0\n for item in possible_birthdays:\n if month == item[0]:\n count +=1\n else:\n continue\n if count >=2:\n return False\n else:\n return True\n\n\ndef contains_unique_day(month, possible_birthdays):\n day = filter(lambda x: x[0]== month, possible_birthdays)\n for item in tuple(day):\n if unique_day(item[1],possible_birthdays) == True:\n return True\n else:\n continue\n return False \n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2161,"func_code":"def unique_day(day, possible_birthdays):\n store = 0\n for i in possible_birthdays:\n if i[1] == day:\n if store == 1:\n return False\n else:\n store += 1\n return True\n\ndef unique_month(month, possible_birthdays):\n store = 0\n for i in possible_birthdays:\n if i[0] == month:\n if store == 1:\n return False\n else:\n store += 1\n return True\n\ndef contains_unique_day(month, possible_birthdays):\n def generate_unique_days(possible_birthdays):\n generate = ()\n for i in range(14, 20):\n if unique_day(str(i), possible_birthdays):\n generate += (str(i),)\n return generate\n for i in possible_birthdays:\n if i[0] == month:\n if str(i[1]) in generate_unique_days(possible_birthdays):\n return True\n return False\n","correct":false,"assignment_id":2,"func_name":"unique_day-unique_month-contains_unique_day","test":"\n\ntuple_of_possible_birthdays = (('May', '15'),\n ('May', '16'),\n ('May', '19'),\n ('June', '17'),\n ('June', '18'),\n ('July', '14'),\n ('July', '16'),\n ('August', '14'),\n ('August', '15'),\n ('August', '17'))\n\nassert unique_day(\"1\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and contains_unique_day(\"January\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and contains_unique_day(\"February\", ((\"January\",\"10\"),(\"February\",\"1\"),(\"February\",\"10\")))==True and unique_day(\"3\", ((\"January\",\"1\"),(\"January\",\"2\")))==False and unique_month(\"March\", ((\"January\",\"1\"),(\"February\",\"1\")))==False and unique_day(\"1\", ((\"January\",\"1\"),(\"January\",\"2\")))==True and unique_day(\"16\", tuple_of_possible_birthdays)==False and unique_day(\"17\", tuple_of_possible_birthdays)==False and unique_day(\"18\", tuple_of_possible_birthdays)==True and unique_day(\"19\", tuple_of_possible_birthdays)==True and unique_month(\"May\", tuple_of_possible_birthdays)==False and unique_month(\"June\", tuple_of_possible_birthdays)==False and contains_unique_day(\"June\", tuple_of_possible_birthdays)==True and contains_unique_day(\"July\", tuple_of_possible_birthdays)==False","description":"Task: Unique dates and months\n\n\nImplement unique_day, unique_month and contains_unique_day."} {"submission_id":2162,"func_code":"def remove_extras(lst):\n newlist = []\n for i in lst:\n if i not in newlist:\n newlist.append(i)\n return newlist\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2163,"func_code":"def remove_extras(lst):\n new_lst = []\n for i in lst:\n if i not in new_lst:\n new_lst.append(i)\n else:\n continue\n return new_lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2164,"func_code":"def remove_extras(lst):\n output = []\n for i in lst:\n if i not in output:\n output.append(i)\n return output\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2165,"func_code":"def remove_extras(lst):\n output = []\n for i in lst:\n if i not in output:\n output.append(i)\n return output\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2166,"func_code":"def remove_extras(lst):\n output = []\n for i in lst:\n if i not in output:\n output.append(i)\n return output\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2167,"func_code":"def remove_extras(lst):\n new = []\n for i in lst:\n if i not in new:\n new += [i]\n else:\n continue\n return new \n \n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2168,"func_code":"def remove_extras(lst):\n new=[]\n for i in lst:\n if i not in new:\n new.append(i) \n return new\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2169,"func_code":"def remove_extras(lst):\n new = []\n for i in lst:\n if i not in new:\n new += [i]\n else:\n continue\n return new \n \n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2170,"func_code":"def remove_extras(lst):\n new_lst = []\n for i in lst:\n if i in new_lst:\n continue\n else:\n new_lst.append(i)\n return new_lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2171,"func_code":"def remove_extras(lst):\n new=[]\n for i in lst:\n if i not in new:\n new.append(i) \n return new\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2172,"func_code":"def remove_extras(lst):\n keep = []\n for i in lst :\n if i not in keep :\n keep.append(i)\n return keep\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2173,"func_code":"def remove_extras(lst):\n new_lst = []\n for num in lst:\n if num not in new_lst:\n new_lst.append(num)\n return new_lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2174,"func_code":"def remove_extras(lst):\n # your code here\n occurrences = ()\n new_lst = []\n for item in lst:\n if item not in occurrences:\n occurrences += (item,)\n new_lst.append(item)\n return new_lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2175,"func_code":"def remove_extras(lst):\n newlist = []\n for i in lst:\n if i not in newlist:\n newlist.append(i)\n return newlist\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2176,"func_code":"def remove_extras(lst):\n # your code here\n occurrences = ()\n new_lst = []\n for item in lst:\n if item not in occurrences:\n occurrences += (item,)\n new_lst.append(item)\n return new_lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2177,"func_code":"def remove_extras(lst):\n length = len(lst)\n if length == 0:\n return []\n result = [lst[0]]\n for i in range(1,length):\n if lst[i] not in result:\n result = result + [lst[i]]\n return result\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2178,"func_code":"def remove_extras(lst):\n new = []\n for x in lst:\n if x not in new:\n new += [x,]\n else:\n new += []\n return new\n pass\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2179,"func_code":"def remove_extras(lst):\n new_lst = []\n for i in lst:\n if i not in new_lst:\n new_lst += [i]\n return new_lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2180,"func_code":"def remove_extras(lst):\n lst.reverse()\n for i in lst:\n if lst.count(i) >1:\n j = 0\n while j < lst.count(i):\n lst.remove(i)\n j += 1\n lst.reverse()\n return lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2181,"func_code":"def remove_extras(lst):\n a=[]\n for i in lst:\n if i not in a:\n a+=[i]\n return a\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2182,"func_code":"def remove_extras(lst):\n output = []\n for i in lst:\n if i not in output:\n output += [i]\n return output\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2183,"func_code":"def remove_extras(lst):\n result = []\n for i in lst:\n if i not in result:\n result += [i]\n return result\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2184,"func_code":"def remove_extras(lst):\n length = len(lst)\n if length == 0:\n return []\n result = [lst[0]]\n for i in range(1,length):\n if lst[i] not in result:\n result = result + [lst[i]]\n return result\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2185,"func_code":"def remove_extras(lst):\n output = []\n for i in lst:\n if i not in output:\n output += [i]\n return output\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2186,"func_code":"def remove_extras(lst):\n return [lst[i] for i in range(len(lst)) if lst[i] not in lst[:i]]\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2187,"func_code":"def remove_extras(lst):\n new_lst = []\n for numbers in lst:\n if numbers not in new_lst:\n new_lst.append(numbers)\n return new_lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2188,"func_code":"def remove_extras(lst):\n new=[]\n for i in lst:\n new=new+[i] if i not in new else new\n return new\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2189,"func_code":"def remove_extras(lst):\n new_list=[]\n for value in lst:\n if value not in new_list:\n new_list.append(value)\n return new_list\n \n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2190,"func_code":"def remove_extras(lst):\n new_lst=[]\n for i in lst:\n if i not in new_lst:\n new_lst.append(i)\n return new_lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2191,"func_code":"def remove_extras(lst):\n result = []\n for i in lst:\n if i not in result:\n result += [i]\n return result\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2192,"func_code":"def remove_extras(lst):\n s = []\n for i in lst:\n if i not in s:\n s.append(i)\n return s\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2193,"func_code":"def remove_extras(lst):\n new = []\n for i in lst:\n if i not in new:\n new = new + [i,]\n return new\n pass\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2194,"func_code":"def remove_extras(lst):\n new_lst=[]\n for i in lst:\n if i not in new_lst:\n new_lst.append(i)\n return new_lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2195,"func_code":"def remove_extras(lst):\n a=[]\n for i in lst:\n if i not in a:\n a.append(i)\n return a\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2196,"func_code":"def remove_extras(lst):\n result=[]\n for i in lst:\n if i not in result:\n result+=[i]\n return result\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2197,"func_code":"def remove_extras(lst):\n newlist = []\n for x in lst:\n if x not in newlist:\n newlist.append(x)\n return newlist\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2198,"func_code":"def remove_extras(lst):\n copy_list = lst.copy()\n copy_list.reverse()\n for i in lst:\n x = lst.count(i)\n if x > 1:\n for j in range(x-1):\n copy_list.remove(i)\n lst = copy_list\n lst.reverse()\n return lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2199,"func_code":"def remove_extras(lst):\n new_lst = []\n for ele in lst:\n if not (ele in new_lst):\n new_lst.insert(len(new_lst), ele)\n return new_lst\n \n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2200,"func_code":"def remove_extras(lst):\n product = []\n for i in lst:\n if i not in product:\n product.append(i)\n return product\n \n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2201,"func_code":"def remove_extras(lst):\n product = []\n for i in lst:\n if i not in product:\n product.append(i)\n return product\n \n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2202,"func_code":"def remove_extras(lst):\n s = []\n for i in lst:\n if i not in s:\n s.append(i)\n return s\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2203,"func_code":"def remove_extras(lst):\n copy_list = lst.copy()\n copy_list.reverse()\n for i in lst:\n x = lst.count(i)\n if x > 1:\n for j in range(x-1):\n copy_list.remove(i)\n lst = copy_list\n lst.reverse()\n return lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2204,"func_code":"def remove_extras(lst):\n if lst == []:\n return lst\n else:\n one = [lst[0],]\n for repeat in lst:\n if repeat not in one:\n one += [repeat,]\n return one\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2205,"func_code":"def remove_extras(lst):\n remove_indices = []\n \n for i in range(len(lst)):\n this = lst[i]\n \n for j in range(i):\n if lst[j] == this:\n remove_indices.append(i)\n \n for i in remove_indices:\n lst[i] = None\n \n while None in lst:\n del lst[lst.index(None)]\n \n return lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2206,"func_code":"def remove_extras(lst):\n result = []\n for i in lst:\n if i not in result:\n result += [i]\n return result\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2207,"func_code":"def remove_extras(lst):\n new=[]\n for i in lst:\n if not i in new:\n new+=[i]\n return new# your code here\n pass\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2208,"func_code":"def remove_extras(lst):\n remove_indices = []\n \n for i in range(len(lst)):\n this = lst[i]\n \n for j in range(i):\n if lst[j] == this:\n remove_indices.append(i)\n \n for i in remove_indices:\n lst[i] = None\n \n while None in lst:\n del lst[lst.index(None)]\n \n return lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2209,"func_code":"def remove_extras(lst):\n new_lst = []\n for i in lst:\n if i not in new_lst:\n new_lst.append(i)\n return new_lst\n \n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2210,"func_code":"def remove_extras(lst):\n new=[]\n for i in lst:\n if not i in new:\n new+=[i]\n return new# your code here\n pass\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2211,"func_code":"def remove_extras(lst):\n new_lst = []\n for i in lst:\n if i not in new_lst:\n new_lst.append(i)\n return new_lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2212,"func_code":"def remove_extras(lst):\n result = []\n for i in lst:\n if i not in result:\n result += [i]\n return result\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2213,"func_code":"def remove_extras(lst):\n res = []\n for i in lst:\n if i not in res:\n res.append(i)\n return res\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2214,"func_code":"def remove_extras(lst):\n output = []\n for x in lst:\n if x not in output:\n output.append(x)\n return output\n \n \n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2215,"func_code":"def remove_extras(lst):\n new = []\n for el in lst:\n if el not in new:\n new += [el,]\n return new\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2216,"func_code":"def remove_extras(lst):\n result = []\n for elem in lst:\n if elem not in result:\n result.append(elem)\n return result\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2217,"func_code":"def remove_extras(lst):\n lst.reverse()\n for i in lst:\n if lst.count(i) >1:\n j = 0\n while j < lst.count(i):\n lst.remove(i)\n j += 1\n lst.reverse()\n return lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2218,"func_code":"def remove_extras(lst):\n l=[]\n for i in lst:\n checker=True\n for k in l:\n if k==i:\n checker=False\n if checker:\n l+=[i]\n return l\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2219,"func_code":"def remove_extras(lst):\n i = 0\n while i < len(lst):\n j = i + 1\n while j < len(lst):\n if lst[i] == lst[j]:\n lst = lst[:j] + lst[j+1:]\n else:\n j += 1\n i += 1\n return lst\n \n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2220,"func_code":"def remove_extras(lst):\n lsts = []\n for i in lst:\n if i not in lsts:\n lsts.append(i)\n lst = lsts\n return lst\n\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2221,"func_code":"def remove_extras(lst):\n s = []\n for element in lst:\n if element not in s:\n s.append(element)\n return s\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2222,"func_code":"def remove_extras(lst):\n #your code here\n result = []\n for entry in lst:\n if entry not in result:\n result = result + [entry]\n return result\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2223,"func_code":"def remove_extras(lst):\n new_lst = []\n for element in lst:\n if element not in new_lst:\n new_lst.append(element)\n return new_lst\n \n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2224,"func_code":"def remove_extras(lst):\n list1 = []\n for i in lst:\n if i not in list1:\n list1 += [i,]\n return list1\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2225,"func_code":"def remove_extras(lst):\n new_lst = []\n for element in lst:\n if element not in new_lst:\n new_lst.append(element)\n return new_lst\n \n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2226,"func_code":"def remove_extras(lst):\n for i in lst:\n remove_multiple(i, lst)\n return lst\n \n \n\n \ndef remove_multiple(n, lst):\n if lst.count(n) == 1:\n return lst\n else:\n lst.reverse()\n lst.remove(n)\n lst.reverse()\n return remove_multiple(n, lst)\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2227,"func_code":"def remove_extras(lst):\n new_lst = []\n for i in lst:\n if i in new_lst:\n continue\n else:\n new_lst += [i,]\n return new_lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2228,"func_code":"def remove_extras(lst):\n tmp = []\n for x in lst:\n if x not in tmp:\n tmp.append(x)\n return tmp\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2229,"func_code":"def remove_extras(lst):\n new_lst = []\n for i in lst:\n if i in new_lst:\n continue\n else:\n new_lst += [i,]\n return new_lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2230,"func_code":"def remove_extras(lst):\n list = []\n for i in lst:\n if i not in list:\n list.append(i)\n return list\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2231,"func_code":"def remove_extras(lst):\n list1 = []\n for i in lst:\n if i not in list1:\n list1 += [i,]\n return list1\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2232,"func_code":"def remove_extras(lst):\n store = []\n for ele in lst:\n if ele not in store:\n store += [ele]\n return store\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2233,"func_code":"def remove_extras(lst):\n tmp = []\n for x in lst:\n if x not in tmp:\n tmp.append(x)\n return tmp\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2234,"func_code":"def remove_extras(lst):\n x = tuple(lst)\n store = ()\n for ele in lst:\n if ele not in store:\n store += (ele,)\n return list(store)\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2235,"func_code":"def remove_extras(lst):\n sumx=[]\n for i in lst:\n if i not in sumx:\n sumx.append(i)\n return sumx\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2236,"func_code":"def remove_extras(lst):\n new_list=[]\n for ele in lst:\n if ele not in new_list:\n new_list.append(ele)\n return new_list\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2237,"func_code":"def remove_extras(lst):\n for i in lst:\n remove_multiple(i, lst)\n return lst\n \n \n\n \ndef remove_multiple(n, lst):\n if lst.count(n) == 1:\n return lst\n else:\n lst.reverse()\n lst.remove(n)\n lst.reverse()\n return remove_multiple(n, lst)\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2238,"func_code":"def remove_extras(lst):\n new = []\n for i in lst:\n if i not in new:\n new = new + [i,]\n return new\n pass\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2239,"func_code":"def remove_extras(lst):\n sumx=[]\n for i in lst:\n if i not in sumx:\n sumx.append(i)\n return sumx\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2240,"func_code":"def remove_extras(lst):\n new_lst = []\n for i in lst:\n if i not in new_lst:\n new_lst += [i]\n return new_lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2241,"func_code":"def remove_extras(lst):\n new_list=[]\n for ele in lst:\n if ele not in new_list:\n new_list.append(ele)\n return new_list\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2242,"func_code":"def remove_extras(lst):\n a = ()\n c = ()\n n = len(lst)\n for i in range(n):\n for j in range(i,n):\n if lst[i] == lst[j] and i != j:\n a += (j,) #j is the jth index of the list\n else:\n continue\n d = tuple(set(a)) #[repeated_index1, repeated_index2]\n for i in d:\n c += (lst[i],)\n lst.reverse()\n for j in range(len(c)):\n lst.remove(c[j])\n lst.reverse()\n return lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2243,"func_code":"def remove_extras(lst):\n result=[]\n for i in lst:\n if i not in result:\n result+=[i]\n return result\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2244,"func_code":"def remove_extras(lst):\n answer = []\n for i in lst:\n unique = True\n for a in answer:\n if i == a:\n unique = False\n break\n if unique:\n answer += [i]\n return answer\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2245,"func_code":"def remove_extras(lst):\n lst_final = []\n for i in lst:\n if i not in lst_final:\n lst_final.append(i)\n return lst_final\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2246,"func_code":"def remove_extras(lst):\n res = []\n for i in lst:\n if i not in res:\n res.append(i)\n return res\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2247,"func_code":"def remove_extras(lst):\n new = []\n if lst == []:\n return lst \n else:\n for i in lst:\n if i in new:\n continue \n else:\n new.append(i)\n return new\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2248,"func_code":"def remove_extras(lst):\n # your code here\n new_lst = []\n for i in lst:\n if not i in new_lst:\n new_lst.append(i)\n return new_lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2249,"func_code":"def remove_extras(lst):\n new_lst = []\n for ele in lst:\n if not (ele in new_lst):\n new_lst.insert(len(new_lst), ele)\n return new_lst\n \n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2250,"func_code":"def remove_extras(lst):\n new=[]\n for i in lst:\n new=new+[i] if i not in new else new\n return new\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2251,"func_code":"def remove_extras(lst):\n final=[]\n for x in lst:\n if x not in final:\n final.append(x)\n return final\n pass\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2252,"func_code":"def remove_extras(lst):\n \n new = []\n \n for i in lst:\n if i not in new:\n new = new + [i]\n return new\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2253,"func_code":"def remove_extras(lst):\n new=[]\n for i in lst:\n new=new+[i] if i not in new else new\n return new\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2254,"func_code":"def remove_extras(lst):\n newlist = []\n for i in lst:\n if i not in newlist:\n newlist.append(i)\n return newlist\n \n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2255,"func_code":"def remove_extras(lst):\n remove_lst = []\n for i in lst:\n if i not in remove_lst:\n remove_lst.append(i)\n return remove_lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2256,"func_code":"def remove_extras(lst):\n output = []\n for entry in lst:\n if output.count(entry) == 0:\n output == output.append(entry)\n return output\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2257,"func_code":"def remove_extras(lst):\n new_lst=[]\n for element in lst:\n if element not in new_lst:\n new_lst += [element]\n return new_lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2258,"func_code":"def remove_extras(lst):\n output = []\n for entry in lst:\n if output.count(entry) == 0:\n output == output.append(entry)\n return output\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2259,"func_code":"def remove_extras(lst):\n new_lst=[]\n for element in lst:\n if element not in new_lst:\n new_lst += [element]\n return new_lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2260,"func_code":"def remove_extras(lst):\n l=[]\n for x in lst:\n if x not in l:\n l.append(x)\n return l\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2261,"func_code":"def remove_extras(lst):\n l=[]\n for x in lst:\n if x not in l:\n l.append(x)\n return l\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2262,"func_code":"def remove_extras(lst):\n newlst=[]\n for i in lst:\n while i not in newlst:\n newlst.append(i)\n return newlst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2263,"func_code":"def remove_extras(lst):\n s=[]\n for i in lst:\n if i not in s:\n s.append(i)\n return s\n pass\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2264,"func_code":"def remove_extras(lst):\n new_lst = []\n for i in lst:\n if i not in new_lst:\n new_lst.append(i)\n return new_lst\n \n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2265,"func_code":"def remove_extras(lst):\n new_lst = []\n for i in range(len(lst)):\n if lst[0] in new_lst:\n new_lst = new_lst\n lst = lst[1:]\n else:\n new_lst.append(lst[0])\n lst = lst[1:]\n return new_lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2266,"func_code":"def remove_extras(lst):\n new_lst = []\n for i in lst:\n if i not in new_lst:\n new_lst += [i,]\n return new_lst\n \n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2267,"func_code":"def remove_extras(lst):\n newlist = []\n for number in lst:\n if number not in newlist:\n newlist.append(number)\n return newlist\n \n \n # your code here\n pass\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2268,"func_code":"def remove_extras(lst):\n a = []\n for i in lst:\n if i not in a:\n a += [i]\n return a\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2269,"func_code":"def remove_extras(lst):\n s=[]\n for i in lst:\n if i not in s:\n s.append(i)\n return s\n pass\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2270,"func_code":"def remove_extras(lst):\n if lst == []:\n return lst\n new_lst = [lst[0],]\n for e in lst:\n if e in new_lst:\n continue\n else:\n new_lst.append(e)\n \n return new_lst\n \n \n \n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2271,"func_code":"def remove_extras(lst):\n new_lst = []\n for item in lst:\n if item not in new_lst:\n new_lst.append(item)\n return new_lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2272,"func_code":"def remove_extras(lst):\n o = []\n for i in lst:\n if i not in o:\n o.append(i)\n return o\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2273,"func_code":"def remove_extras(lst):\n new_lst = []\n for i in range(len(lst)):\n if lst[0] in new_lst:\n new_lst = new_lst\n lst = lst[1:]\n else:\n new_lst.append(lst[0])\n lst = lst[1:]\n return new_lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2274,"func_code":"def remove_extras(lst):\n new_lst = []\n for ele in lst:\n if ele not in new_lst:\n new_lst.append(ele)\n return new_lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2275,"func_code":"def remove_extras(lst):\n non_extra = ()\n count = 0\n for el in lst:\n if el not in non_extra:\n non_extra += (el,)\n else:\n continue \n lst = list(non_extra)\n return lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2276,"func_code":"def remove_extras(values):\n output = []\n for value in values:\n if value not in output:\n output.append(value)\n return output\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2277,"func_code":"def remove_extras(lst):\n new_lst = []\n for item in lst:\n if item not in new_lst:\n new_lst.append(item)\n return new_lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2278,"func_code":"def remove_extras(lst):\n result = []\n for i in lst:\n if i not in result:\n result.append(i)\n return result\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2279,"func_code":"\ndef remove_extras(lst):\n new = []\n for i in lst:\n if i not in new:\n new += [i]\n else:\n continue\n return new\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2280,"func_code":"def remove_extras(lst):\n l = []\n for i in lst:\n if i not in l:\n l += [i]\n return l\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2281,"func_code":"def remove_extras(lst):\n lst2=[]\n for x in lst:\n if x not in lst2:\n lst2+=[x]\n return lst2\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2282,"func_code":"def remove_extras(lst):\n a = []\n for i in lst:\n if i not in a:\n a += [i]\n return a\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2283,"func_code":"def remove_extras(lst):\n l=[]\n for i in lst:\n checker=True\n for k in l:\n if k==i:\n checker=False\n if checker:\n l+=[i]\n return l\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2284,"func_code":"def remove_extras(lst):\n s =[]\n for i in lst:\n if i not in s:\n s.append(i)\n return s\n \n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2285,"func_code":"def remove_extras(lst):\n new = []\n for x in lst:\n if x not in new:\n new += [x,]\n else:\n new += []\n return new\n pass\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2286,"func_code":"def remove_extras(lst):\n newlst=[]\n for i in lst:\n if i not in newlst:\n newlst+= [i,]\n return newlst\n\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2287,"func_code":"def remove_extras(lst):\n output = []\n for x in lst:\n if x not in output:\n output.append(x)\n return output\n \n \n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2288,"func_code":"def remove_extras(lst):\n new_lst = []\n for i in lst:\n if i in new_lst:\n new_lst = new_lst\n else:\n new_lst += [i]\n return new_lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2289,"func_code":"def remove_extras(lst):\n output = []\n seen = set()\n for value in lst:\n # If value has not been encountered yet,\n # ... add it to both list and set.\n if value not in seen:\n output.append(value)\n seen.add(value)\n return output\n pass\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2290,"func_code":"def remove_extras(lst):\n lst1 = []\n for i in lst:\n if i not in lst1:\n lst1 += [i,]\n return lst1\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2291,"func_code":"def remove_extras(lst):\n result = []\n for i in lst:\n if i not in result:\n result += [i]\n return result\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2292,"func_code":"def remove_extras(lst):\n if lst == []:\n return []\n else:\n a =[lst[0]]\n i = lst[0]\n for j in range (1,len(lst)): #while lst is not empty \n if i == lst[j]:\n continue\n else: \n a += [lst[j]]\n \n return a \n\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2293,"func_code":"def remove_extras(lst):\n\tnew_lst = []\n\tfor i in lst:\n\t\tif i not in new_lst:\n\t\t\tnew_lst.append(i)\n\treturn new_lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2294,"func_code":"def remove_extras(lst):\n lst.reverse()\n for i in lst:\n if lst.count(i) > 1:\n lst.remove(i)\n lst.reverse()\n return lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2295,"func_code":"def remove_extras(lst):\n store = []\n for ele in lst:\n if ele not in store:\n store += [ele]\n return store\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2296,"func_code":"def remove_extras(lst):\n new = []\n for x in lst:\n if x not in new:\n new += [x,]\n else:\n new += []\n return new\n pass\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2297,"func_code":"def remove_extras(lst):\n\tnewlst = []\n\tfor i in lst:\n\t\tif i not in newlst:\n\t\t\tnewlst.append(i)\n\treturn newlst\n \n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2298,"func_code":"def remove_extras(lst):\n new_lst = []\n for i in lst:\n if i not in new_lst:\n new_lst = new_lst + [i,]\n else:\n continue\n return new_lst\n \n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2299,"func_code":"def remove_extras(lst):\n new_lst=[]\n for i in lst:\n if i in new_lst:\n continue\n else:\n new_lst.append(i)\n return new_lst\n \n \n \n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2300,"func_code":"def remove_extras(lst):\n s = []\n for n in lst: \n if n not in s: \n s.append(n)\n return s \n \n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2301,"func_code":"def remove_extras(lst):\n new = []\n for term in lst:\n if term not in new:\n new += [term,]\n return new\n \n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2302,"func_code":"def remove_extras(lst):\n output = []\n for i in lst:\n if i not in output:\n output.append(i)\n return output\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2303,"func_code":"def remove_extras(lst):\n new = []\n for num in lst:\n if num in new:\n continue\n new.append(num)\n return new\n \n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2304,"func_code":"def remove_extras(lst):\n # your code here\n lst_new = []\n for element in lst:\n if element not in lst_new:\n lst_new.append(element)\n return lst_new\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2305,"func_code":"def remove_extras(lst):\n lst1 = []\n for i in lst:\n if i not in lst1:\n lst1 += [i,]\n return lst1\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2306,"func_code":"def remove_extras(lst):\n new_lst = []\n for i in lst:\n if i not in new_lst:\n new_lst += [i]\n return new_lst\n \n pass\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2307,"func_code":"def remove_extras(lst):\n lst.reverse()\n for i in lst:\n if lst.count(i) > 1:\n lst.remove(i)\n lst.reverse()\n return lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2308,"func_code":"def remove_extras(lst):\n new = []\n for num in lst:\n if num in new:\n continue\n new.append(num)\n return new\n \n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2309,"func_code":"def remove_extras(lst):\n a = []\n for ele in lst:\n if ele in a:\n continue\n else:\n a = a+[ele]\n return a\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2310,"func_code":"def remove_extras(lst):\n wo_extras = []\n for i in lst:\n if i in wo_extras:\n continue\n wo_extras.append(i)\n return wo_extras\n pass\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2311,"func_code":"def remove_extras(lst):\n s =[]\n for i in lst:\n if i not in s:\n s.append(i)\n return s\n \n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2312,"func_code":"def remove_extras(lst):\n new_lst = []\n for i in lst:\n if i not in new_lst:\n new_lst += [i,]\n return new_lst \n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2313,"func_code":"def remove_extras(lst):\n if lst==[]:\n return []\n new_lst=[lst[0]]\n for i in range(len(lst)):\n a=lst[i]\n for h in range(i,len(lst)):\n if a!=lst[h]:\n ele=lst[h]\n if ele in new_lst:\n continue\n new_lst.append(ele)\n return new_lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2314,"func_code":"def remove_extras(lst):\n a = []\n for ele in lst:\n if ele in a:\n continue\n else:\n a = a+[ele]\n return a\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2315,"func_code":"def remove_extras(lst):\n lst_final = []\n for i in lst:\n if i not in lst_final:\n lst_final.append(i)\n return lst_final\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2316,"func_code":"def remove_extras(lst):\n # your code here\n lst_new = []\n for element in lst:\n if element not in lst_new:\n lst_new.append(element)\n return lst_new\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2317,"func_code":"def remove_extras(lst):\n wo_extras = []\n for i in lst:\n if i in wo_extras:\n continue\n wo_extras.append(i)\n return wo_extras\n pass\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2318,"func_code":"def remove_extras(lst):\n new_lst = []\n for i in lst:\n if i not in new_lst:\n new_lst.append(i)\n return new_lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2319,"func_code":"def remove_extras(lst):\n result = []\n\n for element in lst:\n if element not in result:\n result.append(element)\n return result\n \n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2320,"func_code":"def remove_extras(lst):\n o = []\n for i in lst:\n if i not in o:\n o.append(i)\n return o\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2321,"func_code":"def remove_extras(lst):\n new_list = []\n n = len(lst)\n for counter1 in range(n):\n if lst[counter1] not in new_list:\n new_list.append(lst[counter1])\n return new_list\n \n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2322,"func_code":"def remove_extras(lst):\n lst2 = []\n for i in lst:\n if i not in lst2:\n lst2.append(i)\n return lst2\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2323,"func_code":"def remove_extras(lst):\n new_lst = []\n for i in lst:\n if i not in new_lst:\n new_lst.append(i)\n return new_lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2324,"func_code":"def remove_extras(lst):\n # your code here\n if lst == []:\n return []\n else:\n result = (lst[0],)\n for item in lst[1:]:\n if item in result:\n continue\n else:\n result +=(item,)\n return list(result)\n \n \n \n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2325,"func_code":"def remove_extras(lst):\n copy = lst.copy()\n for i in copy:\n if copy.count(i) > 1:\n left = copy[:copy.index(i)+1]\n right = copy[copy.index(i)+1:]\n right.remove(i)\n copy = left + right\n return copy\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2326,"func_code":"def remove_extras(lst):\n newlst = []\n for element in lst:\n if element not in newlst:\n newlst = newlst + [element]\n return newlst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2327,"func_code":"def remove_extras(lst):\n lst.reverse()\n for element in lst:\n if lst.count(element)>1:\n lst.remove(element)\n lst.reverse()\n return lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2328,"func_code":"def remove_extras(lst):\n if lst == []:\n return lst\n new_lst = [lst[0],]\n for e in lst:\n if e in new_lst:\n continue\n else:\n new_lst.append(e)\n \n return new_lst\n \n \n \n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2329,"func_code":"def remove_extras(lst):\n result = []\n for i in lst:\n if i not in result:\n result = result + [i,]\n else:\n continue\n return result\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2330,"func_code":"def remove_extras(lst):\n result = []\n\n for element in lst:\n if element not in result:\n result.append(element)\n return result\n \n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2331,"func_code":"def remove_extras(lst):\n store = []\n for ele in lst:\n if ele not in store:\n store += [ele]\n return store\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2332,"func_code":"def remove_extras(lst):\n new = []\n for i in lst:\n if i not in new:\n new += [i]\n return new\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2333,"func_code":"def remove_extras(lst):\n result = []\n for i in lst:\n if i not in result:\n result.append(i)\n return result\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2334,"func_code":"def remove_extras(lst):\n result=[]\n for i in lst: \n if i not in result: \n result.append(i)\n else:\n continue\n return result \n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2335,"func_code":"def remove_extras(lst):\n new_lst = []\n for i in lst:\n if i not in new_lst:\n new_lst.append(i)\n return new_lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2336,"func_code":"def remove_extras(lst):\n result = []\n for i in lst:\n if i not in result:\n result += [i]\n return result\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2337,"func_code":"def remove_extras(lst):\n remove_lst = []\n for i in lst:\n if i not in remove_lst:\n remove_lst.append(i)\n return remove_lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2338,"func_code":"def remove_extras(lst):\n res= []\n for i in lst:\n if res.count(i) == 0:\n res = res + [i]\n else:\n res = res\n return res\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2339,"func_code":"def remove_extras(lst):\n new_lst = []\n for i in lst:\n if i in new_lst:\n continue\n else:\n new_lst.append(i)\n return new_lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2340,"func_code":"def remove_extras(lst):\n new_lst = []\n for i in lst:\n if i not in new_lst:\n new_lst += [i]\n return new_lst\n \n pass\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2341,"func_code":"def remove_extras(lst):\n newlst=[]\n for i in lst:\n if i not in newlst:\n newlst.append(i)\n return newlst\n\n # your code here\n pass\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2342,"func_code":"def remove_extras(lst):\n lst2 = []\n for i in lst:\n if i not in lst2:\n lst2.append(i)\n return lst2\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2343,"func_code":"def remove_extras(lst):\n result = []\n for i in lst:\n if i not in result:\n result += [i]\n return result\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2344,"func_code":"def remove_extras(list):\n list.reverse()\n for element in list:\n if list.count(element)>1:\n list.remove(element)\n list.reverse()\n return list\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2345,"func_code":"def remove_extras(lst):\n lst.reverse()\n for element in lst:\n if lst.count(element)>1:\n lst.remove(element)\n lst.reverse()\n return lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2346,"func_code":"def remove_extras(lst):\n newlst=[]\n for i in lst:\n if i not in newlst:\n newlst+= [i,]\n return newlst\n\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2347,"func_code":"def remove_extras(lst):\n if lst == []:\n return []\n sub_list = []\n for elem in lst:\n if elem not in lst[lst.index(elem)+1:]:\n return lst\n elif elem in lst[lst.index(elem)+1:]:\n sub_list += lst[lst.index(elem)+1:]\n while elem in sub_list:\n sub_list.remove(elem) \n return lst[:lst.index(elem)+1] + sub_list\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2348,"func_code":"def remove_extras(lst):\n # your code here\n result = []\n for i in lst:\n if i not in result:\n result.append(i)\n return result\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2349,"func_code":"def remove_extras(lst):\n new_lst = []\n for x in lst:\n if x not in new_lst:\n new_lst += [x]\n return new_lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2350,"func_code":"def remove_extras(lst):\n newlst = []\n for element in lst:\n if element not in newlst:\n newlst = newlst + [element]\n return newlst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2351,"func_code":"def remove_extras(lst):\n if lst==[]:\n return []\n new_lst = [lst[0]]\n for i in range(0,len(lst)):\n a=lst[i]\n for h in range(i,len(lst)):\n if a!=lst[h]:\n ele=lst[h]\n new_lst.append(ele) \n return new_lst\n return new_lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2352,"func_code":"def remove_extras(lst):\n newlst=[]\n for i in lst:\n if i not in newlst:\n newlst.append(i)\n return newlst\n\n # your code here\n pass\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2353,"func_code":"def remove_extras(lst):\n lst2 = []\n for i in lst:\n if i not in lst2:\n lst2.append(i)\n return lst2\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2354,"func_code":"def remove_extras(lst):\n # your code here\n result = []\n for i in lst:\n if i not in result:\n result.append(i)\n return result\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2355,"func_code":"def remove_extras(lst):\n new_lst=[]\n for i in lst:\n if i in new_lst:\n continue\n else:\n new_lst.append(i)\n return new_lst\n \n \n \n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2356,"func_code":"def remove_extras(lst):\n lst1=[]\n for i in lst:\n if i not in lst1:\n lst1.append(i)\n return lst1\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2357,"func_code":"def remove_extras(lst):\n \n seq = []\n \n for i in lst:\n if i in seq:\n continue\n else:\n seq += [i]\n \n return seq\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2358,"func_code":"def remove_extras(lst):\n list = []\n for i in lst:\n if i not in list:\n list += [i]\n return list\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2359,"func_code":"def remove_extras(lst):\n i=1\n if lst==[]: return lst\n \n while i!=len(lst):\n if lst[i] in lst[:i]:\n del lst[i]\n continue\n i+=1\n return lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2360,"func_code":"def remove_extras(lst):\n result=[]\n for i in lst:\n if i in result:\n continue\n result+= [i]\n return result\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2361,"func_code":"def remove_extras(lst):\n newlist = []\n for i in lst:\n if i not in newlist:\n newlist = newlist + [i,]\n return newlist\n \n\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2362,"func_code":"def remove_extras(lst):\n new_lst = []\n for i in lst:\n if i not in new_lst:\n new_lst.append(i)\n return new_lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2363,"func_code":"def remove_extras(lst):\n result = []\n for i in lst:\n if i not in result:\n result = result + [i,]\n else:\n continue\n return result\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2364,"func_code":"def remove_extras(lst):\n new = []\n for i in lst:\n if i not in new: #if its already in new, it would skip the element and wont add into the new listt.\n new += [i, ]\n else:\n continue\n return new\n \n\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2365,"func_code":"def remove_extras(lst):\n lst2=[]\n for x in lst:\n if x not in lst2:\n lst2+=[x]\n return lst2\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2366,"func_code":"def remove_extras(lst):\n result = []\n for i in lst:\n if i not in result:\n result = result + [i]\n return result\n \n \n # your code here\n pass\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2367,"func_code":"def remove_extras(lst):\n new_lst = []\n for numbers in lst:\n if numbers not in new_lst:\n new_lst.append(numbers)\n return new_lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2368,"func_code":"def remove_extras(lst):\n lst1=[]\n for i in lst:\n if i not in lst1:\n lst1.append(i)\n return lst1\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2369,"func_code":"def remove_extras(lst):\n new = []\n for term in lst:\n if term not in new:\n new += [term,]\n return new\n \n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2370,"func_code":"def remove_extras(lst):\n for i in lst:\n if lst.count(i) > 1:\n left = lst[:lst.index(i)+1]\n right = lst[lst.index(i)+1:]\n right.remove(i)\n lst = left + right\n return lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2371,"func_code":"def remove_extras(lst):\n a = ()\n c = ()\n n = len(lst)\n for i in range(n):\n for j in range(i,n):\n if lst[i] == lst[j] and i != j:\n a += (j,) #j is the jth index of the list\n else:\n continue\n d = tuple(set(a)) #[repeated_index1, repeated_index2]\n for i in d:\n c += (lst[i],)\n b = lst[::-1]\n for j in range(len(c)):\n b.remove(c[j])\n e = b[::-1]\n return e\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2372,"func_code":"def remove_extras(lst):\n a = ()\n c = ()\n n = len(lst)\n for i in range(n):\n for j in range(i,n):\n if lst[i] == lst[j] and i != j:\n a += (j,) #j is the jth index of the list\n else:\n continue\n d = tuple(set(a)) #[repeated_index1, repeated_index2]\n for i in d:\n c += (lst[i],)\n lst.reverse()\n for j in range(len(c)):\n lst.remove(c[j])\n lst.reverse()\n return lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2373,"func_code":"def remove_extras(lst):\n a = []\n for i in lst:\n if i not in a:\n a.append(i)\n return a\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2374,"func_code":"def remove_extras(lst):\n result = []\n for item in lst:\n if item not in result:\n result += [item]\n return result\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2375,"func_code":"def remove_extras(lst):\n result = []\n for item in lst:\n if item not in result:\n result += [item,]\n return result\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2376,"func_code":"def remove_extras(lst):\n result = []\n for item in lst:\n if item not in result:\n result += [item]\n return result\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2377,"func_code":"def remove_extras(lst):\n # your code here\n new_lst = []\n for i in lst:\n if not i in new_lst:\n new_lst.append(i)\n return new_lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2378,"func_code":"def remove_extras(lst):\n\tfinal=[]\n\tfor i in lst:\n\t\tif i not in final:\n\t\t\tfinal+=[i,]\n\t\telse:\n\t\t\tcontinue\n\treturn final\n\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2379,"func_code":"def remove_extras(lst):\n if lst == []:\n return []\n sub_list = []\n for elem in lst:\n if elem not in lst[lst.index(elem)+1:]:\n return lst\n elif elem in lst[lst.index(elem)+1:]:\n sub_list += lst[lst.index(elem)+1:]\n while elem in sub_list:\n sub_list.remove(elem) \n return lst[:lst.index(elem)+1] + sub_list\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2380,"func_code":"def remove_extras(lst):\n output = []\n for i in lst:\n if i not in output:\n output.append(i)\n return output \n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2381,"func_code":"def remove_extras(lst):\n list = []\n for i in lst:\n if i not in list:\n list.append(i)\n return list\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2382,"func_code":"def remove_extras(lst):\n \n seq = []\n \n for i in lst:\n if i in seq:\n continue\n else:\n seq += [i]\n \n return seq\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2383,"func_code":"def remove_extras(lst):\n result=[]\n for i in lst:\n if i in result:\n continue\n result+= [i]\n return result\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2384,"func_code":"def remove_extras(values):\n output = []\n seen = set()\n for value in values:\n if value not in seen:\n output.append(value)\n seen.add(value)\n return output\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2385,"func_code":"def remove_extras(values):\n output = []\n seen = ()\n for value in values:\n if value not in seen:\n output.append(value)\n seen += (value,)\n return output\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2386,"func_code":"def remove_extras(values):\n output = []\n for value in values:\n if value not in output:\n output.append(value)\n return output\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2387,"func_code":"def remove_extras(lst):\n new = []\n for i in lst:\n if i not in new:\n new += [i, ]\n else:\n continue\n return new\n \n\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2388,"func_code":"def remove_extras(lst):\n result = []\n for i in lst:\n if i not in result:\n result = result + [i]\n return result\n \n \n # your code here\n pass\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2389,"func_code":"def remove_extras(lst):\n output = []\n for i in lst:\n if i not in output:\n output.append(i)\n return output \n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2390,"func_code":"def remove_extras(lst):\n copy = lst.copy()\n for i in copy:\n if copy.count(i) > 1:\n left = copy[:copy.index(i)+1]\n right = copy[copy.index(i)+1:]\n right.remove(i)\n copy = left + right\n return copy\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2391,"func_code":"def remove_extras(lst):\n\tnew_lst = []\n\tfor i in lst:\n\t\tif i not in new_lst:\n\t\t\tnew_lst.append(i)\n\treturn new_lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2392,"func_code":"def remove_extras(lst):\n new_lst = []\n for i in range (len(lst)):\n if lst[i] not in new_lst:\n new_lst.append(lst[i])\n return new_lst\nprint(remove_extras([1,5,1,1,3,2]))\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2393,"func_code":"def remove_extras(lst):\n new_lst = []\n for i in lst:\n if i not in new_lst:\n new_lst.append(i)\n return new_lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2394,"func_code":"def remove_extras(lst):\n result=[]\n for i in lst:\n if i in result:\n continue\n else:\n result+=[i,]\n return result\n pass\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2395,"func_code":"def remove_extras(lst):\n s = []\n for element in lst:\n if element not in s:\n s.append(element)\n return s\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2396,"func_code":"def remove_extras(lst):\n result = []\n check = set()\n for element in lst:\n if element not in check:\n result.append(element)\n check.add(element)\n return result\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2397,"func_code":"def remove_extras(lst):\n lst2 = []\n for i in lst:\n if i not in lst2:\n lst2.append(i)\n return lst2\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2398,"func_code":"def remove_extras(lst):\n a = []\n for i in lst:\n if i not in a:\n a.append(i)\n return a\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2399,"func_code":"def remove_extras(lst):\n new_list = []\n for k in range(len(lst)):\n if lst[k] in lst[:k]:\n new_list = new_list\n else:\n new_list = new_list + [lst[k]]\n return new_list \n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2400,"func_code":"def remove_extras(lst):\n # your code here\n z=[]\n for i in lst:\n if i in z:\n continue\n else:\n z.append(i)\n return z\n\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2401,"func_code":"def remove_extras(lst):\n if len(lst)==0:\n return lst\n l=[lst[0],]\n for i in lst[1:]:\n if i not in l:\n l+=[i,]\n return l\n\n\n#qn3\n#list1 = [1] * 4\n#list2 = [5, 5, 5]\n#while not 0:\n# list1[0] += 1\n# if list1[0] == 5: \n# break #break out of the while loop\n# list1[1] += 2\n# list1[2] += 3 #list1[2]+=3 every time it loops\n\n#list1=[5, 1, 10, 1]\n#list2 is [5, 5, 5]\n\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2402,"func_code":"def remove_extras(lst):\n new_lst = []\n for num in lst:\n if num not in new_lst:\n new_lst.append(num)\n return new_lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2403,"func_code":"def remove_extras(lst):\n new_lst = []\n for i in lst:\n if not i in new_lst:\n new_lst.append(i)\n return new_lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2404,"func_code":"def remove_extras(lst):\n\tnew = []\n\tfor i in lst:\n\t if i not in new:\n\t new.append(i)\n\treturn new\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2405,"func_code":"def remove_extras(lst):\n new_lst = []\n for i in lst:\n if not i in new_lst:\n new_lst.append(i)\n return new_lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2406,"func_code":"def remove_extras(lst):\n # your code here\n lst.reverse()\n for item in lst:\n while lst.count(item) != 1:\n lst.remove(item)\n lst.reverse()\n return lst\n\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2407,"func_code":"def remove_extras(lst):\n # your code here\n z=[]\n for i in lst:\n if i in z:\n continue\n else:\n z.append(i)\n return z\n\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2408,"func_code":"\ndef remove_extras(lst):\n s =[]\n for i in lst:\n if i not in s:\n s = s +[i]\n lst.clear()\n lst.extend(s)\n return lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2409,"func_code":"\ndef remove_extras(lst):\n x = []\n for i in lst:\n if i not in x:\n x = x + [i,]\n else:\n continue\n return x\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2410,"func_code":"def remove_extras(lst):\n result = []\n check = set()\n for element in lst:\n if element not in check:\n result.append(element)\n check.add(element)\n return result\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2411,"func_code":"def remove_extras(lst):\n a = []\n for i in lst:\n if i not in a:\n a.append(i)\n return a\n \n\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2412,"func_code":"def remove_extras(lst):\n s = []\n for i in lst:\n if i not in s:\n s.append(i)\n return s\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2413,"func_code":"def remove_extras(lst):\n new_list=[]\n for value in lst:\n if value not in new_list:\n new_list.append(value)\n return new_list\n \n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2414,"func_code":"def remove_extras(lst):\n\tresult = []\n\tfor i in lst:\n\t\tif i not in result:\n\t\t\tresult.append(i)\n\treturn result\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2415,"func_code":"def remove_extras(lst):\n new = []\n for i in lst:\n if i not in new:\n new.append(i)\n return new\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2416,"func_code":"def remove_extras(lst):\n a = []\n for i in lst:\n if i not in a:\n a.append(i)\n return a\n \n\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2417,"func_code":"def remove_extras(lst):\n store = []\n for ele in lst:\n if ele not in store:\n store += [ele]\n return store\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2418,"func_code":"def remove_extras(lst):\n output = []\n for i in lst:\n if i not in output:\n output.append(i)\n return output\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2419,"func_code":"def remove_extras(lst):\n removed = []\n for e in lst:\n if (e in lst) and (e not in removed):\n removed.append(e)\n return removed\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2420,"func_code":"def remove_extras(lst):\n newlist = []\n for i in lst:\n if i in newlist:\n continue\n else:\n newlist += [i]\n return newlist\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2421,"func_code":"def remove_extras(lst):\n # your code here\n if lst == []:\n return []\n else:\n result = (lst[0],)\n for item in lst[1:]:\n if item in result:\n continue\n else:\n result +=(item,)\n return list(result)\n \n \n \n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2422,"func_code":"def remove_extras(lst):\n new_list = []\n for k in range(len(lst)):\n if lst[k] in lst[:k]:\n new_list = new_list\n else:\n new_list = new_list + [lst[k]]\n return new_list \n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2423,"func_code":"def remove_extras(lst):\n new_list = []\n for k in range(len(lst)):\n if lst[k] in lst[:k]:\n new_list = new_list\n else:\n new_list = new_list + [lst[k]]\n return new_list \n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2424,"func_code":"def remove_extras(n):\n result = []\n counter = 0\n while counter < len(n):\n temp = n[counter]\n if temp not in result:\n result.append(temp)\n counter = counter + 1\n return result\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2425,"func_code":"def remove_extras(lst):\n newlist = []\n for i in lst:\n if i not in newlist:\n newlist.append(i)\n return newlist\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2426,"func_code":"def remove_extras(lst):\n new = []\n for e in lst:\n if e not in new:\n new.append(e)\n return new\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2427,"func_code":"def remove_extras(lst):\n result = []\n for i in lst:\n if i not in result:\n result.append(i)\n return result\n pass\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2428,"func_code":"def remove_extras(lst):\n new_lst=[]\n for i in lst:\n if i not in new_lst:\n new_lst.append(i)\n return new_lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2429,"func_code":"def remove_extras(lst):\n final=[]\n for x in lst:\n if x not in final:\n final.append(x)\n return final\n pass\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2430,"func_code":"def remove_extras(lst):\n new=[]\n while lst!=[]:\n new=new+[lst[0]]\n check=lst[0]\n i=0\n while i 1:\n lst.remove(i)\n lst.reverse()\n return lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2441,"func_code":"def remove_extras(lst):\n # your code here\n new_lst = []\n for i in lst:\n if i not in new_lst:\n new_lst += [i,]\n return new_lst\n \n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2442,"func_code":"def remove_extras(lst):\n answer = []\n for i in lst:\n unique = True\n for a in answer:\n if i == a:\n unique = False\n break\n if unique:\n answer += [i]\n return answer\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2443,"func_code":"def remove_extras(lst):\n new = []\n for x in lst:\n if x not in new:\n new += [x]\n return new\n \n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2444,"func_code":"def remove_extras(lst):\n if lst == []:\n return []\n else:\n lst1 = []\n for i in range(0,len(lst)):\n if lst[i] not in lst1:\n lst1 = lst1 + [lst[i]]\n return lst1\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2445,"func_code":"def remove_extras(lst):\n # your code here\n out = []\n for ele in lst:\n if not ele in out:\n out.append(ele)\n return out\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2446,"func_code":"def remove_extras(lst):\n newlist = []\n for i in lst:\n if i not in newlist:\n newlist.append(i)\n lst[:]= newlist\n return lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2447,"func_code":"def remove_extras(lst):\n # your code here\n out = []\n for ele in lst:\n if not ele in out:\n out.append(ele)\n return out\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2448,"func_code":"def remove_extras(lst):\n result = []\n for elem in lst:\n if elem not in result:\n result.append(elem)\n return result\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2449,"func_code":"def remove_extras(lst):\n result=[]\n for i in lst: \n if i not in result: \n result.append(i)\n else:\n continue\n return result \n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2450,"func_code":"def remove_extras(lst):\n\tnew_list = []\n\tfor x in lst:\n\t\tif x not in new_list:\n\t\t\tnew_list.append(x)\n\treturn new_list\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2451,"func_code":"def remove_extras(lst):\n lst1 = []\n for i in lst:\n if i not in lst1:\n lst1.append(i)\n return lst1\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2452,"func_code":"def remove_extras(lst):\n newlist = []\n for i in lst:\n if i in newlist:\n continue\n else:\n newlist += [i]\n return newlist\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2453,"func_code":"def remove_extras(lst):\n lst1 = []\n for i in lst:\n if i not in lst1:\n lst1.append(i)\n return lst1\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2454,"func_code":"def remove_extras(lst):\n newlist = []\n for i in lst:\n if i in newlist:\n continue\n else:\n newlist += [i]\n return newlist\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2455,"func_code":"def remove_extras(lst):\n new_lst = []\n for ele in lst:\n if ele not in new_lst:\n new_lst.append(ele)\n return new_lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2456,"func_code":"def remove_extras(lst):\n new_lst=[]\n for i in lst:\n if i not in new_lst:\n new_lst+=[i]\n return new_lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2457,"func_code":"def remove_extras(lst):\n if lst == []:\n return []\n seq = [lst[0],]\n for i in lst:\n if i not in seq:\n seq = seq + [i,]\n return seq\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2458,"func_code":"def remove_extras(lst):\n newlst = []\n for elem in lst:\n if elem not in newlst:\n newlst.append(elem)\n return newlst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2459,"func_code":"def remove_extras(lst):\n result = []\n for i in range(len(lst)):\n if lst[i] not in result:\n result += [lst[i],]\n continue\n return result\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2460,"func_code":"def remove_extras(lst):\n new_lst = []\n for i in lst:\n if i in new_lst:\n new_lst\n else:\n new_lst.append(i)\n return new_lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2461,"func_code":"def remove_extras(lst):\n listt = []\n for i in lst:\n if i in listt:\n continue\n else:\n listt += [i]\n return listt\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2462,"func_code":"def remove_extras(lst):\n new_lst=[]\n for i in lst:\n if i not in new_lst:\n new_lst+=[i]\n return new_lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2463,"func_code":"def remove_extras(lst):\n new_lst = []\n for i in lst:\n if i in new_lst:\n new_lst\n else:\n new_lst.append(i)\n return new_lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2464,"func_code":"def remove_extras(lst):\n result = []\n for ele in lst:\n if ele not in result:\n result.append(ele)\n return result\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2465,"func_code":"def remove_extras(lst):\n new_list = []\n for item in lst:\n if new_list.count(item) == 0:\n new_list.append(item)\n return new_list\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2466,"func_code":"\ndef remove_extras(lst):\n new = []\n for i in lst:\n if i not in new:\n new.append(i)\n return new\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2467,"func_code":"def remove_extras(lst):\n output = [] \n for i in lst:\n if i not in output:\n output.append(i)\n return output\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2468,"func_code":"def remove_extras(lst):\n answer = []\n for x in lst:\n if x not in answer:\n answer.append(x)\n return answer\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2469,"func_code":"def remove_extras(lst):\n my_lst = []\n for i in lst:\n if i not in my_lst:\n my_lst.append(i)\n return my_lst\n\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2470,"func_code":"def remove_extras(lst):\n newlst = []\n for i in lst:\n if i not in newlst:\n newlst.append(i)\n return newlst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2471,"func_code":"def remove_extras(lst):\n new_lst = []\n for i in range (len(lst)):\n if lst[i] not in new_lst:\n new_lst.append(lst[i])\n return new_lst\nprint(remove_extras([1,5,1,1,3,2]))\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2472,"func_code":"def remove_extras(lst):\n output = [] \n for i in lst:\n if i not in output:\n output.append(i)\n return output\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2473,"func_code":"def remove_extras(lst):\n if lst == []:\n return []\n seq = [lst[0],]\n for i in lst:\n if i not in seq:\n seq = seq + [i,]\n return seq\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2474,"func_code":"def remove_extras(lst):\n my_lst = []\n for i in lst:\n if i not in my_lst:\n my_lst.append(i)\n return my_lst\n\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2475,"func_code":"def remove_extras(lst):\n result = []\n for i in range(len(lst)):\n if lst[i] not in result:\n result += [lst[i],]\n continue\n return result\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2476,"func_code":"def remove_extras(lst):\n product = []\n for element in lst:\n if element in product:\n continue\n else:\n product = product + [element]\n return product\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2477,"func_code":"def remove_extras(lst):\n new = []\n for i in lst:\n if i not in new:\n new += [i]\n return new\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2478,"func_code":"def remove_extras(lst):\n product = []\n for element in lst:\n if element in product:\n continue\n else:\n product = product + [element]\n return product\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2479,"func_code":"def remove_extras(lst):\n new_lst = []\n for i in lst:\n new_lst.append(i)\n if new_lst.count(i) > 1:\n new_lst.pop()\n continue\n return new_lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2480,"func_code":"def remove_extras(lst):\n lst2=[]\n for i in lst:\n if i not in lst2:\n lst2+=[i]\n return lst2\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2481,"func_code":"def remove_extras(lst):\n new_lst = []\n for element in lst:\n if element in new_lst:\n continue\n else:\n new_lst += [element]\n return new_lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2482,"func_code":"\ndef remove_extras(lst):\n new = []\n for i in lst:\n if i not in new:\n new.append(i)\n return new\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2483,"func_code":"def remove_extras(seq):\n new_lst = []\n for i in seq:\n if i not in new_lst:\n new_lst.append(i)\n return new_lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2484,"func_code":"def remove_extras(lst):\n result = []\n for i in lst:\n if i not in result:\n result.append(i)\n return result\n pass\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2485,"func_code":"def remove_extras(lst):\n non_extra = ()\n count = 0\n for el in lst:\n if el not in non_extra:\n non_extra += (el,)\n else:\n continue \n lst = list(non_extra)\n return lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2486,"func_code":"def remove_extras(lst):\n new_lst = []\n for element in lst:\n if element in new_lst:\n continue\n else:\n new_lst += [element]\n return new_lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2487,"func_code":"def remove_extras(lst):\n new_lst = []\n for i in lst:\n if i not in new_lst:\n new_lst += [i,]\n return new_lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2488,"func_code":"def remove_extras(lst):\n answer = []\n for x in lst:\n if x not in answer:\n answer.append(x)\n return answer\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2489,"func_code":"def remove_extras(lst):\n lst_new = list()\n for i in lst:\n if (i in lst_new):\n continue\n else:\n lst_new.append(i)\n return lst_new\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2490,"func_code":"def remove_extras(lst):\n result = []\n for ele in lst:\n if ele not in result:\n result.append(ele)\n return result\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2491,"func_code":"def remove_extras(lst):\n lst_new = list()\n for i in lst:\n if (i in lst_new):\n continue\n else:\n lst_new.append(i)\n return lst_new\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2492,"func_code":"def remove_extras(lst):\n newlst = []\n for item in lst:\n if item not in newlst:\n newlst.append(item)\n return newlst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2493,"func_code":"\ndef remove_extras(lst):\n new = []\n for i in lst:\n if i not in new:\n new += [i]\n else:\n continue\n return new\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2494,"func_code":"def remove_extras(lst):\n \n new = []\n \n for i in lst:\n if i not in new:\n new = new + [i]\n return new\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2495,"func_code":"def remove_extras(lst):\n index = 0\n listNumber = []\n result = []\n for i in lst:\n listNumber.append(i)\n count = 0\n for j in listNumber:\n if i == j:\n count += 1\n if count <= 1:\n result.append(i)\n index += 1\n return result\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2496,"func_code":"def remove_extras(lst):\n new = []\n for el in lst:\n if el not in new:\n new += [el,]\n return new\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2497,"func_code":"def remove_extras(lst):\n result = []\n for i in lst:\n if i not in result:\n result = result + [i]\n return result\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2498,"func_code":"def remove_extras(lst):\n new_lst = []\n for i in lst:\n if i not in new_lst:\n new_lst.append(i)\n return new_lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2499,"func_code":"def remove_extras(lst):\n new_lst = []\n for i in lst:\n if i not in new_lst:\n new_lst += [i,]\n return new_lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2500,"func_code":"def remove_extras(lst):\n l=[]\n for i in lst:\n if i not in l:\n l.append(i)\n return l \n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2501,"func_code":"def remove_extras(lst):\n wo_extras = []\n for i in lst:\n if i in wo_extras:\n continue\n wo_extras.append(i)\n return wo_extras\n pass\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2502,"func_code":"def remove_extras(lst):\n new = []\n for i in lst:\n if i not in new:\n new += [i]\n return new\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2503,"func_code":"def remove_extras(lst):\n newlist = []\n for i in lst:\n if i not in newlist:\n newlist.append(i)\n return newlist\n \n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2504,"func_code":"def remove_extras(lst):\n new_lst = []\n for i in lst:\n if i in new_lst:\n new_lst = new_lst\n else:\n new_lst += [i]\n return new_lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2505,"func_code":"def remove_extras(lst):\n\ts = []\n\tfor i in lst:\n\t\tif i not in s:\n\t\t\ts.append(i)\n\treturn s\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2506,"func_code":"def remove_extras(lst):\n newlst = []\n for elem in lst:\n if elem not in newlst:\n newlst.append(elem)\n return newlst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2507,"func_code":"def remove_extras(lst):\n rem_lst=[]\n for i in lst:\n if rem_lst.count(i)==0:\n rem_lst+=[i]\n return rem_lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2508,"func_code":"def remove_extras(lst):\n\tcurrent = []\n\tfor i in lst:\n\t\tif i in current:\n\t\t\tcontinue\n\t\telse:\n\t\t\tcurrent.append(i)\n\treturn current\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2509,"func_code":"def remove_extras(lst):\n new_lst = [] \n for i in lst:\n if i not in new_lst:\n new_lst += [i,] \n return new_lst\n \n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2510,"func_code":"def remove_extras(lst):\n pst=[]\n for i in lst:\n if i not in pst:\n pst.extend([i])\n return pst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2511,"func_code":"def remove_extras(lst):\n newlist = []\n for i in lst:\n if i in newlist:\n continue\n else:\n newlist += [i]\n return newlist\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2512,"func_code":"def remove_extras(lst):\n newlst = []\n for i in lst:\n if i not in newlst:\n newlst.append(i)\n return newlst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2513,"func_code":"def remove_extras(lst):\n pst=[]\n for i in lst:\n if i not in pst:\n pst.extend([i])\n return pst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2514,"func_code":"def remove_extras(lst):\n rem_lst=[]\n for i in lst:\n if rem_lst.count(i)==0:\n rem_lst+=[i]\n return rem_lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2515,"func_code":"def remove_extras(lst):\n new_lst = [] \n for i in lst:\n if i not in new_lst:\n new_lst += [i,] \n return new_lst\n \n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2516,"func_code":"def remove_extras(lst):\n lst.reverse()\n for elem in lst:\n while elem in lst[lst.index(elem)+1:]:\n lst.remove(elem)\n #reversing list to remove elements from the back.. I think?\n lst.reverse()\n new_lst = lst.copy()\n return new_lst\n\n\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2517,"func_code":"def remove_extras(lst):\n new = []\n for i in lst:\n if i not in new:\n new += [i]\n return new\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2518,"func_code":"def remove_extras(lst):\n newlist = []\n for i in lst:\n if i not in newlist:\n newlist.append(i)\n return newlist\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2519,"func_code":"def remove_extras(lst):\n lsts = []\n for i in lst:\n if i not in lsts:\n lsts.append(i)\n return lsts\n\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2520,"func_code":"def remove_extras(lst):\n newlst = []\n for i in lst:\n if i not in newlst:\n newlst += [i]\n return newlst \n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2521,"func_code":"def remove_extras(lst):\n res= []\n for i in lst:\n if res.count(i) == 0:\n res = res + [i]\n else:\n res = res\n return res\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2522,"func_code":"def remove_extras(lst):\n lsts = []\n for i in lst:\n if i not in lsts:\n lsts.append(i)\n return lsts\n\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2523,"func_code":"def remove_extras(lst):\n t = []\n for n in lst:\n if t.count(n) == 0:\n t = t + [n,]\n return t\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2524,"func_code":"def remove_extras(lst):\n lst2 = []\n for i in lst:\n if i not in lst2:\n lst2.append(i)\n return lst2\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2525,"func_code":"def remove_extras(lst):\n if lst == []:\n return []\n else:\n lst1 = []\n for i in range(0,len(lst)):\n if lst[i] not in lst1:\n lst1 = lst1 + [lst[i]]\n return lst1\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2526,"func_code":"def remove_extras(lst):\n lst1=[]\n for i in range (len(lst)):\n if lst[i] not in lst1:\n lst1 += [lst[i]]\n return lst1\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2527,"func_code":"def remove_extras(lst):\n new = []\n for i in lst:\n if i not in new:\n new.append(i)\n return new\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2528,"func_code":"def remove_extras(lst):\n new_list =[]\n for i in lst:\n if i not in new_list:\n new_list.append(i)\n return new_list\n \n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2529,"func_code":"def remove_extras(lst):\n newlst = []\n for i in lst:\n if i not in newlst:\n newlst += [i]\n return newlst \n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2530,"func_code":"def remove_extras(lst):\n lsts = []\n for i in lst:\n if i not in lsts:\n lsts.append(i)\n lst = lsts\n return lst\n\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2531,"func_code":"def remove_extras(lst):\n lst1=[]\n for i in range (len(lst)):\n if lst[i] not in lst1:\n lst1 += [lst[i]]\n return lst1\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2532,"func_code":"def remove_extras(lst):\n new_lst = []\n for i in lst:\n if i not in new_lst:\n new_lst.append(i)\n return new_lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2533,"func_code":"\ndef remove_extras(lst):\n\ta = []\n\tfor i in lst:\n\t\tif i not in a:\n\t\t\ta += [i,]\n\treturn a\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2534,"func_code":"def remove_extras(lst):\n\tnew_lst = []\n\tfor element in lst:\n\t\tif (element in lst) and (element not in new_lst):\n\t\t\t\t\t new_lst.append(element)\n\t\telse:\n\t\t continue\n\treturn new_lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2535,"func_code":"def remove_extras(lst):\n if lst == []:\n return lst\n else:\n one = [lst[0],]\n for repeat in lst:\n if repeat not in one:\n one += [repeat,]\n return one\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2536,"func_code":"def remove_extras(lst):\n new_list =[]\n for i in lst:\n if i not in new_list:\n new_list.append(i)\n return new_list\n \n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2537,"func_code":"def remove_extras(lst):\n # your code here\n n = 0\n a = lst\n while n < len(a):\n if a[n] in a[n+1:]:\n b = a[n+1:]\n b.remove(a[n])\n a = a[:n+1] + b\n else:\n n = n + 1\n return a\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2538,"func_code":"def remove_extras(lst):\n new_list = []\n if lst == []:\n return lst\n else:\n for i in lst:\n if i in new_list:\n continue\n else:\n new_list.append(i)\n return new_list\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2539,"func_code":"def remove_extras(lst):\n if lst == []:\n return []\n else:\n lst1 = []\n for i in range(0,len(lst)):\n if lst[i] not in lst1:\n lst1 = lst1 + [lst[i]]\n return lst1\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2540,"func_code":"def remove_extras(lst):\n new_lst = []\n for i in lst:\n if i not in new_lst:\n new_lst.append(i)\n return new_lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2541,"func_code":"def remove_extras(lst):\n new = []\n for i in lst:\n if i not in new: #if its already in new, it would skip the element and wont add into the new listt.\n new += [i, ]\n else:\n continue\n return new\n \n\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2542,"func_code":"def remove_extras(lst):\n result = []\n for i in lst:\n if i not in result:\n result += [i]\n return result\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2543,"func_code":"def remove_extras(lst):\n newlst = []\n for i in lst:\n if i in newlst:\n continue\n newlst.append(i)\n return newlst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2544,"func_code":"def remove_extras(lst):\n new_list = []\n for i in lst:\n if i not in new_list:\n new_list.append(i)\n return new_list\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2545,"func_code":"def remove_extras(lst):\n newlst = []\n [newlst.append(i) for i in lst if i not in newlst]\n return newlst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2546,"func_code":"def remove_extras(lst):\n new = []\n for i in range(len(lst)):\n if lst[i] not in new:\n new.append(lst[i])\n return new\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2547,"func_code":"def remove_extras(lst):\n a=[]\n for i in lst:\n if i not in a:\n a.append(i)\n return a\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2548,"func_code":"def remove_extras(lst):\n a = []\n for i in lst:\n if i not in a:\n a.append(i)\n return a\n \n\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2549,"func_code":"def remove_extras(lst):\n new_lst = []\n for num in lst:\n if num not in new_lst:\n new_lst.append(num)\n return new_lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2550,"func_code":"def remove_extras(lst):\n new_lst = []\n for num in lst:\n if num not in new_lst:\n new_lst.append(num)\n return new_lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2551,"func_code":"def remove_extras(lst):\n\tnew_lst = []\n\tfor i in lst:\n\t\tif i not in new_lst:\n\t\t\tnew_lst.append(i)\n\treturn new_lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2552,"func_code":"def remove_extras(lst):\n new = []\n for i in range(len(lst)):\n if lst[i] not in new:\n new.append(lst[i])\n return new\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2553,"func_code":"def remove_extras(lst):\n l=[]\n for i in lst:\n if i not in l:\n l.append(i)\n return l \n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2554,"func_code":"def remove_extras(lst):\n new_lst = []\n for num in lst:\n if num not in new_lst:\n new_lst.append(num)\n return new_lst\n \n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2555,"func_code":"def remove_extras(lst):\n newlst=[]\n for i in lst:\n while i not in newlst:\n newlst.append(i)\n return newlst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2556,"func_code":"def remove_extras(lst):\n\tnew_list = []\n\tfor x in lst:\n\t\tif x not in new_list:\n\t\t\tnew_list.append(x)\n\treturn new_list\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2557,"func_code":"def remove_extras(lst):\n list = []\n for element in lst:\n if element not in list: \n list.append(element)\n else:\n continue\n return list\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2558,"func_code":"def remove_extras(lst):\n if lst == []:\n return []\n else:\n a =[lst[0]]\n i = lst[0]\n for j in range (1,len(lst)): #while lst is not empty \n if i == lst[j]:\n continue\n else: \n a += [lst[j]]\n \n return a \n\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2559,"func_code":"def remove_extras(lst):\n removed = []\n for e in lst:\n if (e in lst) and (e not in removed):\n removed.append(e)\n return removed\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2560,"func_code":"def remove_extras(lst):\n new_lst = []\n for x in lst:\n if x not in new_lst:\n new_lst = new_lst + [x]\n else:\n continue\n return new_lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2561,"func_code":"def remove_extras(lst):\n new_lst = []\n for i in lst:\n if i not in new_lst:\n new_lst.append(i)\n return new_lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2562,"func_code":"def remove_extras(lst):\n\tproduct = []\n\tfor i in lst:\n\t\tif i not in product:\n\t\t\tproduct = product + [i]\n\treturn product\n \n \n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2563,"func_code":"def remove_extras(lst):\n new_list = []\n for number in lst:\n if number not in new_list:\n new_list.append(number)\n return new_list\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2564,"func_code":"def remove_extras(lst):\n new_list = []\n for x in lst:\n if (x in new_list) == False:\n new_list.append(x)\n return new_list\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2565,"func_code":"def remove_extras(lst):\n\n lst1=[]\n for i in lst:\n check=True\n for j in lst1:\n\n if j==i:\n check=False\n if check:\n lst1+=[i,]\n return lst1\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2566,"func_code":"def remove_extras(lst):\n product = []\n for i in lst:\n if i not in product:\n product.append(i)\n else:\n continue\n return product\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2567,"func_code":"def remove_extras(lst):\n new=[]\n for i in lst:\n if i not in new:\n new.append(i)\n return new\n pass\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2568,"func_code":"def remove_extras(lst):\n new_list = []\n for elem in lst:\n if elem not in new_list:\n new_list.append(elem)\n return new_list \n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2569,"func_code":"def remove_extras(lst):\n new_lst = []\n for i in lst:\n if i not in new_lst:\n new_lst.append(i)\n return new_lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2570,"func_code":"def remove_extras(lst):\n rev_lst=lst.copy()\n rev_lst.reverse()\n ori_len=len(lst)\n new_lst=lst.copy()\n for i in range(ori_len):\n if rev_lst[i] in rev_lst[i+1:]:\n new_lst.pop(ori_len-i-1)\n return new_lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2571,"func_code":"def remove_extras(lst):\n product = []\n for i in lst:\n if i not in product:\n product.append(i)\n else:\n continue\n return product\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2572,"func_code":"def remove_extras(lst):\n # your code here\n n = 0\n a = lst\n while n < len(a):\n if a[n] in a[n+1:]:\n b = a[n+1:]\n b.remove(a[n])\n a = a[:n+1] + b\n else:\n n = n + 1\n return a\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2573,"func_code":"def remove_extras(lst):\n\n lst1=[]\n for i in lst:\n check=True\n for j in lst1:\n\n if j==i:\n check=False\n if check:\n lst1+=[i,]\n return lst1\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2574,"func_code":"def remove_extras(lst):\n lst1 = []\n for item in lst:\n if (item in lst1):\n continue\n else:\n lst1 += [item,]\n return lst1\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2575,"func_code":"def remove_extras(lst):\n new_list = []\n for item in lst:\n if item not in new_list:\n new_list.append(item)\n return new_list\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2576,"func_code":"def remove_extras(lst):\n rev_lst=lst.copy()\n rev_lst.reverse()\n ori_len=len(lst)\n new_lst=lst.copy()\n for i in range(ori_len):\n if rev_lst[i] in rev_lst[i+1:]:\n new_lst.pop(ori_len-i-1)\n return new_lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2577,"func_code":"\ndef remove_extras(lst):\n x = []\n for i in lst:\n if i not in x:\n x = x + [i,]\n else:\n continue\n return x\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2578,"func_code":"def remove_extras(lst):\n new_list = []\n for item in lst:\n if item not in new_list:\n new_list.append(item)\n return new_list\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2579,"func_code":"def remove_extras(lst):\n a=[]\n for i in lst:\n if i not in a:\n a.append(i)\n return a\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2580,"func_code":"def remove_extras(lst):\n new_lst = []\n for i in lst:\n if i not in new_lst:\n new_lst = new_lst + [i,]\n else:\n continue\n return new_lst\n \n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2581,"func_code":"def remove_extras(lst):\n new_list = []\n n = len(lst)\n for counter1 in range(n):\n if lst[counter1] not in new_list:\n new_list.append(lst[counter1])\n return new_list\n \n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2582,"func_code":"def remove_extras(lst):\n newseq = []\n for element in lst:\n if element not in newseq:\n newseq += [element]\n return newseq\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2583,"func_code":"def remove_extras(lst):\n new = []\n for x in lst:\n if x not in new:\n new += [x]\n return new\n \n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2584,"func_code":"def remove_extras(lst):\n result=[]\n for i in lst:\n if i in result:\n continue\n else:\n result+=[i,]\n return result\n pass\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2585,"func_code":"def remove_extras(lst):\n lst1 = []\n for item in lst:\n if (item in lst1):\n continue\n else:\n lst1 += [item,]\n return lst1\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2586,"func_code":"def remove_extras(lst):\n if lst==[]:\n return []\n new_lst=[lst[0]]\n for i in range(len(lst)):\n a=lst[i]\n for h in range(i,len(lst)):\n if a!=lst[h]:\n ele=lst[h]\n if ele in new_lst:\n continue\n new_lst.append(ele)\n return new_lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2587,"func_code":"def remove_extras(lst):\n for i in lst:\n n = lst.index(i)\n lst = lst[:n+1] + list(filter(lambda x: x!=i, lst[n+1:]))\n return lst\n \n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2588,"func_code":"def remove_extras(lst):\n lst.reverse()\n for elem in lst:\n while elem in lst[lst.index(elem)+1:]:\n lst.remove(elem)\n #print(lst)\n lst.reverse()\n return lst\n \n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2589,"func_code":"def remove_extras(lst):\n lst.reverse()\n for elem in lst:\n while elem in lst[lst.index(elem)+1:]:\n lst.remove(elem)\n #print(lst)\n lst.reverse()\n new_lst = lst.copy()\n return new_lst\n \n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2590,"func_code":"def remove_extras(lst):\n lst.reverse()\n for elem in lst:\n while elem in lst[lst.index(elem)+1:]:\n lst.remove(elem)\n #reversing list to remove elements from the back.. I think?\n lst.reverse()\n new_lst = lst.copy()\n return new_lst\n\n#Don't really understand the new list part. Does this mean they don't want me to modify\n#the list that was input? Will making a shallow copy at the end suffice?\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2591,"func_code":"def remove_extras(lst):\n result = []\n for i in lst:\n if i not in result:\n result = result + [i]\n return result\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2592,"func_code":"def remove_extras(lst):\n lst2 = []\n for i in lst:\n if i not in lst2:\n lst2.append(i)\n return lst2\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2593,"func_code":"def remove_extras(lst):\n n = 0\n while n < len(lst):\n if lst[n] in lst[n+1:]:\n ext = lst[n+1:]\n ext.remove(lst[n])\n lst = lst[:n+1] + ext\n else:\n n = n + 1\n return lst\n \n \n \n \n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2594,"func_code":"def remove_extras(lst):\n new_lst = []\n for x in lst:\n if x not in new_lst:\n new_lst = new_lst + [x]\n else:\n continue\n return new_lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2595,"func_code":"def remove_extras(lst):\n new_list = []\n for element in lst:\n if element in new_list:\n continue\n else:\n new_list.append(element)\n return new_list\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2596,"func_code":"def remove_extras(lst):\n i=0\n new = []\n while i<=len(lst)-1: \n curr = lst[i]\n new += [curr,]\n for ele in lst:\n if ele == curr:\n continue\n new += [ele,]\n lst = new.copy()\n new = []\n i +=1\n lst.reverse()\n return lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2597,"func_code":"def remove_extras(lst):\n \n def position(i,seq):\n n = len(seq)\n for j in range(n):\n if seq[j] == i:\n return j\n def helper(start,i):\n for k in lst[start:]:\n if k == i:\n n_pos = position(k,lst[start:])+ index +1\n print(k,n_pos)\n lst.pop(n_pos)\n for i in lst:\n index = position(i,lst)\n helper(index+1,i)\n\n return lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2598,"func_code":"def remove_extras(lst):\n\tnew = []\n\tfor element in lst:\n\t\tif element not in new:\n\t\t\tnew.append(element)\n\treturn new\n\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2599,"func_code":"def remove_extras(lst):\n list = []\n for element in lst:\n if element not in list: \n list.append(element)\n else:\n continue\n return list\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2600,"func_code":"def remove_extras(lst):\n new_list = []\n for element in lst:\n if element in new_list:\n continue\n else:\n new_list.append(element)\n return new_list\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2601,"func_code":"def remove_extras(lst):\n new_lst = []\n for i in lst:\n if i not in new_lst:\n new_lst.append(i)\n \n return new_lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2602,"func_code":"def remove_extras(lst):\n listt = []\n for i in lst:\n if i in listt:\n continue\n else:\n listt += [i]\n return listt\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2603,"func_code":"def remove_extras(lst):\n i=0\n new = []\n while i<=len(lst)-1: \n curr = lst[i]\n new += [curr,]\n for ele in lst:\n if ele == curr:\n continue\n new += [ele,]\n lst = new.copy()\n new = []\n i +=1\n lst.reverse()\n return lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2604,"func_code":"def remove_extras(lst):\n new_lst = []\n for num in lst:\n if num not in new_lst:\n new_lst += [num]\n return new_lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2605,"func_code":"def remove_extras(lst):\n new_lst = []\n for i in lst:\n if i not in new_lst:\n new_lst.append(i)\n \n return new_lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2606,"func_code":"def remove_extras(lst):\n #your code here\n result = []\n for entry in lst:\n if entry not in result:\n result = result + [entry]\n return result\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2607,"func_code":"def remove_extras(lst):\n\tnew = []\n\tfor i in lst:\n\t\tif i not in new:\n\t\t\tnew.append(i)\n\treturn new\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2608,"func_code":"def remove_extras(lst):\n new_lst = []\n for num in lst:\n if num not in new_lst:\n new_lst.append(num)\n return new_lst\n \n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2609,"func_code":"def remove_extras(lst):\n new = []\n for i in lst:\n if i not in new:\n new.append(i)\n return new\n \n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2610,"func_code":"def remove_extras(lst):\n newseq = []\n for element in lst:\n if element not in newseq:\n newseq += [element]\n return newseq\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2611,"func_code":"def remove_extras(mylist):\n newlist=[]\n for i in mylist:\n if i not in newlist:\n newlist.append(i)\n return newlist\n\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2612,"func_code":"def remove_extras(lst):\n result = []\n for i in lst:\n if i not in result:\n result.append(i)\n else:\n continue\n return result\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2613,"func_code":"def remove_extras(lst):\n new_lst=[]\n for i in lst:\n if i not in new_lst:\n new_lst.append(i)\n return new_lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2614,"func_code":"def remove_extras(lst):\n if lst==[]:\n return []\n new_list=[lst[0]]\n for i in lst:\n if i in new_list:\n continue\n else:\n new_list.append(i)\n return new_list\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2615,"func_code":"def remove_extras(lst):\n new_lst = []\n for i in lst:\n if i not in new_lst:\n new_lst += [i,]\n return new_lst\n \n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2616,"func_code":"def remove_extras(lst):\n i=1\n if lst==[]: return lst\n \n while i!=len(lst):\n if lst[i] in lst[:i]:\n del lst[i]\n continue\n i+=1\n return lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2617,"func_code":"def remove_extras(lst):\n new_lst = []\n for i in range(len(lst)):\n if lst[i] not in new_lst:\n new_lst += [lst[i]]\n return new_lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2618,"func_code":"def remove_extras(lst):\n\ta = []\n\tfor i in lst:\n\t\ta = a+[i,]\n\t\tif a.count(i)>1:\n\t\t\ta.pop()\n\treturn a\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2619,"func_code":"def remove_extras(lst):\n new_lst = []\n for i in range(len(lst)):\n if lst[i] not in new_lst:\n new_lst += [lst[i]]\n return new_lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2620,"func_code":"def remove_extras(lst):\n new_lst = []\n for i in lst:\n if i not in new_lst:\n new_lst.append(i)\n return new_lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2621,"func_code":"def remove_extras(lst):\n newLst=[]\n for i in lst:\n if i not in newLst:\n newLst.append(i)\n else:\n continue\n return newLst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2622,"func_code":"def remove_extras(lst):\n new_list = []\n for number in lst:\n if number not in new_list:\n new_list.append(number)\n return new_list\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2623,"func_code":"def remove_extras(lst):\n newlist = []\n for element in lst:\n if newlist.count(element)==0:\n newlist.append(element)\n return newlist\n pass\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2624,"func_code":"def remove_extras(lst):\n newlist = []\n for element in lst:\n if newlist.count(element)==0:\n newlist.append(element)\n return newlist\n pass\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2625,"func_code":"def remove_extras(lst):\n new = []\n for ele in lst:\n if ele not in new:\n new = new + [ele,]\n return new# your code here\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2626,"func_code":"def remove_extras(lst):\n lst_new=[]\n l=len(lst)\n for i in range (l):\n if lst[i] in lst_new:\n continue\n else:\n lst_new.append(lst[i])\n return lst_new\n\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2627,"func_code":"def remove_extras(lst):\n a =[]\n for i in lst:\n if i not in a:\n a = a + [i,]\n else:\n continue\n return a\n pass\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2628,"func_code":"def remove_extras(lst):\n new = []\n for ele in lst:\n if ele not in new:\n new = new + [ele,]\n return new# your code here\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2629,"func_code":"def remove_extras(lst):\n new_lst = []\n added = set()\n for val in lst:\n if not val in added:\n new_lst.append(val)\n added.add(val)\n return new_lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2630,"func_code":"def remove_extras(lst):\n # your code here\n new_list = []\n for i in lst:\n if i not in new_list:\n new_list = new_list + [i]\n return new_list\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2631,"func_code":"def remove_extras(lst):\n # your code here\n new_list = []\n for i in lst:\n if i not in new_list:\n new_list = new_list + [i]\n return new_list\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2632,"func_code":"def remove_extras(lst):\n lst_new=[]\n l=len(lst)\n for i in range (l):\n if lst[i] in lst_new:\n continue\n else:\n lst_new.append(lst[i])\n return lst_new\n\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2633,"func_code":"def remove_extras(lst):\n new_lst = []\n added = set()\n for val in lst:\n if not val in added:\n new_lst.append(val)\n added.add(val)\n return new_lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2634,"func_code":"def remove_extras(lst):\n empty_list = []\n for i in lst:\n if i not in empty_list:\n empty_list += [i]\n return empty_list\n pass\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2635,"func_code":"def remove_extras(lst):\n\tnew_list = []\n\tfor i in lst:\n\t\tif i not in new_list:\n\t\t\tnew_list.append(i)\n\treturn new_list\n \n \n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2636,"func_code":"def remove_extras(lst):\n empty_list = []\n for i in lst:\n if i not in empty_list:\n empty_list += [i]\n return empty_list\n pass\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2637,"func_code":"def remove_extras(lst):\n\tif lst == []:\n\t\treturn []\n\telif lst[-1] in lst[:-1]:\n\t\treturn remove_extras(lst[:-1])\n\telse:\n\t\treturn remove_extras(lst[:-1]) + [lst[-1]]\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2638,"func_code":"from collections import OrderedDict\n\ndef remove_extras(lst):\n return list(OrderedDict.fromkeys(lst)) \n \n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2639,"func_code":"def remove_extras(lst):\n a=[]\n for i in lst:\n if i not in a:\n a+=[i]\n return a\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2640,"func_code":"def remove_extras(lst):\n a =[]\n for i in lst:\n if i not in a:\n a = a + [i,]\n else:\n continue\n return a\n pass\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2641,"func_code":"def remove_extras(lst):\n new_lst = []\n for i in range (len(lst)):\n if lst[i] not in new_lst:\n new_lst += [lst[i]]\n\n return new_lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2642,"func_code":"def remove_extras(lst):\n new_lst = []\n for i in range(len(lst)):\n\t if lst[i] not in new_lst:\n\t\t new_lst.append(lst[i])\n return new_lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2643,"func_code":"def remove_extras(lst):\n s = []\n for n in lst: \n if n not in s: \n s.append(n)\n return s \n \n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2644,"func_code":"def remove_extras(lst):\n\tre=()\n\tuni=[]\n\tfor ele in lst:\n\t\tif ele not in re:\n\t\t\tre+=(ele,)\n\t\t\tuni+=[ele]\n\t\telse:\n\t\t\tcontinue\n\treturn uni\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2645,"func_code":"def remove_extras(lst):\n lst.reverse()\n for element in lst:\n if lst.count(element) > 1:\n lst.remove(element)\n lst.reverse()\n return lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2646,"func_code":"def remove_extras(lst):\n new_list = []\n for elem in lst:\n if elem not in new_list:\n new_list.append(elem)\n return new_list \n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2647,"func_code":"def remove_extras(lst):\n lst.reverse()\n for element in lst:\n if lst.count(element) > 1:\n lst.remove(element)\n lst.reverse()\n return lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2648,"func_code":"from collections import OrderedDict\n\ndef remove_extras(lst):\n return list(OrderedDict.fromkeys(lst))\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2649,"func_code":"def remove_extras(lst):\n lst_new=[]\n for i in range (len(lst)):\n if lst[i] in lst_new:\n continue\n else:\n lst_new.append(lst[i])\n return lst_new\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2650,"func_code":"def remove_extras(lst):\n new_list = []\n for i in lst:\n if i not in new_list:\n new_list.append(i)\n return new_list\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2651,"func_code":"def remove_extras(lst):\n new_list = []\n for x in lst:\n if (x in new_list) == False:\n new_list.append(x)\n return new_list\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2652,"func_code":"def remove_extras(lst):\n lst2 = []\n for i in lst:\n if i not in lst2:\n lst2.append(i)\n return lst2\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2653,"func_code":"def remove_extras(lst):\n newlist = []\n for i in lst:\n if i not in newlist:\n newlist += i,\n return newlist\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2654,"func_code":"def remove_extras(lst):\n result = []\n for i in lst:\n if i in result:\n continue\n else:\n result.append(i)\n return result\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2655,"func_code":"def remove_extras(lst):\n result = []\n for i in lst:\n if i in result:\n continue\n else:\n result.append(i)\n return result\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2656,"func_code":"def remove_extras(lst):\n a = []\n for i in lst:\n if i not in a:\n a.append(i)\n return a\n pass\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2657,"func_code":"def remove_extras(lst):\n a = []\n for i in lst:\n if i not in a:\n a.append(i)\n return a\n pass\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2658,"func_code":"def remove_extras(lst):\n s = []\n for i in lst:\n if i not in s:\n s.append(i)\n return s\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2659,"func_code":"def remove_extras(lst):\n output = []\n for item in lst:\n if item not in output:\n output.append(item)\n return output\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2660,"func_code":"def remove_extras(lst):\n output = []\n for item in lst:\n if item not in output:\n output.append(item)\n return output\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2661,"func_code":"def remove_extras(lst):\n new = []\n for x in lst:\n if x not in new:\n new.append(x)\n return new\n \n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2662,"func_code":"def remove_extras(lst):\n result = []\n for i in lst:\n if i not in result:\n result.append(i)\n else:\n continue\n return result\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2663,"func_code":"def remove_extras(lst):\n if lst == []:\n return []\n else: \n result = [lst[0],]\n for e in lst:\n if e not in result:\n result.append(e)\n else:\n continue\n return result\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2664,"func_code":"def remove_extras(lst):\n newlist=[]\n for i in lst:\n if i not in newlist:\n newlist += [i,]\n return newlist\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2665,"func_code":"def remove_extras(lst):\n new_list = []\n for x in lst:\n if x not in new_list:\n new_list += [x]\n return new_list\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2666,"func_code":"def remove_extras(lst):\n newlst = []\n while len(lst) > 0:\n x = lst[0]\n newlst.append(x)\n lst.remove(x)\n while x in lst:\n lst.remove(x) \n return newlst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2667,"func_code":"def remove_extras(lst):\n output = [] \n for i in lst:\n if i not in output:\n output.append(i)\n return output\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2668,"func_code":"def remove_extras(lst):\n lst2 = []\n for x in lst:\n if x not in lst2:\n lst2.append(x)\n return lst2\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2669,"func_code":"def remove_extras(lst):\n lst2 = []\n for x in lst:\n if x not in lst2:\n lst2.append(x)\n return lst2\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2670,"func_code":"def remove_extras(lst):\n l = []\n for i in lst:\n if i not in l:\n l.append(i)\n return l\n \n \n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2671,"func_code":"def remove_extras(lst):\n newlst=[]\n for i in lst:\n if i not in newlst:\n newlst.append(i)\n return newlst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2672,"func_code":"def remove_extras(lst):\n newlst=[]\n for i in lst:\n if i not in newlst:\n newlst.append(i)\n return newlst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2673,"func_code":"def remove_extras(lst):\n new = []\n for i in lst:\n if i not in new:\n new.append(i)\n else:\n new = new\n return new\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2674,"func_code":"def remove_extras(lst):\n new = []\n for i in lst:\n if i not in new:\n new = new + [i,]\n else:\n new = new\n return new\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2675,"func_code":"def remove_extras(lst):\n new_lst = []\n for i in lst:\n if i not in new_lst:\n new_lst.append(i)\n return new_lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2676,"func_code":"def remove_extras(lst):\n new_list = []\n if lst == []:\n return lst\n else:\n for i in lst:\n if i in new_list:\n continue\n else:\n new_list.append(i)\n return new_list\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2677,"func_code":"def remove_extras(lst):\n newlist = []\n for number in lst:\n if number not in newlist:\n newlist.append(number)\n return newlist\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2678,"func_code":"def remove_extras(lst):\n new_list=[]\n for i in range(len(lst)):\n judge=0\n for j in range(i):\n if lst[i]==lst[j]:\n judge=1\n if judge==0:\n new_list+=[lst[i],]\n return new_list\n # your code here\n pass\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2679,"func_code":"def remove_extras(lst):\n new_list=[]\n for i in range(len(lst)):\n judge=0\n for j in range(i):\n if lst[i]==lst[j]:\n judge=1\n if judge==0:\n new_list+=[lst[i],]\n return new_list\n # your code here\n pass\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2680,"func_code":"def remove_extras(lst):\n l = []\n for i in lst:\n if i not in l:\n l.append(i)\n return l\n \n \n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2681,"func_code":"def remove_extras(lst):\n new_lst=[]\n for x in lst:\n if x in new_lst:\n new_lst=new_lst\n else:\n new_lst+=[x,]\n return new_lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2682,"func_code":"def remove_extras(lst):\n new_lst=[]\n for x in lst:\n if x in new_lst:\n new_lst=new_lst\n else:\n new_lst+=[x,]\n return new_lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2683,"func_code":"def remove_extras(lst):\n new = []\n if lst == []:\n return lst \n else:\n for i in lst:\n if i in new:\n continue \n else:\n new.append(i)\n return new\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2684,"func_code":"def remove_extras(lst):\n counter = 0\n while counter < len(lst):\n for i in lst[counter + 1:]:\n if lst[counter] == i:\n lst.reverse()\n lst.remove(i)\n lst.reverse()\n counter = counter + 1\n return lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2685,"func_code":"def remove_extras(lst):\n new_list=[]\n for element in lst:\n if not is_same(element,new_list):\n new_list.append(element)\n else:\n continue\n return new_list\n \ndef is_same(test,lst):\n for e in lst:\n if e == test:\n return True\n else:\n continue\n return False\n \n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2686,"func_code":"def remove_extras(lst):\n lst1 = []\n for i in lst:\n if i not in lst1:\n lst1.append(i)\n return lst1\n \n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2687,"func_code":"def remove_extras(lst):\n new_lst = []\n for ele in lst:\n if ele in new_lst:\n continue\n else:\n new_lst += [ele]\n return new_lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2688,"func_code":"def remove_extras(lst):\n keep = []\n for i in lst :\n if i not in keep :\n keep.append(i)\n return keep\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2689,"func_code":"def remove_extras(lst):\n new = []\n x = 0\n for x in range(len(lst)):\n if lst[x] not in new:\n new += [lst[x]]\n return new\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2690,"func_code":"def remove_extras(lst):\n counter = 0\n while counter < len(lst):\n for i in lst[counter + 1:]:\n if lst[counter] == i:\n lst.reverse()\n lst.remove(i)\n lst.reverse()\n counter = counter + 1\n return lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2691,"func_code":"def remove_extras(lst):\n a = []\n for i in lst:\n if i not in a:\n a.append(i)\n return a\n \n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2692,"func_code":"def remove_extras(lst):\n a=[]\n for i in lst:\n if i not in a:\n a.append(i)\n return a\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2693,"func_code":"def remove_extras(lst):\n output = [] \n for i in lst:\n if i not in output:\n output.append(i)\n return output\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2694,"func_code":"def remove_extras(lst):\n if lst != []:\n \n my_list = []\n\n \n for i in range(len(lst)):\n if lst[i] not in my_list:\n my_list.append(lst[i])\n return my_list\n else:\n return []\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2695,"func_code":"def remove_extras(lst):\n # your code here\n l=[]\n for i in lst:\n if i not in l:\n l.append(i)\n return l\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2696,"func_code":"def remove_extras(lst):\n # your code here\n l=[]\n for i in lst:\n if i not in l:\n l.append(i)\n return l\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2697,"func_code":"def remove_extras(lst):\n new = []\n for x in lst:\n if x not in new:\n new.append(x)\n return new\n \n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2698,"func_code":"def remove_extras(lst):\n new_lst=[]\n for x in lst:\n if x in new_lst:\n continue\n else:\n new_lst+=[x,]\n return new_lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2699,"func_code":"def remove_extras(lst):\n lst.reverse()\n for i in lst:\n n=len(lst)\n counter = 1\n number_of_appearance = 0\n while counter <= n:\n if i == lst[counter-1]:\n counter += 1\n number_of_appearance += 1\n else:\n counter += 1\n while number_of_appearance != 1:\n lst.remove(i)\n number_of_appearance -= 1\n lst.reverse()\n return lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2700,"func_code":"def remove_extras(lst):\n a = []\n for i in lst:\n if i in a:\n continue\n else:\n a.append(i)\n return a\n \n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2701,"func_code":"def remove_extras(lst):\n a = []\n for i in lst:\n if i in a:\n continue\n else:\n a.append(i)\n return a\n \n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2702,"func_code":"def remove_extras(lst):\n if lst != []:\n \n my_list = []\n\n \n for i in range(len(lst)):\n if lst[i] not in my_list:\n my_list.append(lst[i])\n return my_list\n else:\n return []\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2703,"func_code":"def remove_extras(lst):\n new = []\n for e in lst:\n if e not in new:\n new.append(e)\n return new\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2704,"func_code":"def remove_extras(lst):\n\ta = []\n\tfor i in lst:\n\t\tif i not in a:\n\t\t\ta.append(i)\n\treturn a\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2705,"func_code":"def remove_extras(lst):\n new_lst = []\n for i in lst:\n if i not in new_lst:\n new_lst.append(i)\n return new_lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2706,"func_code":"def remove_extras(lst):\n dic = {}\n for e in lst:\n if e not in dic:\n dic[e] = 0\n return list(dic.keys())\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2707,"func_code":"def remove_extras(lst):\n t=[]\n for i in lst:\n if i not in t:\n t.append(i)\n else:\n pass\n return t\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2708,"func_code":"def remove_extras(lst):\n new_lst = []\n for i in lst:\n if i not in new_lst:\n new_lst.append(i)\n else:\n continue\n return new_lst\n","correct":true,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2709,"func_code":"def remove_extras(lst):\n output = []\n for i in lst:\n if i in output:\n output.append(i)\n return output\n \n# Lines, 4 is wrong \n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2710,"func_code":"def remove_extras(lst):\n # your code here\n occurrences = ()\n new_lst = []\n for item in lst:\n if item not in occurrences:\n occurences += (item,)\n new_list.append(item)\n return new_lst\n \n# Line 7 is wrong \n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2711,"func_code":"def remove_extras(lst):\n # your code here\n occurrences = ()\n new_lst = []\n for item in lst:\n if item not in occurrences:\n occurrences += (item,)\n new_list.append(item)\n return new_lst\n \n# Line 7 is wrong \n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2712,"func_code":"def remove_extras(lst):\n # your code here\n occurrences = ()\n new_lst = []\n for item in lst:\n if item not in occurrences:\n occurrences += (item,)\n new_list.append(item)\n return new_lst\n \n# Line 7 is wrong \n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2713,"func_code":"def remove_extras(lst):\n length = len(lst)\n result = [lst[0]]\n for i in range(1,length):\n if lst[i] not in result:\n result = result + [lst[i]]\n return result\n \n# Line 6 is wrong \n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2714,"func_code":"def remove_extras(lst):\n new_list = []\n for number in list:\n if number not in new_list:\n new_list.append(number)\n return new_list\n \n# Line 3 is wrong \n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2715,"func_code":"def remove_extras(lst):\n lst1 = lst.reverse\n for i in lst:\n if lst.count(i) >1:\n lst1.remove(i) * (i-1)\n return lst1.reverse\n \n# This is totally wrong \n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2716,"func_code":"def remove_extras(lst):\n lst1 = lst.reverse\n for i in lst:\n if lst.count(i) >1:\n j = 0\n while j < i:\n lst1.remove(i)\n j += 1\n return lst1.reverse\n \n# This is totally wrong \n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2717,"func_code":"def remove_extras(lst):\n for i in range(lst):\n if lst[i] in lst[:i]+lst[i+1:]:\n lst.pop(i)\n return lst\n \n# Completley wrong \n \n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2718,"func_code":"def remove_extras(lst):\n for i in range(len(lst)):\n if lst[i] in lst[:i]+lst[i+1:]:\n lst.pop(i)\n return lst\n \n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2719,"func_code":"def remove_extras(lst):\n for i in range(len(lst)-1):\n if lst[i] in lst[:i]+lst[i+1:]:\n lst.pop(i)\n return lst\n \n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2720,"func_code":"def remove_extras(lst):\n result = []\n for i in lst and not result:\n result += result + i\n return result\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2721,"func_code":"def remove_extras(lst):\n result = []\n for i in lst:\n if i not in result:\n result += result + i\n return result\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2722,"func_code":"def remove_extras(lst):\n result = []\n for i in lst:\n if i not in result:\n result += result + list(i)\n return result\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2723,"func_code":"def remove_extras(lst):\n result = []\n for i in lst:\n if i not in result:\n result += result + [i]\n return result\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2724,"func_code":"def remove_extras(lst):\n lst.reverse()\n for i in lst:\n if lst.count(i) >1:\n j = 0\n while j < i:\n lst.remove(i)\n j += 1\n lst.reverse()\n return lst\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2725,"func_code":"def remove_extras(lst):\n for i in range(len(lst)):\n for j in range(j+1, len(lst)):\n if lst[j] == lst[i]:\n lst = lst[:j] + lst[j+1:]\n return lst\n \n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2726,"func_code":"def remove_extras(lst):\n for i in range(len(lst)):\n for j in range(i+1, len(lst)):\n if lst[j] == lst[i]:\n lst = lst[:j] + lst[j+1:]\n return lst\n \n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2727,"func_code":"def remove_extras(lst):\n i = 0\n while i < len(lst):\n for j in range(i+1,len(lst)):\n if lst[i] == lst[j]:\n lst = lst[:j] + lst[j+1:]\n i += 1\n return lst\n \n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2728,"func_code":"def remove_extras(lst):\n i = 0\n while i < len(lst):\n j = i + 1\n while j < len(lst):\n if lst[i] == lst[j]:\n lst = lst[:j] + lst[j+1:]\n j += 1\n return lst\n \n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2729,"func_code":"def remove_extras(lst):\n i = 0\n while i < len(lst):\n j = i + 1\n while j < len(lst):\n if lst[i] == lst[j]:\n lst = lst[:j] + lst[j+1:]\n j += 1\n i += 1\n return lst\n \n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2730,"func_code":"def remove_extras(lst):\n new_lst = []\n for element in lst:\n if element not in new_lst:\n new_lst.append(element)\n return new_list\n \n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2731,"func_code":"def remove_extras(lst):\n list1 = []\n for i in lst:\n if i not in list1:\n list1 += i\n return list1\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2732,"func_code":"def remove_extras(lst):\n return set(lst)\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2733,"func_code":"def remove_extras(lst):\n return list(set(lst))\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2734,"func_code":"def remove_extras(lst):\n result = []\n counter = 0\n while counter < len(lst):\n for i in lst[1:]:\n if lst[counter] == i:\n lst = lst.append(i)\n return lst\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2735,"func_code":"def remove_extras(lst):\n result = []\n counter = 0\n while counter < len(lst):\n for i in lst[1:]:\n if lst[counter] == i:\n lst = ((lst.reverse()).remove(i)).reverse()\n counter = counter + 1\n return lst\n \n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2736,"func_code":"def remove_extras(lst):\n store = []\n for ele in lst:\n if ele not in store:\n store += ele\n return store\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2737,"func_code":"def remove_extras(lst):\n for i in lst:\n remove_mutiple(i, lst)\n return lst\n \n \n\n \n \n \n \n \ndef remove_multiple(n, lst):\n if lst.count(n) == 1:\n return lst\n else:\n lst.reverse()\n lst.remove(n)\n lst.reverse()\n return remove_multiple(n, lst)\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2738,"func_code":"def remove_extras(lst):\n return set(lst)\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2739,"func_code":"def remove_extras(lst):\n return list(set(lst))\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2740,"func_code":"def remove_extras(lst):\n for i in lst:\n if i not in sumx:\n sumx.append(i)\n return sumx\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2741,"func_code":"def remove_extras(lst):\n new_lst = []\n for ele in lst:\n if not (ele in new_lst):\n new_lst += ele\n return new_lst\n \n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2742,"func_code":"def remove_extras(lst):\n new_lst = []\n for ele in lst:\n if not (ele in new_lst):\n new_lst.insert(len[new_lst]-1, ele)\n return new_lst\n \n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2743,"func_code":"def remove_extras(lst):\n new_lst = []\n for ele in lst:\n if not (ele in new_lst):\n new_lst.insert(0, ele)\n return new_lst\n \n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2744,"func_code":"def remove_extras(lst):\n output == []\n for entry in lst:\n if output.count[entry] == 0:\n output == output.append[entry]\n return output\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2745,"func_code":"def remove_extras(lst):\n output = []\n for entry in lst:\n if output.count[entry] == 0:\n output == output.append[entry]\n return output\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2746,"func_code":"def remove_extras(lst):\n new_lst=()\n for element in lst:\n if element not in new_lst:\n new_lst += (element,)\n return new_lst\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2747,"func_code":"def remove_extras(lst):\n return list(set(lst))\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2748,"func_code":"def remove_extras(lst):\n s = []\n for i in lst:\n if i not in lst:\n s.append(i)\n return s\n # your code here\n pass\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2749,"func_code":"def remove_extras(lst):\n return list(set(lst))\n # your code here\n pass\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2750,"func_code":"def remove_extras(lst):\n return list(set(lst))\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2751,"func_code":"def remove_extras(lst):\n return list(set(lst))\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2752,"func_code":"def remove_extras(lst):\n new_lst = []\n for i in lst:\n if i == lst[i+1]:\n continue\n else:\n new_list += i\n return new_lst\n \n \n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2753,"func_code":"def remove_extras(lst):\n return list(set(lst))\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2754,"func_code":"def remove_extras(lst):\n a = []\n for i in lst:\n if i not in a:\n a += i\n return a\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2755,"func_code":"def remove_extras(lst):\n new = ()\n for x in lst:\n if lst.count(x) > 1:\n new += []\n else:\n new += [x,]\n return new\n pass\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2756,"func_code":"def remove_extras(lst):\n new = []\n for x in lst:\n if lst.count(x) > 1:\n new += []\n else:\n new = new.append(x)\n return new\n pass\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2757,"func_code":"def remove_extras(lst):\n new = []\n for x in lst:\n if lst.count(x) > 1:\n new += []\n else:\n new += [x,]\n return new\n pass\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2758,"func_code":"def remove_extras(lst):\n lst.sort()\n store = []\n for ele in lst:\n if ele not in store:\n store += [ele]\n return store\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2759,"func_code":"def remove_extras(lst):\n i = -1\n while i > (-len(lst)):\n if lst[i] in lst[:i]:\n del lst[i]\n i = i + 1\n return lst\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2760,"func_code":"def remove_extras(lst):\n return list(set(lst))\n \n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2761,"func_code":"def remove_extras(lst):\n for num in lst:\n while lst.count(num)>1:\n lst.remove(num)\n return lst\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2762,"func_code":"def remove_extras(lst):\n new_lst = []\n for lst in new_lst:\n if i not in lst:\n new_lst += [i,]\n return new_lst \n pass\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2763,"func_code":"def remove_extras(lst):\n new_lst = []\n for new_lst in lst:\n if i not in lst:\n new_lst += [i,]\n return new_lst \n pass\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2764,"func_code":"def remove_extras(lst):\n new_lst = []\n for i in lst:\n if lst not in new_lst:\n new_lst += [i,]\n return new_lst \n pass\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2765,"func_code":"def remove_extras(lst):\n new_lst = []\n for i in lst:\n if lst not in new_lst:\n new_lst += [i,]\n return new_lst \n pass\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2766,"func_code":"from collections import OrderedDict\ndef remove_extras(lst):\n return (OrderedDict.fromkeys(lst))\n \n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2767,"func_code":"def remove_extras(lst):\n lst_final = []\n for i in lst:\n if i not in lst_final:\n lst_final = lst_final + i\n return lst_final\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2768,"func_code":"def remove_extras(lst):\n return list(set(lst))\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2769,"func_code":"def remove_extras(lst):\n o = []\n for i in lst:\n if i not in o:\n o.append(lst.pop(i))\n return o\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2770,"func_code":"def remove_extras(lst):\n o = []\n for i in lst:\n if i not in o:\n o.append(lst.remove(i))\n return o\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2771,"func_code":"def remove_extras(lst):\n o = []\n for i in lst:\n if i not in o:\n lst.remove(i)\n o.append(i)\n return o\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2772,"func_code":"def remove_extras(lst):\n new_lst = lst[0]\n for e in lst:\n if e in new_lst:\n continue\n else:\n new_lst.append(e)\n \n return new_lst\n \n \n \n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2773,"func_code":"def remove_extras(lst):\n new_lst = [lst[0],]\n for e in lst:\n if e in new_lst:\n continue\n else:\n new_lst.append(e)\n \n return new_lst\n \n \n \n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2774,"func_code":"def remove_extras(lst):\n result =[]\n for element in lst:\n if element not in result:\n result.append[element]\n return result \n \n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2775,"func_code":"def remove_extras(lst):\n return list(set(lst))\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2776,"func_code":"def remove_extras(lst):\n extra = []\n for i in lst:\n if i not in lst:\n continue\n else:\n extra += i\n return lst.remove(int(extra))\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2777,"func_code":"def remove_extras(lst):\n remove_lst = []\n for i in lst:\n if i not in lst:\n remove_lst.append(i)\n return remove_lst\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2778,"func_code":"def remove_extras(lst):\n #find the repeated index\n n = len(lst)\n for i in range(n):\n for j in range(n):\n if lst[i] == lst[j] and i != j:\n a = lst[:j]+lst[n-j:]\n else:\n continue\n return a\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2779,"func_code":"def remove_extras(lst):\n #find the repeated index\n n = len(lst)\n for i in range(n):\n for j in range(n):\n if lst[i] == lst[j] and i != j:\n a = lst[:j]+lst[n-j:]\n else:\n continue\n return a\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2780,"func_code":"def remove_extras(lst):\n newlst = []\n for i in lst:\n if i not in newlst:\n newlst = newlst.append(i)\n return newlst\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2781,"func_code":"def remove_extras(lst):\n return list(set(lst))\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2782,"func_code":"def remove_extras(lst):\n result = []\n for i in lst:\n if i not in result:\n result += i\n return result\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2783,"func_code":"def remove_extras(lst):\n lst.reverse()\n for element in lst:\n if lst.count(element)>1:\n lst.remove(element)\n return lst.reverse()\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2784,"func_code":"def remove_extras(list):\n list.reverse()\n for element in list:\n if list.count(element)>1:\n list.remove(element)\n return list.reverse()\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2785,"func_code":"def remove_extras(lst):\n newlst=[]\n for i in lst:\n if i not in newlst:\n newlst=newlst.append(i)\n return newlst\n # your code here\n pass\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2786,"func_code":"def remove_extras(lst):\n return list(set(lst))\n # your code here\n pass\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2787,"func_code":"def remove_extras(lst):\n for i in lst:\n result=lst.count(i)\n while result>1:\n lst.remove(i)\n result=result-1\n return lst \n \n \n \n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2788,"func_code":"def remove_extras(lst):\n new_lst = []\n for x in lst:\n if x not in new_lst:\n new_lst += [x]\n return lst\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2789,"func_code":"def remove_extras(lst):\n newlst=[]\n for i in lst:\n if i not in newlst:\n newlst=newlst.append(i)\n return newlst\n\n # your code here\n pass\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2790,"func_code":"def remove_extras(lst):\n new_lst = [lst[0]]\n for i in range(0,len(lst)):\n a=lst[i]\n for h in range(i,len(lst)):\n if a!=lst[h]:\n ele=lst[h]\n new_lst.append(ele) \n return new_lst\n return new_lst\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2791,"func_code":"def remove_extras(lst):\n list = []\n for i in lst:\n if i not in list:\n list += lst[0]\n return lst\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2792,"func_code":"def remove_extras(lst):\n if lst == []:\n return []\n elif lst[0] not in lst[1:]:\n return lst[0] + remove_extras(lst[1:])\n else:\n return remove_extras(lst[1:])\n \n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2793,"func_code":"def remove_extras(lst):\n if lst == []:\n return []\n elif lst[0] not in lst[1:]:\n return [lst[0],] + remove_extras(lst[1:])\n else:\n return remove_extras(lst[1:])\n \n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2794,"func_code":"def remove_extras(lst):\n result = ()\n for i in lst:\n if i not in result:\n result = result + (i,)\n else:\n continue\n return result\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2795,"func_code":"def remove_extras(lst):\n a = ()\n n = len(lst)\n for i in range(n):\n for j in range(i,n):\n if lst[i] == lst[j] and i != j:\n a += (lst[j],)\n else:\n continue\n c = a[:-1]\n b = lst[::-1]\n for i in range(len(c)):\n b.remove(c[i])\n d = b[::-1]\n return d\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2796,"func_code":"def remove_extras(lst):\n sub_list = []\n for elem in lst:\n if elem not in lst[lst.index(elem)+1:]:\n return lst\n elif elem in lst[lst.index(elem)+1:]:\n sub_list += lst[lst.index(elem)+1:]\n sub_list.remove(elem)\n return lst[:lst.index(elem)] + sub_list\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2797,"func_code":"def remove_extras(lst):\n sub_list = []\n for elem in lst:\n if elem not in lst[lst.index(elem)+1:]:\n return lst\n elif elem in lst[lst.index(elem)+1:]:\n sub_list += lst[lst.index(elem)+1:]\n sub_list.remove(elem)\n return lst[:lst.index(elem)] + sub_list\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2798,"func_code":"def remove_extras(lst):\n result=[]\n for i in lst:\n if i in lst[:i]:\n continue\n result+= [i]\n return result\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2799,"func_code":"def remove_extras(lst):\n result = []\n for item in lst:\n if item not in result:\n item += result\n return result\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2800,"func_code":"def remove_extras(lst):\n result = []\n for item in lst:\n if item not in result:\n result += item\n return result\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2801,"func_code":"def remove_extras(lst):\n sub_list = []\n for elem in lst:\n if elem not in lst[lst.index(elem)+1:]:\n return lst\n elif elem in lst[lst.index(elem)+1:]:\n sub_list += lst[lst.index(elem)+1:]\n while elem in sub_list:\n sub_list.remove(elem) \n return lst[:lst.index(elem)+1] + sub_list\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2802,"func_code":"def remove_extras(lst):\n new = []\n for i in lst:\n if i not in new:\n new += i\n else:\n continue\n return new\n \n\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2803,"func_code":"def remove_extras(values):\n output = []\n for value in values:\n if value not in seen:\n output.append(value)\n return output\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2804,"func_code":"def remove_extras(lst):\n result = []\n for i in lst:\n if i not in result:\n result = result + i\n return result\n \n \n # your code here\n pass\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2805,"func_code":"def remove_extras(lst):\n copy = lst.copy()\n for i in copy:\n if copy.count(i) > 1:\n left = lst[:copy.index(i)+1]\n right = lst[copy.index(i)+1:]\n right.remove(i)\n copy = left + right\n return copy\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2806,"func_code":"def remove_extras(lst):\n for element in lst:\n if element in lst.remove(element):\n lst = lst.remove(element)\n else:\n lst \n return lst\n \n pass\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2807,"func_code":"def remove_extras(lst):\n # your code here\n for item in st:\n while lst.count(item) != 1:\n lst.pop(item)\n return lst\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2808,"func_code":"def remove_extras(lst):\n # your code here\n lst.reverse()\n for item in lst:\n while lst.count(item) != 1:\n lst.remove(item)\n print(lst)\n return lst\n\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2809,"func_code":"def remove_extras(lst):\n # your code here\n lst.reverse()\n for item in lst:\n while lst.count(item) != 1:\n lst.remove(item)\n\n return lst\n\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2810,"func_code":"def remove_extras(lst):\n # your code here\n lst.reverse()\n for item in lst:\n while lst.count(item) != 1:\n lst.remove(item)\n lst.reverse\n\n return lst\n\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2811,"func_code":"def remove_extras(lst):\n a = []\n for i in lst:\n if i not in a:\n a.append(i)\n return i\n \n\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2812,"func_code":"def remove_extras(lst):\n a = []\n for i in lst:\n if i not in a:\n a.append(i)\n return i\n \n\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2813,"func_code":"def remove_extras(lst):\n for k in range(len(lst)):\n if lst[k] in lst[:k]:\n return lst.remove(lst[k])\n else:\n return lst\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2814,"func_code":"def remove_extras(lst):\n # your code here\n result = (lst[0],)\n count = 0\n for item in lst[1:]:\n if item == result[count]:\n count += 1\n else:\n result +=(item,)\n count +=1\n return result\n \n \n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2815,"func_code":"def remove_extras(lst):\n # your code here\n result = (lst[0],)\n for item in lst[1:]:\n if item in result:\n continue\n else:\n result +=(item,)\n return result\n \n \n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2816,"func_code":"def remove_extras(lst):\n # your code here\n result = (lst[0],)\n for item in lst[1:]:\n if item in result:\n continue\n else:\n result +=(item,)\n return list(result)\n \n \n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2817,"func_code":"def remove_extras(lst):\n for k in range(len(lst)):\n if lst[k] in lst[:k]:\n return lst[:k] + lst[k+1:]\n else:\n return lst\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2818,"func_code":"def remove_extras(lst):\n for i in lst:\n if lst.count(i)>1:\n lst=lst.reverse()\n lst=lst.remove(i)\n lst=lst.reverse\n return lst\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2819,"func_code":"def remove_extras(lst):\n final=[]\n for x in lst:\n if x !=final:\n final.append(x)\n return final\n pass\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2820,"func_code":"def remove_extras(lst):\n answer = []\n for i in lst:\n for a in answer:\n if i == a:\n break\n answer += i\n return answer\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2821,"func_code":"def remove_extras(lst):\n compare = lst[0]\n for element in lst[1:]:\n if element == compare:\n lst.remove(element)\n print(lst)\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2822,"func_code":"def remove_extras(lst):\n # your code here\n new_lst = []\n for i in lst:\n if i not in lst:\n new_lst += [i,]\n return new_lst\n \n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2823,"func_code":"def remove_extras(lst):\n # your code here\n return list(set(lst))\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2824,"func_code":"def remove_extras(lst):\n result=[]\n for i in lst: \n if i not in result: \n result=result+i\n return result \n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2825,"func_code":"def remove_extras(lst):\n newlist = []\n for i in lst:\n if i in newlist:\n continue\n else:\n newlist += i\n return newlist\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2826,"func_code":"def remove_extras(lst):\n new_lst = []\n for ele in lst:\n if ele not in new_list:\n new_lst += ele\n return new_lst\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2827,"func_code":"def remove_extras(lst):\n new_lst = []\n for ele in lst:\n if ele not in new_lst:\n new_lst += ele\n return new_lst\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2828,"func_code":"def remove_extras(lst):\n seq = (lst[0],)\n for i in lst:\n if i not in seq:\n seq = seq + (lst[i],)\n return seq\n pass\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2829,"func_code":"def remove_extras(lst):\n seq = (lst[0],)\n for i in lst:\n if i not in seq:\n seq = seq + (i,)\n return seq\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2830,"func_code":"def remove_extras(lst):\n seq = (lst[0],)\n for i in lst:\n if i not in seq:\n seq = seq + (i,)\n return seq\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2831,"func_code":"def remove_extras(lst):\n seq = (lst[0],)\n for i in lst:\n if i not in seq:\n seq = seq + (i,)\n return seq\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2832,"func_code":"def remove_extras(lst):\n\tseq = (lst[0],)\n\tfor i in lst:\n\t\tif i not in seq:\n\t\t\tseq = seq + (i,)\n\treturn seq\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2833,"func_code":"def remove_extras(lst):\n seq = (lst[0],)\n for i in lst:\n if i not in seq:\n seq = seq + (i,)\n return seq\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2834,"func_code":"def remove_extras(lst):\n seq = (lst[0],)\n for i in lst:\n if i not in seq:\n seq = seq + (i,)\n return seq\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2835,"func_code":"def remove_extras(lst):\n seq = [lst[0],]\n for i in lst:\n if i not in seq:\n seq = seq + [i,]\n return seq\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2836,"func_code":"def remove_extras(lst):\n i = -1\n while i > (-len(lst)):\n if lst[i] in lst[:i]:\n lst.pop[i]\n i = i + 1\n return lst\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2837,"func_code":"def remove_extras(lst):\n i = -1\n while i < (-len(lst)):\n if lst[i] in lst[:i]:\n lst.pop[i]\n i = i - 1\n return lst\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2838,"func_code":"def remove_extras(lst):\n i = -1\n while i < (-len(lst)):\n if lst[i] in lst[:i]:\n lst.pop[i]\n i = i - 1\n return lst\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2839,"func_code":"def remove_extras(lst):\n i = -1\n while i < (-len(lst)):\n if lst[i] in lst[:i]:\n lst.pop(i)\n i = i - 1\n return lst\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2840,"func_code":"def remove_extras(lst):\n i = -1\n while i > (-len(lst)):\n if lst[i] in lst[:i]:\n lst.pop(i)\n i = i - 1\n return lst\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2841,"func_code":"def remove_extras(lst):\n i = -1\n while i > (-len(lst)):\n if lst[i] in lst[:i]:\n lst.pop(i)\n i = i - 1\n return lst\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2842,"func_code":"def remove_extras(lst):\n i = -1\n while i >= (-len(lst)):\n if lst[i] in lst[:i]:\n lst.pop(i)\n i = i - 1\n return lst\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2843,"func_code":"def remove_extras(lst):\n i = -1\n while i >= (-len(lst)):\n if lst[i] in lst[:-1]:\n lst.pop(i)\n i = i - 1\n return lst\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2844,"func_code":"def remove_extras(lst):\n new_list = []\n for item in list:\n if new_list.count(item) == 0:\n new_list.append(item)\n return new_list\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2845,"func_code":"def remove_extras(lst):\n lst.reverse()\n if lst[0] in lst[1:]:\n lst.pop(0)\n lst.reverse()\n return lst\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2846,"func_code":"def remove_extras(lst):\n lst1 = []\n for i in range(len(lst)):\n if lst[i] in lst1:\n lst1.remove(lst[i])\n return lst1\n else:\n return []\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2847,"func_code":"def remove_extras(lst):\n lst1 = []\n for i in range(len(lst)):\n if lst[i] in lst1:\n lst1.remove(lst[i])\n return lst1\n else:\n return lst\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2848,"func_code":"def remove_extras(lst):\n my_lst = []\n for i in lst:\n if i not in my_lst:\n my_lst.append(i)\n return my_lst\n\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2849,"func_code":"def remove_extras(lst):\n result = []\n for i in range(len(lst)):\n if lst[i] not in result:\n result += lst[i]\n continue\n return result\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2850,"func_code":"def remove_extras(lst):\n for i in range (0, len(lst)):\n for j in range (i + 1, len(lst)):\n if lst[j] == lst[i]:\n lst.pop(j)\n print (lst)\n else:\n continue\n return remove_extras(lst)\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2851,"func_code":"def remove_extras(lst):\n for i in range (0, len(lst)):\n for j in range (i + 1, len(lst)):\n if lst[j] == lst[i]:\n lst.pop(j)\n return remove_extras(lst)\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2852,"func_code":"def remove_extras(lst):\n new_lst = []\n for i in lst:\n new_lst += new_lst.append(i)\n if new_lst.count(i) > 1:\n new_lst.pop\n return new_lst\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2853,"func_code":"def remove_extras(lst):\n new_lst = []\n for i in lst:\n new_lst.append(i)\n if new_lst.count(i) > 1:\n new_lst.pop\n return new_lst\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2854,"func_code":"def remove_extras(lst):\n new_lst = []\n for i in lst:\n new_lst.append(i)\n if new_lst.count(i) > 1:\n new_lst.pop\n continue\n return new_lst\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2855,"func_code":"def remove_extras(lst):\n for i in lst:\n if lst.count(i)>1:\n lst.remove(i)\n return lst\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2856,"func_code":"def remove_extras(lst):\n lst2=[]\n for i in lst:\n if i not in lst2:\n lst2+=i\n return lst2\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2857,"func_code":"def remove_extras(lst):\n result = []\n for i in lst:\n if i not in result:\n result.append[i]\n return result\n pass\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2858,"func_code":"def remove_extras(lst):\n for i in range(1,len(lst)):\n if i in lst[i:]:\n lst = lst.remove(i)\n return lst\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2859,"func_code":"def remove_extras(lst):\n result = []\n for ele in lst:\n if x not in result:\n result += x\n return result\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2860,"func_code":"def remove_extras(lst):\n result = []\n for ele in lst:\n if x not in result:\n result += x\n return result\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2861,"func_code":"def remove_extras(lst):\n result = []\n for ele in lst:\n if x not in result:\n result += x\n return result\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2862,"func_code":"def remove_extras(lst):\n result = []\n for ele in lst:\n if ele not in result:\n result += ele\n return result\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2863,"func_code":"def remove_extras(lst):\n result = []\n for ele in lst:\n if ele not in result:\n result += ele\n return result\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2864,"func_code":"def remove_extras(lst):\n new = []\n for i in lst:\n if i not in new:\n new += i\n else:\n continue\n return new\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2865,"func_code":"def remove_extras(lst):\n for i in lst:\n test_lst = lst.remove(i)\n if i not in test_lst:\n continue\n else:\n lst = lst.remove(i)\n return lst\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2866,"func_code":"def remove_extras(lst):\n new_lst = lst\n for i in lst:\n n = new_lst.count(i)\n while True:\n if n <= 1:\n break\n else:\n new_lst.remove(i)\n n -= 1\n return new_lst\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2867,"func_code":"def remove_extras(lst):\n newlist = []\n for i in lst:\n if i not in newlist:\n newlist.append(i)\n \n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2868,"func_code":"def remove_extras(lst):\n pst=[]\n for i in lst:\n if i not in pst:\n pst.extend(i)\n return pst\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2869,"func_code":"def remove_extras(lst):\n pst=[]\n for i in lst:\n if i not in pst:\n pst.extend(list(i))\n return pst\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2870,"func_code":"def remove_extras(lst):\n newlst = []\n for i in lst:\n if i not in lst:\n newlst.append(i)\n return newlst\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2871,"func_code":"def remove_extras(lst):\n new_lst = [] \n for i in lst:\n if i not in new_lst:\n new_lst += i \n return new_lst\n \n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2872,"func_code":"def remove_extras(lst):\n new = []\n for i in lst:\n if i not in new:\n new += i\n return new\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2873,"func_code":"def remove_extras(lst):\n i = 0\n while i < len(lst):\n if lst[0] in lst[1:]:\n lst.remove(lst[0])\n i = i + 1\n return lst\n\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2874,"func_code":"def remove_extras(lst):\n return set(lst)\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2875,"func_code":"def remove_extras(lst):\n newlst = lst(0)\n for i in lst:\n if i not in newlst:\n newlst += [i]\n return newlst \n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2876,"func_code":"def remove_extras(lst):\n a = []\n for repeat in range(len(lst) + 1):\n if repeat != a:\n a += repeat\n return a\n \n \n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2877,"func_code":"def remove_extras(lst):\n a = []\n for repeat in range(len(lst) + 1):\n if repeat not in a:\n a += repeat\n return a\n \n \n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2878,"func_code":"def remove_extras(lst):\n a = []\n for repeat in range(len(lst) + 1):\n if repeat not in a:\n a += [repeat,]\n return a\n \n \n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2879,"func_code":"def remove_extras(lst):\n one = [lst[0],]\n for repeat in lst:\n if repeat not in one:\n one += [repeat,]\n return one\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2880,"func_code":"def remove_extras(lst):\n for i in range(len(lst)):\n for j in range(len(lst[1:])):\n if lst[i] == lst[j]:\n del lst[j]\n return lst\n \n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2881,"func_code":"def remove_extras(lst):\n for i in range(len(lst)-1):\n for j in range(i+1,len(lst[1:])):\n if lst[i] == lst[j]:\n del lst[j]\n return lst\n \n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2882,"func_code":"def remove_extras(lst):\n for i in range(len(lst)):\n print(lst[i:])\n print(lst[i:].count(lst[i]))\n if lst.count(lst[i]) > 1:\n element = lst[i]\n lst.reverse()\n lst.remove(element)\n lst.reverse()\n return lst\n \n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2883,"func_code":"def remove_extras(lst):\n for i in range(len(lst)):\n if lst[i] in lst[i+1:]:\n lst.pop(i)\n return lst\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2884,"func_code":"def remove_extras(lst):\n for i in range(len(lst)-1):\n if lst[i] in lst[i+1:]:\n lst.pop(i)\n return lst\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2885,"func_code":"def remove_extras(lst):\n # your code here\n n = 0\n while n < len(lst):\n lst = lst[n] + lst[n+1:].remove(lst[n])\n n = n + 1\n pass\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2886,"func_code":"def remove_extras(lst):\n # your code here\n n = 0\n while n < len(lst):\n lst = lst[n] + lst[n+1:].remove(lst[n])\n n = n + 1\n return lst\n pass\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2887,"func_code":"def remove_extras(lst):\n # your code here\n n = 0\n while n < len(lst):\n if lst[n] in lst[n+1:]:\n lst = lst[:n+1] + lst[n+1:].remove(lst[n])\n n = n + 1\n return lst\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2888,"func_code":"def remove_extras(lst):\n lst.sort()\n i=0 \n while i len(lst):\n return lst\n elif lst[count+1] == element:\n lst.remove(element)\n continue\n return lst\n \n \n \n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2920,"func_code":"def remove_extras(lst):\n \n def position(i):\n n = len(lst)\n for j in range(n):\n if lst[j] == i:\n return j\n def helper(start,i):\n for k in lst[start:]:\n if k == i:\n lst.remove(k)\n else:\n pass\n \n for i in lst:\n index = position(i)\n helper(index+1,i)\n return lst\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2921,"func_code":"def remove_extras(lst):\n new_list = []\n for element in lst:\n if element in new_list:\n continue\n else:\n new_list += new_list.append(element)\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2922,"func_code":"def remove_extras(lst):\n i=0\n while i 1:\n lst.pop(i)\n return lst\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2928,"func_code":"def remove_extras(lst):\n for i in lst:\n if lst.count(i) > 1:\n lst.remove(i)\n return lst\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2929,"func_code":"def remove_extras(lst):\n for i in range(len(lst)-1):\n if lst.count(lst[i]) > 1:\n lst.pop(i)\n return lst\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2930,"func_code":"def remove_extras(lst):\n new_lst = []\n for i in list:\n if i not in lst[i:]:\n new_lst = lst.append(i)\n return new_lst\n \n pass\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2931,"func_code":"def remove_extras(lst):\n new_lst = []\n for i in list:\n if i not in lst[i:]:\n new_lst = new_lst.append(i)\n return new_lst\n \n pass\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2932,"func_code":"def remove_extras(lst):\n for i in range(0, len(lst)-1):\n if lst.count(lst[i]) > 1:\n lst.pop(i)\n return lst\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2933,"func_code":"def remove_extras(lst):\n for i in range(0, len(lst)-1):\n num = lst[i]\n if lst.count(num) > 1:\n lst.pop(i)\n return lst\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2934,"func_code":"def remove_extras(lst):\n for i in range(0, len(lst)-2):\n num = lst[i]\n if lst.count(num) > 1:\n lst.pop(i)\n return lst\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2935,"func_code":"def remove_extras(lst):\n for i in lst:\n if lst.count(i) > 1:\n lst.remove(i)\n return lst\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2936,"func_code":"def remove_extras(lst):\n for i in lst:\n if lst.count(i) > 1:\n lst.reverse.remove(i).reverse\n return lst\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2937,"func_code":"def remove_extras(lst):\n for i in lst:\n if lst.count(i) > 1:\n ((lst.reverse()).remove(i)).reverse\n return lst\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2938,"func_code":"def remove_extras(lst):\n new_lst = []\n for i in lst:\n if i not in lst[i:]:\n new_lst = new_lst.append(i)\n return new_lst\n \n pass\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2939,"func_code":"def remove_extras(lst):\n lst = []\n for i in lst:\n if lst.count(i) == 1:\n lst += i\n \n return lst\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2940,"func_code":"def remove_extras(lst):\n new_lst = []\n for i in lst:\n if lst.count(i) == 1:\n lst.append(i)\n return neW_lst\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2941,"func_code":"def remove_extras(lst):\n new_lst = []\n for i in lst:\n if lst.count(i) == 1:\n lst.append(i)\n return new_lst\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2942,"func_code":"def remove_extras(lst):\n new_lst = []\n for i in lst:\n if lst.count(i) == 1:\n new_lst.append(i)\n return new_lst\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2943,"func_code":"def remove_extras(lst):\n newseq = []\n for element in lst:\n if element not in newseq:\n newseq += [n]\n return newseq\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2944,"func_code":"def remove_extras(lst):\n l=len(lst)\n for i in l:\n for j in range(i+1,l):\n if lst[i]==lst[j]:\n del lst[j]\n return lst\n \n # your code here\n pass\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2945,"func_code":"def remove_extras(lst):\n l=len(lst)\n for i in l:\n for j in range(i+1,l):\n if lst[i]==lst[j]:\n del lst[j]\n return lst\n\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2946,"func_code":"def remove_extras(lst):\n l=len(lst)\n for i in range(l):\n for j in range(i+1,l):\n if lst[i]==lst[j]:\n del lst[j]\n return lst\n\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2947,"func_code":"def remove_extras(lst):\n l=len(lst)\n for i in range(l-1):\n for j in range(i+1,l):\n if lst[i]==lst[j]:\n del lst[j]\n return lst\n\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2948,"func_code":"def remove_extras(mylist):\n for i in mylist:\n if i not in newlist:\n newlist.append(i)\n return newlist\n\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2949,"func_code":"def remove_extras(lst):\n new_lst = []\n if lst == []:\n return new_lst\n elif lst[0] not in lst:\n new_lst += lst[0] + remove_extras(lst[1:])\n else:\n new_lst += remove_extras(lst[1:])\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2950,"func_code":"def remove_extras(lst):\n new_list=[lst[0]]\n for i in lst:\n if i in new_list == True:\n continue\n else:\n new_list.append(i)\n return new_list\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2951,"func_code":"def remove_extras(lst):\n new_list=[list[0]]\n for i in lst:\n if i in new_list:\n continue\n else:\n new_list.append(i)\n return new_list\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2952,"func_code":"def remove_extras(lst):\n new_list=[lst[0]]\n for i in lst:\n if i in new_list:\n continue\n else:\n new_list.append(i)\n return new_list\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2953,"func_code":"def remove_extras(lst):\n i=1\n while True:\n if lst[i] in lst[:i]:\n del lst[i]\n continue\n \n if lst[i]==lst[-1]:\n break\n i=i+1\n return lst\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2954,"func_code":"def remove_extras(lst):\n i=1\n while i!=len(lst):\n if lst[i] in lst[:i]:\n del lst[i]\n continue\n i+=1\n return lst\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2955,"func_code":"def remove_extras(lst):\n new_lst = []\n for i in range(len(lst)):\n if lst[i] != new_lst:\n new_lst += lst[i]\n return new_lst\n \n # your code here\n pass\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2956,"func_code":"def remove_extras(lst):\n newLst=[]\n hashtable=[]\n for i in lst:\n if hashtable[lst[i]]!=1:\n hasttable[lst[i]]=1\n newLst.append(lst[i])\n \n \n return newLst\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2957,"func_code":"def remove_extras(lst):\n new_list = []\n for number in list:\n if number not in new_list:\n new_list.append(number)\n return new_list\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2958,"func_code":"def remove_extras(lst):\n newlist = []\n for element in lst:\n if newlist.count(element)==0:\n newlist += element\n return newlist\n pass\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2959,"func_code":"def remove_extras(lst):\n \n result = lst\n for i in result:\n \n if lst.count(i) > 1:\n result.remove(i)\n continue\n \n\n \n return result\n pass\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2960,"func_code":"def remove_extras(lst):\n new = []\n for ele in lst:\n if ele not in lst:\n new = new + [ele,]\n return new# your code here\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2961,"func_code":"def remove_extras(lst):\n # your code here\n new_list = []\n for i in lst:\n if i not in new_list:\n new_list = new_list + i\n return new_list\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2962,"func_code":"def remove_extras(lst):\n new_lst = []\n if lst == []:\n return new_lst\n elif lst[0] in new_lst:\n return new_lst + remove_extras(lst[1:])\n else:\n new_lst += [lst[0]]\n return new_lst + remove_extras(lst[1:])\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2963,"func_code":"from collections import OrderedDict\n\ndef remove_extras(lst):\n return lists(OrderedDict.fromkeys(lst)) \n \n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2964,"func_code":"def remove_extras(lst):\n new_list = []\n for elem in lst:\n if elem not in new_list:\n new_list += new_list.append(elem)\n return new_list \n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2965,"func_code":"def remove_extras(lst):\n new_list = []\n for elem in lst:\n if elem not in new_list:\n new_list = new_list.append(elem)\n return new_list \n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2966,"func_code":"def remove_extras(lst):\n lst.sort()\n i = len(lst)-1\n while i > 0: \n if lst[i] == lst[i - 1]:\n lst.pop(i)\n i=i-1\n return lst\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2967,"func_code":"def remove_extras(lst):\n new_list = []\n for number in list:\n if number not in new_list:\n new_list.append(number)\n return new_list\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2968,"func_code":"def remove_extras(lst):\n for element in lst:\n if count(element) > 1:\n lst.remove(element)\n return lst\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2969,"func_code":"def remove_extras(lst):\n lst.sort()\n i = len(lst)-1\n while i > 0: \n if lst[i] == lst[i - 1]:\n lst.pop(i)\n i=i-1\n return lst\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2970,"func_code":"def remove_extras(lst):\n for element in lst:\n if lst.count(element) > 1:\n lst.remove(element)\n return lst\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2971,"func_code":"def remove_extras(lst):\n lst.sort()\n i = len(lst)-1\n while i > 0: \n if lst[i]==lst[i - 1]:\n lst.pop(i)\n i-=1\n return lst\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2972,"func_code":"def remove_extras(lst):\n return list(set(lst))\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2973,"func_code":"def remove_extras(lst):\n listt = lst.reverse()\n for element in listt:\n if listt.count(element) > 1:\n listt.remove(element)\n return listt.reverse()\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2974,"func_code":"def remove_extras(lst):\n listt = lst.copy()\n listtt = listt.reverse()\n for element in listtt:\n if listtt.count(element) > 1:\n listtt.remove(element)\n return listtt.reverse()\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2975,"func_code":"def remove_extras(lst):\n lst = list(seq)\n if len(lst) >= abs(index):\n del lst[index]\n return tuple(lst)\n else:\n return seq\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2976,"func_code":"def remove_extras(lst):\n return list(OrderedDict.fromkeys(lst))\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2977,"func_code":"def remove_extras(lst):\n return list(OrderedDict.fromkeys(lst))\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2978,"func_code":"def remove_extras(lst):\n newlist = []\n for i in list:\n if i not in list:\n newlist += i,\n return newlist\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2979,"func_code":"def remove_extras(lst):\n s = []\n for i in lst:\n if i not in s:\n s.append(i)\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2980,"func_code":"def remove_extras(lst):\n result = lst[0]\n for e in lst:\n if e not in result:\n result += (e,)\n return result\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2981,"func_code":"def remove_extras(lst):\n result = lst[0]\n for e in lst:\n if e not in result:\n result += (e,)\n else:\n continue\n return result\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2982,"func_code":"def remove_extras(lst):\n result = lst[0]\n for e in lst:\n if e not in result:\n result.add(e)\n else:\n continue\n return result\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2983,"func_code":"def remove_extras(lst):\n result = lst[0]\n for e in lst:\n if e not in result:\n result.append(e)\n else:\n continue\n return result\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2984,"func_code":"def remove_extras(lst):\n result = [lst[0],]\n for e in lst:\n if e not in result:\n result.append(e)\n else:\n continue\n return result\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2985,"func_code":"def remove_extras(lst):\n if lst == []:\n return None\n else: \n result = [lst[0],]\n for e in lst:\n if e not in result:\n result.append(e)\n else:\n continue\n return result\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2986,"func_code":"def remove_extras(lst):\n if lst == []:\n return None\n else: \n result = [lst[0],]\n for e in lst:\n if e not in result:\n result.append(e)\n else:\n continue\n return result\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2987,"func_code":"def remove_extras(lst):\n new_list = ()\n for x in lst:\n if x not in new_list:\n new_list += (x)\n return new_list\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2988,"func_code":"def remove_extras(lst):\n new_list = ()\n for x in lst:\n if x not in new_list:\n new_list.append(x)\n return new_list\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2989,"func_code":"def remove_extras(lst):\n new_list = ()\n for x in lst:\n if x not in new_list:\n new_list += ((x))\n return new_list\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2990,"func_code":"def remove_extras(lst):\n new_list = ()\n for x in lst:\n if x not in new_list:\n new_list += x\n return new_list\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2991,"func_code":"def remove_extras(lst):\n return set(lst)\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2992,"func_code":"def remove_extras(lst):\n for x in range(len(lst)):\n if lst[x] in lst[:x] or lst[x] in ls[x+1:]:\n lst.remove(lst[x])\n return lst\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2993,"func_code":"def remove_extras(lst):\n lst2 = []\n for x in lst:\n if lst.count(x) < 1:\n lst2.append(x)\n return lst2\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2994,"func_code":"def remove_extras(lst):\n for element in lst:\n while lst.count(element) > 1:\n lst.remove(element)\n if lst.count(element) == 1:\n break\n return lst\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2995,"func_code":"def remove_extras(lst):\n for element in lst:\n while lst.count(element) > 1:\n lst.remove(element)\n if lst.count(element) == 1:\n break\n return lst\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2996,"func_code":"def remove_extras(lst):\n new = []\n for i in lst:\n for j in i:\n if j != i:\n new.append(j)\n return new\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2997,"func_code":"def remove_extras(lst):\n new_list=[]\n for i in range(len(lst)):\n judge=0\n for j in range(i):\n if lst[i]==lst[j]:\n judge=1\n if judge==0:\n new_list+=[lst[i],]\n return new_lst\n # your code here\n pass\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2998,"func_code":"def remove_extras(lst):\n new_list=[]\n for e in lst:\n if not is_same(element,new_list):\n new_list.append(element)\n else:\n continue\n return new_list\n \ndef is_same(test,lst):\n for e in lst:\n if e == test:\n return True\n else:\n continue\n return False\n \n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":2999,"func_code":"def remove_extras(lst):\n lst1 = []\n for i in lst:\n if i not in newlist:\n lst1.append(i)\n return lst1\n \n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":3000,"func_code":"def remove_extras(lst):\n keep = []\n remove = []\n for i in lst :\n if i not in keep :\n keep.append(i)\n else :\n remove.append(i)\n for i in remove :\n lst.remove(i)\n return lst\n \n pass\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":3001,"func_code":"def remove_extras(lst):\n keep = []\n remove = []\n for i in lst :\n if i not in keep :\n keep.append(i)\n elif i in keep :\n remove.append(i)\n for i in remove :\n lst.remove(i)\n return lst\n \n pass\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":3002,"func_code":"def remove_extras(lst):\n keep = []\n destroy = []\n for i in lst :\n if i not in keep :\n keep.append(i)\n elif i in keep :\n destroy.append(i)\n for i in destroy :\n lst.remove(i)\n return lst\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":3003,"func_code":"def remove_extras(lst):\n keep = []\n for i in lst :\n if i not in keep :\n keep.append(i)\n return lst\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":3004,"func_code":"def remove_extras(lst):\n new = []\n x = 0\n while x < len(lst)+1:\n if lst[x] in new:\n new += lst[x]\n else:\n continue\n return new\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":3005,"func_code":"def remove_extras(lst):\n new = []\n x = 0\n while x < len(lst)+1:\n if lst[x] in new:\n new += [lst[x]]\n else:\n continue\n return new\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":3006,"func_code":"def remove_extras(lst):\n new = []\n x = 0\n for x in range(len(lst)):\n if lst[x] in new:\n new += [lst[x]]\n else:\n continue\n return new\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":3007,"func_code":"def remove_extras(lst):\n a=[]\n for i in lst:\n if i not in a:\n a+=i\n return a\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":3008,"func_code":"def remove_extras(lst):\n new = []\n for x in lst:\n if x not in new:\n new.append(x)\n return x\n \n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":3009,"func_code":"def remove_extras(lst):\n n=len(lst)\n for i in lst:\n counter = 1\n number_of_appearance = 0\n while counter <= n:\n if i == lst[counter-1]:\n counter += 1\n number_of_appearance += 1\n else:\n counter += 1\n while number_of_appearance != 1:\n lst.remove(i)\n number_of_appearance -= 1\n return lst\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":3010,"func_code":"def remove_extras(lst):\n return list(set(lst))\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":3011,"func_code":"def remove_extras(lst):\n a = []\n for i in lst:\n if i in a:\n continue\n a.extend(i)\n return a\n \n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":3012,"func_code":"def remove_extras(lst):\n a = []\n for i in lst:\n if i in a:\n continue\n else:\n a.extend(i)\n return a\n \n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":3013,"func_code":"def remove_extras(lst):\n new_lst = []\n for i in lst:\n if i not in new_lst:\n new_list.append(i)\n return new_lst\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":3014,"func_code":"def remove_extras(lst):\n return list(set(lst))\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":3015,"func_code":"def remove_extras(lst):\n t=[]\n for i in lst:\n if i not in t:\n t.append(i)\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":3016,"func_code":"def remove_extras(lst):\n t=[]\n for i in lst:\n if i not in t:\n t.append(i)\n else:\n return t\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":3017,"func_code":"def remove_extras(lst):\n result = []\n for i in lst and not result:\n result += result + i\n return result\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":3018,"func_code":"def remove_extras(lst):\n i = 0\n while i < len(lst):\n j = i + 1\n while j < len(lst):\n if lst[i] == lst[j]:\n lst = lst[:j] + lst[j+1:]\n j += 1\n return lst\n \n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":3019,"func_code":"def remove_extras(lst):\n i = 0\n while i < len(lst):\n j = i + 1\n while j < len(lst):\n if lst[i] == lst[j]:\n lst = lst[:j] + lst[j+1:]\n j += 1\n i += 1\n return lst\n \n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":3020,"func_code":"def remove_extras(lst):\n for i in lst:\n remove_mutiple(i, lst)\n return lst\n \n \n\n \n \n \n \n \ndef remove_multiple(n, lst):\n if lst.count(n) == 1:\n return lst\n else:\n lst.reverse()\n lst.remove(n)\n lst.reverse()\n return remove_multiple(n, lst)\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":3021,"func_code":"def remove_extras(lst):\n for i in lst:\n lst.remove(i)\n lst.remove(i)\n return lst\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":3022,"func_code":"def remove_extras(lst):\n count=0\n rev_lst=lst.reverse()\n ori_len=len(lst)\n for i in range(ori_len):\n if rev_lst[i] in rev_lst[i+1:]:\n lst.pop(ori_len-i-1)\n return lst\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":3023,"func_code":"def remove_extras(lst):\n i=1\n while True:\n if lst[i] in lst[:i]:\n del lst[i]\n continue\n \n if lst[i]==lst[-1]:\n break\n i=i+1\n return lst\n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":3024,"func_code":"def remove_extras(lst):\n new_list=[]\n for e in lst:\n if not is_same(element,new_list):\n new_list.append(element)\n else:\n continue\n return new_list\n \ndef is_same(test,lst):\n for e in lst:\n if e == test:\n return True\n else:\n continue\n return False\n \n","correct":false,"assignment_id":3,"func_name":"remove_extras","test":"from collections import OrderedDict\nassert remove_extras([1, 1, 1, 2, 3])==[1, 2, 3] and remove_extras([1, 5, 1, 1, 3, 2])==[1, 5, 3, 2] and remove_extras([])==[] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1] and remove_extras([3, 4, 5, 1, 3])==[3, 4, 5, 1]","description":"Task: Duplicate elimination\n\n\nWrite a function remove_extras(lst) that takes in a list and returns a new list with\nall repeated occurrences of any element removed. For example, remove_extras([5,\n2, 1, 2, 3]) returns the list [5, 2, 1, 3]."} {"submission_id":3025,"func_code":"def sort_age(lst):\n for i in range(0, len(lst)-1):\n for j in range(i+1, len(lst)):\n if lst[i][1] < lst[j][1]:\n tmp = lst[i]\n lst[i] = lst[j]\n lst[j] = tmp\n return lst","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3026,"func_code":"def sort_age(lst):\n output = []\n for i in range(len(lst)):\n largest = max(lst, key=lambda p: p[1])\n lst.remove(largest)\n output.append(largest)\n return output\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3027,"func_code":"def sort_age(lst):\n new = []\n while lst:\n largest = lst[0][1]\n for i in lst:\n if i[1] > largest:\n largest = i[1]\n for j in lst:\n if largest in j:\n lst.remove(j)\n new.append(j)\n return new\n\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3028,"func_code":"def sort_age(lst):\n newlist = []\n if lst == []:\n return [] \n for i in lst : \n if newlist == []:\n newlist = i \n elif i[1] > newlist[1] :\n newlist = i \n lst.remove(newlist)\n return [newlist] + sort_age(lst)\n \n pass\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3029,"func_code":"def sort_age(lst):\n new_lst = []\n while lst:\n oldest = lst[0]\n for i in range(len(lst)):\n if lst[i][1] > oldest[1]:\n oldest = lst[i]\n lst.remove(oldest)\n new_lst.append(oldest)\n return new_lst\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3030,"func_code":"def sort_age(lst):\n sort = []\n while lst:\n smallest = lst[0]\n for element in lst:\n if element[1] > smallest[1]:\n smallest = element\n lst.remove(smallest)\n sort.append(smallest)\n return sort\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3031,"func_code":"def sort_age(lst):\n result = []\n while lst !=[]:\n lowest = lst[0][1]\n index = 0\n for i in range(1,len(lst)):\n if lst[i][1], ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3032,"func_code":"def sort_age(lst):\n old_lst = lst\n new_lst = []\n while old_lst:\n largest = old_lst[0][1]\n remove = old_lst[0]\n for i in lst:\n if i[1] > largest:\n largest = i[1]\n remove = i\n old_lst.remove(remove)\n new_lst.append(remove)\n return new_lst\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3033,"func_code":"def sort_age(lst):\n sort = []\n while lst: \n biggest = lst[0]\n for element in lst:\n if element[1] > biggest[1]:\n biggest = element\n lst.remove(biggest)\n sort.append(biggest)\n return sort\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3034,"func_code":"def sort_age(lst):\n if len(lst) == 0:\n return []\n elif len(lst) == 1:\n return lst\n elif len(lst) == 2:\n if lst[0][1] >= lst[1][1]:\n return lst\n else:\n return [lst[1], lst[0]]\n else:\n if lst[0][1] >= lst[1][1]:\n list1, list2 = [lst[0]], [lst[1]]\n else:\n list1, list2 = [lst[1]], [lst[0]]\n for i in lst[2:]:\n if i[1] >= list1[0][1]:\n list1.append(i)\n else:\n list2.append(i)\n return sort_age(list1) + sort_age(list2)\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3035,"func_code":"def sort_age(lst):\n sort = []\n while lst:\n oldest = lst[0]\n for person in lst:\n if person[1] >= oldest[1]:\n oldest = person\n lst.remove(oldest)\n sort.append(oldest)\n return sort\n \n \n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3036,"func_code":"def sort_age(lst):\n answer = []\n while lst:\n largest = lst[0]\n for entry in lst:\n if entry[1] > largest[1]:\n largest = entry\n answer.append(largest)\n lst.remove(largest)\n return answer\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3037,"func_code":"def quicksort(lst, f):\n if len(lst) <= 1:\n return lst\n\n pivot_ind = len(lst)\/\/2\n pivot = lst[pivot_ind]\n\n flist, blist = [], []\n for i in range(len(lst)):\n if i == pivot_ind:\n continue\n if f(lst[i]) <= f(pivot):\n flist.append(lst[i])\n else:\n blist.append(lst[i])\n \n finalsort = quicksort(flist, f) + [pivot] + quicksort(blist, f)\n return finalsort\n\ndef sort_age(lst):\n return quicksort(lst, lambda x: x[1])[::-1]\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3038,"func_code":"def sort_age(lst):\n a=lst\n sort=[]\n while a:\n smallest=a[0]\n for element in a:\n if element[1], ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3039,"func_code":"def sort_age(lst):\n sort=[]\n while lst:\n biggest=lst[0]\n for element in lst:\n if element[1] > biggest[1]:\n biggest=element\n lst.remove(biggest)\n sort.append(biggest)\n return sort\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3040,"func_code":"def sort_age(lst):\n result = []\n while lst !=[]:\n lowest = lst[0][1]\n index = 0\n for i in range(1,len(lst)):\n if lst[i][1], ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3041,"func_code":"def sort_age(lst):\n if len(lst) == 0:\n return []\n elif len(lst) == 1:\n return lst\n elif len(lst) == 2:\n if lst[0][1] >= lst[1][1]:\n return lst\n else:\n return [lst[1], lst[0]]\n else:\n if lst[0][1] >= lst[1][1]:\n list1, list2 = [lst[0]], [lst[1]]\n else:\n list1, list2 = [lst[1]], [lst[0]]\n for i in lst[2:]:\n if i[1] >= list1[0][1]:\n list1.append(i)\n else:\n list2.append(i)\n return sort_age(list1) + sort_age(list2)\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3042,"func_code":"def sort_age(lst):\n if lst==[]:\n return []\n sort=[]\n while lst:\n largest = lst[0]\n for i in lst:\n if i[1] > largest[1]:\n largest = i\n lst.remove(largest)\n sort.append(largest)\n return sort\n pass\n\n\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3043,"func_code":"def sort_age(lst):\n if len(lst) == 0:\n return []\n elif len(lst) == 1:\n return lst\n else:\n mid = len(lst) \/\/ 2\n lst1 = sort_age(lst[:mid])\n lst2 = sort_age(lst[mid:])\n \n result = []\n while lst1 and lst2:\n if lst1[0][1] < lst2[0][1]:\n result.append(lst2.pop(0))\n else:\n result.append(lst1.pop(0))\n result.extend(lst1)\n result.extend(lst2)\n \n return result\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3044,"func_code":"def sort_age(lst):\n product = []\n while lst:\n largest = lst[0]\n for i in lst:\n if i[1]>largest[1]:\n largest = i\n lst.remove(largest)\n product.append(largest)\n return product\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3045,"func_code":"def sort_age(lst):\n for i in range(0,len(lst)):\n this=lst[i]\n j=0\n while jlst[j][1]:\n break\n j+=1\n del lst[i]\n lst.insert(j,this)\n return lst\n \n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3046,"func_code":"def sort_age(lst):\n sort = []\n \n while len(lst) > 0:\n largest = lst[0]\n for i in lst:\n if i[1] > largest[1]:\n largest = i\n \n lst.remove(largest)\n sort.append(largest)\n\n return sort\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3047,"func_code":"def sort_age(lst):\n result = []\n while lst:\n biggest = lst[0]\n for element in lst:\n if element[1] > biggest[1]:\n biggest = element\n lst.remove(biggest)\n result.append(biggest)\n return result\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3048,"func_code":"def sort_age(lst):\n newlst = []\n while lst:\n largest = lst[0]\n for el in lst:\n if el[1] > largest[1]:\n largest = el\n newlst.append(largest)\n lst.remove(largest) #when it repeats, largest will take on the new first element in lst\n return newlst\n \n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3049,"func_code":"def sort_age(lst):\n rslt=[]\n while lst:\n smallest=lst[0]\n for element in lst:\n if element[1]>smallest[1]:\n smallest=element\n lst.remove(smallest)\n rslt.append(smallest)\n return rslt\n \n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3050,"func_code":"def sort_age(lst):\n for i in range(len(lst)-1):\n for j in range(i+1, len(lst)):\n if lst[i][1] < lst[j][1]:\n lst[i], lst[j] = lst[j], lst[i]\n return lst\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3051,"func_code":"def sort_age(lst):\n sort = []\n while lst:\n oldest = lst[0]\n for person in lst:\n if person[1] >= oldest[1]:\n oldest = person\n lst.remove(oldest)\n sort.append(oldest)\n return sort\n \n \n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3052,"func_code":"def sort_age(lst):\n sort = []\n while lst:\n largest = lst[0]\n largestx = lst[0][1]\n for element in lst:\n if element[1] > largestx:\n largestx = element[1]\n largest = element\n lst.remove(largest)\n sort.append(largest)\n return sort\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3053,"func_code":"def sort_age(lst):\n result=[] \n while lst:\n biggest=lst[0][1]\n tuple_biggest=lst[0]\n for i in lst:\n if i[1]>biggest:\n biggest=i[1]\n tuple_biggest=i\n lst.remove(tuple_biggest)\n result.append(tuple_biggest)\n return result\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3054,"func_code":"def sort_age(lst):\n new_lst = []\n while lst:\n max_age = lst[0]\n for tpl in lst:\n if tpl[1] > max_age[1]:\n max_age = tpl\n new_lst.append(max_age)\n lst.remove(max_age)\n return new_lst\n \n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3055,"func_code":"def sort_age(lst):\n sorted1 = []\n while lst:\n largest = lst[0]\n for element in lst:\n if element[1] > largest[1]:\n largest = element\n lst.remove(largest)\n sorted1.append(largest)\n return sorted1\n \n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3056,"func_code":"def sort_age(lst):\n result = []\n while lst != []:\n largest_tup = lst[0]\n largest = lst[0][1]\n for i in lst:\n if i[1] > largest:\n largest_tup = i \n largest = i[1]\n lst.remove(largest_tup)\n result.append(largest_tup)\n return result\n \n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3057,"func_code":"def sort_age(lst):\n sort_list = []\n while lst: # a is not []\n biggest = lst[0]\n for element in lst:\n if element[1] > biggest[1]:\n biggest = element\n lst.remove(biggest)\n sort_list.append(biggest)\n return sort_list\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3058,"func_code":"def sort_age(lst):\n tmp = []\n ages = [x[1] for x in lst]\n while len(ages) > 0:\n age = max(ages)\n for x in lst:\n if x[1] == age:\n tmp.append(x)\n ages.remove(age)\n continue\n return tmp\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3059,"func_code":"def sort_age(lst):\n males, females = [], []\n for i in lst:\n if i[0] == \"M\":\n males = males + [lst[0],]\n elif i[0] == \"F\":\n females = females + [lst[0],]\n lst = lst[1:]\n return merge(merge_sort(males), merge_sort(females))\n \ndef merge(left, right):\n results = []\n while left and right:\n if left[0][1] > right[0][1]:\n results.append(left.pop(0))\n else:\n results.append(right.pop(0))\n results.extend(left)\n results.extend(right)\n return results\n\ndef merge_sort(lst):\n if len(lst) < 2:\n return lst\n mid = len(lst) \/\/ 2\n left = merge_sort(lst[:mid])\n right = merge_sort(lst[mid:])\n return merge(left, right)\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3060,"func_code":"def sort_age(lst):\n sort = []\n while lst:\n biggest = lst[0]\n for element in lst:\n if element[1] > biggest[1]:\n biggest = element\n lst.remove(biggest)\n sort.append(biggest)\n return sort\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3061,"func_code":"def sort_age(lst):\n new_lst = []\n while lst:\n max_age = lst[0]\n for tpl in lst:\n if tpl[1] > max_age[1]:\n max_age = tpl\n new_lst.append(max_age)\n lst.remove(max_age)\n return new_lst\n \n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3062,"func_code":"def sort_age(lst):\n new=[]\n while lst !=[]:\n big=lst[0]\n for i in lst:\n if i[1]>big[1]:\n big=i\n lst.remove(big)\n new.append(big)\n return new\n \n \n \n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3063,"func_code":"def sort_age(lst):\n sort = []\n while lst: \n biggest = lst[0][1]\n element=lst[0]\n for ele in lst:\n if ele[1] > biggest:\n biggest = ele[1]\n element=ele\n lst.remove(element)\n sort.append(element)\n return sort\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3064,"func_code":"def sort_age(lst):\n result = []\n while lst:\n heights= map(lambda x:x[1],lst)\n tall=max(heights)\n person=list(filter(lambda x:x[1]==tall,lst))\n result += person\n lst.remove(person[0])\n return result\n \n \n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3065,"func_code":"def sort_age(lst):\n for i in range(0,len(lst)):\n this=lst[i]\n j=0\n while jlst[j][1]:\n break\n j+=1\n del lst[i]\n lst.insert(j,this)\n return lst\n \n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3066,"func_code":"def sort_age(lst):\n result = []\n while lst != []:\n largest_tup = lst[0]\n largest = lst[0][1]\n for i in lst:\n if i[1] > largest:\n largest_tup = i \n largest = i[1]\n lst.remove(largest_tup)\n result.append(largest_tup)\n return result\n \n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3067,"func_code":"def sort_age(lst):\n old_lst = lst\n new_lst = []\n while old_lst:\n largest = old_lst[0][1]\n remove = old_lst[0]\n for i in lst:\n if i[1] > largest:\n largest = i[1]\n remove = i\n old_lst.remove(remove)\n new_lst.append(remove)\n return new_lst\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3068,"func_code":"def sort_age(lst):\n for i in range(len(lst)):\n position = i\n biggest = position\n for a in range(position, len(lst)):\n if lst[a][1] > lst[biggest][1]:\n biggest = a\n tmp = lst[position]\n lst[position] = lst[biggest]\n lst[biggest] = tmp\n return lst\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3069,"func_code":"def sort_age(lst):\n tmp = []\n ages = [x[1] for x in lst]\n while len(ages) > 0:\n age = max(ages)\n for x in lst:\n if x[1] == age:\n tmp.append(x)\n ages.remove(age)\n continue\n return tmp\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3070,"func_code":"def sort_age(lst):\n sort = []\n while lst: \n biggest = lst[0][1]\n element=lst[0]\n for ele in lst:\n if ele[1] > biggest:\n biggest = ele[1]\n element=ele\n lst.remove(element)\n sort.append(element)\n return sort\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3071,"func_code":"def sort_age(lst):\n if len(lst) == 1:\n return lst\n else:\n new_list = []\n while lst:\n minimum = lst[0]\n for i in lst:\n if i[1] < minimum[1]:\n minimum = i\n new_list.append(minimum)\n lst.remove(minimum)\n return new_list[::-1]\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3072,"func_code":"def sort_age(lst):\n product = []\n while lst:\n largest = lst[0]\n for i in lst:\n if i[1]>largest[1]:\n largest = i\n lst.remove(largest)\n product.append(largest)\n return product\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3073,"func_code":"def sort_age(lst):\n sort = []\n while lst: \n biggest = lst[0]\n for element in lst:\n if element[1] > biggest[1]:\n biggest = element\n lst.remove(biggest)\n sort.append(biggest)\n return sort\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3074,"func_code":"def sort_age(lst):\n new_lst = []\n while lst:\n oldest = lst[0]\n for a in lst:\n if a[1] > oldest[1]:\n oldest = a\n lst.remove(oldest)\n new_lst.append(oldest)\n return new_lst\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3075,"func_code":"def sort_age(lst):\n for loop in range(len(lst)):\n for i in range(len(lst)-1):\n if lst[i][1], ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3076,"func_code":"def sort_age(lst):\n def for_age(lst):\n for i in range(len(lst)):\n if i == 0: continue\n else:\n while i > 0:\n if lst[i][1] < lst[i-1][1]:\n lst[i], lst[i-1] = lst[i-1], lst[i]\n i -= 1\n else: i = 0\n for_age(lst)\n lst.reverse()\n return lst\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3077,"func_code":"def sort_age(lst):\n # Fill in your code here\n new_lst = []\n while lst:\n oldest = lst[0]\n for i in range(len(lst)):\n if lst[i][1] > oldest[1]:\n oldest = lst[i] \n lst.remove(oldest)\n new_lst.append(oldest)\n \n return new_lst\n \n \n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3078,"func_code":"def sort_age(lst):\n holder=[]\n if lst==[]:\n return []\n for x in lst:\n if holder==[]:\n holder=x\n elif x[1]>holder[1]:\n holder=x\n lst.remove(holder)\n return [holder]+sort_age(lst)\n\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3079,"func_code":"def sort_age(lst):\n \n people = []\n \n while lst:\n \n i = lst[0]\n \n for a in lst:\n \n if a[1] >= i[1] :\n \n i = a\n \n lst.remove(i)\n \n people.append(i)\n \n return people\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3080,"func_code":"def sort_age(lst):\n if len(lst) == 0:\n return []\n elif len(lst) == 1:\n return lst\n else:\n mid = len(lst) \/\/ 2\n lst1 = sort_age(lst[:mid])\n lst2 = sort_age(lst[mid:])\n \n result = []\n while lst1 and lst2:\n if lst1[0][1] < lst2[0][1]:\n result.append(lst2.pop(0))\n else:\n result.append(lst1.pop(0))\n result.extend(lst1)\n result.extend(lst2)\n \n return result\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3081,"func_code":"def sort_age(lst):\n sort = []\n while lst:\n oldest = lst[0]\n for i in lst[1:]:\n if i[1] > oldest[1]:\n oldest = i\n lst.remove(oldest)\n sort.append(oldest)\n return sort\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3082,"func_code":"def sort_age(lst):\n a=lst\n sort=[]\n while a:\n smallest=a[0]\n for element in a:\n if element[1], ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3083,"func_code":"def sort_age(lst):\n oldtoyoung=[]\n while lst:\n younger=lst[0]\n for older in lst:\n if older[1]>younger[1]:\n younger=older\n lst.remove(younger)\n oldtoyoung.append(younger)\n return oldtoyoung\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3084,"func_code":"def sort_age(lst):\n sort = []\n while lst:\n largest = lst[0]\n for element in lst:\n if element[1] > largest[1]:\n largest = element\n lst.remove(largest)\n sort.append(largest)\n return sort\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3085,"func_code":"def sort_age(lst):\n sort = []\n while lst:\n oldest = lst[0]\n for i in lst:\n if i[1] > oldest[1]:\n oldest = i\n lst.remove(oldest)\n sort.append(oldest)\n return sort\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3086,"func_code":"def sort_age(lst):\n \n sort_lst = []\n \n while lst:\n smallest = lst[0]\n for e in lst:\n if e[1] < smallest[1]:\n smallest = e\n lst.remove(smallest)\n sort_lst.append(smallest)\n \n return sort_lst[::-1]\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3087,"func_code":"def sort_age(lst):\n output = []\n while lst:\n largest = lst[0]\n for i in lst:\n if i[1] > largest[1]:\n largest = i\n lst.remove(largest)\n output.append(largest)\n return output\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3088,"func_code":"def sort_age(lst):\n all_age = []\n for person in lst:\n all_age += [person[1],]\n result = []\n while len(result) < len(lst):\n for person in lst:\n if person[1] == max(all_age):\n result += (person,)\n all_age.remove(max(all_age))\n return result\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3089,"func_code":"def sort_age(lst):\n if lst == []:\n return []\n else:\n result = [lst[0]]\n for i in lst[1:]:\n if i[1] > result[0][1]:\n result.insert(0, i)\n elif i[1] < result[-1][1]:\n result.append(i)\n else:\n for j in range(len(result) - 1):\n if i[1] < result[j][1] and i[1] > result[j+1][1]:\n result.insert(j+1, i)\n return result\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3090,"func_code":"def sort_age(lst):\n sort = []\n while lst:\n oldest = lst[0]\n for i in lst:\n if i[1]>oldest[1]:\n oldest = i\n lst.remove(oldest)\n sort.append(oldest)\n return sort\n \n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3091,"func_code":"def sort_age(lst):\n lst1=[]\n while lst:\n smallest=lst[0]\n for ele in lst:\n if ele[1]>smallest[1]:\n smallest=ele\n lst.remove(smallest)\n lst1.append(smallest)\n return lst1\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3092,"func_code":"def sort_age(lst):\n if len(lst) == 1:\n return lst\n elif lst == []:\n return []\n else:\n s = 0\n for i in lst:\n if i[1] > s:\n s = i[1]\n t = i\n lst.remove(t)\n return [t] + sort_age(lst)\n \n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3093,"func_code":"def sort_age(lst):\n l = len(lst)\n for i in range(l):\n largest = lst[i]\n for j in range(i+1,l):\n if lst[j][1] > largest[1]:\n largest = lst[j] #assign new largest value\n lst[i],lst[j] = lst[j],lst[i] #swap positions if larger\n #print(i,lst)\n return lst\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3094,"func_code":"def sort_age(lst):\n newlst=[]\n while lst:\n oldest = lst[0][1] #first age\n for person in lst:\n if person[1]>oldest:\n oldest=person[1]\n for person in lst:\n if person[1]==oldest:\n newlst.append(person)\n lst.remove(person) \n return newlst\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3095,"func_code":"def sort_age(lst):\n def cmp(a,b):\n if a[1] >= b[1]:\n return True\n else:\n return False\n \n while True:\n sorted = True\n for i in range(len(lst)-1):\n if not cmp(lst[i],lst[i+1]):\n lst[i],lst[i+1]=lst[i+1],lst[i]\n sorted = False\n if sorted==True:\n break\n\n return lst\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3096,"func_code":"def sort_age(lst):\n sort = True\n while sort:\n sort = False\n for i in range(len(lst)-1):\n if lst[i][1] < lst[i+1][1]:\n sort = True\n lst[i], lst[i+1] = lst[i+1], lst[i]\n return lst\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3097,"func_code":"def sort_age(lst):\n a = []\n b = lst.copy()\n lst.clear()\n for i in b:\n a += [i[1]]\n for i in range(len(a)):\n for i in range(len(a)):\n if a[i] == min(a):\n if b[i] not in lst:\n lst.append(b[i])\n a[i] = (max(a) +1)\n lst.reverse() \n return lst\n\n# sort will work for tuples\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3098,"func_code":"def sort_age(lst):\n new=[]\n while lst !=[]:\n big=lst[0]\n for i in lst:\n if i[1]>big[1]:\n big=i\n lst.remove(big)\n new.append(big)\n return new\n \n \n \n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3099,"func_code":"def sort_age(lst):\n sort = []\n while lst:\n smallest = lst[0]\n for element in lst:\n if element[1] > smallest[1]:\n smallest = element\n lst.remove(smallest)\n sort.append(smallest)\n return sort\n \n pass\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3100,"func_code":"def sort_age(lst):\n sort=[]\n while lst:\n oldest=lst[0]\n for element in lst:\n if element[1]>oldest[1]:\n oldest=element\n lst.remove(oldest)\n sort.append(oldest)\n return sort \n \n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3101,"func_code":"def sort_age(lst):\n new =[]\n while lst:\n index = 0\n oldest = lst[0][1]\n for i in range(1, len(lst)):\n if lst[i][1] >oldest:\n oldest = lst[i][1]\n index = i\n new.append(lst[index])\n del lst[index]\n return new\n \n \n \n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3102,"func_code":"def sort_age(lst):\n # Fill in your code here\n new_lst = [('A',10000),('B',0)]\n for element in lst:\n age = element[1]\n for i in range(len(new_lst)):\n if age > new_lst[i][1]:\n new_lst.insert(i, element)\n break\n new_lst.remove(('A',10000))\n new_lst.remove(('B',0))\n return new_lst\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3103,"func_code":"def sort_age(lst):\n if len(lst) == 1:\n return lst\n sort = []\n while lst:\n tup = lst[0]\n smallest = lst[0][1]\n for element in lst:\n if element[1] > smallest:\n smallest = element[1]\n tup = element\n lst.remove(tup)\n sort.append(tup)\n return sort\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3104,"func_code":"def sort_age(lst):\n result = []\n while lst:\n largest = lst[0]\n for i in lst:\n if i[1] > largest[1]:\n largest = i\n lst.remove(largest)\n result.append(largest)\n return result\n pass\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3105,"func_code":"def sort_age(lst):\n new_lst = []\n age = []\n for i in lst:\n age = age + [i[1],]\n while len(lst) != 0:\n for j in lst:\n if j[1] == max(age):\n lst.remove(j)\n age.remove(max(age))\n new_lst = new_lst + [j,]\n \n return new_lst\n \n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3106,"func_code":"def sort_age(lst):\n n = len(lst)\n result = []\n while n != 0:\n test = []\n for counter in range(n):\n test.append(lst[counter][1])\n first = max(test)\n for counter in range(n):\n if counter == len(lst):\n break\n elif lst[counter][1] == first:\n result.append(lst.pop(counter))\n n = len(lst)\n return result\n \n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3107,"func_code":"def sort_age(lst):\n if len(lst) == 1:\n return lst\n elif lst == []:\n return []\n else:\n s = 0\n for i in lst:\n if i[1] > s:\n s = i[1]\n t = i\n lst.remove(t)\n return [t] + sort_age(lst)\n \n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3108,"func_code":"def sort_age(lst):\n decoy = []\n decoy2 = []\n final = []\n for i in lst:\n decoy.append(i[1])\n while decoy != []:\n decoy2.append(max(decoy))\n decoy.remove(max(decoy))\n for i in decoy2:\n for j in lst:\n if i == j[1]:\n final.append(j)\n return final\n \n \n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3109,"func_code":"def sort_age(lst):\n a = lst\n sort = []\n while a:\n largest = a[0]\n for item in a:\n if item[1] >largest[1]:\n largest = item\n a.remove(largest)\n sort.append(largest)\n\n return(sort)# Fill in your code here\n \n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3110,"func_code":"def sort_age(lst):\n result = []\n while lst:\n oldest = lst[0]\n for people in lst:\n if people[1] > oldest[1]:\n oldest = people\n lst.remove(oldest)\n result += (oldest,)\n return result\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3111,"func_code":"def sort_age(lst):\n if lst==[]:\n return []\n sort=[]\n while lst:\n largest = lst[0]\n for i in lst:\n if i[1] > largest[1]:\n largest = i\n lst.remove(largest)\n sort.append(largest)\n return sort\n pass\n\n\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3112,"func_code":"def sort_age(lst):\n newlst = []\n while lst:\n current = lst[0]\n for element in lst:\n if element[1] > current[1]:\n current = element\n newlst += (current,)\n lst.remove(current)\n return newlst\n \n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3113,"func_code":"def sort_age(lst):\n new_list = []\n while lst:\n smallest = lst[0]\n for element in lst:\n if smallest[1], ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3114,"func_code":"def sort_age(lst):\n # Fill in your code here\n sorted = []\n while lst:\n oldest = lst[0]\n for i in range(len(lst)):\n if lst[i][1] > oldest[1]:\n oldest = lst[i]\n sorted.append(oldest)\n lst.remove(oldest)\n return sorted\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3115,"func_code":"def sort_age(lst):\n result=[] \n while lst:\n largest=lst[0][1]\n tuple_largest=lst[0]\n for i in lst:\n if i[1]>largest:\n largest=i[1]\n tuple_largest=i\n lst.remove(tuple_largest)\n result.append(tuple_largest)\n return result\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3116,"func_code":"def sort_age(lst):\n sorted_lst = []\n while lst:\n smallest = lst[0]\n for i in lst:\n if i[1] < smallest[1]:\n smallest = i\n lst.remove(smallest)\n sorted_lst.append(smallest)\n sorted_lst.reverse()\n return sorted_lst\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3117,"func_code":"def sort_age(lst):\n # Fill in your code here\n new_lst = [('A',10000),('B',0)]\n for element in lst:\n age = element[1]\n for i in range(len(new_lst)):\n if age > new_lst[i][1]:\n new_lst.insert(i, element)\n break\n new_lst.remove(('A',10000))\n new_lst.remove(('B',0))\n return new_lst\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3118,"func_code":"def sort_age(lst):\n res = []\n a=age_list(lst)\n while lst:\n for i in lst:\n if max(a) == i[1]:\n highest=i\n res= res + [i]\n lst.remove(highest)\n a.remove(highest[1])\n return res\n\n\ndef age_list(lst):\n age_list= []\n for i in range(len(lst)):\n age_list = age_list+ [lst[i][1]]\n return age_list\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3119,"func_code":"def sort_age(lst):\n result = []\n while lst:\n biggest = lst[0]\n for element in lst:\n if element[1] > biggest[1]:\n biggest = element\n lst.remove(biggest)\n result.append(biggest)\n return result\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3120,"func_code":"def sort_age(lst):\n \n sort_lst = []\n \n while lst:\n smallest = lst[0]\n for e in lst:\n if e[1] < smallest[1]:\n smallest = e\n lst.remove(smallest)\n sort_lst.append(smallest)\n \n return sort_lst[::-1]\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3121,"func_code":"def sort_age(lst):\n if lst == []:\n return []\n else:\n result = [lst[0]]\n for i in lst[1:]:\n if i[1] > result[0][1]:\n result.insert(0, i)\n elif i[1] < result[-1][1]:\n result.append(i)\n else:\n for j in range(len(result) - 1):\n if i[1] < result[j][1] and i[1] > result[j+1][1]:\n result.insert(j+1, i)\n return result\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3122,"func_code":"def sort_age(lst):\n output = []\n while lst:\n largest = lst[0]\n for i in lst:\n if i[1] > largest[1]:\n largest = i\n lst.remove(largest)\n output.append(largest)\n return output\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3123,"func_code":"def sort_age(lst):\n order = []\n while lst:\n oldest = lst[0]\n for person in lst:\n if person[1] > oldest[1]:\n oldest = person\n lst.remove(oldest)\n order.append(oldest)\n return order\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3124,"func_code":"def sort_age(lst):\n new=[]\n while lst:\n biggest=lst[0]\n for element in lst:\n if element[1]>biggest[1]: \n biggest=element\n \n lst.remove(biggest)\n new.append(biggest)\n return new\n\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3125,"func_code":"def sort_age(lst):\n sortt = [] #empty list\n while lst:\n largest = lst[0] #let the first element be the largest first\n for i in lst:\n if i[1] > largest[1]:\n largest = i\n lst.remove(largest)\n sortt.append(largest)\n return sortt\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3126,"func_code":"def sort_age(lst):\n # Fill in your code here\n i = 1\n while i < len(lst):\n j = i\n while j>0 and lst[j-1][1] > lst[j][1]:\n lst[j], lst[j-1] = lst[j-1], lst[j]\n j-=1\n i+=1\n return lst[::-1]\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3127,"func_code":"def sort_age(lst):\n arranged = []\n while lst:\n oldest = lst[0]\n for person in lst:\n if person[1] > oldest[1]:\n oldest = person\n lst.remove(oldest)\n arranged.append(oldest)\n return arranged\n pass\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3128,"func_code":"def sort_age(lst):\n final=[]\n while lst:\n old=lst[0]\n for i in lst:\n if old[1], ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3129,"func_code":"def sort_age(lst):\n sort=[]\n while lst:\n oldest=lst[0]\n for element in lst:\n if element[1]>oldest[1]:\n oldest=element\n lst.remove(oldest)\n sort.append(oldest)\n return sort \n \n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3130,"func_code":"def sort_age(lst):\n ages = list(i[1] for i in lst)\n \n for i in range(len(lst)):\n index_youngest = ages.index(max(ages))\n lst[i], lst[index_youngest] = lst[index_youngest], lst[i]\n ages[index_youngest] = min(ages) - 1\n ages[i], ages[index_youngest] = ages[index_youngest], ages[i]\n\n \n return lst\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3131,"func_code":"def sort_age(lst):\n\tfinal = []\n\twhile lst:\n\t\tbiggest = lst[0]\n\t\tfor i in lst:\n\t\t\tif i[1] > biggest[1]:\n\t\t\t\tbiggest = i\n\t\tlst.remove(biggest)\n\t\tfinal.append(biggest)\n\treturn final\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3132,"func_code":"def sort_age(lst):\n new = []\n while lst:\n largest = lst[0][1]\n for i in lst:\n if i[1]>largest:\n largest = i[1]\n tpl = ()\n for j in lst:\n if j[1] == largest:\n tpl = j\n lst.remove(tpl)\n new.append(tpl)\n return new \n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3133,"func_code":"def sort_age(lst):\n newlst=[]\n while lst:\n oldest = lst[0][1] #first age\n for person in lst:\n if person[1]>oldest:\n oldest=person[1]\n for person in lst:\n if person[1]==oldest:\n newlst.append(person)\n lst.remove(person) \n return newlst\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3134,"func_code":"def sort_age(lst):\n new =[]\n while lst:\n index = 0\n oldest = lst[0][1]\n for i in range(1, len(lst)):\n if lst[i][1] >oldest:\n oldest = lst[i][1]\n index = i\n new.append(lst[index])\n del lst[index]\n return new\n \n \n \n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3135,"func_code":"def sort_age(lst):\n new_lst = []\n while lst:\n max_num = lst[0]\n for i in lst:\n if i[1] > max_num[1]:\n max_num = i\n lst.remove(max_num)\n new_lst.append(max_num)\n return new_lst\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3136,"func_code":"\ndef sort_age(lst):\n\tnewlst=[]\n\twhile lst:\n\t\tminimum1=lst[0]\n\t\tminimum=lst[0][1]\n\t\tfor x in lst:\n\t\t\tif x[1]>minimum:\n\t\t\t\tminimum=x[1]\n\t\t\t\tminimum1=x\n\t\tnewlst.append(minimum1)\n\t\tlst.remove(minimum1)\n\treturn newlst\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3137,"func_code":"def sort_age(lst):\n\tnew = []\n\twhile lst:\n\t\tsmall = lst[0]\n\t\tfor a in lst:\n\t\t\tif a > small and a[1] > small[1]:\n\t\t\t\tsmall = a\n\t\tnew.append(small)\n\t\tlst.remove(small)\n\treturn new\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3138,"func_code":"def sort_age(lst):\n newlst = []\n while lst:\n current = lst[0]\n for element in lst:\n if element[1] > current[1]:\n current = element\n newlst += (current,)\n lst.remove(current)\n return newlst\n \n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3139,"func_code":"def sort_age(lst):\n sort = []\n while lst:\n biggest = lst[0]\n for k in lst:\n if k[1] > biggest[1]:\n biggest = k\n lst.remove(biggest)\n sort.append(biggest)\n return sort \n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3140,"func_code":"def sort_age(lst):\n result = []\n while lst:\n oldest = lst[0]\n for people in lst:\n if people[1] > oldest[1]:\n oldest = people\n lst.remove(oldest)\n result += (oldest,)\n return result\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3141,"func_code":"def sort_age(lst):\n # Fill in your code here\n a = []\n for i in lst:\n if a ==[]:\n a.append(i)\n continue\n else:\n for k in range(0,len(lst)):\n if i[1]>a[0][1]:\n a.insert(0,i)\n break\n elif a[-1][1]>i[1]:\n a.insert(len(lst),i)\n break\n elif i[1] > a[k+1][1] and i[1], ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3142,"func_code":"def sort_age(lst):\n if len(lst) < 2:\n return lst\n new_lst = []\n while lst:\n max_age = lst[0][1]\n first = lst[0]\n for j in range(1, len(lst)):\n if lst[j][1] > max_age:\n max_age = lst[j][1]\n first = lst[j]\n new_lst.append(first)\n lst.remove(first)\n return new_lst\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3143,"func_code":"def sort_age(lst):\n # Fill in your code here\n new_lst = []\n while lst:\n oldest = lst[0]\n for i in range(len(lst)):\n if lst[i][1] > oldest[1]:\n oldest = lst[i] \n lst.remove(oldest)\n new_lst.append(oldest)\n \n return new_lst\n \n \n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3144,"func_code":"def sort_age(lst):\n if len(lst) < 2:\n return lst\n new_lst = []\n while lst:\n max_age = lst[0][1]\n first = lst[0]\n for j in range(1, len(lst)):\n if lst[j][1] > max_age:\n max_age = lst[j][1]\n first = lst[j]\n new_lst.append(first)\n lst.remove(first)\n return new_lst\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3145,"func_code":"def sort_age(lst):\n arranged = []\n while lst:\n oldest = lst[0]\n for person in lst:\n if person[1] > oldest[1]:\n oldest = person\n lst.remove(oldest)\n arranged.append(oldest)\n return arranged\n pass\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3146,"func_code":"def sort_age(lst):\n\tfor i in range(0,len(lst)-1):\n\t\t for j in range(i+1,len(lst)):\n\t\t\t if lst[i][1], ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3147,"func_code":"def sort_age(lst):\n order = []\n while lst:\n oldest = lst[0]\n for person in lst:\n if person[1] > oldest[1]:\n oldest = person\n lst.remove(oldest)\n order.append(oldest)\n return order\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3148,"func_code":"def sort_age(lst):\n result = []\n while lst:\n oldest = lst[0]\n for people in lst:\n if people[1] > oldest[1]:\n oldest = people\n lst.remove(oldest)\n result += (oldest,)\n return result\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3149,"func_code":"def sort_age(lst):\n sort = []\n while lst:\n biggest = lst[0]\n for element in lst:\n if element[1] > biggest[1]:\n biggest = element\n lst.remove(biggest)\n sort.append(biggest)\n return sort\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3150,"func_code":"def sort_age(lst):\n\tnewlst = []\n\twhile lst:\n\t\toldest = lst[0]\n\t\tfor element in lst:\n\t\t\tif element[1] > oldest[1]:\n\t\t\t\toldest = element\n\t\tlst.remove(oldest)\n\t\tnewlst.append(oldest)\n\treturn newlst\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3151,"func_code":"def sort_age(lst):\n final=[]\n while lst:\n old=lst[0]\n for i in lst:\n if old[1], ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3152,"func_code":"def sort_age(lst):\n new_lst = []\n age = []\n for i in lst:\n age = age + [i[1],]\n while len(lst) != 0:\n for j in lst:\n if j[1] == max(age):\n lst.remove(j)\n age.remove(max(age))\n new_lst = new_lst + [j,]\n \n return new_lst\n \n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3153,"func_code":"def sort_age(lst):\n answer = []\n while lst:\n largest = lst[0]\n for entry in lst:\n if entry[1] > largest[1]:\n largest = entry\n answer.append(largest)\n lst.remove(largest)\n return answer\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3154,"func_code":"def sort_age(lst):\n sort=[]\n while lst:\n smallest = lst[0]\n for i in lst:\n if i[1] < smallest[1]:\n smallest = i\n sort.append(smallest)\n lst.remove(smallest)\n sort.reverse()\n return sort\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3155,"func_code":"def sort_age(lst):\n # Fill in your code here\n a = []\n for i in lst:\n if a ==[]:\n a.append(i)\n continue\n else:\n for k in range(0,len(lst)):\n if i[1]>a[0][1]:\n a.insert(0,i)\n break\n elif a[-1][1]>i[1]:\n a.insert(len(lst),i)\n break\n elif i[1] > a[k+1][1] and i[1], ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3156,"func_code":"def sort_age(lst):\n sort = []\n while lst:\n biggest = lst[0]\n for element in lst:\n if element[1] > biggest[1]:\n biggest = element\n lst.remove(biggest)\n sort.append(biggest)\n return sort\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3157,"func_code":"def sort_age(lst):\n rslt=[]\n while lst:\n smallest=lst[0]\n for element in lst:\n if element[1]>smallest[1]:\n smallest=element\n lst.remove(smallest)\n rslt.append(smallest)\n return rslt\n \n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3158,"func_code":"def sort_age(lst):\n\tresult=[]\n\tdef lame(lst):\n\t\tloser=0\n\t\tlist_of_numbers=[]\n\t\tx=len(lst)\n\t\tif lst==[]:\n\t\t\treturn result\n\t\tfor i in range(x):\n\t\t\tlist_of_numbers+=[lst[i][1]]\n\t\ty=max(list_of_numbers)\n\t\tfor i in lst:\n\t\t\tif i[1]==y:\n\t\t\t\tloser=i\n\t\tresult.append(loser)\n\t\tlst.remove(loser)\n\t\treturn lame(lst)\n\treturn lame(lst)\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3159,"func_code":"def sort_age(lst):\n result = []\n while lst:\n biggest = lst[0]\n for e in lst:\n if e[1] > biggest[1]:\n biggest = e\n result.append(biggest)\n lst.remove(biggest)\n return result\n\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3160,"func_code":"def sort_age(lst):\n sort = []\n while lst:\n largest = lst[0]\n for i in lst:\n if largest[1] < i[1]:\n largest = i\n else:\n continue\n lst.remove(largest)\n sort.append(largest)\n return sort\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3161,"func_code":"def sort_age(lst):\n sort = []\n while lst:\n largest = lst[0]\n for element in lst:\n if element[1] > largest[1]:\n largest = element\n lst.remove(largest)\n sort.append(largest)\n return sort\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3162,"func_code":"def sort_age(lst):\n slist = []\n while lst:\n elder = lst[0]\n for i in range(len(lst)):\n if lst[i][1] > elder[1]:\n elder = lst[i]\n else:\n continue\n slist.append(elder)\n lst.remove(elder)\n return slist\n \n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3163,"func_code":"def sort_age(lst):\n sort = []\n while lst:\n oldest = lst[0]\n for i in lst[1:]:\n if i[1] > oldest[1]:\n oldest = i\n lst.remove(oldest)\n sort.append(oldest)\n return sort\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3164,"func_code":"def sort_age(lst):\n if len(lst) < 2:\n return lst\n for j in range(len(lst)-1):\n minimum = j\n for i in range(j+1, len(lst)):\n if lst[minimum][1] > lst[i][1]:\n minimum = i\n lst[j], lst[minimum] = lst[minimum], lst[j]\n lst.reverse()\n return lst\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3165,"func_code":"def sort_age(lst):\n sort = []\n while lst:\n largest = lst[0]\n for element in lst:\n if element[1] > largest[1]:\n largest = element\n lst.remove(largest)\n sort.append(largest)\n return sort\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3166,"func_code":"def sort_age(lst):\n\tnew_lst = []\n\twhile lst:\n\t\toldest = lst[0][1]\n\t\tfor people in lst:\n\t\t\tif people[1] >= oldest:\n\t\t\t\toldest = people[1]\n\t\t\t\tremove_people = people\n\t\tnew_lst.append(remove_people)\n\t\tlst.remove(remove_people)\n\treturn new_lst\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3167,"func_code":"def sort_age(lst):\n # Fill in your code here\n sorted_list = []\n while lst:\n tpl = lst[0]\n gender = lst[0][0]\n oldest = lst[0][1]\n for i in lst:\n if i[1] > oldest:\n oldest = i[1]\n tpl = i\n gender = i[0]\n lst.remove(tpl)\n sorted_list.append((gender, oldest))\n return sorted_list\n \n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3168,"func_code":"def sort_age(lst):\n sort=[]\n while lst:\n largest=lst[0]\n for i in lst:\n if i[1]>largest[1]:\n largest=i\n lst.remove(largest)\n sort.append(largest)\n return sort\n\n# lst.sort(key= lambda x:x[1], reverse=True)\n # return lst\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3169,"func_code":"def sort_age(lst):\n holder=[]\n if lst==[]:\n return []\n for x in lst:\n if holder==[]:\n holder=x\n elif x[1]>holder[1]:\n holder=x\n lst.remove(holder)\n return [holder]+sort_age(lst)\n\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3170,"func_code":"#def sort_age(lst):\n# lst.sort(key=lambda x: x[1],reverse=True)\n# return lst\n\ndef sort_age(lst):\n a=lst\n sort=[]\n while a:\n largest=a[0]\n for i in a:\n if i[1]>largest[1]:\n largest=i\n a.remove(largest) #1.indentation!\n sort.append(largest)\n return sort\n\n#1.it's same indentation as for loop,\n #that is, we only start removing when we find the largest \n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3171,"func_code":"def sort_age(lst):\n for i in range(len(lst)):\n position = i\n biggest = position\n for a in range(position, len(lst)):\n if lst[a][1] > lst[biggest][1]:\n biggest = a\n tmp = lst[position]\n lst[position] = lst[biggest]\n lst[biggest] = tmp\n return lst\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3172,"func_code":"def sort_age(lst):\n for i in range(len(lst)):\n position = i\n biggest = position\n for a in range(position, len(lst)):\n if lst[a][1] > lst[biggest][1]:\n biggest = a\n tmp = lst[position]\n lst[position] = lst[biggest]\n lst[biggest] = tmp\n return lst\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3173,"func_code":"def sort_age(lst):\n sort = []\n while lst:\n oldest = lst[0]\n for x in lst:\n if x[1] > oldest[1]:\n oldest = x\n lst.remove(oldest)\n sort.append(oldest)\n return sort\n \n \n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3174,"func_code":"def sort_age(lst):\n # Fill in your code here\n if lst == []:\n return lst\n \n out = [lst[0],]\n for ele in lst[1:]:\n for indx in range(len(out)):\n if out[indx][1] < ele[1]:\n out.insert(indx, ele)\n break\n elif indx == len(out) - 1:\n out.append(ele)\n return out\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3175,"func_code":"def sort_age(lst):\n sort = []\n while lst:\n largest = lst[0]\n for element in lst:\n if element[1] > largest[1]:\n largest = element\n lst.remove(largest)\n sort.append(largest)\n return sort\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3176,"func_code":"def sort_age(lst):\n sort = []\n while lst:\n largest = lst[0]\n for element in lst:\n if element[1] > largest[1]:\n largest = element\n lst.remove(largest)\n sort.append(largest)\n return sort\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3177,"func_code":"def sort_age(lst):\n\tsort = []\n\twhile lst:\n\t\tlargest = lst[0]\n\t\tfor element in lst:\n\t\t\tif element[1] > largest[1]:\n\t\t\t\tlargest = element\n\t\tlst.remove(largest)\n\t\tsort.append(largest)\n\treturn sort\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3178,"func_code":"def sort_age(lst):\n sort1 = []\n while lst:\n largest = lst[0]\n for i in lst:\n if i[1] > largest[1]:\n largest = i\n lst.remove(largest)\n sort1.append(largest)\n return sort1\n\n\n\n \n \n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3179,"func_code":"def sort(lst):\n for i in range(len(lst)-1):\n if lst[i][1] > lst[i+1][1]:\n temp = lst[i]\n del lst[i]\n lst += [temp]\n else:\n continue\n return lst\n\ndef sort_age(lst):\n oldlist = tuple(lst)\n if tuple(sort(lst)) == oldlist:\n lst.reverse()\n return lst\n else:\n sort(lst)\n return sort_age(lst)\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3180,"func_code":"def sort_age(lst):\n sort1 = []\n while lst:\n largest = lst[0]\n for i in lst:\n if i[1] > largest[1]:\n largest = i\n lst.remove(largest)\n sort1.append(largest)\n return sort1\n\n\n\n \n \n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3181,"func_code":"def sort_age(lst):\n new_list = []\n while lst:\n smallest = lst[0]\n for element in lst:\n if smallest[1], ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3182,"func_code":"def sort_age(lst):\n lst_len = len(lst) - 1\n while lst_len > 0:\n for i in range(lst_len):\n if lst[i][1] > lst[i+1][1]:\n lst[i], lst[i+1] = lst[i+1], lst[i]\n lst_len -= 1\n return lst[::-1]\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3183,"func_code":"def sort_age(lst):\n ages=[]\n for j in lst:\n ages.append(j[1])\n ages=sort(ages)\n new_lst=[]\n for age in ages:\n for i in lst:\n if age==i[1]:\n new_lst.append(i)\n return new_lst\n \ndef sort(lst):\n age=[]\n while lst:\n largest=lst[0]\n for elem in lst:\n if elem > largest:\n largest = elem\n lst.remove(largest)\n age.append(largest)\n return age\n \n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3184,"func_code":"def sort_age(lst):\n new = []\n while lst:\n largest = lst[0][1]\n for i in lst:\n if i[1]>largest:\n largest = i[1]\n tpl = ()\n for j in lst:\n if j[1] == largest:\n tpl = j\n lst.remove(tpl)\n new.append(tpl)\n return new \n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3185,"func_code":"def sort_age(lst):\n sort = []\n while lst:\n biggest = lst[0]\n for k in lst:\n if k[1] > biggest[1]:\n biggest = k\n lst.remove(biggest)\n sort.append(biggest)\n return sort \n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3186,"func_code":"def sort_age(lst):\n new = []\n while lst:\n small = lst[0][1]\n name =lst[0][0]\n for ele in lst:\n if ele[1]>small:\n small = ele[1]\n name = ele[0]\n new.append((name,small))\n lst.remove((name,small))\n return new\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3187,"func_code":"def sort_age(lst):\n sort = []\n while lst:\n biggest = lst[0]\n for k in lst:\n if k[1] > biggest[1]:\n biggest = k\n lst.remove(biggest)\n sort.append(biggest)\n return sort \n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3188,"func_code":"def sort_age(lst):\n sorted = []\n while lst:\n biggest = lst[0]\n for elem in lst:\n if elem[1] > biggest[1]:\n biggest = elem\n lst.remove(biggest)\n sorted.append(biggest)\n return sorted\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3189,"func_code":"def sort_age(lst):\n n = len(lst)-1\n for i in range(0,n):\n for j in range(i+1,len(lst)):\n if lst[i][1], ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3190,"func_code":"def sort_age(lst):\n sort = []\n while lst:\n largest = lst[0]\n for i in lst:\n if i[1] > largest[1]:\n largest = i\n lst.remove(largest)\n sort.append(largest)\n return sort\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3191,"func_code":"def sort_age(lst):\n if lst == []:\n return lst\n else:\n age_lst, new_lst = [], []\n for x in lst:\n age_lst.append(x[1])\n while age_lst:\n max_age = max(age_lst)\n for i in lst:\n if i[1] == max_age:\n new_lst.append(i)\n age_lst.remove(i[1])\n return new_lst\n pass\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3192,"func_code":"def sort_age(lst):\n sort = []\n\n while lst:\n largest_element = lst[0]\n largest_value = lst[0][1]\n for element in lst:\n if element[1] > largest_value:\n largest_element = element\n largest_value = element[1]\n else:\n continue\n lst.remove(largest_element)\n sort.append(largest_element)\n return sort\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3193,"func_code":"def sort_age(lst):\n if len(lst)== 0:\n return []\n def rank(lyst):\n if len(lyst)==1:\n return list(lyst)\n else:\n a = max(lyst)\n lyst.remove(a)\n return [a]+ rank(lyst)\n a = []\n b = []\n n = len(lst)\n for psn in lst:\n age = psn[1]\n a += [age]\n print(a)\n c = rank(a)\n for age in c:\n for psn in lst:\n if age == psn[1]:\n b += [psn]\n else:\n continue\n return b\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3194,"func_code":"def sort_age(lst):\n final = []\n temp = 0\n while lst:\n biggest = lst[0][1]\n for i in lst:\n if i[1]>=biggest:\n biggest = i[1]\n temp = i \n lst.remove(temp)\n final.append(temp)\n return final\n\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3195,"func_code":"def sort_age(lst):\n new = []\n while lst:\n Max = max(lst,key = lambda x : x[1])\n new.append(Max)\n lst.remove(Max)\n return new\n \n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3196,"func_code":"def sort_age(lst):\n result = []\n while lst:\n largest = lst[0]\n for i in lst:\n if i[1] > largest[1]:\n largest = i\n lst.remove(largest)\n result.append(largest)\n return result\n pass\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3197,"func_code":"def sort_age(lst):\n ans = []\n while lst:\n biggest = lst[0]\n for elem in lst:\n if elem[1] > biggest[1]:\n biggest = elem\n lst.remove(biggest)\n ans.append(biggest)\n \n return ans\n \n \n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3198,"func_code":"def sort_age(lst):\n new_lst = []\n while lst:\n oldest = lst[0]\n for i in range(len(lst)):\n if lst[i][1] > oldest[1]:\n oldest = lst[i]\n lst.remove(oldest)\n new_lst.append(oldest)\n return new_lst\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3199,"func_code":"def sort_age(lst):\n sort = []\n while lst:\n oldest = lst[0]\n for i in lst:\n if i[1] > oldest[1]:\n oldest = i\n lst.remove(oldest)\n sort.append(oldest)\n return sort\n # Fill in your code here\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3200,"func_code":"def sort_age(lst):\n newlst = []\n while lst:\n maximum = lst[0]\n for i in lst:\n if i[1]>maximum[1]:\n maximum = i\n newlst.append(maximum)\n lst.remove(maximum)\n return newlst\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3201,"func_code":"def sort_age(lst):\n # Fill in your code here\n if lst == []:\n return lst\n \n out = [lst[0],]\n for ele in lst[1:]:\n for indx in range(len(out)):\n if out[indx][1] < ele[1]:\n out.insert(indx, ele)\n break\n elif indx == len(out) - 1:\n out.append(ele)\n return out\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3202,"func_code":"def sort_age(lst):\n sort = []\n while lst:\n largest = lst[0]\n for element in lst:\n if element[1] > largest[1]:\n largest = element\n lst.remove(largest)\n sort.append(largest)\n return sort\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3203,"func_code":"def sort_age(lst):\n # Fill in your code here\n for i in range(0, len(lst)-1):\n for j in range(i+1, len(lst)):\n if lst[i][1] < lst[j][1]:\n lst[i],lst[j] = lst[j],lst[i]\n return lst\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3204,"func_code":"def sort_age(lst):\n sort=[]\n while lst:\n biggest=lst[0]\n for element in lst:\n if element[1] > biggest[1]:\n biggest=element\n lst.remove(biggest)\n sort.append(biggest)\n return sort\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3205,"func_code":"def sort_age(lst):\n list1 = []\n while lst:\n biggest = lst[0]\n \n for i in lst:\n if i[1] > biggest[1]:\n biggest = i\n \n lst.remove(biggest)\n list1.append(biggest)\n return list1\n\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3206,"func_code":"def sort_age(lst):\n lst1=[]\n while lst:\n smallest=lst[0]\n for ele in lst:\n if ele[1]>smallest[1]:\n smallest=ele\n lst.remove(smallest)\n lst1.append(smallest)\n return lst1\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3207,"func_code":"def sort_age(lst):\n sort = []\n while lst:\n oldest = lst[0]\n for i in lst:\n if i[1] > oldest[1]:\n oldest = i\n lst.remove(oldest)\n sort.append(oldest)\n return sort\n # Fill in your code here\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3208,"func_code":"# person = (\"M\",30)\n#people list = [(\"M\",30),(\"F\",23)]\n\ndef sort_age(lst):\n \n if len(lst) <= 1:\n return lst\n\n else:\n newlist = []\n biggest = lst[0]\n for i in lst[1:]:\n if biggest[1] > i[1]:\n continue\n else:\n biggest = i\n continue\n \n newlist += [biggest]\n \n lst.remove(biggest)\n \n return newlist + sort_age(lst)\n\n\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3209,"func_code":"def sort_age(lst):\n unsorted = lst\n sort = []\n while unsorted:\n oldest = unsorted[0]\n for i in unsorted[1:]:\n if i[1] > oldest[1]:\n oldest = i\n sort += [oldest,]\n unsorted.remove(oldest)\n return sort\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3210,"func_code":"def sort_age(lst):\n result=[] \n while lst:\n largest=lst[0][1]\n tuple_largest=lst[0]\n for i in lst:\n if i[1]>largest:\n largest=i[1]\n tuple_largest=i\n lst.remove(tuple_largest)\n result.append(tuple_largest)\n return result\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3211,"func_code":"def sort_age(lst):\n \n people = []\n \n while lst:\n \n i = lst[0]\n \n for a in lst:\n \n if a[1] >= i[1] :\n \n i = a\n \n lst.remove(i)\n \n people.append(i)\n \n return people\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3212,"func_code":"def sort(lst):\n for i in range(len(lst)-1):\n if lst[i][1] > lst[i+1][1]:\n temp = lst[i]\n del lst[i]\n lst += [temp]\n else:\n continue\n return lst\n\ndef sort_age(lst):\n oldlist = tuple(lst)\n if tuple(sort(lst)) == oldlist:\n lst.reverse()\n return lst\n else:\n sort(lst)\n return sort_age(lst)\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3213,"func_code":"def sort_age(lst):\n if len(lst) < 2:\n return lst\n for j in range(len(lst)-1):\n minimum = j\n for i in range(j+1, len(lst)):\n if lst[minimum][1] > lst[i][1]:\n minimum = i\n lst[j], lst[minimum] = lst[minimum], lst[j]\n lst.reverse()\n return lst\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3214,"func_code":"def sort_age(lst):\n sort = []\n while lst: \n largest = lst[0]\n for element in lst:\n if element[1] > largest[1]:\n largest = element\n lst.remove(largest)\n sort.append(largest)\n return sort\n\n\n\n\n#def sort_age(lst):\n# lst.sort(key= lambda x: x[1], reverse = True)\n# return lst\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3215,"func_code":"def sort_age(lst):\n a = lst\n sort = []\n while a: # a is not []\n smallest = a[0][1]\n b=a[0]\n for element in a:\n if element[1] > smallest:\n smallest = element[1]\n b=element\n a.remove(b)\n sort.append(b)\n return sort\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3216,"func_code":"def sort_age(lst):\n if len(lst) == 1:\n return lst\n else:\n new_list = []\n while lst:\n minimum = lst[0]\n for i in lst:\n if i[1] < minimum[1]:\n minimum = i\n new_list.append(minimum)\n lst.remove(minimum)\n return new_list[::-1]\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3217,"func_code":"def sort_age(lst):\n sorted1 = []\n while lst:\n largest = lst[0]\n for element in lst:\n if element[1] > largest[1]:\n largest = element\n lst.remove(largest)\n sorted1.append(largest)\n return sorted1\n \n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3218,"func_code":"def sort_age(lst):\n sort_list = []\n while lst: # a is not []\n biggest = lst[0]\n for element in lst:\n if element[1] > biggest[1]:\n biggest = element\n lst.remove(biggest)\n sort_list.append(biggest)\n return sort_list\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3219,"func_code":"def sort_age(lst):\n sort = []\n while lst:\n biggest = lst[0]\n for e in lst:\n print(e)\n if e[1] > biggest[1]:\n biggest = e\n lst.remove(biggest)\n sort.append(biggest)\n return sort\n\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3220,"func_code":"def sort_age(lst):\n for item in range(len(lst)):\n for test in range(len(lst)):\n if lst[test][1] < lst[item][1]:\n lst[test], lst[item] = lst[item], lst[test]\n return lst\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3221,"func_code":"def sort_age(lst):\n if len(lst) < 2:\n return lst\n for j in range(len(lst)-1):\n minimum = j\n for i in range(j+1, len(lst)):\n if lst[minimum][1] > lst[i][1]:\n minimum = i\n lst[j], lst[minimum] = lst[minimum], lst[j]\n lst.reverse()\n return lst\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3222,"func_code":"def sort_age(lst):\n sort = []\n while lst:\n oldest = lst[0]\n for i in lst:\n if i[1]>oldest[1]:\n oldest = i\n lst.remove(oldest)\n sort.append(oldest)\n return sort\n \n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3223,"func_code":"def sort_age(lst):\n\tresult = []\n\twhile lst:\n\t\tlargest = lst[0]\n\t\tfor x in lst:\n\t\t\tif x[1] > largest[1]:\n\t\t\t\tlargest = x\n\t\tlst.remove(largest)\n\t\tresult.append(largest)\n\treturn result\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3224,"func_code":"def sort_age(lst):\n\tresult = []\n\twhile lst:\n\t\tlargest = lst[0]\n\t\tfor x in lst:\n\t\t\tif x[1] > largest[1]:\n\t\t\t\tlargest = x\n\t\tlst.remove(largest)\n\t\tresult.append(largest)\n\treturn result\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3225,"func_code":"def sort_age(lst):\n new_lst = []\n for i in lst:\n if new_lst ==[]:\n new_lst+=[i] \n else:\n pos=0\n for x in new_lst:\n if i[1], ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3226,"func_code":"def sort_age(lst):\n swap = True\n while swap:\n swap = False\n for i in range(len(lst)-1):\n if lst[i][1] < lst[i+1][1]:\n lst[i], lst[i+1] = lst[i+1], lst[i]\n swap = True\n return lst\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3227,"func_code":"def sort_age(lst):\n l=lst.copy()\n res=[]\n while l:\n biggest=l[0]\n\n for element in l:\n if element[1]>biggest[1]:\n biggest=element\n \n l.remove(biggest)\n res.append(biggest)\n return res\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3228,"func_code":"def sort_age(lst):\n result = []\n while lst:\n largest = lst[0]\n for i in lst:\n if i[1] > largest[1]:\n largest = i\n lst.remove(largest)\n result.append(largest)\n return result\n pass\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3229,"func_code":"def sort_age(lst):\n result = []\n while lst:\n largest = lst[0]\n for i in lst:\n if i[1] > largest[1]:\n largest = i\n lst.remove(largest)\n result.append(largest)\n return result\n pass\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3230,"func_code":"def sort_age(lst):\n new = []\n while lst:\n curr = lst[0]\n for i in lst:\n if i[1]>curr[1]:\n curr = i\n lst.remove(curr)\n new.append(curr)\n \n return new\n\n\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3231,"func_code":"def sort_age(lst):\n sort = []\n while lst: # a is not [ ] \n biggest = lst[0] \n for element in lst:\n if element[1] > biggest[1]:\n biggest = element\n lst.remove(biggest)\n sort.append(biggest)\n return sort\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3232,"func_code":"def sort_age(lst):\n def merge(left,right):\n results = []\n while left and right:\n if left[0][1] > right[0][1]:\n results.append(left.pop(0))\n else:\n results.append(right.pop(0))\n results.extend(left)\n results.extend(right)\n return results\n if len(lst) < 2:\n return lst\n mid = len(lst)\/\/2\n left = sort_age(lst[:mid])\n right = sort_age(lst[mid:])\n return merge(left,right)\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3233,"func_code":"def sort_age(lst):\n new = []\n while lst:\n eldest = lst[0]\n for i in lst:\n if i[1] > eldest[1]:\n eldest = i \n lst.remove(eldest)\n new.append(eldest)\n return new\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3234,"func_code":"def sort_age(lst):\n i=0\n while i+1, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3235,"func_code":"def sort_age(lst):\n\tfinal = []\n\twhile lst:\n\t\tlargest = lst[0]\n\t\tfor i in lst:\n\t\t\tif i[1] > largest[1]:\n\t\t\t\tlargest = i\n\t\tlst.remove(largest)\n\t\tfinal.append(largest)\n\treturn final\n\n\t \n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3236,"func_code":"def sort_age(lst):\n males, females = [], []\n for i in lst:\n if i[0] == \"M\":\n males = males + [lst[0],]\n elif i[0] == \"F\":\n females = females + [lst[0],]\n lst = lst[1:]\n return merge(merge_sort(males), merge_sort(females))\n \ndef merge(left, right):\n results = []\n while left and right:\n if left[0][1] > right[0][1]:\n results.append(left.pop(0))\n else:\n results.append(right.pop(0))\n results.extend(left)\n results.extend(right)\n return results\n\ndef merge_sort(lst):\n if len(lst) < 2:\n return lst\n mid = len(lst) \/\/ 2\n left = merge_sort(lst[:mid])\n right = merge_sort(lst[mid:])\n return merge(left, right)\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3237,"func_code":"def sort_age(lst):\n sorted = []\n while lst:\n biggest = lst[0]\n for elem in lst:\n if elem[1] > biggest[1]:\n biggest = elem\n lst.remove(biggest)\n sorted.append(biggest)\n return sorted\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3238,"func_code":"def sort_age(lst):\n new = []\n while lst:\n small = lst[0][1]\n name =lst[0][0]\n for ele in lst:\n if ele[1]>small:\n small = ele[1]\n name = ele[0]\n new.append((name,small))\n lst.remove((name,small))\n return new\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3239,"func_code":"def sort_age(lst):\n new = []\n while lst:\n largest = lst[0]\n for i in lst:\n if i[1] > largest[1]:\n largest = i\n lst.remove(largest)\n new.append(largest)\n return new\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3240,"func_code":"def sort_age(lst):\n new = []\n while lst:\n curr = lst[0]\n for i in lst:\n if i[1]>curr[1]:\n curr = i\n lst.remove(curr)\n new.append(curr)\n \n return new\n\n\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3241,"func_code":"def sort_age(lst):\n i=0\n while i+1, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3242,"func_code":"def sort_age(lst):\n a = []\n for i in lst:\n a.append(i[1])\n sort = []\n while a:\n largest = a[0]\n for element in a:\n if element > largest:\n largest = element\n a.remove(largest)\n sort.append(largest)\n lst2 = []\n counter = 0\n for i in sort:\n for j in lst:\n if j[1] == i:\n lst2.append(j)\n counter += 1\n return lst2\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3243,"func_code":"def sort_age(lst):\n sort = []\n while lst:\n largest = lst[0]\n for i in lst:\n if largest[1] < i[1]:\n largest = i\n else:\n continue\n lst.remove(largest)\n sort.append(largest)\n return sort\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3244,"func_code":"def sort_age(lst):\n result=[]\n while lst:\n minimum=lst[0]\n for i in lst:\n if i[1], ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3245,"func_code":"def sort_age(lst):\n if lst == []:\n return []\n else:\n max_age = max(lst, key = lambda x: x[1])\n lst.remove(max_age)\n return [max_age] + sort_age(lst)\n \n \n \n \n \n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3246,"func_code":"def sort_age(lst):\n if lst == []:\n return []\n else:\n max_age = max(lst, key = lambda x: x[1])\n lst.remove(max_age)\n return [max_age] + sort_age(lst)\n \n \n \n \n \n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3247,"func_code":"def sort_age(lst):\n sort = True\n while sort:\n sort = False\n for i in range(len(lst)-1):\n if lst[i][1] < lst[i+1][1]:\n sort = True\n lst[i], lst[i+1] = lst[i+1], lst[i]\n return lst\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3248,"func_code":"def sort_age(lst):\n\tif len(lst) < 2:\n\t\treturn lst\n\tmid = len(lst) \/\/ 2\n\tleft = sort_age(lst[:mid])\n\tright = sort_age(lst[mid:])\n\treturn merge(left, right)\n\t\ndef merge(left, right):\n\tresults = []\n\twhile left and right:\n\t\tif left[0][1] < right[0][1]:\n\t\t\tresults.append(right.pop(0))\n\t\telse:\n\t\t\tresults.append(left.pop(0))\n\tresults.extend(left)\n\tresults.extend(right)\n\treturn results\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3249,"func_code":"def sort_age(lst):\n new_lst = []\n\n while lst:\n big_age = lst[0]\n for i in lst:\n if i[1] > big_age[1]:\n big_age = i\n lst.remove(big_age)\n new_lst.append(big_age)\n return new_lst\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3250,"func_code":"def sort_age(lst):\n swap = True\n while swap:\n swap = False\n for i in range(len(lst)-1):\n if lst[i][1] < lst[i+1][1]:\n lst[i],lst[i+1] = lst[i+1],lst[i]\n swap = True\n return lst\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3251,"func_code":"def sort_age(lst):\n sort = []\n while lst:\n largest = lst[0]\n for element in lst:\n if element[1] > largest[1]:\n largest = element\n lst.remove(largest)\n sort.append(largest)\n return sort\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3252,"func_code":"def sort_age(lst):\n for i in range(len(lst)-1):\n for j in range(i, len(lst)):\n if lst[j][1] > lst[i][1]:\n x = lst[i]\n lst[i] = lst[j]\n lst[j] = x\n return lst\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3253,"func_code":"def sort_age(lst):\n for i in range(len(lst)):\n for j in range(i+1,len(lst)):\n if lst[i][1], ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3254,"func_code":"def sort_age(lst):\n # Fill in your code here\n new_lst = []\n while lst:\n largest = lst[0]\n for element in lst:\n if largest[1] < element[1]:\n largest = element\n lst.remove(largest)\n new_lst.append(largest)\n return new_lst\n \n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3255,"func_code":"def sort_age(lst):\n new_list = []\n while lst:\n eldest = lst[0]\n for i in lst:\n if i[1] > eldest[1]:\n eldest = i\n lst.remove(eldest)\n new_list.append(eldest)\n return new_list\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3256,"func_code":"def sort_age(lst):\n swap = True\n while swap:\n swap = False\n for i in range(len(lst)-1):\n if lst[i][1] < lst[i+1][1]:\n lst[i],lst[i+1] = lst[i+1],lst[i]\n swap = True\n return lst\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3257,"func_code":"def sort_age(lst):\n\tage_list = []\n\tresult = ()\n\tfor x in lst:\n\t\tage_list.append(list(x))\n\tsort = []\n\twhile age_list:\n\t\tlargest = age_list[0]\n\t\tfor element in age_list:\n\t\t\tif element[1] > largest[1]:\n\t\t\t\tlargest = element\n\t\tage_list.remove(largest)\n\t\tsort.append(largest)\n\tfor x in sort:\n\t\tresult += ((x[0],x[1]),)\n\treturn list(result)\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3258,"func_code":"def sort_age(lst):\n for i in range(len(lst)-1):\n for ele in range(i+1, len(lst)):\n if lst[i][1] < lst[ele][1]:\n lst[i], lst[ele] = lst[ele], lst[i]\n return lst\n \n \n \n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3259,"func_code":"def sort_age(lst):\n sortt = [] #empty list\n while lst:\n largest = lst[0] #let the first element be the largest first\n for i in lst:\n if i[1] > largest[1]:\n largest = i\n lst.remove(largest)\n sortt.append(largest)\n return sortt\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3260,"func_code":"def sort_age(lst):\n new_lst = []\n\n while lst:\n big_age = lst[0]\n for i in lst:\n if i[1] > big_age[1]:\n big_age = i\n lst.remove(big_age)\n new_lst.append(big_age)\n return new_lst\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3261,"func_code":"def sort_age(lst):\n a=[]\n while lst:\n biggest=lst[0]\n for i in lst:\n if i[1] >= biggest[1]:\n biggest=i\n lst.remove(biggest)\n a.append(biggest)\n return a\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3262,"func_code":"def sort_age(lst):\n if lst == []:\n return []\n else:\n max_age = max(lst, key = lambda x: x[1])\n lst.remove(max_age)\n return [max_age] + sort_age(lst)\n \n \n \n \n \n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3263,"func_code":"def sort_age(lst):\n new_lst = []\n while lst:\n new_lst.append(max_age(lst))\n lst.remove(max_age(lst))\n return new_lst\n \n \ndef max_age(lst):\n member = lst[0]\n for i in lst:\n if i[1] > member[1]:\n member = i\n return member\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3264,"func_code":"def sort_age(lst):\n sorted_lst = []\n while lst:\n smallest = lst[0]\n for i in lst:\n if i[1] < smallest[1]:\n smallest = i\n lst.remove(smallest)\n sorted_lst.append(smallest)\n sorted_lst.reverse()\n return sorted_lst\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3265,"func_code":"def sort_age(lst):\n a = lst\n for i in range(len(lst)): \n for i in range(len(a)-1):\n if a[i][1] < a[i+1][1]:\n a[i], a[i+1] = a[i+1], a[i]\n return a\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3266,"func_code":"def sort_age(lst):\n\tnewlst = []\n\twhile lst:\n\t\tnewlst += (max(lst, key = lambda x: x[1]),)\n\t\tlst.remove(max(lst, key = lambda x: x[1]))\n\treturn newlst\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3267,"func_code":"def sort_age(lst):\n new_lst = []\n while lst:\n new_lst.append(max_age(lst))\n lst.remove(max_age(lst))\n return new_lst\n \n \ndef max_age(lst):\n member = lst[0]\n for i in lst:\n if i[1] > member[1]:\n member = i\n return member\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3268,"func_code":"def sort_age(lst):\n sort = []\n while lst:\n largest = lst[0]\n largestx = lst[0][1]\n for element in lst:\n if element[1] > largestx:\n largestx = element[1]\n largest = element\n lst.remove(largest)\n sort.append(largest)\n return sort\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3269,"func_code":"def sort_age(lst):\n l=lst.copy()\n res=[]\n while l:\n biggest=l[0]\n\n for element in l:\n if element[1]>biggest[1]:\n biggest=element\n \n l.remove(biggest)\n res.append(biggest)\n return res\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3270,"func_code":"def sort_age(lst):\n for i, e in enumerate(lst):\n mx = max(range(i,len(lst)), key= lambda x: lst[x][1])\n lst[i], lst[mx] = lst[mx], e\n return lst\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3271,"func_code":"def sort_age(lst):\n new_lst = []\n while lst:\n oldest = lst[0]\n for i in range(len(lst)):\n if lst[i][1] > oldest[1]:\n oldest = lst[i]\n lst.remove(oldest)\n new_lst.append(oldest)\n return new_lst\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3272,"func_code":"def sort_age(lst):\n a = lst\n sort = []\n while a:\n largest = a[0]\n for item in a:\n if item[1] >largest[1]:\n largest = item\n a.remove(largest)\n sort.append(largest)\n\n return(sort)# Fill in your code here\n \n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3273,"func_code":"def sort_age(lst):\n newlst = []\n while lst:\n largest = lst[0]\n for el in lst:\n if el[1] > largest[1]:\n largest = el\n newlst.append(largest)\n lst.remove(largest) #when it repeats, largest will take on the new first element in lst\n return newlst\n \n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3274,"func_code":"def sort_age(lst):\n\tage_list = []\n\tresult = ()\n\tfor x in lst:\n\t\tage_list.append(list(x))\n\tsort = []\n\twhile age_list:\n\t\tlargest = age_list[0]\n\t\tfor element in age_list:\n\t\t\tif element[1] > largest[1]:\n\t\t\t\tlargest = element\n\t\tage_list.remove(largest)\n\t\tsort.append(largest)\n\tfor x in sort:\n\t\tresult += ((x[0],x[1]),)\n\treturn list(result)\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3275,"func_code":"def sort_age(lst):\n swap = True\n while swap == True:\n swap = False\n for i in range(len(lst)-1):\n if lst[i][1] < lst[i+1][1]:\n lst[i], lst[i+1] = lst[i+1], lst[i]\n swap = True\n return lst\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3276,"func_code":"def sort_age(lst):\n new = []\n while lst:\n eldest = lst[0]\n for i in lst:\n if i[1] > eldest[1]:\n eldest = i \n lst.remove(eldest)\n new.append(eldest)\n return new\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3277,"func_code":"def swap_positions(lst):\n\tnew_lst = []\n\tfor i in range(0, len(lst)):\n\t\tnew_lst.append((lst[i][1], lst[i][0]))\n\treturn new_lst\n\ndef sort_age(lst):\n\tswapped_lst = swap_positions(lst)\n\tnew_lst =[]\n\twhile (swapped_lst != []):\n\t\tnew_lst.append(max(swapped_lst))\n\t\tswapped_lst.remove(max(swapped_lst))\n\treturn swap_positions(new_lst)\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3278,"func_code":"def sort_age(lst):\n \n sort = []\n \n while lst:\n\n largest = lst[0]\n\n for x in lst:\n\n if x[1] > largest[1]:\n\n largest = x\n\n lst.remove(largest)\n\n sort.append(largest)\n\n return sort\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3279,"func_code":"def sort_age(lst):\n\tif len(lst) == 0:\n\t\treturn lst\n\telse:\n\t smallest = lst[0]\n\t newlist = []\n\t while lst:\n\t\t for item in lst:\n\t\t \tif item[1] <= smallest[1]:\n\t\t\t \tsmallest = item\n\t\t lst.remove(smallest)\n\t\t newlist.insert(0,smallest)\n\t\t if len(lst) == 0:\n\t\t\t break\n\t\t smallest = lst[0]\n\t return newlist\n\t\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3280,"func_code":"def func(lst, x):\n index = len(lst)\n for i in range(len(lst)):\n if lst[i][1] < x:\n continue\n else:\n index = i\n break\n return index\n \ndef sort_age(lst):\n newlist = []\n for i in range(len(lst)):\n age = lst[i][1]\n b = func(newlist, age)\n newlist.insert(b, lst[i])\n return list(reversed(newlist))\n \n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3281,"func_code":"def sort_age(lst):\n sort = []\n while lst: # a is not [ ] \n biggest = lst[0] \n for element in lst:\n if element[1] > biggest[1]:\n biggest = element\n lst.remove(biggest)\n sort.append(biggest)\n return sort\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3282,"func_code":"def sort_age(lst):\n if lst == []:\n return []\n else:\n agelist = [lst[0],]\n for i in range(1,len(lst)):\n if lst[i][1] > agelist[0][1]:\n agelist.insert(0, lst[i])\n elif lst[i][1] < agelist[len(agelist)-1][1]:\n agelist.insert(len(agelist), lst[i])\n else:\n for x in range(0,len(agelist)):\n if agelist[x][1]> lst[i][1] > agelist[x+1][1]:\n agelist.insert(x+1, lst[i])\n break\n return agelist\n \n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3283,"func_code":"def sort_age(lst):\n newlst=[]\n lstages=[i[1] for i in lst]\n while lst:\n for i in lst:\n if i[1] == max(lstages):\n newlst+=[i]\n lst.remove(i)\n lstages.remove(i[1])\n return newlst\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3284,"func_code":"def sort_age(lst):\n if len(lst)<=1:\n return lst\n else:\n used_lst=lst.copy()\n ages=()\n for i in lst:\n ages+=(i[1],)\n for i in lst:\n if i[1]==max(ages):\n new_lst=[i]\n used_lst.remove(i)\n return new_lst+sort_age(used_lst)\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3285,"func_code":"def sort_age(lst):\n for x in range(len(lst)):\n max = x\n for i in range(x, len(lst)):\n if lst[i][1] > lst[max][1]:\n max = i\n lst[max], lst[x] = lst[x], lst[max]\n return lst\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3286,"func_code":"def sort_age(lst):\n sorted = []\n while lst:\n oldest = lst[0]\n for element in lst:\n if element[1] > oldest[1]:\n oldest = element\n lst.remove(oldest)\n sorted.append(oldest)\n return sorted\n \n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3287,"func_code":"def sort_age(lst):\n\tfor k in range(len(lst)-1):\n\t\tfor i in range(k+1, len(lst)):\n\t\t\tif lst[k][1] < lst[i][1]:\n\t\t\t\tlst[k], lst[i] = lst[i], lst[k]\n\t\t\telse:\n\t\t\t continue\n\treturn lst\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3288,"func_code":"def sort_age(lst):\n swap = True\n while swap:\n swap = False\n for i in range(len(lst)-1):\n if lst[i][1] < lst[i+1][1]:\n lst[i], lst[i+1] = lst[i+1], lst[i]\n swap = True\n return lst\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3289,"func_code":"def sort_age(lst):\n new = []\n while lst:\n largest = lst[0][1]\n for i in lst:\n if i[1] > largest:\n largest = i[1]\n for j in lst:\n if largest in j:\n lst.remove(j)\n new.append(j)\n return new\n\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3290,"func_code":"def sort_age(lst):\n\tnew_lst = []\n\twhile lst:\n\t\tbiggest = lst[0]\n\t\tfor i in lst:\n\t\t\tif i[1] > biggest[1]:\n\t\t\t\tbiggest = i\n\t\tlst.remove(biggest)\n\t\tnew_lst.append(biggest)\n\treturn new_lst\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3291,"func_code":"def sort_age(lst):\n newlst = []\n while lst:\n maximum = lst[0]\n for i in lst:\n if i[1]>maximum[1]:\n maximum = i\n \n newlst.append(maximum)\n lst.remove(maximum)\n return newlst\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3292,"func_code":"def sort_age(lst):\n sort = []\n\n while lst:\n largest_element = lst[0]\n largest_value = lst[0][1]\n for element in lst:\n if element[1] > largest_value:\n largest_element = element\n largest_value = element[1]\n else:\n continue\n lst.remove(largest_element)\n sort.append(largest_element)\n return sort\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3293,"func_code":"def sort_age(lst):\n n = len(lst) - 1\n while n > 0:\n for i in range(n):\n if lst[i][1] > lst[i + 1][1]:\n lst[i],lst[i + 1] = lst[i + 1], lst[i]\n n = n-1\n lst.reverse()\n return lst\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3294,"func_code":"def sort_age(lst):\n sort=[]\n while lst:\n smallest = lst[0]\n for i in lst:\n if i[1] < smallest[1]:\n smallest = i\n sort.append(smallest)\n lst.remove(smallest)\n sort.reverse()\n return sort\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3295,"func_code":"def sort_age(lst):\n for i in range(len(lst)):\n maxi=lst[i][1]\n for j in range (i+1,len(lst)):\n if lst[j][1]>maxi:\n maxi=lst[j][1]\n lst[i],lst[j]=lst[j],lst[i]\n \n return lst\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3296,"func_code":"def sort_age(lst):\n decoy = []\n decoy2 = []\n final = []\n for i in lst:\n decoy.append(i[1])\n while decoy != []:\n decoy2.append(max(decoy))\n decoy.remove(max(decoy))\n for i in decoy2:\n for j in lst:\n if i == j[1]:\n final.append(j)\n return final\n \n \n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3297,"func_code":"def sort_age(lst):\n newlst = []\n while lst:\n i = lst[0]\n for element in lst:\n if element[1] >= i[1]:\n i = element\n lst.remove(i)\n newlst.append(i)\n return newlst\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3298,"func_code":"def sort_age(lst):\n if len(lst)<=1:\n return lst\n else:\n used_lst=lst.copy()\n ages=()\n for i in lst:\n ages+=(i[1],)\n for i in lst:\n if i[1]==max(ages):\n new_lst=[i]\n used_lst.remove(i)\n return new_lst+sort_age(used_lst)\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3299,"func_code":"def sort_age(lst):\n if lst == []:\n return []\n else:\n agelist = [lst[0],]\n for i in range(1,len(lst)):\n if lst[i][1] > agelist[0][1]:\n agelist.insert(0, lst[i])\n elif lst[i][1] < agelist[len(agelist)-1][1]:\n agelist.insert(len(agelist), lst[i])\n else:\n for x in range(0,len(agelist)):\n if agelist[x][1]> lst[i][1] > agelist[x+1][1]:\n agelist.insert(x+1, lst[i])\n break\n return agelist\n \n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3300,"func_code":"def sort_age(lst):\n sort = []\n \n while len(lst) > 0:\n largest = lst[0]\n for i in lst:\n if i[1] > largest[1]:\n largest = i\n \n lst.remove(largest)\n sort.append(largest)\n\n return sort\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3301,"func_code":"def sort_age(lst):\n swap = True\n while swap:\n swap = False\n for i in range(len(lst)-1):\n if lst[i][1] < lst[i+1][1]:\n lst[i], lst[i+1] = lst[i+1], lst[i]\n swap = True\n return lst\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3302,"func_code":"def sort_age(lst):\n # Fill in your code here\n new_lst = []\n while lst:\n largest = lst[0]\n for element in lst:\n if largest[1] < element[1]:\n largest = element\n lst.remove(largest)\n new_lst.append(largest)\n return new_lst\n \n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3303,"func_code":"def sort_age(lst):\n for start in range(len(lst)-1):\n oldest = start\n for i in range(start, len(lst)):\n if lst[i][1] > lst[oldest][1]:\n oldest = i\n lst[start], lst[oldest] = lst[oldest], lst[start]\n return list(lst)\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3304,"func_code":"def sort_age(lst):\n if len(lst)<2:\n return lst\n def merge(lst1, lst2, key):\n r=[]\n while lst1!=[] and lst2!=[]:\n if key(lst1[0])>key(lst2[0]):\n r.append(lst1[0])\n lst1.remove(lst1[0])\n else:\n r.append(lst2[0])\n lst2.remove(lst2[0])\n r.extend(lst1)\n r.extend(lst2)\n return r\n m=len(lst)\/\/2\n key=lambda tup: tup[1]\n return merge(sort_age(lst[:m]), sort_age(lst[m:]), key)\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3305,"func_code":"def sort_age(lst):\n for i in range(len(lst)):\n for j in range(len(lst)-1-i):\n if lst[j][1] < lst[j+1][1]:\n lst[j], lst[j+1] = lst[j+1], lst[j]\n return lst\n \n \n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3306,"func_code":"def sort_age(lst):\n sort = []\n while lst:\n smallest = lst[0]\n for element in lst:\n if element[1] > smallest[1]:\n smallest = element\n lst.remove(smallest)\n sort.append(smallest)\n return sort\n \n pass\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3307,"func_code":"def sort_age(lst):\n sort_lst = []\n while lst:\n high = lst[0]\n for i in lst:\n if i[1] > high[1]:\n high = i\n lst.remove(high)\n sort_lst.append(high)\n return sort_lst\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3308,"func_code":"def sort_age(lst):\n n = len(lst)\n result = []\n while n != 0:\n test = []\n for counter in range(n):\n test.append(lst[counter][1])\n first = max(test)\n for counter in range(n):\n if counter == len(lst):\n break\n elif lst[counter][1] == first:\n result.append(lst.pop(counter))\n n = len(lst)\n return result\n \n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3309,"func_code":"def sort_age(lst):\n if len(lst)<2:\n return lst\n while True:\n changed = False\n for i in range(len(lst)-1):\n if lst[i+1][1]>lst[i][1]:\n lst[i],lst[i+1] = lst[i+1], lst[i]\n changed = True\n if not changed:\n break\n \n return (lst)\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3310,"func_code":"def sort_age(lst):\n n = len(lst)\n result = []\n while n != 0:\n test = []\n for counter in range(n):\n test.append(lst[counter][1])\n first = max(test)\n for counter in range(n):\n if counter == len(lst):\n break\n elif lst[counter][1] == first:\n result.append(lst.pop(counter))\n n = len(lst)\n return result\n \n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3311,"func_code":"def sort_age(lst):\n new_lst = []\n while lst:\n max_num = lst[0]\n for i in lst:\n if i[1] > max_num[1]:\n max_num = i\n lst.remove(max_num)\n new_lst.append(max_num)\n return new_lst\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3312,"func_code":"def sort_age(lst):\n sorted_lst = []\n def oldest_in(lst):\n oldshit = lst[0]\n for i in lst:\n if oldshit[1] < i[1]:\n oldshit = i\n return oldshit\n while lst:\n old = oldest_in(lst)\n lst.remove(old)\n sorted_lst.append(old)\n return sorted_lst\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3313,"func_code":"def sort_age(lst):\n result = []\n while lst:\n biggest = lst[0]\n for e in lst:\n if e[1] > biggest[1]:\n biggest = e\n result.append(biggest)\n lst.remove(biggest)\n return result\n\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3314,"func_code":"def sort_age(lst):\n a=[]\n while lst:\n biggest=lst[0]\n for i in lst:\n if i[1] >= biggest[1]:\n biggest=i\n lst.remove(biggest)\n a.append(biggest)\n return a\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3315,"func_code":"def sort_age(lst):\n if len(lst) < 2:\n return lst\n for j in range(len(lst)-1):\n minimum = j\n for i in range(j+1, len(lst)):\n if lst[minimum][1] > lst[i][1]:\n minimum = i\n lst[j], lst[minimum] = lst[minimum], lst[j]\n lst.reverse()\n return lst\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3316,"func_code":"def sort_age(lst):\n def get_age(person):\n return person[1]\n for i in range(len(lst)-1):\n for elem in lst[i+1:]:\n if get_age(elem) < get_age(lst[i]):\n # lst[i], lst[lst.index(elem)] = lst[lst.index(elem)], lst[i]\n #above doesn't seem to change the list\n temp = lst.index(elem)\n lst[i], lst[temp] = lst[temp], lst[i]\n lst.reverse()\n return lst\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3317,"func_code":"def sort_age(lst):\n sort = []\n while lst:\n smallest = lst[0]\n print(type(smallest))\n for element in lst:\n print(type(element[1]))\n if element[1] > smallest[1]:\n smallest = element\n lst.remove(smallest)\n sort.append(smallest)\n return sort\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3318,"func_code":"def sort_age(lst):\n sorted = []\n while lst:\n oldest = lst[0]\n for element in lst:\n if element[1] > oldest[1]:\n oldest = element\n lst.remove(oldest)\n sorted.append(oldest)\n return sorted\n \n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3319,"func_code":"def sort_age(lst):\n sort = []\n while lst:\n smallest = lst[0]\n for element in lst:\n if element[1] > smallest[1]:\n smallest = element\n lst.remove(smallest)\n sort.append(smallest)\n return sort\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3320,"func_code":"def sort_age(lst):\n if len(lst) == 1:\n return lst\n sort = []\n while lst:\n tup = lst[0]\n smallest = lst[0][1]\n for element in lst:\n if element[1] > smallest:\n smallest = element[1]\n tup = element\n lst.remove(tup)\n sort.append(tup)\n return sort\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3321,"func_code":"def sort_age(lst):\n def age(i):\n return i[1]\n \n def position(seq, ele):\n n = len(seq)\n for i in range(n):\n if seq[i] == ele:\n return i\n \n def largest_age(seq):\n largest = age(seq[0])\n largest_pos = 0\n for i in seq:\n if age(i) > largest:\n largest = age(i)\n largest_pos = position(seq,i)\n return seq[largest_pos]\n n = len(lst)\n final = []\n if n ==0:\n return []\n elif n ==1:\n return lst\n else:\n final = [largest_age(lst)]\n lst.remove(largest_age(lst))\n final = final + sort_age(lst)\n return final\n\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3322,"func_code":"def sort_age(lst):\n unsorted = lst\n sort = []\n while unsorted:\n oldest = unsorted[0]\n for i in unsorted[1:]:\n if i[1] > oldest[1]:\n oldest = i\n sort += [oldest,]\n unsorted.remove(oldest)\n return sort\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3323,"func_code":"def sort_age(lst):\n sort = []\n while lst:\n oldest = lst[0]\n for x in lst:\n if x[1] > oldest[1]:\n oldest = x\n lst.remove(oldest)\n sort.append(oldest)\n return sort\n \n \n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3324,"func_code":"def sort_age(lst):\n swap = True\n while swap:\n swap = False\n for i in range(len(lst)-1):\n if lst[i][1] < lst[i+1][1]:\n lst[i], lst[i+1] = lst[i+1], lst[i]\n swap = True\n return lst\n\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3325,"func_code":"def sort_age(lst):\n for i in range(0,len(lst)):\n for y in range(1+i,len(lst)):\n if lst[y][1] > lst[i][1]:\n lst[y],lst[i] = lst[i],lst[y]\n return lst\n \n#alt\n\n#def sort_age(lst):\n #sort = []\n #while lst:\n #biggest = lst[0]\n #for people in lst:\n #if people[1] > biggest[1]:\n #biggest = people\n #lst.remove(biggest)\n #sort.append(biggest)\n #return sort\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3326,"func_code":"def sort_age(lst):\n if len(lst) == 1:\n return lst\n else:\n for j in range(len(lst) -1):\n for i in range(len(lst) -1):\n if lst[i][1] < lst[i+1][1]:\n lst[i], lst[i+1] = lst[i+1], lst[i]\n \n return lst \n\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3327,"func_code":"def sort_age(lst):\n swap = True\n while swap:\n swap = False\n for tag in range(len(lst)-1):\n if lst[tag][1] < lst[tag+1][1]:\n lst[tag], lst[tag+1] = lst[tag+1], lst[tag]\n swap = True\n return lst\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3328,"func_code":"def sort_age(lst):\n result=[] \n while lst:\n biggest=lst[0][1]\n tuple_biggest=lst[0]\n for i in lst:\n if i[1]>biggest:\n biggest=i[1]\n tuple_biggest=i\n lst.remove(tuple_biggest)\n result.append(tuple_biggest)\n return result\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3329,"func_code":"def sort_age(lst):\n for start in range(len(lst)):\n minimum = start\n for i in range(start,len(lst)): \n if lst[i][1] < lst[minimum][1]:\n minimum = i\n lst[start], lst[minimum] = lst[minimum], lst[start]\n lst.reverse() \n return lst\n \n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3330,"func_code":"def sort_age(lst):\n list1 = []\n while lst:\n biggest = lst[0]\n \n for i in lst:\n if i[1] > biggest[1]:\n biggest = i\n \n lst.remove(biggest)\n list1.append(biggest)\n return list1\n\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3331,"func_code":"def sort_age(lst):\n n = len(lst) - 1\n while n > 0:\n for i in range(n):\n if lst[i][1] > lst[i + 1][1]:\n lst[i],lst[i + 1] = lst[i + 1], lst[i]\n n = n-1\n lst.reverse()\n return lst\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3332,"func_code":"def sort_age(lst):\n\tfor j in range(len(lst) -1):\n\t\tfor i in range(len(lst) -1):\n\t\t\tif lst[i][1] < lst[i+1][1]:\n\t\t\t\tlst[i], lst[i+1] = lst[i+1], lst[i]\n\treturn lst\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3333,"func_code":"def sort_age(lst):\n new_lst = []\n while lst:\n oldest = lst[0]\n for i in range(len(lst)):\n if lst[i][1] > oldest[1]:\n oldest = lst[i]\n lst.remove(oldest)\n new_lst.append(oldest)\n return new_lst\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3334,"func_code":"def sort_age(lst):\n\tfor i in range(len(lst)):\n\t\tfor j in range(i+1, len(lst)):\n\t\t\tif lst[j][1] > lst[i][1]:\n\t\t\t\t#swap\n\t\t\t\tlst[i],lst[j] = lst[j],lst[i]\n\treturn lst\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3335,"func_code":"def sort_age(lst):\n newlst = []\n while lst:\n i = lst[0]\n for element in lst:\n if element[1] >= i[1]:\n i = element\n lst.remove(i)\n newlst.append(i)\n return newlst\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3336,"func_code":"def sort_age(lst):\n new = []\n while lst:\n largest = lst[0]\n for i in lst:\n if i[1] > largest[1]:\n largest = i\n lst.remove(largest)\n new.append(largest)\n return new\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3337,"func_code":"def sort_age(lst):\n for i in range(0,len(lst)-1):\n for j in range(i+1,len(lst)):\n if lst[i][1], ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3338,"func_code":"def sort_age(lst):\n result = []\n while lst:\n largest = lst[0][1]\n index = 0\n for i in range(len(lst)):\n if lst[i][1] > largest:\n index = i\n largest = lst[i][1]\n result.append(lst[index])\n lst.remove(lst[index])\n return result\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3339,"func_code":"def sort_age(lst):\n # Fill in your code here\n sorted_list = []\n while lst:\n tpl = lst[0]\n gender = lst[0][0]\n oldest = lst[0][1]\n for i in lst:\n if i[1] > oldest:\n oldest = i[1]\n tpl = i\n gender = i[0]\n lst.remove(tpl)\n sorted_list.append((gender, oldest))\n return sorted_list\n \n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3340,"func_code":"def sort_age(lst):\n res = []\n a=age_list(lst)\n while lst:\n for i in lst:\n if max(a) == i[1]:\n highest=i\n res= res + [i]\n lst.remove(highest)\n a.remove(highest[1])\n return res\n\n\n\n\ndef age_list(lst):\n age_list= []\n for i in range(len(lst)):\n age_list = age_list+ [lst[i][1]]\n return age_list\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3341,"func_code":"def sort_age(lst):\n s = []\n while lst:\n smallest = lst[0]\n for element in lst:\n if element[1], ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3342,"func_code":"\n \ndef sort_age(lst):\n def bubble_sort(lst):\n swap = True\n while swap:\n swap = False\n for i in range(len(lst)-1):\n if lst[i][1], ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3343,"func_code":"def sort_age(lst):\n sort = []\n while lst:\n biggest = lst[0]\n for element in lst:\n if element[1] > biggest[1]:\n biggest = element\n lst.remove(biggest)\n sort.append(biggest)\n\n return sort\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3344,"func_code":"def sort_age(lst):\n new=[]\n while lst:\n biggest=lst[0]\n for element in lst:\n if element[1]>biggest[1]: \n biggest=element\n \n lst.remove(biggest)\n new.append(biggest)\n return new\n\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3345,"func_code":"def sort_age(lst):\n for oldest in range(len(lst)-1):\n maxage = oldest\n for i in range(oldest,len(lst)):\n if int(lst[i][1]) > int(lst[maxage][1]):\n maxage = i\n lst[oldest], lst[maxage] = lst[maxage], lst[oldest]\n return lst\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3346,"func_code":"def sort_age(lst):\n swap = True\n while swap:\n swap = False\n for i in range(len(lst)-1):\n if lst[i][1] < lst[i+1][1]:\n lst[i],lst[i+1] = lst[i+1],lst[i]\n swap = True\n return lst\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3347,"func_code":"def sort_age(lst):\n\ti = 0\n\twhile i < len(lst)-1:\n\t if lst[i][1] > lst[i+1][1]:\n\t i += 1\n\t elif lst[i][1] < lst[i+1][1]:\n\t lst.append(lst[i])\n\t lst.remove(lst[i])\n\t sort_age(lst)\n\treturn lst\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3348,"func_code":"def sort_age(lst):\n newlst=[]\n lstages=[i[1] for i in lst]\n while lst:\n for i in lst:\n if i[1] == max(lstages):\n newlst+=[i]\n lst.remove(i)\n lstages.remove(i[1])\n return newlst\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3349,"func_code":"def sort_age(lst):\n sort = []\n while lst:\n biggest = lst[0]\n for element in lst:\n if element[1] > biggest[1]:\n biggest = element\n lst.remove(biggest)\n sort.append(biggest)\n\n return sort\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3350,"func_code":"def sort_age(lst):\n new = []\n while lst:\n largest = lst[0]\n for ele in lst:\n if ele[1] > largest[1]:\n largest = ele\n lst.remove(largest)\n new.append(largest)\n return new\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3351,"func_code":"def sort_age(lst):\n s = []\n while lst:\n smallest = lst[0]\n for element in lst:\n if element[1], ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3352,"func_code":"def biggest(lst):\n big=lst[0]\n for i in range (len(lst)):\n if lst[i][1]>big[1]:\n big=lst[i]\n else:\n continue\n return big\n \ndef sort_age(lst):\n sorted_lst=[]\n while lst:\n sorted_lst.append(biggest(lst))\n lst.remove(biggest(lst))\n return sorted_lst\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3353,"func_code":"def sort_age(lst):\n sort =[]\n while lst:\n biggest = lst[0]\n for i in lst:\n if int(i[1])> biggest[1]:\n biggest = i\n lst.remove(biggest)\n sort.append(biggest)\n return sort\n pass\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3354,"func_code":"def sort_age(lst):\n new_list = []\n while lst:\n biggest = lst[0]\n for item in lst:\n if item[1] > biggest[1]:\n biggest = item\n lst.remove(biggest)\n new_list.append(biggest)\n return new_list\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3355,"func_code":"def sort_age(lst):\n # Fill in your code here\n sorted_list = []\n \n while lst:\n oldest = lst[0]\n \n for element in lst:\n if element[1] > oldest[1]:\n oldest = element\n \n lst.remove(oldest)\n sorted_list.append(oldest)\n \n return sorted_list\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3356,"func_code":"def sort_age(lst):\n for i in range(len(lst)-1,0,-1):\n for a in range(i):\n if lst[a][1], ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3357,"func_code":"def biggest(lst):\n big=lst[0]\n for i in range (len(lst)):\n if lst[i][1]>big[1]:\n big=lst[i]\n else:\n continue\n return big\n \ndef sort_age(lst):\n sorted_lst=[]\n while lst:\n sorted_lst.append(biggest(lst))\n lst.remove(biggest(lst))\n return sorted_lst\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3358,"func_code":"def sort_age(lst):\n for i in range(len(lst)-1,0,-1):\n for a in range(i):\n if lst[a][1], ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3359,"func_code":"def sort_age(lst):\n total = ()\n def helper(i, tup):\n if tup == ():\n return (i,)\n elif i[1] > tup[0][1]:\n return (i,)+ tup\n else:\n return (tup[0],) + helper(i, tup[1:])\n for i in lst:\n if total == ():\n total = (i,)\n else:\n total = helper(i, total)\n return list(total)\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3360,"func_code":"def sort_age(lst):\n\tif len(lst) < 2:\n\t\treturn lst\n\tmid = len(lst) \/\/ 2\n\tleft = sort_age(lst[:mid])\n\tright = sort_age(lst[mid:])\n\treturn merge(left, right)\n\t\ndef merge(left, right):\n\ta = []\n\twhile left and right:\n\t\tif left[0][1] < right[0][1]:\n\t\t\ta.append(right.pop(0))\n\t\telse:\n\t\t\ta.append(left.pop(0))\n\ta.extend(left)\n\ta.extend(right)\n\treturn a\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3361,"func_code":"def sort_age(lst):\n sort = True\n while sort:\n sort = False\n for i in range(len(lst)-1):\n if lst[i][1] < lst[i+1][1]:\n sort = True\n lst[i], lst[i+1] = lst[i+1], lst[i]\n return lst\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3362,"func_code":"def sort_age(lst):\n for i in range(len(lst)-1):\n for a in range(i+1, len(lst)):\n if lst[i][1] < lst[a][1]:\n lst[i],lst[a]= lst[a],lst[i]\n \n return lst\n\n \n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3363,"func_code":"def sort_age(lst):\n # Fill in your code here\n sorted_list = []\n \n while lst:\n oldest = lst[0]\n \n for element in lst:\n if element[1] > oldest[1]:\n oldest = element\n \n lst.remove(oldest)\n sorted_list.append(oldest)\n \n return sorted_list\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3364,"func_code":"def sort_age(lst):\n newlist=[]\n newlist2=[]\n for elements in lst:\n newlist.append(elements)\n \n while newlist:\n largest = newlist[0]\n for elements in newlist:\n print (largest)\n if largest[1], ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3365,"func_code":"def sort_age(lst):\n new = []\n while lst:\n largest = lst[0]\n for ele in lst:\n if ele[1] > largest[1]:\n largest = ele\n lst.remove(largest)\n new.append(largest)\n return new\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3366,"func_code":"def sort_age(lst):\n new = []\n while lst:\n largest = lst[0]\n for ele in lst:\n if ele[1] > largest[1]:\n largest = ele\n lst.remove(largest)\n new.append(largest)\n return new\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3367,"func_code":"def sort_age(lst):\n sort = []\n while lst:\n oldest = lst[0]\n for i in lst:\n if i[1] > oldest[1]:\n oldest = i\n lst.remove(oldest)\n sort.append(oldest)\n return sort\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3368,"func_code":"def sort_age(lst):\n sort = []\n while lst:\n largest = lst[0]\n for element in lst: \n if element[1] > largest[1]: \n largest = element \n lst.remove(largest)\n sort.append(largest) \n return sort\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3369,"func_code":"def sort_age(lst):\n ans = []\n while lst:\n biggest = lst[0]\n for elem in lst:\n if elem[1] > biggest[1]:\n biggest = elem\n lst.remove(biggest)\n ans.append(biggest)\n \n return ans\n \n \n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3370,"func_code":"#cannot use this \n#def sort_age(lst):\n# lst.sort(key=lambda x: x[1], reverse = True)\n# return lst \n \ndef sort_age(lst):\n for i in range(0,len(lst) - 1):\n for j in range(i+1, len(lst)):\n if lst[i][1] < lst[j][1]:\n lst[i],lst[j]=lst[j],lst[i]\n return lst\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3371,"func_code":"def sort_age(lst):\n \n sort = []\n \n while lst:\n\n largest = lst[0]\n\n for x in lst:\n\n if x[1] > largest[1]:\n\n largest = x\n\n lst.remove(largest)\n\n sort.append(largest)\n\n return sort\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3372,"func_code":"\ndef sort_age(lst):\n for i in range(0,len(lst)-1): \n for j in range(i+1,len(lst)): \n if lst[i][1], ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3373,"func_code":"def sort_age(lst):\n\tsort=[]\n\tfor ele in lst:\n\t\tif sort==[]:\n\t\t\tsort+=[ele]\n\t\telse:\n\t\t\tfor i in range(len(sort)):\n\t\t\t\tif ele[1], ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3374,"func_code":"def sort_age(lst):\n\tsort=[]\n\tfor ele in lst:\n\t\tif sort==[]:\n\t\t\tsort+=[ele]\n\t\telse:\n\t\t\tfor i in range(len(sort)):\n\t\t\t\tif ele[1], ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3375,"func_code":"def sort_age(lst):\n for i in range(len(lst)-1):\n for j in range(i, len(lst)):\n if lst[j][1] > lst[i][1]:\n x = lst[i]\n lst[i] = lst[j]\n lst[j] = x\n return lst\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3376,"func_code":"def sort_age(lst):\n for start in range (len(lst) - 1):\n for i in range(start, len(lst)):\n if lst[i][1] > lst[start][1]:\n lst[i], lst[start] = lst[start], lst[i]\n return lst\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3377,"func_code":"def sort_age(lst):\n newlist = []\n while lst:\n oldest = lst[0]\n for i in lst:\n if i[1] > oldest[1]:\n oldest = i\n else:\n continue\n lst.remove(oldest)\n newlist.append(oldest)\n return newlist\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3378,"func_code":"def sort_age(lst):\n newlist = []\n while lst:\n oldest = lst[0]\n for i in lst:\n if i[1] > oldest[1]:\n oldest = i\n else:\n continue\n lst.remove(oldest)\n newlist.append(oldest)\n return newlist\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3379,"func_code":"def sort_age(lst):\n sort = []\n while lst:\n largest = lst[0]\n for element in lst: \n if element[1] > largest[1]: \n largest = element \n lst.remove(largest)\n sort.append(largest) \n return sort\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3380,"func_code":"def sort_age(lst):\n new_list=[]\n largest=0\n while lst:\n for i in lst:\n if i[1]>largest:\n largest = i[1]\n count=i\n new_list=new_list+[count]\n lst.remove(count)\n largest=0\n return new_list\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3381,"func_code":"def sort_age(lst):\n new_list=[]\n largest=0\n while lst:\n for i in lst:\n if i[1]>largest:\n largest = i[1]\n count=i\n new_list=new_list+[count]\n lst.remove(count)\n largest=0\n return new_list\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3382,"func_code":"#def sort_age(lst):\n # Fill in your code here\n #lst.sort(key = lambda x: x[1], reverse = True) #running an operation to mutate the list\n #return lst\n \ndef sort_age(lst):\n # Fill in your code here\n sort = []\n n = len(lst)\n \n for i in range(n):\n smallest = lst[0] #create a variable called \"smallest\"\n for element in lst: #loop through each element in list\n if element[1] < smallest[1]: #must compare by the same property of element\n smallest = element\n lst.remove(smallest)\n sort.append(smallest)\n \n \n sort.reverse() #reverse the list that is sorted\n return sort\n \ndef sort_age2(lst):\n sort = []\n while lst: #while there is something in the list\n smallest = lst[0]\n for element in lst:\n if element[1] < smallest[1]:\n smallest = element\n lst.remove(smallest)\n sort.append(smallest)\n \n sort.reverse()\n return sort\n \n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3383,"func_code":"def sort_age(lst):\n\tsorted = []\n\twhile lst:\n\t\tlargest = lst[0]\n\t\tfor i in lst:\n\t\t\tif i[1] > largest[1]:\n\t\t\t\tlargest = i\n\t\tlst.remove(largest)\n\t\tsorted.append(largest)\n\treturn sorted\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3384,"func_code":"def sort_age(lst):\n a = []\n while lst:\n oldest = lst[0]\n for i in lst:\n if i[1] > oldest[1]:\n oldest = i\n lst.remove(oldest)\n a.append(oldest)\n return a\n pass\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3385,"func_code":"def sort_age(lst):\n result=[]\n while lst:\n minimum=lst[0]\n for i in lst:\n if i[1], ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3386,"func_code":"def sort_age(lst):\n if len(lst) < 2:\n return lst\n for i in range(len(lst)-1):\n min = i\n for j in range(i+1, len(lst)):\n if lst[min][1] > lst[j][1]:\n min = j\n lst[i], lst[min] = lst[min], lst[i]\n lst.reverse()\n return lst# Fill in your code here\n \n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3387,"func_code":"def sort_age(lst):\n ages = []\n output = []\n for item in lst:\n ages.append(item[1])\n while ages:\n age = max(ages)\n for item in lst:\n if age == item[1]:\n output.append(item)\n ages.remove(age)\n return output\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3388,"func_code":"def sort_age(lst):\n ages = []\n output = []\n for item in lst:\n ages.append(item[1])\n while ages:\n age = max(ages)\n for item in lst:\n if age == item[1]:\n output.append(item)\n ages.remove(age)\n return output\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3389,"func_code":"def sort_age(lst):\n a = []\n while lst:\n oldest = lst[0]\n for i in lst:\n if i[1] > oldest[1]:\n oldest = i\n lst.remove(oldest)\n a.append(oldest)\n return a\n pass\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3390,"func_code":"def sort_age(lst):\n new = []\n for x in lst:\n index = 0\n for i in new:\n if x[1] < i[1]:\n index += 1\n new.insert(index,x)\n return new\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3391,"func_code":"def sort_age(lst):\n for j in range(len(lst)-1):\n for i in range(len(lst)-1-j):\n if lst[i][1]< lst[i+1][1]:\n lst[i],lst[i+1] = lst[i+1],lst[i]\n return lst\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3392,"func_code":"def sort_age(lst):\n sort =[]\n while lst:\n biggest = lst[0]\n for i in lst:\n if int(i[1])> biggest[1]:\n biggest = i\n lst.remove(biggest)\n sort.append(biggest)\n return sort\n pass\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3393,"func_code":"\n\ndef sort_age(lst):\n for i in range(0,len(lst)-1):\n for j in range(i+1,len(lst)):\n if lst[i][1], ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3394,"func_code":"def sort_age(lst):\n a = []\n b = lst.copy()\n lst.clear()\n for i in b:\n a += [i[1]]\n for i in range(len(a)):\n for i in range(len(a)):\n if a[i] == min(a):\n if b[i] not in lst:\n lst.append(b[i])\n a[i] = (max(a) +1)\n lst.reverse() \n return lst\n\n# sort will work for tuples\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3395,"func_code":"def sort_age(lst):\n lst1 = [] \n while lst:\n largest = lst[0]\n for i in lst:\n if i[1] > largest[1]:\n largest = i\n lst.remove(largest)\n lst1.append(largest)\n return lst1\n\n \n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3396,"func_code":"def sort_age(a):\n for i in range(len(a)):\n for j in range(len(a)-1, i, -1):\n if a[j][1] > a[j-1][1]:\n a[j], a[j-1] = a[j-1], a[j]\n\n return a\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3397,"func_code":"def sort_age(lst):\n sort_lst = []\n while lst:\n high = lst[0]\n for i in lst:\n if i[1] > high[1]:\n high = i\n lst.remove(high)\n sort_lst.append(high)\n return sort_lst\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3398,"func_code":"def sort_age(lst):\n a = []\n for i in lst:\n a.append(i[1])\n sort = []\n while a:\n largest = a[0]\n for element in a:\n if element > largest:\n largest = element\n a.remove(largest)\n sort.append(largest)\n lst2 = []\n counter = 0\n for i in sort:\n for j in lst:\n if j[1] == i:\n lst2.append(j)\n counter += 1\n return lst2\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3399,"func_code":"def sort_age(lst):\n result = []\n while lst:\n largest = lst[0][1]\n index = 0\n for i in range(len(lst)):\n if lst[i][1] > largest:\n index = i\n largest = lst[i][1]\n result.append(lst[index])\n lst.remove(lst[index])\n return result\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3400,"func_code":"def sort_age(lst):\n oldtoyoung=[]\n while lst:\n younger=lst[0]\n for older in lst:\n if older[1]>younger[1]:\n younger=older\n lst.remove(younger)\n oldtoyoung.append(younger)\n return oldtoyoung\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3401,"func_code":"def sort_age(lst):\n final = []\n temp = 0\n while lst:\n biggest = lst[0][1]\n for i in lst:\n if i[1]>=biggest:\n biggest = i[1]\n temp = i \n lst.remove(temp)\n final.append(temp)\n return final\n\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3402,"func_code":"def sort_age(lst):\n lst2 = []\n lst_num = []\n for x in range(len(lst)):\n lst_num.append(lst[x][1])\n \n lst_num_sorted = []\n while lst_num:\n lst_num_sorted.append(max(lst_num))\n lst_num.remove(max(lst_num))\n \n for y in lst_num_sorted:\n for z in lst:\n if y == z[1]:\n lst2.append(z)\n return lst2\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3403,"func_code":"def sort_age(lst):\n lst2 = []\n lst_num = []\n for x in range(len(lst)):\n lst_num.append(lst[x][1])\n \n lst_num_sorted = []\n while lst_num:\n lst_num_sorted.append(max(lst_num))\n lst_num.remove(max(lst_num))\n \n for y in lst_num_sorted:\n for z in lst:\n if y == z[1]:\n lst2.append(z)\n return lst2\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3404,"func_code":"def sort_age(lst):\n for i in range(len(lst)-1): \n x = i+1\n for j in range(x,len(lst)):\n if lst[i][1] < lst[j][1]:\n lst[i],lst[j]= lst[j], lst[i]\n return lst\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3405,"func_code":"def sort_age(lst):\n newlst=[]\n while lst:\n big=lst[0]\n for n in lst:\n if n[1]>big[1]:\n big=n\n lst.remove(big)\n newlst.append(big)\n return newlst\n \n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3406,"func_code":"def sort_age(lst):\n all_age = []\n for person in lst:\n all_age += [person[1],]\n result = []\n while len(result) < len(lst):\n for person in lst:\n if person[1] == max(all_age):\n result += (person,)\n all_age.remove(max(all_age))\n return result\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3407,"func_code":"def sort_age(lst):\n new_lst = []\n\n while lst:\n max_age = lst[0] # arbitrary number in list \n for x in lst: \n if x[1] > max_age[1]:\n max_age = x\n new_lst.append(max_age)\n lst.remove(max_age)\n return new_lst\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3408,"func_code":"def sort_age(lst):\n new_list = []\n while lst:\n eldest = lst[0]\n for i in lst:\n if i[1] > eldest[1]:\n eldest = i\n lst.remove(eldest)\n new_list.append(eldest)\n return new_list\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3409,"func_code":"def sort_age(lst):\n newlst=[]\n while lst:\n big=lst[0]\n for n in lst:\n if n[1]>big[1]:\n big=n\n lst.remove(big)\n newlst.append(big)\n return newlst\n \n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3410,"func_code":"def sort_age(lst):\n def helper(lol, lel):\n laugh = []\n while lol and lel:\n if lol[0][1] > lel[0][1]:\n laugh.append(lol.pop(0))\n else:\n laugh.append(right.pop(0))\n laugh.extend(lol)\n laugh.extend(right)\n return laugh\n if len(lst) < 2:\n return list(lst)\n centre = len(lst)\/\/2\n left = sort_age(lst[:centre])\n right = sort_age(lst[centre:])\n return helper(left, right)\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3411,"func_code":"def func(lst, x):\n index = len(lst)\n for i in range(len(lst)):\n if lst[i][1] < x:\n continue\n else:\n index = i\n break\n return index\n \ndef sort_age(lst):\n newlist = []\n for i in range(len(lst)):\n age = lst[i][1]\n b = func(newlist, age)\n newlist.insert(b, lst[i])\n return list(reversed(newlist))\n \n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3412,"func_code":"def sort_age(lst):\n # Fill in your code here\n sorted = []\n while lst:\n oldest = lst[0]\n for i in range(len(lst)):\n if lst[i][1] > oldest[1]:\n oldest = lst[i]\n sorted.append(oldest)\n lst.remove(oldest)\n return sorted\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3413,"func_code":"def sort_age(lst):\n if len(lst)==1 or len(lst)==0:\n return lst\n else:\n temp=lst[0][1]\n count=0\n for i in range(len(lst)):\n if lst[i][1]>temp:\n temp=lst[i][1]\n count=i\n result=[lst[count],]\n pop=lst.pop(count)\n return result+sort_age(lst)\n # Fill in your code here\n pass\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3414,"func_code":"def sort_age(lst):\n sort = []\n while lst:\n largest = lst[0]\n for element in lst:\n if element[1] > largest[1]:\n largest = element\n lst.remove(largest)\n sort.append(largest)\n return sort\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3415,"func_code":"def sort_age(lst):\n if len(lst)==1 or len(lst)==0:\n return lst\n else:\n temp=lst[0][1]\n count=0\n for i in range(len(lst)):\n if lst[i][1]>temp:\n temp=lst[i][1]\n count=i\n result=[lst[count],]\n pop=lst.pop(count)\n return result+sort_age(lst)\n # Fill in your code here\n pass\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3416,"func_code":"def sort_age(lst):\n if lst==[]:\n return []\n new_lst=[lst[0],]\n for x in lst[1:]:\n if x[1] > new_lst[-1][1]:\n new_lst += [x,]\n else:\n count=0\n while count new_lst[count][1]:\n count+=1\n continue\n else:\n new_lst = new_lst[0:count]+[x,]+new_lst[count:]\n break\n return new_lst[::-1]\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3417,"func_code":"def sort_age(lst):\n if lst==[]:\n return []\n new_lst=[lst[0],]\n for x in lst[1:]:\n if x[1] > new_lst[-1][1]:\n new_lst += [x,]\n else:\n count=0\n while count new_lst[count][1]:\n count+=1\n continue\n else:\n new_lst = new_lst[0:count]+[x,]+new_lst[count:]\n break\n return new_lst[::-1]\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3418,"func_code":"def sort_age(lst):\n final = []\n temp = 0\n while lst:\n biggest = lst[0][1]\n for i in lst:\n if i[1]>=biggest:\n biggest = i[1]\n temp = i \n lst.remove(temp)\n final.append(temp)\n return final\n\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3419,"func_code":"def sort_age(lst):\n sort = []\n while lst:\n largest = lst[0]\n for i in lst:\n if i[1] > largest[1]:\n largest = i\n lst.remove(largest)\n sort.append(largest)\n return sort\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3420,"func_code":"def sort_age(lst):\n if lst == []:\n return lst\n else:\n age_lst, new_lst = [], []\n for x in lst:\n age_lst.append(x[1])\n while age_lst:\n max_age = max(age_lst)\n for i in lst:\n if i[1] == max_age:\n new_lst.append(i)\n age_lst.remove(i[1])\n return new_lst\n pass\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3421,"func_code":"def sort_age(lst):\n l = len(lst)\n for i in range(0, l):\n for j in range(0, l-i-1):\n if (lst[j][1] > lst[j + 1][1]):\n temp = lst[j]\n lst[j]= lst[j + 1]\n lst[j + 1]= temp\n return lst[::-1]\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3422,"func_code":"def sort_age(lst):\n newlist = []\n if lst == []:\n return [] \n for i in lst : \n if newlist == []:\n newlist = i \n elif i[1] > newlist[1] :\n newlist = i \n lst.remove(newlist)\n return [newlist] + sort_age(lst)\n \n pass\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3423,"func_code":"def sort_age(lst):\n sort = []\n while lst:\n largest = lst[0]\n for i in lst:\n if i[1] > largest[1]:\n largest = i\n lst.remove(largest)\n sort.append(largest)\n return sort\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3424,"func_code":"def sort_age(lst):\n new_list = []\n while lst:\n biggest = lst[0]\n for item in lst:\n if item[1] > biggest[1]:\n biggest = item\n lst.remove(biggest)\n new_list.append(biggest)\n return new_list\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3425,"func_code":"def sort_age(lst):\n sort = []\n while lst:\n largest = lst[0]\n for i in lst:\n if i[1] > largest[1]:\n largest = i\n lst.remove(largest)\n sort.append(largest)\n return sort\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3426,"func_code":"def sort_age(lst):\n final = []\n temp = 0\n while lst:\n biggest = lst[0][1]\n for i in lst:\n if i[1]>=biggest:\n biggest = i[1]\n temp = i \n lst.remove(temp)\n final.append(temp)\n return final\n\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3427,"func_code":"def sort_age(lst):\n for i in range(0,len(lst)-1):\n for j in range(i+1,len(lst)):\n if lst[i][1], ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3428,"func_code":"def sort_age(lst):\n lst_len=len(lst)-1\n while lst_len>0:\n for i in range(lst_len):\n if lst[i][1]>lst[i+1][1]:\n lst[i],lst[i+1]=lst[i+1],lst[i]\n lst_len-=1\n return lst[::-1]\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3429,"func_code":"def sort_age(lst):\n sort = []\n while lst:\n biggest = lst[0]\n for element in lst:\n if element[1] > biggest[1]:\n biggest = element\n lst.remove(biggest)\n sort.append(biggest)\n return sort\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3430,"func_code":"def sort_age(lst):\n # Fill in your code here\n newlst=[]\n while lst:\n maximum = lst[0]\n for i in lst:\n if i[1]>maximum[1]:\n maximum = i\n \n newlst.append(maximum)\n lst.remove(maximum)\n\n return newlst\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3431,"func_code":"def sort_age(lst):\n ages=[]\n for j in lst:\n ages.append(j[1])\n ages=sort(ages)\n new_lst=[]\n for age in ages:\n for i in lst:\n if age==i[1]:\n new_lst.append(i)\n return new_lst\n \ndef sort(lst):\n age=[]\n while lst:\n largest=lst[0]\n for elem in lst:\n if elem > largest:\n largest = elem\n lst.remove(largest)\n age.append(largest)\n return age\n \n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3432,"func_code":"def sort_age(lst):\n new = []\n for x in lst:\n index = 0\n for i in new:\n if x[1] < i[1]:\n index += 1\n new.insert(index,x)\n return new\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3433,"func_code":"def sort_age(lst):\n result = []\n while lst:\n oldest = lst[0]\n for people in lst:\n if people[1] > oldest[1]:\n oldest = people\n lst.remove(oldest)\n result += (oldest,)\n return result\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3434,"func_code":"def sort_age(lst):\n while True: \n changed = False \n for i in range (len(lst)-1):\n if lst[i][1] < lst[i+1][1]:\n lst[i], lst[i+1] = lst[i+1], lst[i]\n changed = True \n if not changed: \n break \n return lst \n \n # lst.sort(key = lambda x: x[1], reverse= True)\n # return lst\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3435,"func_code":"def sort_age(lst):\n\tdef sort(lst):\n\t\tcounter = 0\n\t\ta = list(lst)\n\t\twhile counterprevious:\n\t\t\t\t\ta[i-1]=a[i]\n\t\t\t\t\ta[i]=previous\n\t\t\t\telse:\n\t\t\t\t\tprevious = a[i]\n\t\t\tcounter += 1\n\t\treturn a\n\tA = list(map(lambda x:x[1],lst))\n\ta = sort(A)\n\tb = []\n\tfor i in a:\n\t\tfor y in lst:\n\t\t\tif y[1]==i:\n\t\t\t\tb.append(y)\n\treturn b\n \n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3436,"func_code":"def sort_age(lst):\n sort = []\n while lst:\n biggest = lst[0]\n for element in lst:\n if element[1] > biggest[1]:\n biggest = element\n lst.remove(biggest)\n sort.append(biggest)\n return sort\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3437,"func_code":"def sort_age(lst):\n for i in range(0,len(lst)-1):\n for j in range(i+1,len(lst)):\n if lst[i][1], ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3438,"func_code":"def sort_age(lst):\n slist = []\n while lst:\n elder = lst[0]\n for i in range(len(lst)):\n if lst[i][1] > elder[1]:\n elder = lst[i]\n else:\n continue\n slist.append(elder)\n lst.remove(elder)\n return slist\n \n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3439,"func_code":"def sort_age(lst):\n slist = []\n while lst:\n elder = lst[0]\n for i in range(len(lst)):\n if lst[i][1] > elder[1]:\n elder = lst[i]\n else:\n continue\n slist.append(elder)\n lst.remove(elder)\n return slist\n \n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3440,"func_code":"\ndef sort_age(lst):\n\ta = 0\n\tfor i in range(len(lst) - 1):\n\t\tif lst[i][1] < lst[i+1][1]:\n\t\t\tlst.insert(i, lst[i+1])\n\t\t\tlst.pop(i + 2)\n\t\t\ta += 1\n\tif a == 0:\n\t\treturn lst\n\telse:\n\t\treturn sort_age(lst)\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3441,"func_code":"def sort_age(lst):\n new_lst = []\n\n while lst:\n max_age = lst[0] # arbitrary number in list \n for x in lst: \n if x[1] > max_age[1]:\n max_age = x\n new_lst.append(max_age)\n lst.remove(max_age)\n return new_lst\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3442,"func_code":"def sort_age(lst):\n # Fill in your code here\n newlst=[]\n while lst:\n maximum = lst[0]\n for i in lst:\n if i[1]>maximum[1]:\n maximum = i\n \n newlst.append(maximum)\n lst.remove(maximum)\n\n return newlst\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3443,"func_code":"def sort_age(lst):\n new_lst = []\n while lst:\n oldest = lst[0]\n for a in lst:\n if a[1] > oldest[1]:\n oldest = a\n lst.remove(oldest)\n new_lst.append(oldest)\n return new_lst\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3444,"func_code":"def sort_age(lst):\n sorted_age = []\n while lst:\n oldest = lst[0]\n for i in lst:\n if i[1] > oldest[1]:\n oldest = i\n sorted_age.append(oldest)\n lst.remove(oldest)\n return sorted_age\n","correct":true,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3445,"func_code":"def sort_age(lst):\n result = []\n while lst !=[]:\n lowest = lst[0][1]\n index = 0\n for i in range(1,len(lst)):\n if lst[i][1], ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3446,"func_code":"def sort_age(lst):\n sort = []\n while lst:\n oldest = lst[0]\n for person in lst:\n if person > oldest:\n person = oldest\n a.remove(smallest)\n sort.append(smallest)\n print(a)\n \n \n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3447,"func_code":"def sort_age(lst):\n sort = []\n while lst:\n oldest = lst[0]\n for person in lst:\n if person[1] > oldest[1]:\n person = oldest\n a.remove(oldest)\n sort.append(oldest)\n print(sort)\n \n \n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3448,"func_code":"def sort_age(lst):\n sort = []\n while lst:\n oldest = lst[0]\n for person in lst:\n if person[1] > oldest[1]:\n person = oldest\n a.remove(oldest)\n sort.append(oldest)\n print(lst)\n \n \n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3449,"func_code":"def sort_age(lst):\n sort = []\n while lst:\n oldest = lst[0]\n for person in lst:\n if person[1] >= oldest[1]:\n person = oldest\n lst.remove(oldest)\n sort.append(oldest)\n print(lst)\n \n \n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3450,"func_code":"def sort_age(lst):\n sort = []\n while lst:\n oldest = lst[0]\n for person in lst:\n if person[1] >= oldest[1]:\n person = oldest\n lst.remove(oldest)\n sort.append(oldest)\n return sort\n \n \n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3451,"func_code":"def sort_age(lst):\n for i in range(0,len(lst)):\n this=lst[i]\n for j in range(0,len(lst)):\n if lst[j][1], ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3452,"func_code":"def sort_age(lst):\n for i in range(0,len(lst)):\n this=lst[i]\n for j in range(0,len(lst)):\n if lst[j][1], ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3453,"func_code":"def sort_age(lst):\n for i in range(0,len(lst)):\n this=lst[i]\n for j in range(0,len(lst)):\n if lst[j][1], ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3454,"func_code":"def sort_age(lst):\n for i in range(0,len(lst)):\n this=lst[0]\n for j in range(1,len(lst)+1):\n a=len(lst)-j\n if lst[a][1]>this[1]:\n lst=lst[1:a+1]+[this]+lst[a+1:]\n break\n return lst\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3455,"func_code":"def sort_age(lst):\n result = []\n while lst != []:\n largest = lst[0][1]\n for i in lst:\n if i[1] > largest:\n largest_tup = i \n largest = i[1]\n lst.remove(largest_tup)\n result.append(largest_tup)\n return result\n \n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3456,"func_code":"def sort_age(lst):\n old_lst = lst\n new_lst = []\n while old_lst:\n largest = old_lst[0]\n for i in lst:\n if i > largest:\n largest = i\n old_lst.remove(largest)\n new_lst.append(largest)\n return new_lst\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3457,"func_code":"def sort_age(lst):\n return lst.sort(key=lambda x: x[1], reverse=True)\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3458,"func_code":"def sort_age(lst):\n lst.sort(key=lambda x: x[1], reverse=True)\n return lst\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3459,"func_code":"def sort_age(lst):\n sort = []\n while lst: \n smallest = lst[0]\n for element in lst:\n if element < smallest:\n smallest = element\n a.remove(smallest)\n sort.append(smallest)\n return sort\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3460,"func_code":"def sort_age(lst):\n sort = []\n while lst: \n biggest = lst[0]\n for element in lst:\n if element > biggest:\n biggest = element\n lst.remove(biggest)\n sort.append(biggest)\n return sort\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3461,"func_code":"def sort_age(lst):\n lst.sort(key=lambda x: x[1],reverse = True)\n return lst\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3462,"func_code":"def sort_age(lst):\n sample = lst[0]\n newlst = []\n for i in lst:\n if i[1] > sample[1]:\n newlst = [i] + newlst\n else:\n newlst += [i]\n return newlst\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3463,"func_code":"def sort_age(lst):\n product = []\n while lst:\n smallest = lst[0]\n for i in lst:\n if i[1], ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3464,"func_code":"def sort_age(lst):\n new_lst=[]\n new_lst.append(lst[0])\n for i in lst[1:]:\n for j in range(len(new_lst)):\n if i[1]>new_lst[j][1] and j==0:\n new_lst.insert(0,i)\n elif i[1]new_lst[j][1]:\n new_lst.insert(j,i)\n return new_lst\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3465,"func_code":"def sort_age(lst):\n product = []\n while lst:\n largest = lst[0]\n for i in lst:\n if i[1], ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3466,"func_code":"def sort_age(lst):\n while lsst: \n biggest = a[0]\n for element in a:\n if element > biggest:\n smallest = element\n a.remove(biggest)\n sort.append(biggest)\n return lst\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3467,"func_code":"def sort_age(lst):\n sort = []\n while lsst: \n biggest = a[0]\n for element in a:\n if element > biggest:\n smallest = element\n a.remove(biggest)\n sort.append(biggest)\n return sort\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3468,"func_code":"def sort_age(lst):\n sort = []\n while lst: \n biggest = a[0]\n for element in a:\n if element > biggest:\n smallest = element\n lst.remove(biggest)\n sort.append(biggest)\n return sort\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3469,"func_code":"def sort_age(lst):\n sort = []\n while lst: \n biggest = lst[0]\n for element in lst:\n if element > biggest:\n smallest = element\n lst.remove(biggest)\n sort.append(biggest)\n return sort\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3470,"func_code":"def sort_age(lst):\n sort = []\n while lst: \n biggest = lst[0]\n for element in lst:\n if element > biggest:\n biggest = element\n lst.remove(biggest)\n sort.append(biggest)\n return sort\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3471,"func_code":"def sort_age(lst):\n sort = []\n while lst: \n biggest = lst[1]\n for element in lst:\n if element > biggest:\n biggest = element\n lst.remove(biggest)\n sort.append(biggest)\n return sort\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3472,"func_code":"def sort_age(lst):\n def for_age(lst):\n for i in range(len(lst)):\n if i == 0: continue\n else:\n while i > 0:\n if lst[i][1] < lst[i-1][1]:\n lst[i], lst[i-1] = lst[i-1], lst[i]\n i -= 1\n else: i = 0\n for_age(lst).reverse\n return lst\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3473,"func_code":"def sort_age(lst):\n if len(lst) == 0:\n return []\n elif len(lst) == 1:\n return lst\n else:\n mid = len(lst) \/\/ 2\n lst1 = lst[:mid]\n lst2 = lst[mid:]\n \n result = []\n while lst1 and lst2:\n if lst1[0][1] < lst2[0][1]:\n result.append(lst1.pop())\n else:\n result.append(lst2.pop())\n result.extend(lst1)\n result.extend(lst2)\n \n return result\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3474,"func_code":"def sort_age(lst):\n if len(lst) == 0:\n return []\n elif len(lst) == 1:\n return lst\n else:\n mid = len(lst) \/\/ 2\n lst1 = sort_age(lst[:mid])\n lst2 = sort_age(lst[mid:])\n \n result = []\n while lst1 and lst2:\n if lst1[0][1] < lst2[0][1]:\n result.append(lst1.pop())\n else:\n result.append(lst2.pop())\n result.extend(lst1)\n result.extend(lst2)\n \n return result\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3475,"func_code":"def sort_age(lst):\n if len(lst) == 0:\n return []\n elif len(lst) == 1:\n return lst\n else:\n mid = len(lst) \/\/ 2\n lst1 = sort_age(lst[:mid])\n lst2 = sort_age(lst[mid:])\n \n result = []\n while lst1 and lst2:\n if lst1[0][1] < lst2[0][1]:\n result.append(lst2.pop())\n else:\n result.append(lst1.pop())\n result.extend(lst1)\n result.extend(lst2)\n \n return result\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3476,"func_code":"def sort_age(lst):\n a=lst\n sort=[]\n while a:\n smallest=a[0]\n for element in a:\n if element[1], ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3477,"func_code":"def sort_age(lst):\n a=lst\n sort=[]\n while a:\n smallest=a[0]\n for element in a:\n if element[1], ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3478,"func_code":"def sort_age(lst):\n a=lst\n sort=[]\n while a:\n smallest=a[0]\n for element in a:\n if element[1], ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3479,"func_code":"def sort_age(lst):\n lst.sort(key=lambda x: x[1], reverse=True)\n return lst\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3480,"func_code":"def sort_age(lst):\n l = len(lst)\n for i in range(l):\n largest = lst[i]\n for j in range(i+1,l):\n if lst[j][1] > largest[1]:\n largest = lst[j] #assign new largest value\n lst[i],lst[j] = lst[j],lst[j] #swap positions if larger\n return lst\n \n \n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3481,"func_code":"def sort_age(lst):\n\tlst.sort(key=lambda x: x[1],reverse=True)\n\tprint(lst)\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3482,"func_code":"def sort_age(lst):\n lst.sort(key=lambda x: x[1], reverse=True)\n return lst\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3483,"func_code":"def sort_age(lst):\n if lst==[]:\n return []\n sort=[]\n while lst:\n largest = lst[0]\n for i in lst:\n if i > largest:\n largest = i\n lst.remove(largest)\n sort.append(largest)\n return sort\n pass\n\n\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3484,"func_code":"def sort_age(lst):\n \n sort_lst = []\n \n while lst:\n smallest = lst[0]\n for element in lst:\n if element[1] < smallest[1]:\n smallest = element\n lst.remove(smallest)\n sort_lst.append(smallest)\n return sort_lst.reverse()\n \n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3485,"func_code":"def sort_age(lst):\n lst.sort(key = lambda x: x[1], reverse = True)\n return lst\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3486,"func_code":"def sort_age(lst):\n return lst.sort(key = lambda x: x[1], reverse = True)\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3487,"func_code":"def sort_age(lst):\n result = [lst[0]]\n for i in lst[1:]:\n if i[1] > result[0][1]:\n result.insert(0, i)\n elif i[1] < result[-1][1]:\n result.append(i)\n else:\n for j in range(len(result) - 1):\n if i[1] < result[j][1] and i[1] > result[j+1][1]:\n result.insert(j, i)\n return result\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3488,"func_code":"def sort_age(lst):\n lst.sort(key = lambda x: x[1], reverse = True)\n return lst\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3489,"func_code":"def sort_age(lst):\n result = [lst[0]]\n for i in lst[1:]:\n if i[1] > result[0][1]:\n result.insert(0, i)\n elif i[1] < result[-1][1]:\n result.append(i)\n else:\n for j in range(len(result) - 1):\n if i[1] < result[j][1] and i[1] > result[j+1][1]:\n result.insert(j+1, i)\n return result\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3490,"func_code":"def sort_age(lst):\n output = []\n while lst:\n smallest = lst[0]\n for i in lst:\n if i[1] < smallsest[1]:\n smallest = i\n lst.remove(i)\n output.append(i)\n return output\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3491,"func_code":"def sort_age(lst):\n output = []\n while lst:\n smallest = lst[0]\n for i in lst:\n if i[1] < smallest[1]:\n smallest = i\n lst.remove(i)\n output.append(i)\n return output\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3492,"func_code":"def sort_age(lst):\n output = []\n while lst:\n smallest = lst[0]\n for i in lst:\n if i[1] < smallest[1]:\n smallest = i\n lst.remove(smallest)\n output.append(smallest)\n return output\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3493,"func_code":"def sort_age(lst):\n return lst.sort(key=lambda x: x[1], reverse=True)\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3494,"func_code":"def sort_age(lst):\n final = []\n while lst:\n smallest = lst[0]\n for i in lst:\n if i[1] < smallest[1]:\n smallest = i\n lst.remove(smallest)\n final.append(smallest)\n print(lst)\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3495,"func_code":"def sort_age(lst):\n final = []\n while lst:\n biggest = lst[0]\n for i in lst:\n if i[1] > biggest[1]:\n biggest = i\n lst.remove(biggest)\n final.append(biggest)\n print(final)\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3496,"func_code":"def sort_age(lst):\n newlst=[]\n while lst:\n oldest = lst[0][1] #first age\n for person in lst:\n if person[1]>oldest:\n oldest=person[1]\n newlst.append(person)\n lst.remove(person)\n newlst.append(lst[0])\n lst.remove(lst[0])\n return newlst\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3497,"func_code":"def sort_age(lst):\n newlst = []\n while lst:\n current = lst[0]\n for element in lst:\n if element[1] < current[1]:\n current = element\n newlst += current\n lst.remove(current)\n return newlst\n \n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3498,"func_code":"def sort_age(lst):\n newlst = []\n while lst:\n current = lst[0]\n for element in lst:\n if element[1] < current[1]:\n current = element\n newlst += (current,)\n lst.remove(current)\n return newlst\n \n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3499,"func_code":"def sort_age(lst):\n result = []\n while lst:\n oldest = lst[0]\n for people in lst:\n if people[1] > oldest[1]:\n oldest = people\n lst.remove(oldest)\n result += (oldest,)\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3500,"func_code":"def sort_age(lst):\n # Fill in your code here\n new_lst = []\n while lst:\n for i in range(len(lst)):\n oldest = lst[0]\n if lst[i][1] > oldest[1]:\n oldest = lst[i] \n lst.remove(oldest)\n new_lst.append(oldest)\n \n return new_lst\n \n \n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3501,"func_code":"def sort_age(lst):\n arranged = []\n while lst:\n oldest = lst[0]\n for person in lst:\n if person > oldest:\n oldest = person\n lst.remove(oldest)\n arranged.append(oldest)\n return arranged\n pass\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3502,"func_code":"def sort_age(lst):\n lst.sort(key = lambda x:x[1], reverse = True)\n return lst\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3503,"func_code":"def sort_age(lst):\n a = []\n b = []\n n = len(lst)\n for i in range(n):\n age = lst[i][1]\n a += [age]\n a.sort()\n a.reverse()\n for j in range(n):\n for k in range(n):\n if a[j] == lst[k][1]:\n b += [lst[k]]\n else:\n continue\n return b\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3504,"func_code":"def sort_age(lst):\n sort = []\n while lst:\n biggest = lst[0]\n for element in lst:\n if element > biggest:\n biggest = element\n lst.remove(biggest)\n sort.append(biggest)\n return sort\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3505,"func_code":"def sort_age(lst):\n\tlst.sort(key = lambda x: x[1], reverse = True)\n\treturn lst\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3506,"func_code":"def sort_age(lst):\n final=[]\n while lst:\n old=lst[0]\n for i in lst:\n if old[1], ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3507,"func_code":"def sort_age(lst):\n final=[]\n while lst:\n old=lst[0]\n for i in lst:\n if old[1], ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3508,"func_code":"def sort_age(lst):\n lst.sort(key=lambda x:x[1],reverse=True)\n return lst\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3509,"func_code":"def sort_age(lst):\n rslt=[]\n while lst:\n smallest=a[0]\n for element in a:\n if element[1]>smallest[1]:\n smallest=element\n lst.remove(smallest)\n rslt.append(smallest)\n return rslt\n \n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3510,"func_code":"def sort_age(lst):\n rslt=[]\n while lst:\n smallest=lst[0]\n for element in a:\n if element[1]>smallest[1]:\n smallest=element\n lst.remove(smallest)\n rslt.append(smallest)\n return rslt\n \n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3511,"func_code":"def sort_age(lst):\n return lst.sort(key = lambda x: x[1])\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3512,"func_code":"def sort_age(lst):\n lst.sort(key = lambda x: x[1], reverse = True)\n return lst\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3513,"func_code":"def sort_age(lst):\n store = []\n oldest = lst[0]\n for i in lst[1:]:\n if i[1] > oldest[1]:\n oldest = i\n lst.remove(oldest)\n sort.append(oldest)\n return sort\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3514,"func_code":"def sort_age(lst):\n store = []\n oldest = lst[0]\n for i in lst[1:]:\n if i[1] > oldest[1]:\n oldest = i\n lst.remove(oldest)\n sort.append(oldest)\n return sort\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3515,"func_code":"def sort_age(lst):\n while lst:\n oldest = lst[0]\n for i in lst[1:]:\n if i[1] > oldest[1]:\n oldest = i\n lst.remove(oldest)\n sort.append(oldest)\n return sort\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3516,"func_code":"def sort_age(lst):\n while lst:\n oldest = lst[0]\n for i in lst[1:]:\n if i[1] > oldest[1]:\n oldest = i\n lst.remove(oldest)\n sort.append(oldest)\n return sort\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3517,"func_code":"def sort_age(lst):\n sort = []\n while lst:\n oldest = lst[0]\n for i in lst[1:]:\n if i[1] > oldest[1]:\n oldest = i\n lst.remove(oldest)\n sort.append(oldest)\n return sort\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3518,"func_code":"def sort_age(lst):\n lst.sort(key=lambda x:x[1],reverse=True)\n return lst\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3519,"func_code":"def sort_age(lst):\n lst.sort(key=lambda x:x[1],reverse=True)\n return lst\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3520,"func_code":"def sort_age(lst):\n lst.sort(key=lambda x:x[1],reverse=True)\n return lst\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3521,"func_code":"def sort_age(lst):\n lst.sort(key=lambda x:x[1],reverse=True)\n return lst\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3522,"func_code":"def sort_age(lst):\n lst.sort(key=lambda x:x[1],reverse=True)\n return lst\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3523,"func_code":"def sort_age(lst):\n lst = lst.sort(key = lambda x: x[1], reverse=True)\n return lst\n \n \n\n\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3524,"func_code":"def sort_age(lst):\n lst.sort(key=lambda x:x[1],reverse=True)\n return lst\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3525,"func_code":"def sort_age(lst):\n new_lst = []\n while lst:\n oldest = lst[0]\n for i in range(len(lst)):\n if lst[i][1] >= oldest[1]:\n oldest = lst[i]\n lst.remove(oldest)\n new_lst.append(oldest)\n print (new_lst)\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3526,"func_code":"def sort_age(lst):\n return lst.sort(key=lambda x:x[1],reverse=True)\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3527,"func_code":"def sort_age(lst):\n new_lst = []\n while lst:\n oldest = lst [0]\n for i in range(len(lst)):\n if lst[i][1] > oldest[1]:\n oldest = lst[i]\n lst.remove(oldest)\n new_lst.append(oldest)\n print(new_lst)\n\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3528,"func_code":"def sort_age(lst):\n new_lst = []\n while lst:\n oldest = lst [0]\n for i in range(len(lst)):\n if lst[i][1] > oldest[1]:\n oldest = lst[i]\n lst.remove(oldest)\n new_lst.append(oldest)\n print(new_lst)\n\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3529,"func_code":"def sort_age(lst):\n new_lst = []\n while lst:\n oldest = lst [0]\n for i in range(len(lst)):\n if lst[i][1] > oldest[1]:\n oldest = lst[i]\n lst.remove(oldest)\n new_lst.append(oldest)\n print(new_lst)\n\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3530,"func_code":"def sort_age(lst):\n lst.sort(key = lambda x:x[1], reverse = True)\n return lst\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3531,"func_code":"def sort_age(lst):\n new_lst = []\n while lst:\n oldest = lst[0]\n for i in range(len(lst)):\n if lst[i][1] > oldest[1]:\n oldest = lst[i]\n lst.remove(oldest)\n new_lst.append(oldest)\n print(new_lst)\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3532,"func_code":"def sort_age(lst):\n holder=[]\n for x in lst:\n if holder==[]:\n holder=x\n elif x[1]>holder[1]:\n holder=x\n return holder+sort_age(lst[1:])\n \n \n \n \n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3533,"func_code":"def sort_age(lst):\n holder=[]\n if lst==[]:\n return []\n for x in lst:\n if holder==[]:\n holder=x\n elif x[1]>holder[1]:\n holder=x\n return holder+sort_age(lst[1:])\n\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3534,"func_code":"def sort_age(lst):\n holder=[]\n if lst==[]:\n return []\n for x in lst:\n if holder==[]:\n holder=x\n elif x[1]>holder[1]:\n holder=x\n return [holder]+sort_age(lst[1:])\n\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3535,"func_code":"def sort_age(lst):\n holder=[]\n if lst==[]:\n return []\n for x in lst:\n if holder==[]:\n holder=x\n elif x[1]>holder[1]:\n holder=x\n return [holder]+sort_age(lst.remove(holder))\n\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3536,"func_code":"def sort_age(lst):\n answer = []\n for i in range(0,len(lst),-1):\n biggest = lst[i]\n for a in range(i):\n if lst[a][1] > biggest[1]:\n biggest = lst[a]\n answer += biggest \n return answer\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3537,"func_code":"def sort_age(lst):\n result = []\n maximum = 0\n for i in lst:\n if i[1] > maximum:\n maximum = i[1]\n result.insert(0,i)\n else:\n result.append(i)\n return result\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3538,"func_code":"def sort_age(lst):\n\tlst.sort(key=lambda tup:tup[1], reverse = True)\n\treturn lst\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3539,"func_code":"def sort_age(lst):\n lst.sort(lambda x: x[1])\n return lst\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3540,"func_code":"def sort_age(lst):\n lst.sort(key = lambda x: x[1])\n return lst\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3541,"func_code":"def sort_age(lst):\n lst.sort(key = lambda x: x[1], reverse = True)\n return lst\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3542,"func_code":"def sort_age(lst):\n for i in range(len(lst)-1):\n while lst[i][1] > lst[i+1][1]:\n temp = lst[i]\n del lst[i]\n lst += [temp]\n return lst\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3543,"func_code":"def sort_age(lst):\n for i in range(len(lst)-1):\n while lst[i][1] < lst[i+1][1]:\n temp = lst[i]\n del lst[i]\n lst += [temp]\n return lst\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3544,"func_code":"def sort_age(lst):\n for i in range(len(lst)-1):\n while lst[i][1] > lst[i+1][1]:\n temp = lst[i]\n del lst[i]\n lst += [temp]\n return lst.reverse()\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3545,"func_code":"def sort_age(lst):\n for i in range(len(lst)-1):\n while lst[i][1] > lst[i+1][1]:\n temp = lst[i]\n del lst[i]\n lst += [temp]\n lst.reverse()\n return lst\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3546,"func_code":"def sort_age(lst):\n largest = lst[0][1]\n sort1 = []\n for i in lst:\n if i > largest:\n largest = i\n sort1.append(i)\n return sort1\n \n \n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3547,"func_code":"def sort_age(lst):\n largest = lst[0][1]\n sort1 = []\n for i in lst:\n if i[1] > largest:\n largest = i[1]\n sort1.append(i)\n return sort1\n \n \n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3548,"func_code":"def sort_age(lst):\n sort1 = []\n while lst:\n largest = lst[0][1]\n if i[1] > largest:\n largest = i[1]\n lst.remove(i)\n sort1.append(i)\n return sort1\n \n \n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3549,"func_code":"def sort_age(lst):\n sort1 = []\n while lst:\n largest = lst[0][1]\n for i in lst:\n if i[1] > largest:\n largest = i[1]\n lst.remove(i)\n sort1.append(i)\n return sort1\n \n \n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3550,"func_code":"def sort_age(lst):\n smallest = lst[0][1]\n sort = []\n while lst:\n for k in lst:\n if k[1] < smallest:\n smallest = k[1]\n a.remove(smallest)\n sort.append(smallest)\n \n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3551,"func_code":"def sort_age(lst):\n smallest = lst[0][1]\n sort = []\n while lst:\n for k in lst:\n if k[1] < smallest:\n smallest = k[1]\n smallest_tuple = k\n lst.remove(k)\n sort.append(k)\n \n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3552,"func_code":"def sort_age(lst):\n lst.sort(key=lambda x: x[1], reverse=True)\n return lst\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3553,"func_code":"def sort_age(lst):\n sort = []\n while lst:\n biggest = lst[0]\n for k in lst:\n if k[1] > biggest[1]:\n biggest = k\n lst.remove(biggest)\n sort.append(biggest)\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3554,"func_code":"def sort_age(lst):\n new = []\n while lst:\n largest = lst[0][1]\n for i in lst:\n if i[1]>largest:\n largest = i[1]\n tpl = ()\n for j in lst:\n if j[1] == largest:\n j = tpl\n lst.remove(tpl)\n new.append(tpl)\n return new \n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3555,"func_code":"def sort_age(lst):\n new_lst = []\n while lst:\n oldest = lst[0]\n for i in range(len(lst)):\n if lst[i][1] > oldest[1]:\n oldest = lst[i]\n lst.remove(oldest)\n new_lst.append(oldest)\n print(new_lst)\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3556,"func_code":"def sort_age(lst):\n lst.sort(key=lambda x:x[1],reverse=True)\n return lst\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3557,"func_code":"def sort_age(lst):\n # Fill in your code here\n out = [lst[0],]\n for ele in lst[1:]:\n for indx in range(len(out)):\n if out[indx] < ele:\n out.insert(indx, ele)\n break\n elif indx == len(out) - 1:\n out.append(ele)\n return out\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3558,"func_code":"def sort_age(lst):\n # Fill in your code here\n out = [lst[0],]\n for ele in lst[1:]:\n for indx in range(len(out)):\n if out[indx][1] < ele[1]:\n out.insert(indx, ele)\n break\n elif indx == len(out) - 1:\n out.append(ele)\n return out\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3559,"func_code":"def sort_age(lst):\n # Fill in your code here\n if lst == ():\n return lst\n \n out = [lst[0],]\n for ele in lst[1:]:\n for indx in range(len(out)):\n if out[indx][1] < ele[1]:\n out.insert(indx, ele)\n break\n elif indx == len(out) - 1:\n out.append(ele)\n return out\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3560,"func_code":"def sort_age(lst):\n lst.sort(key=lambda x:x[1],reverse=True)\n return lst\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3561,"func_code":"def sort_age(lst):\n # Fill in your code here\n lst.sort(key=lambda x : x[1], reverse=T)\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3562,"func_code":"def sort_age(lst):\n sort=[]\n while lst:\n biggest=lst[0]\n for element in lst:\n if element[1] > biggest[1]:\n biggest=element\n lst.remove(biggest)\n sort.append(biggest)\n sort.append(biggest)\n return sort\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3563,"func_code":"def sort_age(lst):\n first = lst[0][1]\n result = []\n for x in lst[1:]:\n if x[1] > first:\n result = (first,) + (x[1],)\n else:\n result = (x[1],) + (first,)\n pass\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3564,"func_code":"def sort_age(lst):\n first = lst[0][1]\n result = []\n for x in lst[1:]:\n if x[1] > first:\n result = (first,) + (x[1],)\n else:\n result = (x[1],) + (first,)\n return result\n pass\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3565,"func_code":"def sort_age(lst):\n first = lst[0]\n firstnum = lst[0][1]\n result = []\n for x in lst[1:]:\n if x[1] > firstnum:\n result = (first,) + (x,)\n else:\n result = (x,) + (first,)\n return result\n pass\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3566,"func_code":"def sort_age(lst):\n firstnum = lst[0][1]\n result = (lst[0],)\n for x in lst[1:]:\n if x[1] > firstnum:\n result += (x,)\n else:\n result = (x,) + result\n return result\n pass\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3567,"func_code":"def sort_age(lst):\n firstnum = lst[0][1]\n result = (lst[0],)\n for x in lst[1:]:\n if x[1] < firstnum:\n result += (x,)\n else:\n result = (x,) + result\n return result\n pass\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3568,"func_code":"def sort_age(lst):\n firstnum = lst[0][1]\n result = [lst[0],]\n for x in lst[1:]:\n if x[1] < firstnum:\n result += (x,)\n else:\n result = (x,) + result\n return result\n pass\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3569,"func_code":"def sort_age(lst):\n lst1=[]\n while lst:\n smallest=lst[0]\n for ele in lst:\n if ele[1], ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3570,"func_code":"def sort_age(lst):\n sort = []\n while lst:\n oldest = lst[0]\n for i in lst:\n if i[1] > oldest[1]:\n oldest = i\n lst.remove(biggest)\n sort.append(biggest)\n return sort\n # Fill in your code here\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3571,"func_code":"def sort_age(lst):\n sort = []\n while lst:\n oldest = lst[0]\n for i in lst:\n if i[1] > oldest[1]:\n oldest = i\n lst.remove(biggest)\n sort.append(biggest)\n return sort\n # Fill in your code here\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3572,"func_code":"def sort_age(lst):\n \n people = []\n \n while lst:\n \n i = lst[0]\n \n for a in lst:\n \n if i[1] <= a[1] :\n \n i = a\n \n lst.remove(i)\n final.append(i)\n \n return final\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3573,"func_code":"def sort_age(lst):\n \n people = []\n \n while lst:\n \n i = lst[0]\n \n for a in lst:\n \n if a[1] >= i[1] :\n \n i = a\n \n lst.remove(i)\n \n final.append(i)\n \n return final\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3574,"func_code":"def sort_age(lst):\n \n people = []\n \n while lst:\n \n i = lst[0]\n \n for a in lst:\n \n if a[1] >= i[1] :\n \n i = a\n \n lst.remove(i)\n \n people.append(i)\n \n return final\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3575,"func_code":"def sort(lst):\n for i in range(len(lst)-1):\n if lst[i][1] > lst[i+1][1]:\n temp = lst[i]\n del lst[i]\n lst += [temp]\n else:\n continue\n return lst\n\ndef sort_age(lst):\n oldlist = tuple(lst)\n if tuple(sort(lst)) == oldlist:\n return lst\n else:\n sort(lst)\n return sort_age(lst)\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3576,"func_code":"def sort_age(lst):\n lst.sort(key= lambda x: x[1], reverse = True)\n return lst\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3577,"func_code":"def sort_age(lst):\n while lst:\n smallest = lst[0]\n for e in lst[1:]:\n if e[1], ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3578,"func_code":"def sort_age(lst):\n if lst == []:\n return new\n new = []\n small = lst[0][1]\n for i in range(1,len(lst)):\n if lst[i][1], ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3579,"func_code":"def sort_age(lst):\n if lst == []:\n return new\n new = []\n small = lst[0][1]\n for i in range(1,len(lst)):\n if lst[i][1], ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3580,"func_code":"def sort_age(lst):\n a = lst\n sort = []\n smallest = a[0][1]\n while a: # a is not []\n for element in a:\n if element[1] > smallest:\n smallest = element\n a.remove(smallest)\n sort.append(smallest)\n\n \n pass\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3581,"func_code":"def sort_age(lst):\n if len(lst) == 1:\n return lst\n else:\n new_list = []\n while lst:\n minimum = lst[0]\n for i in lst:\n if i[1] < minimum[1]:\n minimum = x\n new_list.append(minimum)\n lst.remove(minimum)\n return new_list\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3582,"func_code":"def sort_age(lst):\n while lst: # a is not []\n smallest = lst[0]\n for element in lst:\n if element[1] < smallest[1]:\n smallest = element\n lst.remove(smallest)\n sort.append(smallest)\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3583,"func_code":"def sort_age(lst):\n sort_list = []\n while lst: # a is not []\n smallest = lst[0]\n for element in lst:\n if element[1] < smallest[1]:\n smallest = element\n lst.remove(smallest)\n sort_list.append(smallest)\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3584,"func_code":"def sort_age(lst):\n sort_list = []\n while lst: # a is not []\n smallest = lst[0]\n for element in lst:\n if element[1] < smallest[1]:\n smallest = element\n lst.remove(smallest)\n sort_list.append(smallest)\n return sort_list\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3585,"func_code":"def sort_age(lst):\n sort_list = []\n while lst: # a is not []\n biggest = lst[0]\n for element in lst:\n if element[1] > smallest[1]:\n biggest = element\n lst.remove(biggest)\n sort_list.append(biggest)\n return sort_list\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3586,"func_code":"def sort_age(lst):\n sort = []\n while lst:\n oldest = lst[0]\n for i in lst:\n if i[1], ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3587,"func_code":"def sort_age(lst):\n males = []\n females = []\n for i in lst:\n if lst[0][0] == \"M\":\n males = males + [lst[0],]\n elif lst[0][0] == \"F\":\n females = females + [lst[0],]\n return merge_sort(males) + merge_sort(females)\n \ndef merge(left, right):\n results = []\n while left and right:\n if left[0][0] < right[0][0]:\n results.append(left,pop(0))\n else:\n results.append(right.pop(0))\n results.extend(left)\n results.extend(right)\n return results\n\ndef merge_sort(lst):\n if len(lst) < 2:\n return lst\n mid = len(lst) \/\/ 2\n left = merge_sort(lst[:mid])\n right = merge_sort(lst[mid:])\n return merge(left, right)\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3588,"func_code":"def sort_age(lst):\n males = []\n females = []\n while len(lst) > 0:\n if lst[0][0] == \"M\":\n males = males + [lst[0],]\n elif lst[0][0] == \"F\":\n females = females + [lst[0],]\n lst = lst[1:]\n return merge(merge_sort(males), merge_sort(females))\n \ndef merge(left, right):\n results = []\n while left and right:\n if left[0][0] < right[0][0]:\n results.append(left.pop(0))\n else:\n results.append(right.pop(0))\n results.extend(left)\n results.extend(right)\n return results\n\ndef merge_sort(lst):\n if len(lst) < 2:\n return lst\n mid = len(lst) \/\/ 2\n left = merge_sort(lst[:mid])\n right = merge_sort(lst[mid:])\n return merge(left, right)\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3589,"func_code":"def sort_age(lst):\n males, females = [], []\n for i in lst:\n if i[0] == \"M\":\n males = males + [lst[0],]\n elif i[0] == \"F\":\n females = females + [lst[0],]\n lst = lst[1:]\n return merge(merge_sort(males), merge_sort(females))\n \ndef merge(left, right):\n results = []\n while left and right:\n if left[0] > right[0]:\n results.append(left.pop(0))\n else:\n results.append(right.pop(0))\n results.extend(left)\n results.extend(right)\n return results\n\ndef merge_sort(lst):\n if len(lst) < 2:\n return lst\n mid = len(lst) \/\/ 2\n left = merge_sort(lst[:mid])\n right = merge_sort(lst[mid:])\n return merge(left, right)\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3590,"func_code":"def sort_age(lst):\n youngest = lst[0][1]\n sorted = []\n while lst:\n for elem in lst:\n if elem[1] < youngest:\n youngest = elem[1]\n lst.remove(youngest)\n sorted.append(youngest)\n return sorted\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3591,"func_code":"def sort_age(lst):\n sorted = []\n while lst:\n youngest = lst[0]\n for elem in lst:\n if elem[1] < youngest[1]:\n youngest = elem\n print(youngest)\n lst.remove(youngest)\n sorted.append(youngest)\n return sorted\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3592,"func_code":"def sort_age(lst):\n i=0\n while i+1, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3593,"func_code":"def sort_age(lst):\n new = []\n while lst:\n small = lst[0][1]\n name =lst[0][0]\n for ele in lst:\n if ele[1], ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3594,"func_code":"def sort_age(lst):\n i=0\n while i+1, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3595,"func_code":"def sort_age(lst):\n new = []\n while lst:\n small = lst[0][1]\n name =lst[0][0]\n for ele in lst:\n if ele[1], ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3596,"func_code":"def sort_age(lst):\n i=0\n while i+1, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3597,"func_code":"def sort_age(lst):\n return lst.sort(key = lambda x:x[1])\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3598,"func_code":"def sort_age(lst):\n new = []\n while lst:\n small = lst[0][1]\n name =lst[0][0]\n for ele in lst:\n if ele[1]>small:\n small = ele[1]\n name = ele[0]\n new.append((name,small))\n lst.remove((name,small))\n return new.reverse\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3599,"func_code":"def sort_age(lst):\n new = []\n while lst:\n curr = lst[0][1]\n for i in range(lst(old)):\n if lst[i][1], ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3600,"func_code":"def sort_age(lst):\n new = []\n while lst:\n curr = lst[0]\n for i in lst:\n if i[1], ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3601,"func_code":"def sort_age(lst):\n new = []\n while lst:\n curr = lst[0]\n for i in lst:\n if i[1], ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3602,"func_code":"def sort_age(lst):\n\tlst.sort(key = lambda x:x[1], reverse=True)\n\tprint (lst)\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3603,"func_code":"def sort_age(lst):\n i=0\n while i+1, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3604,"func_code":"def sort_age(lst):\n return lst.sort(key = lambda x: x[1], reverse = True)\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3605,"func_code":"def sort_age(lst):\n lst.sort(key = lambda x: x[1], reverse = True)\n return lst\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3606,"func_code":"def sort_age(lst):\n lst.sort(key=lambda x:x[1],reverse=True)\n return lst\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3607,"func_code":"def sort_age(lst):\n lst = ()\n for i in lst:\n if lst[i][1], ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3608,"func_code":"def sort_age(lst):\n lst.sort(key = lambda x: x[1])\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3609,"func_code":"def sort_age(lst):\n sort = [] #empty list\n while lst:\n largest = lst[0] #let the first element be the smallest first\n for i in lst:\n if i[1] > largest[1]:\n largest = i\n lst.removal(largest)\n sort.append(a)\n return sort\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3610,"func_code":"def sort_age(lst):\n sort = [] #empty list\n while lst:\n largest = lst[0] #let the first element be the smallest first\n for i in lst:\n if i[1] > largest[1]:\n largest = i\n lst.removal(largest)\n sort.append(largest)\n return sort\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3611,"func_code":"def sort_age(lst):\n sortt = [] #empty list\n while lst:\n largest = lst[0] #let the first element be the largest first\n for i in lst:\n if i[1] > largest[1]:\n largest = i\n lst.remove(largest)\n sortt.append(largest)\n return sort\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3612,"func_code":"def sort_age(lst):\n sortt = [] #empty list\n while lst:\n largest = lst[0] #let the first element be the largest first\n for i in lst:\n if i[1] > largest[1]:\n largest = i\n lst.remove(largest)\n sortt.append(largest)\n return sort\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3613,"func_code":"def sort_age(lst):\n sorted_lst = []\n while lst:\n smallest = lst[0]\n for i in lst:\n if i[1] < smallest[1]:\n smallest = i\n lst.remove(smallest)\n sorted_lst.append(smallest)\n return sorted_lst\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3614,"func_code":"def sort_age(lst):\n sorted_lst = []\n while lst:\n smallest = lst[0]\n for i in lst:\n if i[1] < smallest[1]:\n smallest = i\n lst.remove(smallest)\n sorted_lst.append(smallest)\n return sorted_lst.reverse\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3615,"func_code":"def sort_age(lst):\n lst.sort(lambda x: x[1])\n return lst\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3616,"func_code":"def sort_age(lst):\n lst.sort(key = lambda x: x[1], reverse = True)\n return lst\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3617,"func_code":"def sort_age(lst):\n sort=[]\n while lst:\n smallest = lst[0][1]\n for i in range (len(lst)):\n if lst[i][1] < smallest:\n smallest = lst[i][1]\n a.remove(smallest)\n sort.append(smallest)\n sort.reverse(smallest)\n return sort\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3618,"func_code":"def sort_age(lst):\n sort=[]\n while lst:\n smallest = lst[0][1]\n for i in range (len(lst)):\n if lst[i][1] < smallest:\n smallest = lst[i][1]\n lst.remove(smallest)\n sort.append(smallest)\n sort.reverse(smallest)\n return sort\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3619,"func_code":"def sort_age(lst):\n sort=[]\n while lst:\n smallest = lst[0][1]\n for i in range (1,len(lst)):\n if lst[i][1] < smallest:\n smallest = lst[i][1]\n lst.remove(smallest)\n sort.append(smallest)\n sort.reverse(smallest)\n return sort\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3620,"func_code":"def sort_age(lst):\n newlst = []\n ages = []\n for i in lst:\n ages.append(i[1])\n ages.sort()\n for x in ages[::-1]:\n for i in lst:\n if i[1] == x:\n newlst.append(i)\n return newlst\n \n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3621,"func_code":"def sort_age(lst):\n\tlst.sort(key = lambda x: x[1], reverse = True)\n\treturn lst\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3622,"func_code":"def sort_age(lst):\n lst.sort(key=lambda x:x[1],reverse=True)\n return lst\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3623,"func_code":"def sort_age(lst):\n a = lst\n sort = []\n while a:\n largest = a[0][1]\n for item in a:\n if item[1] >largest:\n largest = item\n a.remove(largest)\n sort.append(largest)\n print(sort)# Fill in your code here\n \n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3624,"func_code":"def sort_age(lst):\n a = lst\n sort = []\n while a:\n largest = a[0]\n for item in a:\n if item[1] >largest[1]:\n largest = item\n a.remove(largest)\n sort.append(largest)\n print(a)\n print(sort)# Fill in your code here\n \n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3625,"func_code":"def sort_age(lst):\n a = lst\n sort = []\n while a:\n largest = a[0]\n for item in a:\n if item[1] >largest[1]:\n largest = item\n a.remove(largest)\n sort.append(largest)\n\n print(sort)# Fill in your code here\n \n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3626,"func_code":"def sort_age(lst):\n lst.sort(key = lambda x: x[1], reverse = True)\n print(lst)\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3627,"func_code":"def sort_age(lst):\n lst.sort(key = lambda x: x[1], reverse = True)\n print(lst)\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3628,"func_code":"def sort_age(lst):\n a = lst\n sort = []\n while a:\n largest = a[0]\n for item in a:\n if item[1] >largest[1]:\n largest = item\n a.remove(largest)\n sort.append(largest)\n\n return sort# Fill in your code here\n \n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3629,"func_code":"def sort_age(lst):\n a = lst\n sort = []\n while a:\n largest = a[0]\n for item in a:\n if item[1] >largest[1]:\n largest = item\n a.remove(largest)\n sort.append(largest)\n print(a)\n print(sort)# Fill in your code here\n \n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3630,"func_code":"def sort_age(lst):\n a = lst\n sort = []\n while a:\n largest = a[0]\n for item in a:\n if item[1] >largest[1]:\n largest = item\n a.remove(largest)\n sort.append(largest)\n\n print(sort)# Fill in your code here\n \n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3631,"func_code":"def sort_age(lst):\n new = []\n while lst:\n eldest = lst[0]\n for i in lst:\n if i > eldest:\n eldest = i \n lst.remove(eldest)\n new.append(eldest)\n return new\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3632,"func_code":"def sort_age(lst):\n return lst.sort(key=lambda x: x[1], reverse=True)\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3633,"func_code":"def sort_age(lst):\n lst.sort(key=lambda x: x[1], reverse=True)\n return lst\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3634,"func_code":"def sort_age(lst):\n sort = [ ]\n while lst: # a is not [ ] \n biggest = lst[0] \n for element in lst:\n if element[1] > biggest[1]:\n biggest = element\n lst.remove(biggest)\n sort.append(biggest)\n return sort\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3635,"func_code":"def sort_age(lst):\n sort = []\n while lst: # a is not [ ] \n biggest = lst[0] \n for element in lst:\n if element[1] > biggest[1]:\n biggest = element\n lst.remove(biggest)\n sort.append(biggest)\n return sort\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3636,"func_code":"def sort_age(lst):\n lst.sort()\n lst.reverse()\n return lst\n pass\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3637,"func_code":"def sort_age(lst):\n lst.sort(key=lambda x: x[1], reverse=True)\n return lst\n pass\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3638,"func_code":"def sort_age(lst):\n biggest = lst[0][1]\n for i in range(len(lst)):\n if lst[0][1], ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3639,"func_code":"def sort_age(lst):\n new = []\n while lst:\n smallest = lst[0][1]\n for i in lst:\n if i[1] < smallest:\n smallest = i[1]\n lst.remove(smallest)\n new.append(smallest)\n return new\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3640,"func_code":"def sort_age(lst):\n new = []\n while lst:\n largest = lst[0][1]\n for i in lst:\n if i[1] > largest:\n largest = i[1]\n lst.remove(i)\n new.append(i)\n return new\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3641,"func_code":"def sort_age(lst):\n new_lst = []\n for i in range(len(lst)):\n if lst[i][1]< lst[i+1][1]:\n new_lst.append(lst[i])\n lst.reverse()\n return lst\n \n pass\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3642,"func_code":"def sort_age(lst):\n new_lst = [()]\n for i in range(len(lst)):\n if lst[i][1]< lst[i+1][1]:\n new_lst.append(lst[i])\n lst.reverse()\n return lst\n \n pass\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3643,"func_code":"def sort_age(lst):\n new_lst = []\n for i in range(len(lst)):\n if lst[i][1]> lst[i+1][1]:\n new_lst.append(lst[i])\n return lst \n \n \n pass\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3644,"func_code":"def sort_age(lst):\n lst.sort(key=lambda x:x[1],reverse=True)\n return lst\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3645,"func_code":"def sort_age(lst):\n agelist = [lst[0],]\n for i in lst:\n if i[1] > agelist[0][1]:\n agelist.insert(0, i)\n elif i[1] < agelist[len(agelist)-1][1]:\n agelist.insert(len(agelist), i)\n else:\n for x in range(0,len(agelist)):\n if agelist[x][1]< i[1] < agelist[x+1][1]:\n agelist.insert(x+1, i)\n return agelist\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3646,"func_code":"def sort_age(lst):\n decoy = []\n decoy2 = []\n final = []\n for i in lst:\n decoy.append(i[1])\n while decoy != []:\n decoy2.append(min(decoy))\n decoy.remove(min(decoy))\n for i in decoy2:\n for j in lst:\n if i == j[1]:\n final.append(j)\n return final\n \n \n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3647,"func_code":"def sort_age(lst):\n sort = []\n while len(lst) > 0:\n smallest = lst[0]\n for i in lst:\n if i[1] < smallest[1]:\n smallest[1] = i[1]\n \n lst.remove(smallest)\n sort.append(smallest)\n return sort\n \n \n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3648,"func_code":"def sort_age(lst):\n agelist = [lst[0],]\n for i in range(1,len(lst)):\n if lst[i][1] > agelist[0][1]:\n agelist.insert(0, lst[i])\n elif lst[i][1] < agelist[len(agelist)-1][1]:\n agelist.insert(len(agelist), lst[i])\n else:\n for x in range(0,len(agelist)):\n if agelist[x][1]> lst[i][1] > agelist[x+1][1]:\n agelist.insert(x+1, lst[i])\n break\n return agelist\n \n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3649,"func_code":"def sort_age(lst):\n if len(lst)==1:\n return lst\n else:\n used_lst=lst.copy()\n ages=()\n for i in lst:\n ages+=(i[1],)\n for i in lst:\n if i[1]==max(ages):\n new_lst=[i]\n used_lst.remove(i)\n return new_lst+sort_age(used_lst)\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3650,"func_code":"def sort_age(lst):\n agelist = [lst[0],]\n for i in range(1,len(lst)):\n if lst[i][1] > agelist[0][1]:\n agelist.insert(0, lst[i])\n elif lst[i][1] < agelist[len(agelist)-1][1]:\n agelist.insert(len(agelist), lst[i])\n else:\n for x in range(0,len(agelist)):\n if agelist[x][1]> lst[i][1] > agelist[x+1][1]:\n agelist.insert(x+1, lst[i])\n break\n return agelist\n \n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3651,"func_code":"def merge(one,two):\n new_tup = []\n while left and right:\n if one[0][1] < two[0][1]:\n new_tup.append(one.pop(0))\n else:\n new_tup.append(two.pop(0))\n return new_tup\n\ndef sort_age(lst):\n n = len(lst)\n if n <2:\n return lst\n left = lst[:n\/2]\n right = lst[n\/2:]\n return merge(left,right)\n \n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3652,"func_code":"def merge(one,two):\n new_tup = []\n while one and two:\n if one[0][1] < two[0][1]:\n new_tup.append(one.pop(0))\n else:\n new_tup.append(two.pop(0))\n return new_tup\n\ndef sort_age(lst):\n n = len(lst)\n if n <2:\n return lst\n left = lst[:n\/2]\n right = lst[n\/2:]\n return merge(left,right)\n \n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3653,"func_code":"def sort_age(lst):\n sort = []\n while lst:\n smallest = lst[0]\n for element in a:\n if element[1] < smallest[1]:\n smallest = element\n lst.remove(smallest)\n sort.append(smallest)\n \n pass\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3654,"func_code":"def sort_age(lst):\n return lst.sort(key=lambda x: x[1], reverse=True)\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3655,"func_code":"def sort_age(lst):\n n = len(lst)\n result = []\n while n != 0:\n test = []\n for counter in range(n):\n test.append(lst[counter][1])\n first = test(max)\n for counter in range(n):\n if lst[counter][1] == first:\n result.append(lst.pop(counter))\n n = len(lst)\n return result\n \n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3656,"func_code":"def sort_age(lst):\n n = len(lst)\n result = []\n while n != 0:\n test = []\n for counter in range(n):\n test.append(lst[counter][1])\n first = max(test)\n for counter in range(n):\n if lst[counter][1] == first:\n result.append(lst.pop(counter))\n n = len(lst)\n return result\n \n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3657,"func_code":"def sort_age(lst):\n lst.sort(key=lambda x: x[1], reverse=True)\n return lst\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3658,"func_code":"def sort_age(lst):\n lst.sort(key=lambda x: x[1])\n return lst\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3659,"func_code":"def sort_age(lst):\n lst.sort(key=lambda x: x[1])\n lst.reverse()\n return lst\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3660,"func_code":"def sort_age(lst):\n lst.sort(key= lambda x: x[1])\n return lst\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3661,"func_code":"def sort_age(lst):\n lst.sort(key= lambda x: x[1], reverse = True)\n return lst\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3662,"func_code":"def sort_age(lst):\n new_lst = []\n for i in range(len(lst)):\n max_num = max(lst)\n lst.remove(max_num)\n new_lst.append(max_num)\n return new_lst\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3663,"func_code":"def sort_age(lst):\n new_lst = []\n for i in range(len(lst)):\n max_num = max(lst)\n lst.remove(max_num)\n new_lst.append(max_num)\n return new_lst\n\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3664,"func_code":"def sort_age(lst):\n male = []\n female = []\n for i in range(len(lst)):\n if lst[i][0] == \"M\":\n male.append(lst[i])\n else:\n female.append(lst[i])\n male.sort()\n female.sort()\n combine = male[::-1] + female[::-1]\n return combine\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3665,"func_code":"def sort_age(lst):\n lst.sort(key = lambda x: x[1], reverse = True)\n return lst\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3666,"func_code":"def sort_age(lst):\n n = len(lst)\n result = []\n while n != 0:\n test = []\n for counter in range(n):\n test.append(lst[counter][1])\n first = max(test)\n for counter in range(n):\n if lst[counter][1] == first:\n result.append(lst.pop(counter))\n n = len(lst)\n return result\n \n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3667,"func_code":"def sort_age(lst):\n a=[]\n while lst:\n for i in lst:\n if i==max(lst):\n a.append(i)\n return a\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3668,"func_code":"def sort_age(lst):\n a=[]\n for i in lst:\n if i==max(lst):\n a.append(i)\n continue \n return a\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3669,"func_code":"def sort_age(lst):\n a=[]\n for i in lst:\n if i[1]>lst[0][1]:\n a.append(i)\n continue \n return a\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3670,"func_code":"def sort_age(lst):\n a=[]\n for i in lst:\n if i[1]>lst[0][1]:\n a.append(i)\n return a\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3671,"func_code":"def sort_age(lst):\n a=[]\n while lst:\n biggest=lst[0]\n for i in lst:\n if i > biggest:\n biggest=i\n lst.remove(biggest)\n a.append(biggest)\n return a\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3672,"func_code":"def sort_age(lst):\n youngest = lst[0][1]\n for item in lst:\n if item[1] < youngest:\n youngest = item[1]\n lst.remove(item)\n lst = item + lst\n \n return lst\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3673,"func_code":"def sort_age(lst):\n youngest = lst[0][1]\n for item in lst:\n if item[1] < youngest:\n youngest = item[1]\n lst.remove(item)\n lst = [item,] + lst\n \n return lst\n\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3674,"func_code":"def sort_age(lst):\n oldest = lst[0][1]\n for item in lst:\n if item[1] > oldest:\n oldest = item[1]\n lst.remove(item)\n lst = [item,] + lst\n \n return lst\n\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3675,"func_code":"def sort_age(lst):\n a=[]\n while lst:\n biggest=lst[0]\n for i in lst:\n if i >= biggest:\n biggest=i\n lst.remove(biggest)\n a.append(biggest)\n return a\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3676,"func_code":"def sort_age(lst):\n compiled = []\n result = []\n for i in lst:\n compiled = compiled + [i[1]]\n compiled.sort()\n compiled.reverse()\n for i in compiled:\n for j in lst:\n if i == j[1]:\n result = result + [j]\n return result\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3677,"func_code":"def sort_age(lst):\n sort = []\n while lst: # a is not []\n smallest = (lst[0])[1]\n for element in lst:\n if element[1] < smallest:\n smallest = element\n lst.remove(smallest)\n sort.append(smallest)\n return lst\n\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3678,"func_code":"def sort_age(lst):\n sorted = []\n while lst:\n oldest = lst[0]\n for element in lst:\n if element[1] > oldest[1]:\n oldest = element\n lst.remove(oldest)\n sorted.append(oldest)\n return sorted\n \n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3679,"func_code":"def sort_age(lst):\n return lst.sort(key=lambda x:x[1])\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3680,"func_code":"def sort_age(lst):\n def age(i):\n return i[1]\n \n def position(seq, ele):\n n = len(seq)\n for i in range(n):\n if seq[i] == ele:\n return i\n \n def largest_age(seq):\n largest = age(seq[0])\n largest_pos = 0\n for i in seq:\n if age(i) > largest:\n largest = age(i)\n largest_pos = position(seq,i)\n return seq[largest_pos]\n n = len(lst)\n if n ==0:\n return []\n elif n ==1:\n return lst\n else:\n return [largest_age(lst)]+[sort_age(lst[1:])]\n \n \n # Fill in your code here\n pass\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3681,"func_code":"def sort_age(lst):\n lst.sort(key=lambda x:x[1])\n lst.reverse()\n return lst\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3682,"func_code":"def sort_age(lst):\n sort = []\n while lst:\n oldest = list[0]\n for x in lst:\n if x[1] > oldest[1]:\n oldest = x\n a.remove(oldest)\n sort.append(oldest)\n return sort\n \n \n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3683,"func_code":"def sort_age(lst):\n sort = []\n while lst:\n oldest = lst[0]\n for x in lst:\n if x[1] > oldest[1]:\n oldest = x\n a.remove(oldest)\n sort.append(oldest)\n return sort\n \n \n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3684,"func_code":"def sort_age(lst):\n lst.sort(key=lambda x: x[1])\n lst.reverse()\n return lst\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3685,"func_code":"def sort_age(lst):\n list1 = ()\n i = 0\n smallest = lst[0][1]\n s = lst[0]\n for i in range(1,len(lst)):\n if lst[i][1] < smallest:\n smallest = lst[i][1]\n s = lst[i]\n list1 += s\n return list1\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3686,"func_code":"def sort_age(lst):\n list1 = []\n i = 0\n smallest = lst[0][1]\n s = lst[0]\n for i in range(1,len(lst)):\n if lst[i][1] < smallest:\n smallest = lst[i][1]\n s = lst[i]\n list1 += s\n return list1\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3687,"func_code":"def sort_age(lst):\n list1 = []\n i = 0\n smallest = lst[0][1]\n s = (lst[0],)\n for i in range(1,len(lst)):\n if lst[i][1] < smallest:\n smallest = lst[i][1]\n s = (lst[i],)\n list1 += s\n return list1\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3688,"func_code":"def sort_age(lst):\n list1 = []\n smallest = lst[0][1]\n s = (lst[0],)\n for i in range(1,len(lst)):\n if lst[i][1] < smallest:\n smallest = lst[i][1]\n s = (lst[i],)\n list1 += s\n return list1\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3689,"func_code":"def sort_age(lst):\n list1 = []\n smallest = lst[0][1]\n s = (lst[0],)\n for i in range(1,len(lst)):\n if lst[i][1] < smallest:\n smallest = lst[i][1]\n s = (lst[i],)\n list1 += s\n return list1\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3690,"func_code":"def sort_age(lst):\n list1 = []\n smallest = lst[0][1]\n s = (lst[0],)\n for j in range(1,len(lst)):\n \n for i in range(1,len(lst)-1):\n if lst[i][1] < smallest:\n smallest = lst[i][1]\n s = (lst[i],)\n list1 += s\n return list1\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3691,"func_code":"def sort_age(lst):\n list1 = []\n while lst:\n biggest = lst[0][1]\n b = lst[0]\n for i in range(1,len(lst)-1):\n if lst[i][1] > biggest:\n biggest = lst[i][1]\n s = (lst[i],)\n lst.remove(biggest)\n list1.append(biggest)\n return list1\n\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3692,"func_code":"def sort_age(lst):\n list1 = []\n while lst:\n biggest = lst[0][1]\n b = lst[0]\n for i in range(1,len(lst)):\n if lst[i][1] > biggest:\n biggest = lst[i][1]\n s = (lst[i],)\n lst.remove(biggest)\n list1.append(biggest)\n return list1\n\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3693,"func_code":"def sort_age(lst):\n list1 = []\n while lst:\n biggest = lst[0][1]\n b = lst[0]\n for i in range(1,len(lst)):\n if lst[i][1] > biggest:\n biggest = lst[i][1]\n b = (lst[i],)\n lst.remove(b)\n list1.append(b)\n return list1\n\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3694,"func_code":"def sort_age(lst):\n swap = True\n while swap:\n swap = False\n for tag in range(len(lst)-1):\n if lst[tag][1] < lst[tag+1][1]:\n lst[tag], lst[tag+1] = lst[tag+1], lst[tag]\n swap = True\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3695,"func_code":"def sort_age(lst):\n list1 = []\n while lst:\n biggest = lst[0]\n \n for i in range(1,len(lst)):\n if lst[i][1] > biggest[1]:\n biggest = lst[i][1]\n \n lst.remove(biggest)\n list1.append(biggest)\n return list1\n\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3696,"func_code":"def sort_age(lst):\n list1 = []\n while lst:\n biggest = lst[0]\n \n for i in range(1,len(lst)+1):\n if lst[i][1] > biggest[1]:\n biggest = lst[i][1]\n \n lst.remove(biggest)\n list1.append(biggest)\n return list1\n\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3697,"func_code":"def sort_age(lst):\n list1 = []\n while lst:\n biggest = lst[0]\n \n for i in lst:\n if i[1] > biggest[1]:\n biggest = i[1]\n \n lst.remove(biggest)\n list1.append(biggest)\n return list1\n\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3698,"func_code":"def sort_age(lst):\n\tlst.sort(key = lambda x: x[1], reverse = True)\n\treturn lst\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3699,"func_code":"def sort_age(lst):\n newlst = []\n while lst:\n i = lst[0]\n for element in lst:\n if element[1] >= i[1]:\n i = n\n lst.remove(i)\n final.append(i)\n return newlst\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3700,"func_code":"def sort_age(lst):\n newlst = []\n while lst:\n i = lst[0]\n for element in lst:\n if element[1] >= i[1]:\n i = element\n lst.remove(i)\n final.append(i)\n return newlst\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3701,"func_code":"def sort_age(lst):\n a = list(set(lst))\n lst.clear()\n lst.append(a)\n return lst\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3702,"func_code":"def sort_age(lst):\n res = []\n age_list= []\n while lst:\n for i in range(len(lst)):\n age_list = age_list+ [lst[i][1]]\n for i in lst:\n if max(age_list) == i[1]:\n res= res + [i]\n else:\n res = res\n lst.remove(i)\n age_list.remove(i[1])\n return res \n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3703,"func_code":"def sort_age(lst):\n lst.sort(key = lambda x: x[1], reverse = True)\n return lst\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3704,"func_code":"def sort_age(lst):\n sort = []\n while lst:\n smallest = lst[0]\n for element in lst:\n if element[1] < smallest[1]:\n smallest = element\n lst.remove(smallest)\n sort.append(smallest)\n\n return sort\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3705,"func_code":"def sort_age(lst):\n lst.sort(key=lambda x:x[1],reverse=True)\n return lst\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3706,"func_code":"def sort_age(lst):\n s = []\n while lst:\n smallest = lst[0]\n for element in lst:\n if element[1], ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3707,"func_code":"def sort_age(lst):\n # Fill in your code here\n return lst.sort(key=lambda x: x[1])\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3708,"func_code":"def sort_age(lst):\n lst.sort(key= lambda x: x[1], reverse=True)\n return lst\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3709,"func_code":"def sort_age(lst):\n for i in range(len(lst)-1):\n for a in range(i+1, len(lst)):\n if lst[i][1] < lst[a][1]:\n lst[i]= lst[a]\n lst[a]= lst[i]\n return lst\n\n \n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3710,"func_code":"def sort_age(lst):\n while lst:\n smallest = lst[0][1]\n for x in lst:\n if x[1] < smallest:\n smallest = x\n lst.remove(smallest)\n sort.append(smallest)\n return lst\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3711,"func_code":"def sort_age(lst):\n # Fill in your code here\n sorted_list = []\n \n while a:\n oldest = lst[0]\n \n for element in lst:\n if element[1] > oldest:\n oldest = element[1]\n \n lst.remove(oldest)\n sorted_list.append(oldest)\n \n return sorted_list\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3712,"func_code":"def sort_age(lst):\n # Fill in your code here\n lst.sort(key=lambda x: x[1], reverse=True)\n return lst\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3713,"func_code":"def sort_age(lst):\n lst.sort(key = lambda x: x[1], reverse = True)\n return lst\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3714,"func_code":"def sort_age(lst):\n if len(lst) < 2:\n return lst\n midpoint = len(lst) \/\/ 2\n left = sort_age(lst[:midpoint])\n right = sort_age(lst[midpoint:])\n new_list = []\n while left and right:\n if left[0][1] < right[0][1]:\n new_list.append(right.pop(0))\n else:\n new_list.append(left.pop(0))\n new_list.extend(left)\n new_list.extend(right)\n return new_list\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3715,"func_code":"def sort_age(lst):\n if len(lst) < 2:\n return lst\n midpoint = len(lst) \/\/ 2\n left = sort_age(lst[:midpoint])\n right = sort_age(lst[midpoint:])\n new_list = []\n while left and right:\n if left[0][1] < right[0][1]:\n new_list.append(right.pop(0))\n else:\n new_list.append(left.pop(0))\n new_list.extend(left)\n new_list.extend(right)\n return new_list\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3716,"func_code":"def sort_age(lst):\n if len(lst) < 2:\n return lst\n midpoint = len(lst) \/\/ 2\n left = sort_age(lst[:midpoint])\n right = sort_age(lst[midpoint:])\n new_list = []\n while left and right:\n if left[0][1] > right[0][1]:\n new_list.append(left.pop(0))\n else:\n new_list.append(right.pop(0))\n new_list.extend(left)\n new_list.extend(right)\n new_list.reverse\n return new_list\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3717,"func_code":"def sort_age(lst):\n new = []\n while lst:\n largest = lst[0]\n for ele in lst:\n if ele[1] > largest:\n largest = ele\n a.remove(largest)\n new.append(largest)\n return new\n \n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3718,"func_code":"def sort_age(lst):\n new = []\n while lst:\n largest = lst[0]\n for ele in lst:\n if ele[1] > largest:\n largest = ele\n a.remove(largest)\n new.append(largest)\n return new\n \n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3719,"func_code":"def sort_age(lst):\n lst.sort(key = lambda x: x[1], reverse = True)\n return lst\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3720,"func_code":"def sort_age(lst):\n sort=[]\n while lst:\n largest=lst[0][1]\n for i in lst:\n if i[1]>largest:\n largest=i[1]\n lst.remove(i)\n sort.append(i)\n return sort \n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3721,"func_code":"def sort_age(lst):\n lst.sort(key=lambda x: x[1], reverse = True)\n return lst \n pass\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3722,"func_code":"def sort_age(lst):\n for i in range(len(lst)-1):\n if lst[i+1][1] < lst[i][1]:\n x = lst[i]\n lst[i] = lst[i+1]\n lst[i+1] = x\n return lst\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3723,"func_code":"def sort_age(lst):\n for i in range(len(lst)-1):\n if lst[i+1][1] > lst[i][1]:\n x = lst[i]\n lst[i] = lst[i+1]\n lst[i+1] = x\n return lst\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3724,"func_code":"def sort_age(lst):\n lst.sort(key = lambda x: x[1], reverse = True)\n return lst\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3725,"func_code":"def sort_age(lst):\n for i in range(len(lst)-1):\n for j in range(len(lst)-1-i):\n if lst[j][1] > lst[j+1][1]:\n lst[j+1][1], lst[j][1] = lst[j][1], lst[j+1][1]\n else:\n continue\n return lst \n pass\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3726,"func_code":"def sort_age(lst):\n for i in range(len(lst)-1):\n for j in range(len(lst)-1-i):\n if lst[j][1] > lst[j+1][1]:\n lst[j][1], lst[j+1][1] = lst[j+1][1], lst[j][1]\n else:\n continue\n return lst \n pass\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3727,"func_code":"def sort_age(lst):\n for i in range(len(lst)-1):\n for j in range(len(lst)-1-i):\n if lst[j][1] < lst[j+1][1]:\n lst[j][1], lst[j+1][1] = lst[j+1][1], lst[j][1]\n else:\n continue\n return lst \n pass\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3728,"func_code":"def sort_age(lst):\n newlist = []\n while lst:\n oldest = lst[0]\n for i in lst:\n if i[1] > oldest:\n oldest = i\n else:\n continue\n lst.remove(oldest)\n newlist.append(oldest)\n return newlist\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3729,"func_code":"def sort_age(lst):\n lst.sort(key = lambda x: x[1], reverse = True)\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3730,"func_code":"def sort_age(lst):\n return lst.sort(key = lambda x: x[1], reverse = True)\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3731,"func_code":"def sort_age(lst):\n lst.sort(key = lambda x: x[1], reverse = True)\n return lst\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3732,"func_code":"def sort_age(lst):\n sort = []\n while lst:\n largest = a[0] \n for element in a: \n if element > smallest: \n largest = element \n lst.remove(largest)\n sort.append(largest) \n print(lst)\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3733,"func_code":"def sort_age(lst):\n new_list=[]\n largest=0\n while lst:\n for i in lst:\n if i[1]>largest:\n largest = i[1]\n new_list=new_list.append(i)\n lst.remove(i)\n return new_list\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3734,"func_code":"def sort_age(lst):\n new_list=[]\n largest=0\n while lst:\n for i in lst:\n if i[1]>largest:\n largest = i[1]\n count=i\n new_list=new_list.append(count)\n lst.remove(count)\n largest=0\n return new_list\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3735,"func_code":"def sort_age(lst):\n sort=[]\n while lst:\n biggest=lst[0][1]\n for i in lst:\n if i[1]>biggest:\n biggest=i[1]\n lst.remove(i)\n sort.append(i)\n return lst# Fill in your code here\n \n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3736,"func_code":"def sort_age(lst):\n sort=[]\n while lst:\n biggest=lst[0][1]\n for i in lst:\n if i[1]>biggest:\n biggest=i[1]\n lst.remove(i)\n sort.append(i)\n return sort# Fill in your code here\n \n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3737,"func_code":"def sort_age(lst):\n sort=[]\n while lst:\n biggest=0\n for i in lst:\n if i[1]>biggest:\n biggest=i[1]\n lst.remove(i)\n sort.append(i)\n return sort# Fill in your code here\n \n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3738,"func_code":"def sort_age(lst):\n sort=[]\n while lst:\n biggest=lst[0][1]\n for i in lst:\n if i[1]>=biggest:\n biggest=i[1]\n lst.remove(i)\n sort.append(i)\n return sort# Fill in your code here\n \n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3739,"func_code":"def sort_age(lst):\n sort=[]\n while lst:\n biggest=lst[0][1]\n for i in range(len(lst)):\n count=0\n if lst[i][1]>=biggest:\n biggest=lst[i][1]\n else:\n i+=1\n count+=1\n lst.remove(lst[i-count])\n sort.append(lst[i-count])\n return sort# Fill in your code here\n \n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3740,"func_code":"def sort_age(lst):\n ages = []\n output = []\n for item in lst:\n ages.append(item[1])\n for item in lst:\n if min(ages) == item[1]:\n output.append(item)\n ages.remove(age)\n return output\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3741,"func_code":"def sort_age(lst):\n ages = []\n output = []\n for item in lst:\n ages.append(item[1])\n for item in lst:\n age = max(ages)\n if age == item[1]:\n output.append(item)\n ages.remove(age)\n return output\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3742,"func_code":"def sort_age(lst):\n a = []\n while lst:\n oldest = lst[0]\n for i in lst:\n if i[1] > oldest[1]:\n oldest = i\n lst.remove(oldest)\n a.append(oldest)\n pass\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3743,"func_code":"def sort_age(lst):\n return lst.sort(key=lambda x:x[1])\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3744,"func_code":"def sort_age(lst):\n lst.sort(key=lambda x:x[1])\n lst.reverse()\n print(lst)\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3745,"func_code":"def sort_age(lst):\n lst.sort(key=lambda x:x[1])\n lst.reverse()\n print(lst)\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3746,"func_code":"def sort_age(lst):\n for i in range(len(lst)-1):\n for j in range(len(lst)-i):\n if lst[j][1] < lst[j+1][1]:\n lst[j][1],lst[j+1][1] = lst[j+1][1],lst[j][1]\n else:\n continue\n return lst \n pass\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3747,"func_code":"def sort_age(lst):\n lst.sort(key=lambda x:x[1])\n lst.reverse()\n print(lst)\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3748,"func_code":"def sort_age(lst):\n lst.sort(key=lambda x:x[1])\n lst.reverse()\n print(lst)\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3749,"func_code":"def sort_age(lst):\n lst.sort(key=lambda x:x[1])\n lst.reverse()\n print(lst)\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3750,"func_code":"def sort_age(lst):\n sort =[]\n while lst:\n smallest = lst[0]\n for i in lst:\n if i< smallest:\n smallest = i\n lst.remove(smallest)\n sort.append(smallest)\n pass\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3751,"func_code":"def sort_age(lst):\n sort =[]\n while lst:\n smallest = lst[0]\n for i in lst:\n if i< smallest:\n smallest = i\n lst.remove(smallest)\n sort.append(smallest)\n return sort\n pass\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3752,"func_code":"def sort_age(lst):\n for j in range(len(lst)-1):\n for i in range(len(lst)-1-j):\n if lst[i][1]> lst[i+1][1]:\n lst[i],lst[i+1] = lst[i+1],lst[i]\n return lst\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3753,"func_code":"def sort_age(lst):\n for i in range(len(lst-1)):\n for j in range(len(lst)-1-i):\n if lst[j][1] < lst[j+1][1]:\n lst[j][1],lst[j+1][1] = lst[j+1][1],lst[j][1]\n else:\n continue\n return lst \n pass\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3754,"func_code":"def sort_age(lst):\n for i in range(len(lst-1)):\n for j in range(len(lst)-1-i):\n if lst[j][1] < lst[j+1][1]:\n lst[j][1],lst[j+1][1] = lst[j+1][1],lst[j][1]\n else:\n continue\n return lst \n pass\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3755,"func_code":"def sort_age(lst):\n for i in range(len(lst-1)):\n for j in range(len(lst)-1-i):\n if lst[j][1] < lst[j+1][1]:\n lst[j][1],lst[j+1][1] = lst[j+1][1],lst[j][1]\n else:\n continue\n return lst \n pass\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3756,"func_code":"def sort_age(lst):\n for i in range(len(lst)-1):\n for j in range(len(lst)-1-i):\n if lst[j][1] < lst[j+1][1]:\n lst[j][1],lst[j+1][1] = lst[j+1][1],lst[j][1]\n else:\n continue\n return lst \n pass\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3757,"func_code":"\n\ndef sort_age(lst):\n lst.sort()\n lst.sort(key=lambda x:x[1],reverse=True)\n\n return lst\n pass\n\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3758,"func_code":"def sort_age(lst):\n lst.sort(key=lambda x: x[1])\n return lst\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3759,"func_code":"def sort_age(lst):\n lst.sort(key=lambda x: x[1],reverse = True)\n return lst\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3760,"func_code":"def sort_age(lst):\n lst1 = []\n \n while lst:\n largest = lst[0]\n for i in lst:\n if i > largest:\n largest = i\n lst.remove(largest)\n lst1.append(largest)\n return lst1\n\n \n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3761,"func_code":"def sort_age(lst):\n a = []\n for i in lst:\n a.append(i[1])\n print(a)\n sort = []\n while a:\n smallest = a[0]\n for element in a:\n if element < smallest:\n smallest = element\n a.remove(smallest)\n sort.append(smallest)\n print(sort)\n lst2 = []\n counter = 0\n for i in sort:\n for j in lst:\n if j[1] == i:\n lst2.append(j)\n counter += 1\n return lst2\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3762,"func_code":"def sort_age(lst):\n lst.sort(lambda x: x[1], reverse = True)\n return lst\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3763,"func_code":"def sort_age(lst):\n lst.sort(key = lambda x: x[1], reverse = True)\n return lst\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3764,"func_code":"def sort_age(lst):\n lst.sort(key = lambda x: x[1], reverse = True)\n return lst\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3765,"func_code":"def sort_age(lst):\n newlst=[]\n for i in lst:\n big=lst[0]\n for n in lst:\n if n[1]>big[1]:\n big=n\n lst.remove(big)\n newlst.append(big)\n return newlst\n \n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3766,"func_code":"def sort_age(lst):\n lst.sort(key=lambda x: x[1], reverse=True)\n return lst\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3767,"func_code":"def sort_age(lst):\n new_lst = lst\n newnew = [new_lst[0]]\n for i in new_lst:\n for j in range(len(newnew)):\n if i[1]>newnew[j][1]:\n newnew.insert(j+1,i)\n elif i[1], ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3768,"func_code":"def sort_age(lst):\n newnew = [lst[0]]\n for i in lst:\n for j in range(len(newnew)):\n if i[1]>newnew[j][1]:\n newnew.insert(j+1,i)\n elif i[1], ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3769,"func_code":"def sort_age(lst):\n newnew = []\n for i in lst:\n for j in range(len(newnew)):\n if i[1]>newnew[j][1]:\n newnew.insert(j+1,i)\n elif i[1], ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3770,"func_code":"def sort_age(lst):\n newnew = [lst[0]]\n for i in lst:\n for j in range(len(newnew)):\n if i[1]>newnew[j][1]:\n newnew.insert(j,i)\n elif i[1], ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3771,"func_code":"def sort_age(lst):\n # Fill in your code here\n sorted = []\n while lst:\n oldest = lst[0]\n for i in range(len(lst)):\n if lst[i][1] > oldest[1]:\n oldest = lst[i]\n sorted.append(lst.pop(i))\n return sorted\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3772,"func_code":"def sort_age(lst):\n # Fill in your code here\n sorted = []\n while lst:\n oldest = lst[0]\n for i in range(len(lst)):\n if lst[i][1] > oldest[1]:\n oldest = lst[i]\n sorted.append(lst.pop(i))\n return sorted\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3773,"func_code":"def sort_age(lst):\n sort = []\n while lst:\n biggest = lst[0]\n for i in lst:\n if i[1] > biggest[1]:\n biggesr - k\n lst.remove(biggest)\n sort.append(biggest)\n return sort\n \n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3774,"func_code":"def sort_age(lst):\n sort = []\n while lst:\n biggest = lst[0]\n for i in lst:\n if i[1] > biggest[1]:\n biggesr - k\n lst.remove(biggest)\n sort.append(biggest)\n return sort\n \n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3775,"func_code":"def sort_age(lst):\n sort = []\n while lst:\n biggest = lst[0]\n for i in lst:\n if i[1] > biggest[1]:\n biggesr - i\n lst.remove(biggest)\n sort.append(biggest)\n return sort\n \n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3776,"func_code":"def sort_age(lst):\n sort = []\n while lst:\n biggest = lst[0]\n for i in lst:\n if i[1] > biggest[1]:\n biggest - i\n lst.remove(biggest)\n sort.append(biggest)\n return sort\n \n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3777,"func_code":"def sort_age(lst):\n for i in range(1,len(lst)):\n while lst[i][1], ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3778,"func_code":"def sort_age(lst):\n for i in range(1,len(lst)):\n while lst[i][1], ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3779,"func_code":"def sort_age(lst):\n if len(lst)==1:\n return lst\n else:\n temp=lst[0][1]\n for i in range(len(lst)):\n if lst[i][1], ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3780,"func_code":"def sort_age(lst):\n if len(lst)==1:\n return lst\n else:\n temp=lst[0][1]\n count=0\n for i in range(len(lst)):\n if lst[i][1]>temp:\n temp=lst[i][1]\n count=i\n result=[lst[count],]\n pop=lst.pop(count)\n return result+sort_age(lst)\n # Fill in your code here\n pass\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3781,"func_code":"def sort_age(lst):\n new_lst=[lst[0],]\n for x in lst[1:]:\n if x[1] > new_lst[-1][1]:\n new_lst += [x,]\n else:\n count=0\n while count new_lst[count][1]:\n count+=1\n continue\n else:\n new_lst = new_lst[0:count]+[x,]+new_lst[count:]\n break\n return new_lst[::-1]\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3782,"func_code":"def sort_age(lst):\n new_lst=[lst[0],]\n if lst==[]:\n return []\n for x in lst[1:]:\n if x[1] > new_lst[-1][1]:\n new_lst += [x,]\n else:\n count=0\n while count new_lst[count][1]:\n count+=1\n continue\n else:\n new_lst = new_lst[0:count]+[x,]+new_lst[count:]\n break\n return new_lst[::-1]\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3783,"func_code":"def sort_age(lst):\n if lst == []:\n return lst\n else:\n age_lst, new_lst = [], []\n for x in lst:\n age_lst.append(x[1])\n while age_lst:\n max_age = max(age_lst)\n for i in lst:\n if i[1] == max_age:\n new_lst.append(i)\n return new_lst\n pass\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3784,"func_code":"def sort_age(lst):\n l = len(lst)\n for i in range(0, l):\n for j in range(0, l-i-1):\n if (lst[j][1] > lst[j + 1][1]):\n temp = lst[j]\n lst[j]= lst[j + 1]\n lst[j + 1]= temp\n return lst\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3785,"func_code":"def sort_age(lst):\n l = len(lst)\n for i in range(0, l):\n for j in range(0, l-i-1):\n if (lst[j][1] > lst[j + 1][1]):\n temp = lst[j]\n lst[j]= lst[j + 1]\n lst[j + 1]= temp\n return list.reverse(lst)\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3786,"func_code":"def sort_age(lst):\n lst.sort(key=lambda x: x[1], reverse=True)\n return lst\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3787,"func_code":"def sort_age(lst):\n return lst.sort(key=lambda x: x[1], reverse=True)\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3788,"func_code":"def sort_age(lst):\n current=0\n tup=()\n for i in lst:\n if i[1]>current:\n tup+=tuple(i)\n current=i[1]\n else:\n tuple(i)+tup\n return tup\n \n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3789,"func_code":"def sort_age(lst):\n current=0\n tup=()\n for i in lst:\n if i[1]>current:\n tup+=tuple(i)\n current=i[1]\n else:\n tuple(i)+tup\n return tup\n \n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3790,"func_code":"def sort_age(lst):\n current=0\n tup=()\n for i in lst:\n if i[1]>current:\n tup+=tuple(i)\n current=i[1]\n else:\n tup=tuple(i)+tup\n return tup\n \n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3791,"func_code":"def sort_age(lst):\n current=0\n tup=()\n for i in lst:\n if i[1]>current:\n tup+=tuple(i)\n current=i[1]\n else:\n tup=tuple(i)+tup\n return list(tup)\n \n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3792,"func_code":"def sort_age(lst):\n current=0\n tup=()\n for i in lst:\n if i[1]>current:\n tup+=tuple(i)\n current=i[1]\n else:\n tup=tuple(i)+tup\n return [tup]\n \n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3793,"func_code":"def sort_age(lst):\n current=0\n tup=[]\n for i in lst:\n if i[1]>current:\n tup.append(i)\n else:\n i.append(tup)\n return tup\n \n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3794,"func_code":"def sort_age(lst):\n # Fill in your code here\n result=[]\n for i in lst:\n result+=[i[::-1],]\n result.sort()\n result.reverse()\n ans=[]\n for i in result:\n ans+=[i[::-1],]\n return ans\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3795,"func_code":"def sort_age(lst):\n lst.sort()\n new = []\n for i in range(len(lst)):\n j = len(lst) - i- 1\n new.append(lst[j])\n return new\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3796,"func_code":"def sort_age(lst):\n # lst.sort(key = lambda x: x[1], reverse= True)\n # return lst\n while True: \n changed = False \n for i in range (len(lst)-1):\n if lst[i][1] < lst[i+1][1]:\n lst[i], lst[i+1] = lst[i+1], lst[i]\n changed = True \n if not changed: \n break \n return lst \n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3797,"func_code":"def sort_age(lst):\n # Fill in your code here\n A = map(lambda x:x[1],lst)\n a = []\n counter =0\n while countera[0]:\n a = i.extend(a)\n elif i, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3798,"func_code":"def sort_age(lst):\n lst.sort(key = lambda x: x[1],reverse=True)\n return lst\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3799,"func_code":"def sort_age(lst):\n # Fill in your code here\n newlst=[]\n while lst:\n maximum = lst[0][1]\n for i in lst:\n if i[1]>maximum:\n maximum = i[1]\n newlst.append(i)\n lst.remove(i)\n\n print(newlst)\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3800,"func_code":"def sort_age(lst):\n # Fill in your code here\n newlst=[]\n while lst:\n maximum = lst[0][1]\n for i in lst:\n if i[1]>maximum:\n maximum = i[1]\n newlst.append(i)\n lst.remove(i)\n\n return newlst\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3801,"func_code":"def sort_age(lst):\n # Fill in your code here\n newlst=[]\n while lst:\n maximum = lst[0][1]\n for i in lst:\n if i[1]>maximum:\n maximum = i[1]\n newlst.append(i)\n lst.remove(i)\n\n return newlst\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3802,"func_code":"def sort_age(lst):\n def for_age(lst):\n for i in range(len(lst)):\n if i == 0: continue\n else:\n while i > 0:\n if lst[i][1] < lst[i-1][1]:\n lst[i], lst[i-1] = lst[i-1], lst[i]\n i -= 1\n else: i = 0\n for_age(lst).reverse\n return lst\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3803,"func_code":"def sort_age(lst):\n a=lst\n sort=[]\n while a:\n smallest=a[0]\n for element in a:\n if element[1], ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3804,"func_code":"def sort_age(lst):\n\tlst.sort(key=lambda x: x[1],reverse=True)\n\tprint(lst)\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3805,"func_code":"def sort_age(lst):\n return lst.sort(key = lambda x: x[1], reverse = True)\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3806,"func_code":"def sort_age(lst):\n a = []\n b = []\n n = len(lst)\n for i in range(n):\n age = lst[i][1]\n a += [age]\n a.sort()\n a.reverse()\n for j in range(n):\n for k in range(n):\n if a[j] == lst[k][1]:\n b += [lst[k]]\n else:\n continue\n return b\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3807,"func_code":"def sort_age(lst):\n return lst.sort(key = lambda x: x[1])\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3808,"func_code":"def sort_age(lst):\n lst = lst.sort(key = lambda x: x[1], reverse=True)\n return lst\n \n \n\n\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3809,"func_code":"def sort_age(lst):\n holder=[]\n for x in lst:\n if holder==[]:\n holder=x\n elif x[1]>holder[1]:\n holder=x\n return holder+sort_age(lst[1:])\n \n \n \n \n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3810,"func_code":"def sort_age(lst):\n lst.sort(key = lambda x: x[1])\n return lst\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3811,"func_code":"def sort_age(lst):\n for i in range(len(lst)-1):\n while lst[i][1] > lst[i+1][1]:\n temp = lst[i]\n del lst[i]\n lst += [temp]\n return lst\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3812,"func_code":"def sort_age(lst):\n for i in range(len(lst)-1):\n while lst[i][1] < lst[i+1][1]:\n temp = lst[i]\n del lst[i]\n lst += [temp]\n return lst\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3813,"func_code":"def sort_age(lst):\n for i in range(len(lst)-1):\n while lst[i][1] > lst[i+1][1]:\n temp = lst[i]\n del lst[i]\n lst += [temp]\n return lst.reverse()\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3814,"func_code":"def sort_age(lst):\n for i in range(len(lst)-1):\n while lst[i][1] > lst[i+1][1]:\n temp = lst[i]\n del lst[i]\n lst += [temp]\n lst.reverse()\n return lst\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3815,"func_code":"def sort_age(lst):\n sort1 = []\n while lst:\n largest = lst[0][1]\n if i[1] > largest:\n largest = i[1]\n lst.remove(i)\n sort1.append(i)\n return sort1\n \n \n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3816,"func_code":"def sort_age(lst):\n # Fill in your code here\n lst.sort(key=lambda x : x[1], reverse=T)\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3817,"func_code":"def sort(lst):\n for i in range(len(lst)-1):\n if lst[i][1] > lst[i+1][1]:\n temp = lst[i]\n del lst[i]\n lst += [temp]\n else:\n continue\n return lst\n\ndef sort_age(lst):\n oldlist = tuple(lst)\n if tuple(sort(lst)) == oldlist:\n return lst\n else:\n sort(lst)\n return sort_age(lst)\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3818,"func_code":"def sort_age(lst):\n males = []\n females = []\n for i in lst:\n if lst[0][0] == \"M\":\n males = males + [lst[0],]\n elif lst[0][0] == \"F\":\n females = females + [lst[0],]\n return merge_sort(males) + merge_sort(females)\n \ndef merge(left, right):\n results = []\n while left and right:\n if left[0][0] < right[0][0]:\n results.append(left,pop(0))\n else:\n results.append(right.pop(0))\n results.extend(left)\n results.extend(right)\n return results\n\ndef merge_sort(lst):\n if len(lst) < 2:\n return lst\n mid = len(lst) \/\/ 2\n left = merge_sort(lst[:mid])\n right = merge_sort(lst[mid:])\n return merge(left, right)\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3819,"func_code":"def sort_age(lst):\n males = []\n females = []\n while len(lst) > 0:\n if lst[0][0] == \"M\":\n males = males + [lst[0],]\n elif lst[0][0] == \"F\":\n females = females + [lst[0],]\n lst = lst[1:]\n return merge(merge_sort(males), merge_sort(females))\n \ndef merge(left, right):\n results = []\n while left and right:\n if left[0][0] < right[0][0]:\n results.append(left.pop(0))\n else:\n results.append(right.pop(0))\n results.extend(left)\n results.extend(right)\n return results\n\ndef merge_sort(lst):\n if len(lst) < 2:\n return lst\n mid = len(lst) \/\/ 2\n left = merge_sort(lst[:mid])\n right = merge_sort(lst[mid:])\n return merge(left, right)\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3820,"func_code":"def sort_age(lst):\n males, females = [], []\n for i in lst:\n if i[0] == \"M\":\n males = males + [lst[0],]\n elif i[0] == \"F\":\n females = females + [lst[0],]\n lst = lst[1:]\n return merge(merge_sort(males), merge_sort(females))\n \ndef merge(left, right):\n results = []\n while left and right:\n if left[0] > right[0]:\n results.append(left.pop(0))\n else:\n results.append(right.pop(0))\n results.extend(left)\n results.extend(right)\n return results\n\ndef merge_sort(lst):\n if len(lst) < 2:\n return lst\n mid = len(lst) \/\/ 2\n left = merge_sort(lst[:mid])\n right = merge_sort(lst[mid:])\n return merge(left, right)\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3821,"func_code":"def sort_age(lst):\n return lst.sort(key = lambda x:x[1])\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3822,"func_code":"def sort_age(lst):\n return lst.sort(key = lambda x: x[1], reverse = True)\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3823,"func_code":"def sort_age(lst):\n lst.sort(key = lambda x: x[1])\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3824,"func_code":"def sort_age(lst):\n lst.sort(lambda x: x[1])\n return lst\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3825,"func_code":"def sort_age(lst):\n newlst = []\n ages = []\n for i in lst:\n ages.append(i[1])\n ages.sort()\n for x in ages[::-1]:\n for i in lst:\n if i[1] == x:\n newlst.append(i)\n return newlst\n \n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3826,"func_code":"def sort_age(lst):\n lst.sort(key = lambda x: x[1], reverse = True)\n print(lst)\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3827,"func_code":"def sort_age(lst):\n lst.sort(key = lambda x: x[1], reverse = True)\n print(lst)\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3828,"func_code":"def sort_age(lst):\n new_lst = []\n for i in range(len(lst)):\n if lst[i][1]< lst[i+1][1]:\n new_lst.append(lst[i])\n lst.reverse()\n return lst\n \n pass\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3829,"func_code":"def sort_age(lst):\n new_lst = [()]\n for i in range(len(lst)):\n if lst[i][1]< lst[i+1][1]:\n new_lst.append(lst[i])\n lst.reverse()\n return lst\n \n pass\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3830,"func_code":"def sort_age(lst):\n new_lst = []\n for i in range(len(lst)):\n if lst[i][1]> lst[i+1][1]:\n new_lst.append(lst[i])\n return lst \n \n \n pass\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3831,"func_code":"def merge(one,two):\n new_tup = []\n while left and right:\n if one[0][1] < two[0][1]:\n new_tup.append(one.pop(0))\n else:\n new_tup.append(two.pop(0))\n return new_tup\n\ndef sort_age(lst):\n n = len(lst)\n if n <2:\n return lst\n left = lst[:n\/2]\n right = lst[n\/2:]\n return merge(left,right)\n \n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3832,"func_code":"def merge(one,two):\n new_tup = []\n while one and two:\n if one[0][1] < two[0][1]:\n new_tup.append(one.pop(0))\n else:\n new_tup.append(two.pop(0))\n return new_tup\n\ndef sort_age(lst):\n n = len(lst)\n if n <2:\n return lst\n left = lst[:n\/2]\n right = lst[n\/2:]\n return merge(left,right)\n \n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3833,"func_code":"def sort_age(lst):\n return lst.sort(key=lambda x: x[1], reverse=True)\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3834,"func_code":"def sort_age(lst):\n a=[]\n for i in lst:\n if i==max(lst):\n a.append(i)\n continue \n return a\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3835,"func_code":"def sort_age(lst):\n compiled = []\n result = []\n for i in lst:\n compiled = compiled + [i[1]]\n compiled.sort()\n compiled.reverse()\n for i in compiled:\n for j in lst:\n if i == j[1]:\n result = result + [j]\n return result\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3836,"func_code":"def sort_age(lst):\n return lst.sort(key=lambda x:x[1])\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3837,"func_code":"def sort_age(lst):\n def age(i):\n return i[1]\n \n def position(seq, ele):\n n = len(seq)\n for i in range(n):\n if seq[i] == ele:\n return i\n \n def largest_age(seq):\n largest = age(seq[0])\n largest_pos = 0\n for i in seq:\n if age(i) > largest:\n largest = age(i)\n largest_pos = position(seq,i)\n return seq[largest_pos]\n n = len(lst)\n if n ==0:\n return []\n elif n ==1:\n return lst\n else:\n return [largest_age(lst)]+[sort_age(lst[1:])]\n \n \n # Fill in your code here\n pass\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3838,"func_code":"def sort_age(lst):\n a = list(set(lst))\n lst.clear()\n lst.append(a)\n return lst\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3839,"func_code":"def sort_age(lst):\n # Fill in your code here\n return lst.sort(key=lambda x: x[1])\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3840,"func_code":"def sort_age(lst):\n return lst.sort(key = lambda x: x[1], reverse = True)\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3841,"func_code":"def sort_age(lst):\n lst.sort(key=lambda x:x[1])\n lst.reverse()\n print(lst)\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3842,"func_code":"def sort_age(lst):\n lst.sort(key=lambda x:x[1])\n lst.reverse()\n print(lst)\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3843,"func_code":"def sort_age(lst):\n lst.sort(key=lambda x:x[1])\n lst.reverse()\n print(lst)\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3844,"func_code":"def sort_age(lst):\n lst.sort(key=lambda x:x[1])\n lst.reverse()\n print(lst)\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3845,"func_code":"def sort_age(lst):\n lst.sort(lambda x: x[1], reverse = True)\n return lst\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3846,"func_code":"def sort_age(lst):\n for i in range(1,len(lst)):\n while lst[i][1], ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3847,"func_code":"def sort_age(lst):\n for i in range(1,len(lst)):\n while lst[i][1], ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3848,"func_code":"def sort_age(lst):\n new_lst=[lst[0],]\n for x in lst[1:]:\n if x[1] > new_lst[-1][1]:\n new_lst += [x,]\n else:\n count=0\n while count new_lst[count][1]:\n count+=1\n continue\n else:\n new_lst = new_lst[0:count]+[x,]+new_lst[count:]\n break\n return new_lst[::-1]\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3849,"func_code":"def sort_age(lst):\n return lst.sort(key=lambda x: x[1], reverse=True)\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3850,"func_code":"def sort_age(lst):\n # Fill in your code here\n result=[]\n for i in lst:\n result+=[i[::-1],]\n result.sort()\n result.reverse()\n ans=[]\n for i in result:\n ans+=[i[::-1],]\n return ans\n","correct":false,"assignment_id":4,"func_name":"sort_age","test":"assert sort_age([(\"F\", 19)])==[('F', 19)] and sort_age([(\"M\", 35), (\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 35), ('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30), (\"M\", 17)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18), ('M', 17)] and sort_age([(\"F\", 18), (\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19), ('F', 18)] and sort_age([(\"M\", 23), (\"F\", 19), (\"M\", 30)])==[('M', 30), ('M', 23), ('F', 19)] and sort_age([])==[]","description":"Task: Sorting Tuples\n\n\nCan we sort items other than integers? For this question, you will be sorting tuples!\nWe represent a person using a tuple (, ). Given a list of people, write\na function sort_age that sorts the people and return a list in an order such that the older\npeople are at the front of the list. An example of the list of people is [(\"M\", 23), (\"F\",\n19), (\"M\", 30)]. The sorted list would look like [(\"M\", 30), (\"M\", 23), (\"F\", 19)]. You\nmay assume that no two members in the list of people are of the same age."} {"submission_id":3851,"func_code":"def top_k(lst, k):\n ls = []\n for i in range(k):\n ls.append(max(lst))\n lst.remove(max(lst))\n return ls","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3852,"func_code":"def top_k(lst, k):\n res = []\n for i in range(k):\n res.append(max(lst))\n lst.remove(max(lst))\n return res\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3853,"func_code":"def top_k(lst, k):\n res = []\n for i in range(k):\n res.append(max(lst))\n lst.remove(max(lst))\n return res\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3854,"func_code":"def top_k(lst, k):\n res = []\n for i in range(k):\n res.append(max(lst))\n lst.remove(max(lst))\n return res\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3855,"func_code":"def top_k(lst, k):\n result = []\n for i in range(k):\n result.append(max(lst))\n lst.remove(max(lst))\n return result\n \n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3856,"func_code":"def top_k(lst, k):\n ls=[]\n for i in range(k):\n ls.append(max(lst))\n lst.remove(max(lst))\n return ls\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3857,"func_code":"def sort_descending(lst):\n new_lst = []\n while lst:\n largest = lst[0]\n for i in range(len(lst)):\n if lst[i] > largest:\n largest = lst[i]\n lst.remove(largest)\n new_lst.append(largest)\n return new_lst\n\ndef top_k(lst, k):\n lst = sort_descending(lst)\n return lst[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3858,"func_code":"def top_k(lst, k):\n if k == 0:\n return []\n if lst == []:\n return lst\n sort = []\n while lst:\n biggest = lst[0]\n for element in lst:\n if element > biggest:\n biggest = element\n lst.remove(biggest)\n sort.append(biggest)\n if len(sort) == k:\n return sort\n else:\n continue\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3859,"func_code":"def top_k(lst, k):\n stop = False\n result = []\n while k>0:\n highest = 0\n index = 0\n for i in range(0,len(lst)):\n if lst[i]>highest:\n index = i\n highest = lst[i]\n result = result + [highest]\n lst.pop(index)\n k = k - 1\n return result\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3860,"func_code":"def top_k(lst, k):\n lst_res = lst\n sort = []\n while lst_res:\n largest = lst_res[0]\n for elements in lst_res:\n if elements > largest:\n largest = elements\n lst_res.remove(largest)\n sort.append(largest)\n return sort[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3861,"func_code":"def top_k(lst, k):\n sort = []\n while lst: \n biggest = lst[0]\n for element in lst:\n if element > biggest:\n biggest = element\n lst.remove(biggest)\n sort.append(biggest)\n return sort[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3862,"func_code":"def magus_sort(lst):\n if len(lst) == 0:\n return []\n elif len(lst) == 1:\n return lst\n elif len(lst) == 2:\n if lst[0] >= lst[1]:\n return lst\n else:\n return [lst[1], lst[0]]\n else:\n if lst[0] >= lst[1]:\n list1, list2 = [lst[0]], [lst[1]]\n else:\n list1, list2 = [lst[1]], [lst[0]]\n for i in lst[2:]:\n if i >= list1[0]:\n list1.append(i)\n else:\n list2.append(i)\n return magus_sort(list1) + magus_sort(list2)\n\ndef top_k(lst, k):\n return magus_sort(lst)[0:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3863,"func_code":"def top_k(lst, k):\n if k == 1:\n return [max(lst)]\n else:\n answer = []\n for i in range(min(k, len(lst))):\n largest = max(lst)\n answer.append(largest)\n lst.remove(largest)\n return answer\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3864,"func_code":"def top_k(lst, k):\n new_lst = []\n while lst:\n largest = lst[0]\n for numbers in lst:\n if numbers > largest:\n largest = numbers\n new_lst.append(largest)\n lst.remove(largest)\n return new_lst[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3865,"func_code":"def top_k(lst, k):\n sort=[]\n for i in range (k):\n biggest=max(lst)\n lst.remove(biggest)\n sort.append(biggest)\n return sort\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3866,"func_code":"def top_k(lst, k):\n result = []\n while k > 0:\n big = max(lst)\n result.append(big)\n lst.remove(big)\n k -= 1\n return result\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3867,"func_code":"def magus_sort(lst):\n if len(lst) == 0:\n return []\n elif len(lst) == 1:\n return lst\n elif len(lst) == 2:\n if lst[0] >= lst[1]:\n return lst\n else:\n return [lst[1], lst[0]]\n else:\n if lst[0] >= lst[1]:\n list1, list2 = [lst[0]], [lst[1]]\n else:\n list1, list2 = [lst[1]], [lst[0]]\n for i in lst[2:]:\n if i >= list1[0]:\n list1.append(i)\n else:\n list2.append(i)\n return magus_sort(list1) + magus_sort(list2)\n\ndef top_k(lst, k):\n return magus_sort(lst)[0:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3868,"func_code":"def top_k(lst, k):\n sort = []\n while lst:\n biggest = lst[0]\n for i in lst:\n if i > biggest:\n biggest = i\n lst.remove(biggest)\n sort.append(biggest)\n return sort[0:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3869,"func_code":"def top_k(lst, k):\n if lst==[]:\n return []\n sort=[]\n while lst:\n largest = lst[0]\n for i in lst:\n if i > largest:\n largest = i\n lst.remove(largest)\n sort.append(largest)\n return sort[:k]\n pass\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3870,"func_code":"def top_k(lst, k):\n stop = False\n result = []\n while k>0:\n highest = 0\n index = 0\n for i in range(0,len(lst)):\n if lst[i]>highest:\n index = i\n highest = lst[i]\n result = result + [highest]\n lst.pop(index)\n k = k - 1\n return result\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3871,"func_code":"def top_k(lst, k):\n counter=0\n new_lst=[]\n while counterlargest:\n largest = i\n lst.remove(largest)\n product.append(largest)\n return product[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3873,"func_code":"def top_k(lst, k):\n ret = []\n for i in range(k):\n max_int_pos = lst.index(max(lst))\n ret.append(lst.pop(max_int_pos))\n return ret\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3874,"func_code":"def top_k(lst, k):\n result=[]\n for i in range(0,k):\n max=lst[0]\n for j in lst:\n if j>max:\n max=j\n result.append(max)\n lst.remove(max)\n return result# Fill in your code here\n pass\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3875,"func_code":"def top_k(lst, k):\n max_lst =[]\n i = 0\n while i < k:\n max_lst.append(max(lst))\n lst.remove(max(lst))\n i += 1\n return max_lst\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3876,"func_code":"def top_k(lst, k):\n new_lst = []\n while len(new_lst) < k:\n maximum = max(lst)\n new_lst.append(maximum)\n lst.remove(maximum)\n\n return new_lst\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3877,"func_code":"def top_k(lst, k):\n result = []\n while len(result) < k:\n biggest = lst[0]\n for i in lst:\n if i > biggest:\n biggest = i\n lst.remove(biggest)\n result.append(biggest)\n return result\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3878,"func_code":"def top_k(lst, k):\n sortedlst = []\n while len(sortedlst) != k:\n largest = lst[0]\n for el in lst:\n if el > largest:\n largest = el\n sortedlst.append(largest)\n lst.remove(largest)\n return sortedlst\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3879,"func_code":"\ndef top_k(lst, k):\n sort = []\n while lst:\n biggest = lst[0]\n for elem in lst:\n if elem > biggest:\n biggest = elem\n lst.remove(biggest)\n sort.append(biggest)\n return sort[:k]\n\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3880,"func_code":"def quicksort(lst, f, comparator):\n if len(lst) <= 1:\n return lst\n \n pivot_index = len(lst) \/\/ 2\n pivot = lst[pivot_index]\n flist, blist = [], []\n \n for i in range(len(lst)):\n if i == pivot_index:\n continue\n if comparator(f(lst[i]), f(pivot)):\n flist.append(lst[i])\n else:\n blist.append(lst[i])\n \n return quicksort(flist, f, comparator) + [pivot] + quicksort(blist, f, comparator)\n\ndef top_k(lst, k):\n sorted_lst = quicksort(lst, lambda x: x, lambda x, y: x > y)\n return sorted_lst[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3881,"func_code":"def top_k(lst, k):\n rs=[]\n for qwerty in range(0,k):\n biggest=lst[0]\n for k in lst:\n if biggest minimum:\n minimum = x\n result.append(minimum)\n lst.remove(minimum) \n return result[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3884,"func_code":"def top_k(lst, k):\n new_lst = []\n while lst:\n maxi = lst[0]\n for item in lst:\n if item > maxi:\n maxi = item\n new_lst.append(maxi)\n lst.remove(maxi)\n return new_lst[0:k]# Fill in your code here\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3885,"func_code":"def top_k(lst, k):\n sort = []\n while lst:\n biggest = lst[0]\n for i in lst:\n if i > biggest:\n biggest = i\n lst.remove(biggest)\n sort.append(biggest)\n return sort[0:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3886,"func_code":"def top_k(lst, k):\n result = []\n while lst:\n largest = lst[0]\n for i in lst:\n if i>largest:\n largest = i\n lst.remove(largest)\n result.append(largest)\n return result[:k]\n \n \n \n \n \n \n#def sort_age(lst):\n # sort = []\n # while lst:\n # oldest = lst[0]\n # for person in lst:\n # if person[1] >= oldest[1]:\n # oldest = person\n # lst.remove(oldest)\n # sort.append(oldest)\n # return sort\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3887,"func_code":"def top_k(lst, k):\n if lst == [] or k == 0:\n return []\n else:\n final = []\n while lst:\n element = max(lst)\n final += [element,]\n lst.remove(element)\n if len(final) == k:\n break\n return final\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3888,"func_code":"def top_k(lst, k):\n sort_list = []\n counter = 0\n while counter < k:\n sort_list.append(max(lst))\n lst.remove(max(lst))\n counter = counter + 1\n return sort_list\n \n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3889,"func_code":"def top_k(lst, k):\n tmp = []\n while len(lst) > 0:\n tmp.append(max(lst))\n lst.remove(max(lst))\n return tmp[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3890,"func_code":"def top_k(lst, k):\n return merge_sort(lst)[:k]\n \ndef merge_sort(lst):\n if len(lst) < 2:\n return lst\n mid = len(lst) \/\/ 2\n left = merge_sort(lst[:mid])\n right = merge_sort(lst[mid:])\n return merge(left, right)\n \ndef merge(left, right):\n results = []\n while left and right:\n if left[0] > right[0]:\n results.append(left.pop(0))\n else:\n results.append(right.pop(0))\n results.extend(left)\n results.extend(right)\n return results\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3891,"func_code":"def top_k(lst,k):\n sort = []\n while lst:\n biggest = lst[0]\n for element in lst:\n if element > biggest:\n biggest = element\n lst.remove(biggest)\n sort.append(biggest)\n return sort[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3892,"func_code":"def top_k(lst, k):\n new_lst = []\n while lst:\n maxi = lst[0]\n for item in lst:\n if item > maxi:\n maxi = item\n new_lst.append(maxi)\n lst.remove(maxi)\n return new_lst[0:k]# Fill in your code here\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3893,"func_code":"def sort_age(lst):\n new=[]\n while lst !=[]:\n big=lst[0]\n for i in lst:\n if i>big:\n big=i\n lst.remove(big)\n new.append(big)\n return new\ndef top_k(lst, k):\n return sort_age(lst)[:k]\n pass\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3894,"func_code":"def top_k(lst, k):\n sort = []\n if k==0 or lst==[]:\n return []\n while lst: \n biggest = lst[0]\n for element in lst:\n if element > biggest:\n biggest = element\n \n lst.remove(biggest)\n sort.append(biggest)\n if len(sort)==k:\n break\n return sort\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3895,"func_code":"def top_k(lst, k):\n result = []\n while k > 0:\n big = max(lst)\n result.append(big)\n lst.remove(big)\n k -= 1\n return result\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3896,"func_code":"def top_k(lst, k):\n lst_res = lst\n sort = []\n while lst_res:\n largest = lst_res[0]\n for elements in lst_res:\n if elements > largest:\n largest = elements\n lst_res.remove(largest)\n sort.append(largest)\n return sort[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3897,"func_code":"def top_k(lst, k):\n tmp = []\n while len(lst) > 0:\n tmp.append(max(lst))\n lst.remove(max(lst))\n return tmp[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3898,"func_code":"def top_k(lst, k):\n new_list = []\n while lst:\n maximum = lst[0]\n for i in lst:\n if i > maximum:\n maximum = i\n new_list.append(maximum)\n lst.remove(maximum)\n new_list_2 = []\n counter = 0\n for i in new_list:\n if counter < k:\n new_list_2.append(new_list[counter])\n counter = counter + 1\n return new_list_2\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3899,"func_code":"def top_k(lst, k):\n sort = []\n if k==0 or lst==[]:\n return []\n while lst: \n biggest = lst[0]\n for element in lst:\n if element > biggest:\n biggest = element\n \n lst.remove(biggest)\n sort.append(biggest)\n if len(sort)==k:\n break\n return sort\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3900,"func_code":"def top_k(lst, k):\n product = []\n while lst:\n largest = lst[0]\n for i in lst:\n if i>largest:\n largest = i\n lst.remove(largest)\n product.append(largest)\n return product[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3901,"func_code":"def top_k(lst, k):\n new = []\n while lst:\n largest = lst[0]\n for a in lst:\n if a > largest:\n largest = a\n lst.remove(largest)\n new.append(largest)\n return new[0:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3902,"func_code":"def top_k(lst, k):\n sort = []\n while lst: \n biggest = lst[0]\n for element in lst:\n if element > biggest:\n biggest = element\n lst.remove(biggest)\n sort.append(biggest)\n return sort[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3903,"func_code":"def top_k(lst, k):\n # Fill in your code here\n sort = []\n while lst: # a is not []\n largest = lst[0]\n for element in lst:\n if element > largest:\n largest = element\n lst.remove(largest)\n sort.append(largest)\n return sort[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3904,"func_code":"def top_k(lst, num):\n def insertion_sort(lst):\n for i in range(len(lst)):\n if i == 0: continue\n else:\n while i > 0:\n if lst[i] < lst[i-1]:\n lst[i], lst[i-1] = lst[i-1], lst[i]\n i -= 1\n else: i = 0\n\n insertion_sort(lst)\n lst.reverse()\n \n score, result = -1, []\n for i in lst:\n if i == score:\n result += (i,)\n elif len(result) >= num: break\n else:\n result += (i,)\n score = i\n return result\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3905,"func_code":"def top_k(lst, k):\n \n answer = []\n a = lst[0]\n \n while lst:\n \n for i in range(len(lst)):\n answer.append(max(lst))\n lst.remove(max(lst))\n \n return answer[:k]\n\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3906,"func_code":"def top_k(lst, k):\n ls=[]\n for i in range(k):\n ls.append(max(lst))\n lst.remove(max(lst))\n return ls\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3907,"func_code":"def top_k(lst, k):\n def merge_sort(lst):\n if len(lst) <= 1:\n return lst\n else:\n mid = len(lst) \/\/ 2\n lst1 = merge_sort(lst[:mid])\n lst2 = merge_sort(lst[mid:])\n result = []\n \n while lst1 and lst2:\n if lst1[0] < lst2[0]:\n result.append(lst2.pop(0))\n else:\n result.append(lst1.pop(0))\n \n result.extend(lst1)\n result.extend(lst2)\n \n return result\n \n lst = merge_sort(lst)\n return lst[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3908,"func_code":"def top_k(lst, k):\n sort = []\n while lst:\n biggest = lst[0]\n for i in lst[1:]:\n if i > biggest:\n biggest = i\n lst.remove(biggest)\n sort.append(biggest)\n \n n = 1\n sort_k = []\n while n <= k:\n sort_k.append(sort.pop(0))\n n += 1\n \n return sort_k\n \n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3909,"func_code":"def top_k(lst, k):\n k=len(lst) if k>len(lst) else k\n l=[]\n while len(l)!=k:\n m=lst[0]\n for i in lst:\n if i>m:\n m=i\n l.append(m)\n lst.remove(m)\n return l\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3910,"func_code":"def top_k(lst, k):\n while lst:\n maximum=[]\n for a in range(len(lst)):\n maximum.append(max(lst))\n lst.remove(max(lst))\n \n return maximum[0:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3911,"func_code":"def top_k(lst, k):\n sorted_lst = []\n while lst:\n largest = lst[0]\n for element in lst:\n if element > largest:\n largest = element\n lst.remove(largest)\n sorted_lst.append(largest)\n return sorted_lst[:k]\n pass\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3912,"func_code":"def top_k(lst, k):\n num, result = max(lst), []\n while len(result) < k:\n if num in lst:\n result.append(num)\n lst.remove(num)\n elif num not in lst:\n num -= 1\n continue\n return result\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3913,"func_code":"def top_k(lst, k):\n new = []\n while lst:\n largest = lst[0]\n for i in lst:\n if i > largest:\n largest = i\n new.append(largest)\n lst.remove(largest)\n if k > len(new):\n return new\n else:\n return new[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3914,"func_code":"def top_k(lst, k):\n newlst = []\n while lst:\n largest = lst[0]\n for number in lst:\n if number > largest:\n largest = number\n lst.remove(largest)\n newlst.append(largest)\n result = []\n for counter in range(k):\n result = result + [newlst[counter],]\n return result\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3915,"func_code":"def top_k(lst, k):\n lst=sort_list(lst)\n while len(lst)>k:\n lst.pop(-1)\n return lst\n\n\ndef sort_list(lst):\n sort=[]\n while lst:\n largest=lst[0]\n for i in lst:\n if i>largest:\n largest=i\n lst.remove(largest) #1.indentation: under while loop\n sort+=[largest]\n return sort\n\n#1. find the largest first, then remove it from the lst, \n#then append the sort \n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3916,"func_code":"def top_k(lst, k):\n sorted_list = []\n while lst:\n l = lst[0]\n for i in lst:\n if i > l:\n l = i\n lst.remove(l)\n sorted_list.append(l)\n return sorted_list[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3917,"func_code":"def top_k(lst, k):\n result = []\n while len(result) < k:\n result.append(lst.pop(lst.index(max(lst))))\n return result\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3918,"func_code":"def top_k(lst, k):\n result = [lst[0]]\n for i in lst[1:]:\n if i > result[0]:\n result.insert(0, i)\n elif i <= result[-1]:\n result.append(i)\n else:\n for j in range(1, len(result) - 1):\n if i <= result[j] and i >= result[j+1]:\n result.insert(j+1, i)\n break\n return result[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3919,"func_code":"def top_k(lst, k):\n sort = []\n counter = 0\n while counter != k:\n sort.append(max(lst))\n lst.remove(max(lst))\n counter += 1\n return sort\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3920,"func_code":"def top_k(lst, k):\n sort=[]\n for i in range (k):\n biggest=max(lst)\n lst.remove(biggest)\n sort.append(biggest)\n return sort\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3921,"func_code":"def top_k(lst, k):\n s = []\n for i in range(k):\n t = 0\n for r in lst:\n if r >= t:\n t = r\n lst.remove(t)\n s.append(t)\n return s\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3922,"func_code":"def top_k(lst, k):\n sort_list = []\n counter = 0\n while counter < k:\n sort_list.append(max(lst))\n lst.remove(max(lst))\n counter = counter + 1\n return sort_list\n \n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3923,"func_code":"def top_k(lst,k):\n newlst=[]\n while lst:\n highest=lst[0] #first number\n for number in lst:\n if number>highest:\n highest=number\n for number in lst:\n if number==highest:\n newlst.append(number)\n lst.remove(number)\n return newlst[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3924,"func_code":"def top_k(lst, k):\n\n newlst = []\n for i in range(k):\n newlst.append(max(lst))\n lst.remove(max(lst))\n return newlst\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3925,"func_code":"def top_k(lst, k):\n a = lst.copy()\n b = lst.copy()\n lst.clear()\n for i in range(len(b)):\n lst.append(max(a))\n a.remove(max(a))\n lst = lst[:k]\n return lst# Fill in your code here\n pass\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3926,"func_code":"def top_k(lst, k):\n sort = []\n i = 0\n while i < k:\n smallest = lst[0]\n for element in lst:\n if element > smallest:\n smallest = element\n lst.remove(smallest)\n sort.append(smallest)\n i += 1\n \n return sort \n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3927,"func_code":"def top_k(lst, k):\n def merge(left,right):\n merged = []\n while left and right:\n if left[0] > right[0]:\n merged.append(left.pop(0))\n else:\n merged.append(right.pop(0))\n return merged + left + right\n def merge_sort(lst):\n if len(lst) == 1:\n return lst\n if len(lst) == 2:\n if lst[0] > lst[1]:\n return lst\n else:\n return lst[::-1] #reverse list\n else:\n a = len(lst)\/\/2\n return merge(merge_sort(lst[:a]),merge_sort(lst[a:]))\n lst = merge_sort(lst)\n return lst[:k]\n \n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3928,"func_code":"def top_k(lst, k):\n def quick_sort(lst):\n def cmp(a,b):\n if a > b:\n return True\n else:\n return False \n \n if len(lst)==0:\n return []\n \n lst0=[]\n lst1=[]\n \n partition = lst[0]\n \n for item in lst[1:]:\n if cmp(item,partition):\n lst0.append(item)\n else:\n lst1.append(item)\n \n return quick_sort(lst0)+[partition]+quick_sort(lst1)\n \n return quick_sort(lst)[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3929,"func_code":"def top_k(lst,k): #k is the number of values in the lst\n lst2 = []\n while lst:\n a = max(lst)\n lst2.append(a)\n lst.remove(a)\n return lst2[0:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3930,"func_code":"def top_k(lst, k):\n new = []\n for i in range(k):\n largest = max(lst)\n new += [largest]\n lst.remove(largest)\n return new\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3931,"func_code":"def top_k(lst, k):\n # Fill in your code here\n sorted = []\n \n while lst:\n smallest = lst[0] # smallest has to exist within this step\n for i in lst:\n if i < smallest:\n smallest = i # take note: you must not reverse this step\n \n sorted.append(smallest)\n lst.remove(smallest)\n \n #ends the while loop, when lst has no elements\n # and every element is sorted into sorted\n sorted.reverse() \n \n return sorted[0:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3932,"func_code":"def top_k(lst, k):\n # Fill in your code here\n new = []\n for i in range(k):\n a = max(lst)\n lst.remove(a)\n new.append(a)\n return new\n \n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3933,"func_code":"def top_k(lst, k):\n new_lst = []\n for i in range(k):\n new_lst.append(max(lst))\n lst.remove(max(lst))\n return new_lst\n pass\n\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3934,"func_code":"def top_k(lst, k):\n sort = []\n while lst: \n largest = lst[0]\n for element in lst:\n if element > largest:\n largest = element\n lst.remove(largest)\n sort.append(largest)\n return sort[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3935,"func_code":"def top_k(lst,k):\n a = []\n while lst:\n biggest = lst[0]\n for element in lst:\n if element > biggest:\n biggest = element\n lst.remove(biggest)\n a.append(biggest)\n return a[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3936,"func_code":"def top_k(lst, k):\n sorted_list = []\n biggest = []\n while lst:\n largest = 0\n for i in lst:\n if i >= largest:\n largest = i\n lst.remove(largest)\n sorted_list.append(largest) # from biggest to smallest\n for j in range (k):\n biggest.append(sorted_list[j])\n return biggest\n pass\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3937,"func_code":"def top_k(lst, k):\n new_lst = []\n while len(new_lst) != k:\n new_lst.append(max(lst))\n lst.remove(max(lst))\n return new_lst\n\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3938,"func_code":"def top_k(lst,k):\n n = len(lst)\n result = []\n while n !=0:\n test =[]\n for counter in range(n):\n test.append(lst[counter])\n first = max(test)\n for counter in range(n):\n if lst[counter] == first:\n result.append(lst.pop(counter))\n break\n n = len(lst)\n return result[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3939,"func_code":"def top_k(lst, k):\n final = []\n while len(final) != k:\n a = max(lst)\n final.append(a)\n lst.remove(a)\n return final\n \n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3940,"func_code":"def top_k(lst, k):\n # Fill in your code here\n a = lst\n sort = []\n while a:\n largest = a[0]\n for item in a:\n if item>largest:\n largest = item\n a.remove(largest)\n sort.append(largest)\n return(sort)[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3941,"func_code":"def top_k(lst, k):\n result = []\n while lst:\n biggest = lst[0]\n for number in lst:\n if number > biggest:\n biggest = number\n lst.remove(biggest)\n result.append(biggest)\n return result[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3942,"func_code":"def top_k(lst, k):\n sorted_list = []\n while lst:\n smallest = lst[0]\n for element in lst:\n if element < smallest:\n smallest = element\n lst.remove(smallest)\n sorted_list.append(smallest)\n final = sorted_list[::-1]\n return final[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3943,"func_code":"def top_k(lst, k):\n s = []\n for i in range(k):\n t = 0\n for r in lst:\n if r >= t:\n t = r\n lst.remove(t)\n s.append(t)\n return s\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3944,"func_code":"def top_k(lst, k):\n # Fill in your code here\n sort = []\n while lst:\n largest = lst[0]\n for i in range(len(lst)):\n if lst[i] > largest:\n largest = lst[i]\n sort.append(largest)\n lst.remove(largest)\n return sort[:k]\n \n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3945,"func_code":"def top_k(lst, k):\n descending_list=[]\n while lst:\n largest=lst[0]\n for i in lst:\n if i>largest:\n largest=i\n descending_list.append(largest)\n lst.remove(largest)\n return descending_list[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3946,"func_code":"def top_k(lst, k):\n lst = sorting(lst)\n new = []\n for i in range(k):\n new.append(lst[0])\n del lst[0]\n return new\n\ndef sorting(lst):\n sorted_lst = []\n while lst:\n smallest = lst[0]\n for i in lst:\n if i < smallest:\n smallest = i\n lst.remove(smallest)\n sorted_lst.append(smallest)\n sorted_lst.reverse()\n return sorted_lst\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3947,"func_code":"def top_k(lst, k):\n res =[]\n while lst:\n largest = lst[0]\n for element in lst:\n if element > largest:\n largest =element\n lst.remove(largest)\n res.append(largest)\n return res[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3948,"func_code":"def top_k(lst,k):\n sort_list = []\n while lst:\n biggest = lst[0]\n for e in lst:\n if biggest < e:\n biggest = e\n lst.remove(biggest)\n sort_list.append(biggest)\n return sort_list[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3949,"func_code":"def top_k(lst, k):\n # Fill in your code here\n new = []\n for i in range(k):\n a = max(lst)\n lst.remove(a)\n new.append(a)\n return new\n \n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3950,"func_code":"def top_k(lst, k):\n result = []\n while len(result) < k:\n biggest = lst[0]\n for i in lst:\n if i > biggest:\n biggest = i\n lst.remove(biggest)\n result.append(biggest)\n return result\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3951,"func_code":"def sort_age(lst):\n new=[]\n while lst !=[]:\n big=lst[0]\n for i in lst:\n if i>big:\n big=i\n lst.remove(big)\n new.append(big)\n return new\ndef top_k(lst, k):\n return sort_age(lst)[:k]\n pass\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3952,"func_code":"def top_k(lst, k):\n klist = []\n while len(klist) < k:\n biggest = lst[0]\n for i in lst:\n if i > biggest:\n biggest = i\n klist.append(biggest)\n lst.remove(biggest)\n return klist\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3953,"func_code":"def top_k(lst, k):\n \n \n newlist = []\n counter = k\n \n while counter > 0:\n biggest = lst[0]\n for i in lst[1:]:\n if biggest > i:\n continue\n else:\n biggest = i\n continue\n \n newlist += [biggest]\n counter -= 1\n lst.remove(biggest)\n \n return newlist\n\n \n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3954,"func_code":"def top_k(lst, k):\n result = [lst[0]]\n for i in lst[1:]:\n if i > result[0]:\n result.insert(0, i)\n elif i <= result[-1]:\n result.append(i)\n else:\n for j in range(1, len(result) - 1):\n if i <= result[j] and i >= result[j+1]:\n result.insert(j+1, i)\n break\n return result[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3955,"func_code":"def top_k(lst, k):\n new=[]\n for i in range(k):\n biggest=lst[0]\n for element in lst:\n if element>biggest:\n biggest=element\n new.append(biggest)\n lst.remove(biggest)\n return new\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3956,"func_code":"def top_k(lst, k):\n sotsot = []\n while lst:\n largest = lst[0]\n for element in lst:\n if element > largest:\n largest = element\n lst.remove(largest)\n sotsot.append(largest)\n return sotsot[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3957,"func_code":"def top_k(lst, k):\n \n if lst == []:\n return lst\n def sorting(nlist):\n if nlist == []:\n return nlist\n lower = []\n higher = []\n plist = []\n pivot = nlist[0]\n for e in nlist:\n if e < pivot:\n lower.append(e)\n elif e == pivot:\n plist.append(e)\n elif e > pivot:\n higher.append(e)\n higher = sorting(higher)\n lower = sorting(lower)\n return lower + plist + higher\n \n sort_list = sorting(lst)\n sort_list = sort_list[::-1]\n \n return sort_list[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3958,"func_code":"def top_k(lst, k):\n arranged = []\n while k > 0:\n arranged.append(max(lst))\n lst.remove(max(lst))\n k = k-1\n return arranged\n pass\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3959,"func_code":"def top_k(lst, k):\n if k == 0 or lst == []:\n return []\n else:\n sort, output = [], []\n while lst:\n largest = lst[0]\n for i in lst:\n if i > largest:\n largest = i\n lst.remove(largest)\n sort.append(largest)\n for j in sort:\n output.append(j)\n if len(output) == k:\n break\n return output \n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3960,"func_code":"def top_k(lst, k):\n \n def sort(lst):\n\n new_lst=[]\n while lst:\n bigger=lst[0]\n for i in lst:\n if i>=bigger:\n bigger=i \n lst.remove(bigger)\n new_lst.append(bigger)\n\n return new_lst\n \n sorted_lst=sort(lst)\n return sorted_lst[:k]\n \n \n \n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3961,"func_code":"def top_k(lst, k):\n results = []\n counter = 0\n while counter < k:\n for i in range(-len(lst),0):\n if lst[i] == max(lst):\n results.append(lst.pop(i))\n break\n counter += 1\n return results\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3962,"func_code":"def merge_sort(lst):\n if len(lst) < 2: \n return lst\n mid = len(lst) \/\/ 2\n left = merge_sort(lst[:mid])\n right = merge_sort(lst[mid:])\n return merge(left, right)\n \ndef merge(left, right):\n results = [] \n while left and right:\n if left[0] < right[0]:\n results.append(left.pop(0))\n else:\n results.append(right.pop(0))\n results.extend(left)\n results.extend(right)\n return results \ndef top_k(lst, k):\n result=merge_sort(lst)\n result.reverse()\n answer=[]\n for i in range(0,k):\n answer=answer+[result[i]]\n return answer\n pass\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3963,"func_code":"def top_k(lst,k):\n newlst=[]\n while lst:\n highest=lst[0] #first number\n for number in lst:\n if number>highest:\n highest=number\n for number in lst:\n if number==highest:\n newlst.append(number)\n lst.remove(number)\n return newlst[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3964,"func_code":"def top_k(lst, k):\n n = len(lst)\n new =[]\n for i in range(0,n):\n largest = max(lst)\n lst.remove(largest)\n new.append(largest)\n return new[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3965,"func_code":"def top_k(lst, k):\n ret = []\n for i in range(k):\n max_int_pos = lst.index(max(lst))\n ret.append(lst.pop(max_int_pos))\n return ret\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3966,"func_code":"def top_k(lst, k):\n sorted_lst = []\n while lst:\n biggest = lst[0]\n for n in range(len(lst)):\n if lst[n] >= biggest:\n biggest = lst[n]\n lst.remove(biggest)\n sorted_lst.append(biggest)\n return sorted_lst[0:k]\n \n \n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3967,"func_code":"def top_k(lst, k):\n # Fill in your code here\n a = []\n while len(a)minimum:\n\t\t\t\tminimum=x\n\t\tnewlst.append(minimum)\n\t\tlst.remove(minimum)\n\treturn newlst\n\t\ndef top_k(lst, k):\n lst=sort(lst)\n return lst[:k]\n # Fill in your code here\n\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3969,"func_code":"def top_k(lst, k):\n new_lst = []\n while len(new_lst) < k:\n maximum = max(lst)\n new_lst.append(maximum)\n lst.remove(maximum)\n return new_lst\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3970,"func_code":"def top_k(lst, k):\n def sorter(lst):\n newlst = []\n while lst:\n current = lst[0]\n for element in lst:\n if element > current:\n current = element\n newlst.append(current)\n lst.remove(current)\n return newlst\n return sorter(lst)[:k]\n \n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3971,"func_code":"def top_k(lst, k):\n sorted_list = []\n while lst:\n l = lst[0]\n for i in lst:\n if i > l:\n l = i\n lst.remove(l)\n sorted_list.append(l)\n return sorted_list[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3972,"func_code":"def top_k(lst, k):\n result = []\n while lst:\n biggest = lst[0]\n for number in lst:\n if number > biggest:\n biggest = number\n lst.remove(biggest)\n result.append(biggest)\n return result[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3973,"func_code":"def top_k(lst, k):\n # Fill in your code here\n sort = []\n while lst: # a is not []\n largest = lst[0]\n for element in lst:\n if element > largest:\n largest = element\n lst.remove(largest)\n sort.append(largest)\n return sort[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3974,"func_code":"def top_k(lst, k):\n new_lst = []\n while len(new_lst) < k:\n maximum = max(lst)\n new_lst.append(maximum)\n lst.remove(maximum)\n return new_lst\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3975,"func_code":"def top_k(lst, k):\n # Fill in your code here\n def ins_sort(a):\n i = 1\n while i < len(a):\n j = i\n while j>0 and a[j-1] > a[j]:\n a[j], a[j-1] = a[j-1], a[j]\n j-=1\n i+=1\n return a[::-1]\n \n lst_sorted = ins_sort(lst)\n \n return lst_sorted[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3976,"func_code":"def top_k(lst, k):\n arranged = []\n while k > 0:\n arranged.append(max(lst))\n lst.remove(max(lst))\n k = k-1\n return arranged\n pass\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3977,"func_code":"def top_k(lst, k):\n results = []\n for i in range(k):\n results.append(max(lst))\n lst.remove(max(lst))\n return results\n \n \n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3978,"func_code":"def top_k(lst, k):\n result = []\n while lst:\n biggest = lst[0]\n for number in lst:\n if number > biggest:\n biggest = number\n lst.remove(biggest)\n result.append(biggest)\n return result[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3979,"func_code":"def top_k(lst, k):\n def mergesort(lst):\n if len(lst) > 1:\n mid = len(lst)\/\/2\n leftlst = lst[:mid]\n rightlst = lst[mid:]\n mergesort(leftlst)\n mergesort(rightlst)\n i = 0\n j = 0\n k = 0\n while i < len(leftlst) and j < len(rightlst):\n if leftlst[i] >= rightlst[j]:\n lst[k] = leftlst[i]\n i = i + 1\n else:\n lst[k] = rightlst[j]\n j = j + 1\n k = k + 1\n while i < len(leftlst):\n lst[k] = leftlst[i]\n i = i + 1\n k = k + 1\n while j < len(rightlst):\n lst[k] = rightlst[j]\n j = j + 1\n k = k + 1\n mergesort(lst)\n return lst[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3980,"func_code":"def top_k(lst, k):\n sort = []\n while lst:\n largest = lst[0]\n for i in lst:\n if i > largest:\n largest = i\n sort.append(largest)\n lst.remove(largest)\n top = sort[:k]\n return top\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3981,"func_code":"def top_k(lst, k):\n new_lst = []\n while len(new_lst) != k:\n new_lst.append(max(lst))\n lst.remove(max(lst))\n return new_lst\n\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3982,"func_code":"def top_k(lst,k):\n sort = []\n while lst:\n biggest = lst[0]\n for element in lst:\n if element > biggest:\n biggest = element\n lst.remove(biggest)\n sort.append(biggest)\n return sort[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3983,"func_code":"def top_k(lst, k):\n klist = []\n while len(klist) < k:\n biggest = lst[0]\n for i in lst:\n if i > biggest:\n biggest = i\n klist.append(biggest)\n lst.remove(biggest)\n return klist\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3984,"func_code":"def top_k(lst,k):\n sort = []\n while lst:\n biggest = lst[0]\n for element in lst:\n if element > biggest:\n biggest = element\n lst.remove(biggest)\n sort.append(biggest)\n return sort[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3985,"func_code":"def top_k(lst, k):\n\tlst=sort(lst)\n\tlst=lst[:k]\n\treturn lst\n\ndef sort(lst):\n\tfor i in range(0,len(lst)-1):\n\t\t for j in range(i+1,len(lst)):\n\t\t\t if lst[i] biggest:\n biggest = e\n result.append(biggest)\n lst.remove(biggest)\n return result[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3987,"func_code":"def top_k(lst, k):\n\tnew_lst = lst\n\tend = []\n\tfor a in range(k):\n\t\tend.append(max(new_lst))\n\t\tnew_lst.remove(max(new_lst))\n\treturn end\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3988,"func_code":"def sort_by_value(lst):\n\tfinal=[]\n\twhile lst:\n\t\tlargest=lst[0]\n\t\tfor i in lst:\n\t\t\tif largest largest:\n largest = e\n lst.remove(largest)\n sort.append(largest)\n return sort[:k]\n \n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3996,"func_code":"def top_k(lst, k):\n sort = []\n while lst:\n largest = lst[0]\n for element in lst:\n if element > largest:\n largest = element\n lst.remove(largest)\n sort.append(largest)\n return sort[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3997,"func_code":"def top_k(lst, k):\n # Fill in your code here\n sort_lst = []\n while lst:\n biggest = lst[0]\n for element in lst:\n if element > biggest:\n biggest = element\n lst.remove(biggest)\n sort_lst.append(biggest)\n return sort_lst[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3998,"func_code":"def top_k(lst, k):\n sort = []\n while lst:\n biggest = lst[0]\n for i in lst[1:]:\n if i > biggest:\n biggest = i\n lst.remove(biggest)\n sort.append(biggest)\n \n n = 1\n sort_k = []\n while n <= k:\n sort_k.append(sort.pop(0))\n n += 1\n \n return sort_k\n \n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":3999,"func_code":"def top_k(lst, k):\n if lst==[]:\n return []\n sort=[]\n while lst:\n largest = lst[0]\n for i in lst:\n if i > largest:\n largest = i\n lst.remove(largest)\n sort.append(largest)\n return sort[:k]\n pass\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4000,"func_code":"def top_k(lst, k):\n def sortme(lst):\n sort=[]\n while lst:\n largest=lst[0]\n for i in lst:\n if i>largest:\n largest=i\n lst.remove(largest)\n sort.append(largest)\n return sort\n return sortme(lst)[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4001,"func_code":"def top_k(lst, k):\n def merge_sort(lst):\n if len(lst) < 2: # Base case!\n return lst\n mid = len(lst) \/\/ 2\n left = merge_sort(lst[:mid]) #sort left\n right = merge_sort(lst[mid:]) #sort right\n return merge(left, right)\n def merge(left, right):\n results = []\n while left and right:\n if left[0] > right[0]:\n results.append(left.pop(0))\n else:\n results.append(right.pop(0))\n results.extend(left)\n results.extend(right)\n return results\n lst = merge_sort(lst)\n return lst[:k]\n \n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4002,"func_code":"def top_k(lst, k):\n def merge_sort(lst):\n if len(lst) < 2: # Base case!\n return lst\n mid = len(lst) \/\/ 2\n left = merge_sort(lst[:mid]) #sort left\n right = merge_sort(lst[mid:]) #sort right\n return merge(left, right)\n def merge(left, right):\n results = []\n while left and right:\n if left[0] > right[0]:\n results.append(left.pop(0))\n else:\n results.append(right.pop(0))\n results.extend(left)\n results.extend(right)\n return results\n lst = merge_sort(lst)\n return lst[:k]\n \n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4003,"func_code":"def top_k(lst, k):\n sort = []\n while lst:\n oldest = lst[0]\n for x in lst:\n if x > oldest:\n oldest = x\n lst.remove(oldest)\n sort.append(oldest)\n return sort[0:k]\n \n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4004,"func_code":"def top_k(lst, k):\n # Fill in your code here\n out = [lst[0],]\n for ele in lst[1:]:\n for indx in range(len(out)):\n if out[indx] <= ele:\n out.insert(indx, ele)\n break\n elif indx == len(out) - 1:\n out.append(ele)\n return out[0:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4005,"func_code":"def top_k(lst, k):\n def merge_lists(left,right):\n new = []\n while left and right:\n if left[0] >= right[0]:\n new.append(left.pop(0))\n else:\n new.append(right.pop(0))\n new.extend(left)\n new.extend(right)\n return new\n \n def binary_sort(lst):\n if len(lst) <2:\n return lst\n mid = len(lst)\/\/2\n left = binary_sort(lst[:mid])\n right = binary_sort(lst[mid:])\n return merge_lists(left,right)\n \n new = binary_sort(lst)\n return new[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4006,"func_code":"def top_k(lst, k):\n result = 0\n new_list = []\n while result < k:\n temp = max(lst)\n new_list.append(temp)\n lst.remove(temp)\n result = result + 1\n return new_list\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4007,"func_code":"def top_k(lst, k):\n sorted_lst = []\n while lst:\n largest = lst[0]\n for element in lst:\n if element > largest:\n largest = element\n lst.remove(largest)\n sorted_lst.append(largest)\n return sorted_lst[:k]\n pass\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4008,"func_code":"def top_k(lst, k):\n newlist = []\n while len(newlist) < k:\n newlist += [max(lst)]\n for i in range(len(lst)):\n if lst[i] == max(lst):\n break\n del lst[i]\n return newlist\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4009,"func_code":"def top_k(lst, k):\n sort = []\n while lst:\n largest = lst[0]\n for i in lst:\n if i > largest:\n largest = i\n lst.remove(largest)\n sort.append(largest)\n print(sort)\n return sort[:k]\n \n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4010,"func_code":"def top_k(lst, k):\n lst=sort_list(lst)\n while len(lst)>k:\n lst.pop(-1)\n return lst\n\n\ndef sort_list(lst):\n sort=[]\n while lst:\n largest=lst[0]\n for i in lst:\n if i>largest:\n largest=i\n lst.remove(largest) #1.indentation: under while loop\n sort+=[largest]\n return sort\n\n#1. find the largest first, then remove it from the lst, \n#then append the sort \n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4011,"func_code":"def top_k(lst, k):\n # Fill in your code here\n sort_lst=sort(lst)\n return sort_lst[:k]\n\ndef sort(lst):\n sort=[]\n while lst:\n largest=lst[0]\n for elem in lst:\n if elem > largest:\n largest = elem\n lst.remove(largest)\n sort.append(largest)\n return sort\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4012,"func_code":"def top_k(lst, k):\n sorted_list = []\n while lst:\n smallest = lst[0]\n for element in lst:\n if element < smallest:\n smallest = element\n lst.remove(smallest)\n sorted_list.append(smallest)\n final = sorted_list[::-1]\n return final[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4013,"func_code":"def top_k(lst, k):\n if k == 0 or lst == []:\n return []\n else:\n sort, output = [], []\n while lst:\n largest = lst[0]\n for i in lst:\n if i > largest:\n largest = i\n lst.remove(largest)\n sort.append(largest)\n for j in sort:\n output.append(j)\n if len(output) == k:\n break\n return output \n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4014,"func_code":"def top_k(lst, k):\n n= []\n while lst:\n big = lst[0]\n for ele in lst:\n if ele>big:\n big = ele\n if len(n)==k:\n break \n else:\n n.append(big)\n lst.remove(big)\n return n\n \n \n \n pass\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4015,"func_code":"def top_k(lst, k):\n sorted = []\n while lst:\n biggest = lst[0]\n for elem in lst:\n if elem > biggest:\n biggest = elem\n lst.remove(biggest)\n sorted.append(biggest)\n return sorted[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4016,"func_code":"def top_k(lst, k):\n result = []\n for i in range(len(lst)):\n largest = lst[0]\n for element in lst:\n if element > largest:\n largest = element\n lst.remove(largest)\n result.append(largest)\n return result[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4017,"func_code":"def top_k(lst, k):\n new_lst = []\n while lst:\n largest = lst[0]\n for numbers in lst:\n if numbers > largest:\n largest = numbers\n new_lst.append(largest)\n lst.remove(largest)\n return new_lst[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4018,"func_code":"def top_k(lst, k):\n sort = []\n while lst:\n largest = lst[0]\n for i in lst:\n if i>largest:\n largest = i\n lst.remove(largest)\n sort.append(largest)\n return sort[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4019,"func_code":"def top_k(lst, k):\n new_lst = []\n if k == 0 or lst == []:\n return []\n else:\n while k > 0:\n new_lst.append(max(lst))\n lst.remove(new_lst[-1])\n k -= 1\n return new_lst\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4020,"func_code":"def top_k(lst, k):\n result = []\n for x in range(k):\n result.append(max(lst))\n lst.remove(max(lst))\n return result\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4021,"func_code":"def top_k(lst, k):\n new = []\n i = 1\n while i <= k:\n element = find_largest(lst)\n new.append(element)\n lst.remove(element)\n i = i+1\n return new\n\ndef find_largest(lst):\n largest = lst[0]\n for element in lst:\n if element > largest:\n largest = element\n return largest\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4022,"func_code":"def top_k(lst, k):\n final = []\n while lst:\n biggest = lst[0]\n for i in lst: \n if i>biggest:\n biggest = i \n lst.remove(biggest)\n final.append(biggest)\n return final[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4023,"func_code":"def top_k(lst, k):\n result = []\n while lst:\n biggest = lst[0]\n for elem in lst:\n if elem > biggest:\n biggest = elem\n lst.remove(biggest)\n result.append(biggest)\n \n return result[:k]\n\n # Fill in your code here\n pass\n\n\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4024,"func_code":"def top_k(lst, k):\n lst2 = []\n lst3 = []\n while lst:\n largest = lst[0]\n for i in lst:\n if i > largest:\n largest = i\n lst.remove(largest)\n lst2.append(largest)\n if len(lst2) <= k:\n k = len(lst2)\n for i2 in range(k):\n lst3.append(lst2[i2])\n return lst3 \n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4025,"func_code":"def top_k(lst, k):\n newlst = []\n while len(newlst) maximum:\n maximum = i\n newlst.append(maximum)\n lst.remove(maximum)\n return newlst\n \n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4026,"func_code":"def sort_no(lst):\n new = []\n while lst:\n Max = max(lst,key = lambda x : x)\n new.append(Max)\n lst.remove(Max)\n return new\n\ndef top_k(lst, k):\n Sorted = sort_no(lst)\n return Sorted[0:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4027,"func_code":"def top_k(lst, k):\n def sort(lst2):\n holder=[]\n if lst==[]:\n return []\n for x in lst:\n if holder==[]:\n holder=x\n elif x>holder:\n holder=x\n lst.remove(holder)\n return [holder]+sort(lst)\n counter=k\n final=[]\n new_lst=sort(list)\n while counter>0:\n\t a=new_lst.pop(0)\n\t final.append(a)\n\t counter-=1\n return final\n \n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4028,"func_code":"def top_k(lst, k):\n sort = []\n while lst:\n largest = lst[0]\n for element in lst:\n if element > largest:\n largest = element\n lst.remove(largest)\n sort.append(largest)\n return sort[0:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4029,"func_code":"def top_k(lst, k):\n # Fill in your code here\n out = [lst[0],]\n for ele in lst[1:]:\n for indx in range(len(out)):\n if out[indx] <= ele:\n out.insert(indx, ele)\n break\n elif indx == len(out) - 1:\n out.append(ele)\n return out[0:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4030,"func_code":"import heapq\ndef top_k(lst, k):\n k_sorted = heapq.nlargest(k, lst)\n return k_sorted\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4031,"func_code":"def top_k(lst, k):\n def rank(lyst):\n if len(lyst)==1:\n return list(lyst)\n else:\n a = max(lyst)\n lyst.remove(a)\n return [a]+ rank(lyst)\n new_list = rank(lst)\n return new_list[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4032,"func_code":"def top_k(lst, k):\n a = lst\n sort=[]\n while a:\n smallest = a[0]\n for element in a:\n if element largest:\n largest = lst[i]\n lst.remove(largest)\n new_lst.append(largest)\n return new_lst\n\ndef top_k(lst, k):\n lst = sort_descending(lst)\n return lst[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4035,"func_code":"def top_k(lst, k):\n newlst = []\n while lst:\n largest = lst[0]\n for number in lst:\n if number > largest:\n largest = number\n lst.remove(largest)\n newlst.append(largest)\n result = []\n for counter in range(k):\n result = result + [newlst[counter],]\n return result\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4036,"func_code":"def sort(lst):\n\tsort = []\n\twhile lst:\n\t\tlargest = lst[0]\n\t\tfor element in lst:\n\t\t\tif element > largest:\n\t\t\t\tlargest = element\n\t\tlst.remove(largest)\n\t\tsort.append(largest)\n\treturn sort\n\t\ndef top_k(lst, k):\n\tsorted_list = sort(lst)\n\tresult = sorted_list[:k]\n\treturn result\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4037,"func_code":"def top_k(lst, k):\n unsorted = lst\n result = []\n while True:\n if len(result) == k:\n break\n result += [max(unsorted),]\n unsorted.remove(max(unsorted))\n return result\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4038,"func_code":"def top_k(lst, k):\n if k>len(lst):\n return None\n def newsort(lsts):\n l=[]\n while lsts:\n biggest=lsts[0]\n for element in lsts:\n if element>biggest:\n biggest=element\n l.append(biggest)\n lsts.remove(biggest)\n return l\n newlist=newsort(lst)\n return newlist[0:k]\n \n \n \n \n \n \n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4039,"func_code":"def top_k(lst, k):\n \n \n newlist = []\n counter = k\n \n while counter > 0:\n biggest = lst[0]\n for i in lst[1:]:\n if biggest > i:\n continue\n else:\n biggest = i\n continue\n \n newlist += [biggest]\n counter -= 1\n lst.remove(biggest)\n \n return newlist\n\n \n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4040,"func_code":"def top_k(lst, k):\n a = []\n while k > 0:\n a.append(max(lst))\n lst.remove(max(lst))\n k -= 1\n return a\n \n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4041,"func_code":"def sort_no(lst):\n lst_len = len(lst) - 1\n while lst_len > 0:\n for i in range(lst_len):\n if lst[i] > lst[i+1]:\n lst[i], lst[i+1] = lst[i+1], lst[i]\n lst_len -= 1\n return lst[::-1]\ndef top_k(lst, k):\n return sort_no(lst)[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4042,"func_code":"def get_largest(lst):\n for i in range (len(lst)-1):\n if lst[i]> lst[i+1]:\n lst[i],lst[i+1] = lst[i+1],lst[i]\n \n return lst[-1]\n\n\n\ndef top_k(lst, k):\n result = []\n for i in range (len(lst)):\n if len(result) < k:\n largest = get_largest(lst)\n lst.remove(largest)\n result.append(largest)\n return result\n\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4043,"func_code":"def bubble_sort(seq):\n changed = True\n while changed:\n changed = False\n for i in range(len(seq) - 1):\n if seq[i] < seq[i+1]:\n seq[i], seq[i+1] = seq[i+1], seq[i]\n changed = True\n return None\ndef top_k(lst, k):\n bubble_sort(lst)\n return lst[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4044,"func_code":"def top_k(lst, k):\n \n answer = []\n a = lst[0]\n \n while lst:\n \n for i in range(len(lst)):\n answer.append(max(lst))\n lst.remove(max(lst))\n \n return answer[:k]\n\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4045,"func_code":"def top_k(lst, k):\n new_list = []\n while lst:\n maximum = lst[0]\n for i in lst:\n if i > maximum:\n maximum = i\n new_list.append(maximum)\n lst.remove(maximum)\n new_list_2 = []\n counter = 0\n for i in new_list:\n if counter < k:\n new_list_2.append(new_list[counter])\n counter = counter + 1\n return new_list_2\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4046,"func_code":"def top_k(lst, k):\n sort = []\n while lst: \n largest = lst[0]\n for element in lst:\n if element > largest:\n largest = element\n lst.remove(largest)\n sort.append(largest)\n return sort[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4047,"func_code":"def top_k(lst, k):\n if lst == [] or k == 0:\n return []\n else:\n final = []\n while lst:\n element = max(lst)\n final += [element,]\n lst.remove(element)\n if len(final) == k:\n break\n return final\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4048,"func_code":"def top_k(lst, k):\n for item in range(len(lst)):\n for test in range(len(lst)):\n if lst[test] < lst[item]:\n lst[test], lst[item] = lst[item], lst[test]\n return lst[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4049,"func_code":"def top_k(lst, k):\n l=lst.copy()\n res=[]\n while len(res)biggest:\n biggest=element\n \n l.remove(biggest)\n res.append(biggest)\n return res\n\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4050,"func_code":"def top_k(lst, k):\n sorted_list = []\n biggest = []\n while lst:\n largest = 0\n for i in lst:\n if i >= largest:\n largest = i\n lst.remove(largest)\n sorted_list.append(largest) # from biggest to smallest\n for j in range (k):\n biggest.append(sorted_list[j])\n return biggest\n pass\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4051,"func_code":"def top_k(lst, k):\n sorted_list = []\n biggest = []\n while lst:\n largest = 0\n for i in lst:\n if i >= largest:\n largest = i\n lst.remove(largest)\n sorted_list.append(largest) # from biggest to smallest\n for j in range (k):\n biggest.append(sorted_list[j])\n return biggest\n pass\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4052,"func_code":"def top_k(lst,k):\n swap = True\n while swap:\n swap = False\n for i in range(len(lst)-1):\n if lst[i] < lst[i+1]:\n lst[i],lst[i+1] = lst[i+1], lst[i]\n swap = True\n while len(lst) > k:\n lst.pop(-1)\n return lst\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4053,"func_code":"def top_k(lst, k):\n new = []\n counter = k\n while counter > 0:\n curr = 0\n for i in range(len(lst)):\n if lst[i] > lst[curr]:\n curr = i\n new.append(lst.pop(curr))\n counter -= 1\n return new\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4054,"func_code":"def top_k(lst, k):\n def sort(lst):\n sort_list = []\n while lst: # a is not []\n biggest = lst[0]\n for element in lst:\n if element > biggest:\n biggest = element\n lst.remove(biggest)\n sort_list.append(biggest)\n return sort_list\n return sort(lst)[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4055,"func_code":"def top_k(lst, k):\n sort = []\n counter = 0\n while counter != k:\n sort.append(max(lst))\n lst.remove(max(lst))\n counter += 1\n return sort\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4056,"func_code":"def top_k(lst, k):\n af_sort = []\n while lst:\n biggest = lst[0] \n for element in lst:\n if element > biggest:\n biggest = element\n lst.remove(biggest)\n af_sort.append(biggest)\n return af_sort[0:k]\n \n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4057,"func_code":"def top_k(lst, k):\n i=0\n while i+1 0:\n a.append(max(lst))\n lst.remove(max(lst))\n k -= 1\n return a\n \n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4060,"func_code":"def top_k(lst, k):\n newlist = []\n while len(newlist)max:\n max=j\n result.append(max)\n lst.remove(max)\n return result# Fill in your code here\n pass\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4062,"func_code":"def top_k(lst, k):\n sort = []\n while lst:\n largest = lst[0]\n for element in lst:\n if element > largest:\n largest = element\n lst.remove(largest)\n sort.append(largest)\n return sort[:k]\n\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4063,"func_code":"def top_k(lst, k):\n\tnew_lst = []\n\twhile lst:\n\t\tlargest = lst[0]\n\t\tfor i in lst:\n\t\t\tif i > largest:\n\t\t\t\tlargest = i\n\t\tlst.remove(largest)\n\t\tnew_lst.append(largest)\n\treturn new_lst[:k]\n\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4064,"func_code":"def top_k(lst, k):\n sorted = []\n while lst:\n biggest = lst[0]\n for elem in lst:\n if elem > biggest:\n biggest = elem\n lst.remove(biggest)\n sorted.append(biggest)\n return sorted[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4065,"func_code":"def top_k(lst, k):\n new = []\n counter = k\n while counter > 0:\n curr = 0\n for i in range(len(lst)):\n if lst[i] > lst[curr]:\n curr = i\n new.append(lst.pop(curr))\n counter -= 1\n return new\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4066,"func_code":"def top_k(lst, k):\n lst2 = []\n largest = lst[0]\n while lst:\n largest = lst[0]\n for element in lst:\n if element > largest:\n largest = element\n lst.remove(largest)\n lst2.append(largest)\n return lst2[0:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4067,"func_code":"def top_k(lst,k):\n result=[]\n while lst:\n minimum=lst[0]\n for i in lst:\n if ilargest:\n largest=i\n descending_list.append(largest)\n lst.remove(largest)\n return descending_list[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4069,"func_code":"def top_k(lst, k):\n a=[]\n while lst:\n largest = lst[0]\n for i in lst:\n if i > largest:\n largest = i\n lst.remove(largest)\n a.append(largest)\n return a[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4070,"func_code":"def top_k(lst, k):\n i=0\n while i+1 big:\n big = i\n lst.remove(big)\n new_lst.append(big)\n\n return new_lst[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4072,"func_code":"def top_k(lst, k):\n\tdef merge_sort(lst):\n\t\tif len(lst) < 2:\n\t\t \treturn lst\n\t\tmid = len(lst) \/\/ 2\n\t\tleft = merge_sort(lst[:mid])\n\t\tright = merge_sort(lst[mid:])\n\t\treturn merge(left, right)\n\tdef merge(left, right):\n\t\tresults = []\n\t\twhile left and right:\n\t\t\tif left[0] > right[0]:\n\t\t\t\tresults.append(left.pop(0))\n\t\t\telse:\n\t\t\t\tresults.append(right.pop(0))\n\t\tresults.extend(left)\n\t\tresults.extend(right)\n\t\treturn results\n\treturn merge_sort(lst)[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4073,"func_code":"def top_k(lst, k):\n def sort(lst):\n sort = True\n while sort:\n sort = False\n for i in range(len(lst)-1):\n if lst[i] < lst[i+1]:\n sort = True\n lst[i], lst[i+1] = lst[i+1], lst[i]\n return lst\n lsts = sort(lst)\n return lsts[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4074,"func_code":"def top_k(lst, k):\n new_list = []\n while len(new_list) != k:\n largest = lst[0]\n for i in lst:\n if largest < i:\n largest = i\n else:\n continue\n new_list += [largest]\n lst.remove(largest)\n return new_list\n \n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4075,"func_code":"def top_k(lst, k):\n lst = sort_descending(lst)\n return lst[:k]\n \n\ndef sort_descending(lst):\n for i in range(len(lst)-1):\n for j in range(i, len(lst)):\n if lst[j] > lst[i]:\n x = lst[i]\n lst[i] = lst[j]\n lst[j] = x\n return lst\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4076,"func_code":"def top_k(lst, k):\n a=[]\n while lst:\n largest = lst[0]\n for i in lst:\n if i > largest:\n largest = i\n lst.remove(largest)\n a.append(largest)\n return a[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4077,"func_code":"def top_k(lst, k):\n sort = []\n while lst:\n largest = lst[0]\n for element in lst:\n if element > largest:\n largest = element\n lst.remove(largest)\n sort.append(largest)\n return sort[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4078,"func_code":"def top_k(lst, k):\n new_lst = []\n while lst:\n largest = lst[0]\n for i in lst:\n if i > largest:\n largest = i\n lst.remove(largest)\n new_lst.append(largest)\n return new_lst[0:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4079,"func_code":"def top_k(lst,k):\n def selection_sort(lst):\n srt = []\n while lst:\n smallest = lst[0]\n for elem in lst:\n if elem < smallest:\n smallest = elem\n lst.remove(smallest)\n srt.append(smallest)\n return srt\n return selection_sort(lst)[-1:-k-1:-1]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4080,"func_code":"def top_k(lst,k):\n def selection_sort(lst):\n srt = []\n while lst:\n smallest = lst[0]\n for elem in lst:\n if elem < smallest:\n smallest = elem\n lst.remove(smallest)\n srt.append(smallest)\n return srt\n return selection_sort(lst)[-1:-k-1:-1]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4081,"func_code":"def top_k(lst, k):\n new_lst = []\n\n while lst:\n big = lst[0]\n for i in lst:\n if i > big:\n big = i\n lst.remove(big)\n new_lst.append(big)\n\n return new_lst[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4082,"func_code":"def top_k(lst, k):\n lst2 = []\n lst3 = []\n while lst:\n largest = lst[0]\n for i in lst:\n if i > largest:\n largest = i\n lst.remove(largest)\n lst2.append(largest)\n if len(lst2) <= k:\n k = len(lst2)\n for i2 in range(k):\n lst3.append(lst2[i2])\n return lst3 \n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4083,"func_code":"def top_k(lst, k):\n\tfor start in range(len(lst)-1):\n\t\tmaximum = start\n\t\tfor i in range(start, len(lst)):\n\t\t\tif lst[i] > lst[maximum]:\n\t\t\t\tmaximum = i\n\t\tlst[maximum], lst[start] = lst[start], lst[maximum]\n\treturn lst[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4084,"func_code":"def top_k(lst, k):\n count = 0\n op = []\n while count < k:\n op += [max(lst)]\n lst.remove(max(lst))\n count += 1\n return op\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4085,"func_code":"def top_k(lst, k):\n results = []\n for i in range(k):\n results.append(max(lst))\n lst.remove(max(lst))\n return results\n \n \n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4086,"func_code":"def top_k(lst, k):\n a=[]\n while lst:\n for i in lst:\n a.append(max(lst))\n lst.remove(max(lst))\n return a[0:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4087,"func_code":"def top_k(lst, k):\n results = []\n for i in range(k):\n results.append(max(lst))\n lst.remove(max(lst))\n return results\n \n \n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4088,"func_code":"def top_k(lst, k):\n new_lst = []\n while len(new_lst) < k:\n new_lst.append(max(lst))\n lst.remove(max(lst))\n return new_lst\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4089,"func_code":"def top_k(lst, k):\n lst = sorting(lst)\n new = []\n for i in range(k):\n new.append(lst[0])\n del lst[0]\n return new\n\ndef sorting(lst):\n sorted_lst = []\n while lst:\n smallest = lst[0]\n for i in lst:\n if i < smallest:\n smallest = i\n lst.remove(smallest)\n sorted_lst.append(smallest)\n sorted_lst.reverse()\n return sorted_lst\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4090,"func_code":"def top_k(lst, k):\n for i, e in enumerate(lst):\n mx = max(range(i,len(lst)), key= lambda x: lst[x])\n lst[i], lst[mx] = lst[mx], e\n return lst[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4091,"func_code":"def top_k(lst, k):\n l=lst.copy()\n res=[]\n while len(res)biggest:\n biggest=element\n \n l.remove(biggest)\n res.append(biggest)\n return res\n\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4092,"func_code":"def sort_descending(lst):\n new_lst = []\n while lst:\n largest = lst[0]\n for i in range(len(lst)):\n if lst[i] > largest:\n largest = lst[i]\n lst.remove(largest)\n new_lst.append(largest)\n return new_lst\n\ndef top_k(lst, k):\n lst = sort_descending(lst)\n return lst[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4093,"func_code":"def top_k(lst, k):\n\tif lst == [] or k == 0:\n\t\treturn []\n\tsort = []\n\twhile lst:\n\t\tlargest = lst[0]\n\t\tfor element in lst:\n\t\t\tif element > largest:\n\t\t\t\tlargest = element\n\t\tlst.remove(largest)\n\t\tsort.append(largest)\n\t\tif len(sort) > k-1:\n\t\t\tbreak\n\treturn sort\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4094,"func_code":"def top_k(lst, k):\n\tif lst == [] or k == 0:\n\t\treturn []\n\tsort = []\n\twhile lst:\n\t\tlargest = lst[0]\n\t\tfor element in lst:\n\t\t\tif element > largest:\n\t\t\t\tlargest = element\n\t\tlst.remove(largest)\n\t\tsort.append(largest)\n\t\tif len(sort) > k-1:\n\t\t\tbreak\n\treturn sort\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4095,"func_code":"def top_k(lst,k):\n sort = []\n while lst:\n largest = lst[0]\n for element in lst:\n if largest < element:\n largest = element\n lst.remove(largest)\n sort.append(largest)\n return sort[0:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4096,"func_code":"def top_k(lst,k):\n sort = []\n while lst:\n largest = lst[0]\n for element in lst:\n if largest < element:\n largest = element\n lst.remove(largest)\n sort.append(largest)\n return sort[0:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4097,"func_code":"def top_k(lst, k):\n sortedlst = []\n while len(sortedlst) != k:\n largest = lst[0]\n for el in lst:\n if el > largest:\n largest = el\n sortedlst.append(largest)\n lst.remove(largest)\n return sortedlst\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4098,"func_code":"def bubble_sort(lst):\n swap = True\n while swap == True:\n swap = False\n for i in range(len(lst)-1):\n if lst[i] < lst[i+1]:\n lst[i], lst[i+1] = lst[i+1], lst[i]\n swap = True\n return lst\n \ndef top_k(lst, k):\n lst = bubble_sort(lst)\n return lst[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4099,"func_code":"def top_k(lst, k):\n return merge_sort(lst)[:k]\n \ndef merge_sort(lst):\n if len(lst) < 2:\n return lst\n mid = len(lst) \/\/ 2\n left = merge_sort(lst[:mid])\n right = merge_sort(lst[mid:])\n return merge(left, right)\n \ndef merge(left, right):\n results = []\n while left and right:\n if left[0] > right[0]:\n results.append(left.pop(0))\n else:\n results.append(right.pop(0))\n results.extend(left)\n results.extend(right)\n return results\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4100,"func_code":"def top_k(lst, k):\n \n sort = []\n \n while lst:\n\n largest = lst[0]\n\n for x in lst:\n\n if x > largest:\n\n largest = x\n\n lst.remove(largest)\n\n sort.append(largest)\n\n return sort[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4101,"func_code":"\ndef top_k(lst, k):\n x = []\n for i in range(k):\n a = 0\n for ele in lst:\n if ele >= a:\n a = ele\n lst.remove(a)\n x.append(a)\n return x\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4102,"func_code":"def top_k(lst, k):\n def sort(lst):\n new = [] \n while lst:\n greatest = lst[0]\n for i in lst:\n if i > greatest:\n greatest = i \n lst.remove(greatest)\n new.append(greatest)\n return new\n return sort(lst)[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4103,"func_code":"def top_k(lst,k):\n nlst = []\n for x in range(k):\n b = max(lst)\n nlst.append(b)\n lst.remove(b)\n return nlst\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4104,"func_code":"def top_k(lst, k):\n product = []\n while k > 0:\n product += [max(lst)]\n k = k -1\n lst.remove(max(lst))\n return product\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4105,"func_code":"def top_k(lst, k):\n\ttop_lst = []\n\tfor i in range(0, k):\n\t\ttop_lst += [max(lst)]\n\t\tlst.remove(max(lst))\n\treturn top_lst\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4106,"func_code":"def top_k(lst, k):\n list = []\n while len(list) < k:\n a = max(lst)\n lst.remove(a)\n list.append(a)\n return list\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4107,"func_code":"def top_k(lst, k):\n count=0\n newlst=[]\n while lst:\n newlst+=[max(lst)]\n lst.remove(max(lst))\n for i in range(k):\n lst.append(newlst[i])\n return lst\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4108,"func_code":"def top_k(lst,k):\n\tif len(lst) == 0:\n\t\treturn lst\n\tlargest = 0\n\tnewlist = []\n\tfor i in range(k): \n\t\tfor item in lst:\n\t\t\tif item >= largest:\n\t\t\t\tlargest = item\n\t\tlst.remove(largest)\n\t\tnewlist.append(largest)\n\t\tif len(lst) == 0:\n\t\t\tbreak\n\t\tlargest = lst[0]\n\treturn newlist\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4109,"func_code":"def top_k(lst, k):\n if k<=0:\n return []\n else:\n maxi=max(lst)\n length=len(lst)\n for i in range(length):\n if lst[i]==maxi:\n pos=i\n new_list=lst.copy()\n new_list.pop(pos)\n return [maxi]+top_k(new_list,k-1)\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4110,"func_code":"def top_k(lst, k):\n\tnewlst = []\n\twhile len(newlst) < k:\n\t\tnewlst += (lst.pop(lst.index(max(lst))),)\n\treturn newlst\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4111,"func_code":"def top_k(lst, k):\n af_sort = []\n while lst:\n biggest = lst[0] \n for element in lst:\n if element > biggest:\n biggest = element\n lst.remove(biggest)\n af_sort.append(biggest)\n return af_sort[0:k]\n \n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4112,"func_code":"def top_k(lst, k):\n values = []\n while len(values) < k:\n greatest = lst[0]\n for item in lst:\n if item > greatest:\n greatest = item\n lst.remove(greatest)\n values.append(greatest)\n \n return values\n\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4113,"func_code":"def top_k(lst, k):\n for x in range(k+1):\n max = x\n for i in range(x, len(lst)):\n if lst[i] > lst[max]:\n max = i\n if x <= (len(lst) - 1):\n lst[max], lst[x] = lst[x], lst[max]\n new = lst[:k]\n return new\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4114,"func_code":"def top_k(lst, k):\n newlst = []\n while len(newlst) maximum:\n maximum = i\n newlst.append(maximum)\n lst.remove(maximum)\n return newlst\n \n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4115,"func_code":"def top_k(lst, k):\n result = []\n for i in range(k):\n result.append(max(lst))\n lst.remove(max(lst))\n return result\n \n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4116,"func_code":"def top_k(lst, k):\n\tdef sort_num(lst):\n\t\tfor k in range(len(lst)-1):\n\t\t\tfor i in range(k+1, len(lst)):\n\t\t\t\tif lst[k] < lst[i]:\n\t\t\t\t\tlst[k], lst[i] = lst[i], lst[k]\n\t\t\t\telse:\n\t\t\t\t\tcontinue\n\t\treturn lst\n\tslst = sort_num(lst)\n\treturn slst[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4117,"func_code":"def top_k(lst, k):\n n= []\n while lst:\n big = lst[0]\n for ele in lst:\n if ele>big:\n big = ele\n if len(n)==k:\n break \n else:\n n.append(big)\n lst.remove(big)\n return n\n \n \n \n pass\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4118,"func_code":"def top_k(lst, k):\n new, a = [], lst[0]\n while lst:\n for i in range(len(lst)):\n new.append(max(lst))\n lst.remove(max(lst))\n return new[:k]\n pass\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4119,"func_code":"def top_k(lst, k):\n\tnew_lst = []\n\tcut_lst = []\n\twhile lst:\n\t\tbiggest = lst[0]\n\t\tfor i in lst:\n\t\t\tif i > biggest:\n\t\t\t\tbiggest = i\n\t\tlst.remove(biggest)\n\t\tnew_lst.append(biggest)\n\tfor i in range(k):\n\t\tcut_lst.append(new_lst[0])\n\t\tnew_lst.pop(0)\n\treturn cut_lst\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4120,"func_code":"def top_k(lst, k):\n new_lst = []\n while len(new_lst) < k:\n new_lst.append(max(lst))\n lst.remove(max(lst))\n return new_lst\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4121,"func_code":"def top_k(lst, k):\n final = []\n while len(final) != k:\n a = max(lst)\n final.append(a)\n lst.remove(a)\n return final\n \n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4122,"func_code":"def top_k(lst, n):\n for j in range(len(lst)):\n maxi=lst[j]\n for k in range(j+1,len(lst)):\n if lst[k]>maxi:\n maxi=lst[k]\n lst[j],lst[k]=lst[k],lst[j]\n result=lst[0:n]\n return result\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4123,"func_code":"def top_k(lst, k):\n new_lst = []\n while len(new_lst) < k:\n maximum = max(lst)\n new_lst.append(maximum)\n lst.remove(maximum)\n\n return new_lst\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4124,"func_code":"def top_k(lst, k):\n product = []\n while k > 0:\n product += [max(lst)]\n k = k -1\n lst.remove(max(lst))\n return product\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4125,"func_code":"def top_k(lst, k):\n k=len(lst) if k>len(lst) else k\n l=[]\n while len(l)!=k:\n m=lst[0]\n for i in lst:\n if i>m:\n m=i\n l.append(m)\n lst.remove(m)\n return l\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4126,"func_code":"def top_k(lst, k):\n sorted_lst = []\n while lst:\n biggest = lst[0]\n for n in range(len(lst)):\n if lst[n] >= biggest:\n biggest = lst[n]\n lst.remove(biggest)\n sorted_lst.append(biggest)\n return sorted_lst[0:k]\n \n \n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4127,"func_code":"def top_k(lst, k):\n swap = True\n while swap:\n swap = False\n for i in range(len(lst)-1):\n if lst[i] < lst[i+1]:\n lst[i], lst[i+1] = lst[i+1], lst[i]\n swap = True\n return lst[:k]\n pass\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4128,"func_code":"def top_k(lst, k):\n newlist = []\n while len(newlist) < k:\n newlist += [max(lst)]\n for i in range(len(lst)):\n if lst[i] == max(lst):\n break\n del lst[i]\n return newlist\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4129,"func_code":"def top_k(lst, k):\n for i in range(len(lst)-1):\n for j in range(i+1, len(lst)):\n if lst[i] < lst[j]:\n lst[i], lst[j] = lst[j], lst[i]\n result = []\n for i in range(k):\n result.append(lst[i])\n return result\n \n \n \n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4130,"func_code":"def top_k(lst, k):\n new = []\n for i in range(k):\n largest = max(lst)\n new += [largest]\n lst.remove(largest)\n return new\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4131,"func_code":"def top_k(lst, k):\n sort = []\n i = 0\n while i < k:\n smallest = lst[0]\n for element in lst:\n if element > smallest:\n smallest = element\n lst.remove(smallest)\n sort.append(smallest)\n i += 1\n \n return sort \n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4132,"func_code":"def top_k(lst, k):\n # Fill in your code here\n def sort(lst):\n sorted_list = []\n while lst:\n largest = lst[0]\n for element in lst:\n if largest < element:\n largest = element\n lst.remove(largest)\n sorted_list.append(largest)\n return sorted_list\n return sort(lst)[:k]\n pass\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4133,"func_code":"def top_k(lst, k):\n new = []\n i = 1\n while i <= k:\n element = find_largest(lst)\n new.append(element)\n lst.remove(element)\n i = i+1\n return new\n\ndef find_largest(lst):\n largest = lst[0]\n for element in lst:\n if element > largest:\n largest = element\n return largest\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4134,"func_code":"def top_k(lst,k):\n n = len(lst)\n result = []\n while n !=0:\n test =[]\n for counter in range(n):\n test.append(lst[counter])\n first = max(test)\n for counter in range(n):\n if lst[counter] == first:\n result.append(lst.pop(counter))\n break\n n = len(lst)\n return result[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4135,"func_code":"def top_k(lst, k):\n result = []\n while lst:\n biggest = lst[0]\n for e in lst:\n if e > biggest:\n biggest = e\n result.append(biggest)\n lst.remove(biggest)\n return result[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4136,"func_code":"def top_k(lst,k):\n sort_list = []\n while lst:\n biggest = lst[0]\n for e in lst:\n if biggest < e:\n biggest = e\n lst.remove(biggest)\n sort_list.append(biggest)\n return sort_list[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4137,"func_code":"def top_k(lst, k):\n n = len(lst)\n new =[]\n for i in range(0,n):\n largest = max(lst)\n lst.remove(largest)\n new.append(largest)\n return new[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4138,"func_code":"def top_k(lst, k):\n\n\n while True:\n changed = False\n for i in range(len(lst)-1):\n if lst[i+1]>lst[i]:\n lst[i],lst[i+1] = lst[i+1], lst[i]\n changed = True\n if not changed:\n break\n \n while len(lst)>k:\n if len(lst)<=k:\n return lst\n else:\n lst.pop(k)\n \n return (lst)\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4139,"func_code":"def sort_list(lst):\n if len(lst) < 2:\n return lst\n for j in range(len(lst)-1):\n minimum = j\n for i in range(j+1, len(lst)):\n if lst[minimum] > lst[i]:\n minimum = i\n lst[j], lst[minimum] = lst[minimum], lst[j]\n lst.reverse()\n return lst \n \ndef top_k(lst, k):\n a = sort_list(lst)\n return a[0:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4140,"func_code":"def top_k(lst, k):\n count = 0\n op = []\n while count < k:\n op += [max(lst)]\n lst.remove(max(lst))\n count += 1\n return op\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4141,"func_code":"def top_k(lst, k):\n a=[]\n while lst:\n for i in lst:\n a.append(max(lst))\n lst.remove(max(lst))\n return a[0:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4142,"func_code":"def top_k(lst, k):\n newlist = []\n while len(newlist) lst[i]:\n lst[i], lst[j] = lst[j], lst[i]\n return lst[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4144,"func_code":"def top_k(lst, k):\n new = []\n for i in range(k):\n top = max(lst) \n new.append(top)\n lst.remove(top)\n \n return new\n \n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4145,"func_code":"def top_k(lst, k):\n values = []\n while len(values) < k:\n greatest = lst[0]\n for item in lst:\n if item > greatest:\n greatest = item\n lst.remove(greatest)\n values.append(greatest)\n \n return values\n\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4146,"func_code":"def top_k(lst, k):\n unsorted = lst\n result = []\n while True:\n if len(result) == k:\n break\n result += [max(unsorted),]\n unsorted.remove(max(unsorted))\n return result\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4147,"func_code":"def top_k(lst, k):\n if k == 0:\n return []\n if lst == []:\n return lst\n sort = []\n while lst:\n biggest = lst[0]\n for element in lst:\n if element > biggest:\n biggest = element\n lst.remove(biggest)\n sort.append(biggest)\n if len(sort) == k:\n return sort\n else:\n continue\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4148,"func_code":"def top_k(lst, k):\n new_lst = []\n for i in range(k):\n new_lst.append(max(lst))\n lst.remove(max(lst))\n return new_lst\n pass\n\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4149,"func_code":"def top_k(lst,k):\n a = []\n while lst:\n biggest = lst[0]\n for element in lst:\n if element > biggest:\n biggest = element\n lst.remove(biggest)\n a.append(biggest)\n return a[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4150,"func_code":"def top_k(lst, k):\n sort = []\n while lst:\n oldest = lst[0]\n for x in lst:\n if x > oldest:\n oldest = x\n lst.remove(oldest)\n sort.append(oldest)\n return sort[0:k]\n \n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4151,"func_code":"def top_k(lst, k):\n if k<=0:\n return []\n else:\n maxi=max(lst)\n length=len(lst)\n for i in range(length):\n if lst[i]==maxi:\n pos=i\n new_list=lst.copy()\n new_list.pop(pos)\n return [maxi]+top_k(new_list,k-1)\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4152,"func_code":"def top_k(lst, k):\n def pos(seq,i):\n n = len(seq)\n for j in range(n):\n if seq[j] == i:\n return j\n def largest(seq):\n largest = seq[0]\n for i in seq:\n if i > largest:\n largest = i\n return pos(seq,largest)\n n_list =[]\n if k ==1:\n return [lst[largest(lst)]]\n elif lst == [] or k==0:\n return []\n else: \n z = lst.pop(largest(lst))\n n_list = [z]+ top_k(lst, k-1)\n return n_list \n \n \n # Fill in your code here\n pass\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4153,"func_code":"\ndef top_k(lst, k):\n sort = []\n while lst:\n biggest = lst[0]\n for elem in lst:\n if elem > biggest:\n biggest = elem\n lst.remove(biggest)\n sort.append(biggest)\n return sort[:k]\n\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4154,"func_code":"def top_k(lst, k):\n # Fill in your code here\n a = lst\n sort = []\n while a:\n largest = a[0]\n for item in a:\n if item>largest:\n largest = item\n a.remove(largest)\n sort.append(largest)\n return(sort)[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4155,"func_code":"def top_k(lst, k):\n for j in range(len(lst)-1):\n for i in range(len(lst)-1):\n if lst[i] < lst[i+1]:\n lst[i], lst[i+1] = lst[i+1], lst[i]\n return lst[0:k] \n \n \n \n pass\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4156,"func_code":"def top_k(lst, k):\n new = []\n for i in range(k):\n top = max(lst) \n new.append(top)\n lst.remove(top)\n \n return new\n \n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4157,"func_code":"def top_k(lst, k):\n\tresult = []\n\twhile lst:\n\t\tbiggest = lst[0]\n\t\tfor item in lst:\n\t\t\tif item > biggest:\n\t\t\t\tbiggest = item\n\t\tlst.remove(biggest)\n\t\tresult.append(biggest)\n\treturn result[:k]\n\t\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4158,"func_code":"def top_k(lst, k):\n n = len(lst) - 1\n while n > 0:\n for i in range(n):\n if lst[i]> lst[i+1]:\n lst[i], lst[i+1] = lst[i+1], lst[i]\n n = n-1\n lst.reverse()\n return lst[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4159,"func_code":"def sort_descending(lst):\n new_lst = []\n while lst:\n largest = lst[0]\n for i in range(len(lst)):\n if lst[i] > largest:\n largest = lst[i]\n lst.remove(largest)\n new_lst.append(largest)\n return new_lst\n\ndef top_k(lst, k):\n lst = sort_descending(lst)\n return lst[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4160,"func_code":"def top_k(lst, k):\n results = []\n counter = 0\n while counter < k:\n for i in range(-len(lst),0):\n if lst[i] == max(lst):\n results.append(lst.pop(i))\n break\n counter += 1\n return results\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4161,"func_code":"\ndef top_k(lst, k):\n # Fill in your code here\n data_list = lst\n new_list = []\n while data_list:\n minimum = data_list[0] # arbitrary number in list \n for x in data_list: \n if x > minimum:\n minimum = x\n new_list.append(minimum)\n data_list.remove(minimum) \n return new_list[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4162,"func_code":"\ndef top_k(lst, k):\n # Fill in your code here\n \n result = []\n while lst:\n minimum = lst[0] # arbitrary number in list \n for x in lst: \n if x > minimum:\n minimum = x\n result.append(minimum)\n lst.remove(minimum) \n return result[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4163,"func_code":"def top_k(lst, k):\n for start in range(len(lst)):\n minimum = start\n for i in range(start,len(lst)): \n if lst[i] < lst[minimum]:\n minimum = i\n lst[start], lst[minimum] = lst[minimum], lst[start]\n lst.reverse() \n return lst[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4164,"func_code":"def top_k(lst, k):\n new, a = [], lst[0]\n while lst:\n for i in range(len(lst)):\n new.append(max(lst))\n lst.remove(max(lst))\n return new[:k]\n pass\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4165,"func_code":"def top_k(lst, k):\n swap = True\n while swap:\n swap = False\n for i in range(len(lst)-1):\n if lst[i] < lst[i+1]:\n lst[i], lst[i+1] = lst[i+1], lst[i]\n swap = True\n return lst[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4166,"func_code":"def top_k(lst, k):\n\tdef sortedd(lst):\n\t\tfor j in range(len(lst)-1):\n\t\t\tfor i in range(len(lst)-1):\n\t\t\t\tif lst[i] < lst[i+1]:\n\t\t\t\t\tlst[i], lst[i+1] = lst[i+1], lst[i]\n\t\treturn lst\n\treturn sortedd(lst)[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4167,"func_code":"def top_k(lst, k):\n sort = []\n while lst:\n largest = lst[0]\n for element in lst:\n if element > largest:\n largest = element\n lst.remove(largest)\n sort.append(largest)\n return sort[:k]\n\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4168,"func_code":"def top_k(lst, k):\n for j in range(len(lst)):\n for i in range(len(lst)-1):\n if lst[i] biggest:\n biggest = element\n lst.remove(biggest)\n sort_lst.append(biggest)\n return sort_lst[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4170,"func_code":"def top_k(lst, k):\n res =[]\n while lst:\n largest = lst[0]\n for element in lst:\n if element > largest:\n largest =element\n lst.remove(largest)\n res.append(largest)\n return res[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4171,"func_code":"def top_k(lst,k):\n sort = []\n\n while lst:\n biggest = lst[0]\n for element in lst:\n if element > biggest:\n biggest = element\n lst.remove(biggest)\n sort.append(biggest)\n new_sort = []\n for i in range (k):\n new_sort += [sort[i]]\n return new_sort\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4172,"func_code":"def top_k(lst, k):\n new_lst=[]\n def bubble_sort(lst):\n swap = True\n while swap:\n swap = False\n for i in range(len(lst)-1):\n if lst[i]biggest:\n biggest=element\n new.append(biggest)\n lst.remove(biggest)\n return new\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4174,"func_code":"def top_k(lst, k):\n result = []\n length=len(lst)\n while len(lst)>length-k:\n biggest = lst[0]\n for element in lst:\n if element > biggest:\n biggest = element\n result.append(biggest)\n lst.remove(biggest)\n \n return result\n pass\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4175,"func_code":"def top_k(lst, k):\n #assumes not nested lists\n new = []\n count = 0\n while count < k:\n largest = lst[0]\n for ele in lst:\n if ele > largest:\n largest = ele\n lst.remove(largest)\n new.append(largest)\n count = count + 1\n return new\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4176,"func_code":"def top_k(lst, k):\n res = []\n while len(res) != k:\n elem = max(lst)\n lst.remove(elem)\n res.append(elem)\n return res\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4177,"func_code":"def top_k(lst,k):\n sort = []\n\n while lst:\n biggest = lst[0]\n for element in lst:\n if element > biggest:\n biggest = element\n lst.remove(biggest)\n sort.append(biggest)\n new_sort = []\n for i in range (k):\n new_sort += [sort[i]]\n return new_sort\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4178,"func_code":"\ndef biggest(lst):\n big=lst[0]\n for i in range (len(lst)):\n if lst[i]>big:\n big=lst[i]\n else:\n continue\n return big\n \ndef top_k(lst, k):\n l=len(lst)\n new_list=[]\n for i in range (l):\n new_list.append(biggest(lst))\n lst.remove(biggest(lst))\n return new_list[:k]\n\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4179,"func_code":"def top_k(lst, k):\n a=[]\n sort =[]\n while lst:\n biggest = lst[0]\n for i in lst:\n if (i)> biggest:\n biggest = i\n lst.remove(biggest)\n sort.append(biggest)\n for i in range(k):\n a = a + [sort[i],]\n return a\n pass\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4180,"func_code":"def top_k(lst, k):\n swap = True\n while swap:\n swap = False\n for i in range(len(lst)-1):\n if lst[i] < lst[i+1]:\n lst[i], lst[i+1] = lst[i+1], lst[i]\n swap = True\n #lst order done\n\n return lst[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4181,"func_code":"def top_k(lst, k):\n new_list = []\n while k > 0:\n new_list.append(max(lst))\n lst.remove(max(lst))\n k = k-1\n return new_list\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4182,"func_code":"def top_k(lst, k):\n count=0\n newlst=[]\n while lst:\n newlst+=[max(lst)]\n lst.remove(max(lst))\n for i in range(k):\n lst.append(newlst[i])\n return lst\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4183,"func_code":"def top_k(lst, k):\n # Fill in your code here\n sort = []\n while lst:\n biggest = lst[0]\n for element in lst:\n if element > biggest:\n biggest = element\n lst.remove(biggest)\n sort.append(biggest)\n return sort[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4184,"func_code":"def top_k(lst,k):\n def top(lst):\n s = []\n while lst:\n smallest = lst[0]\n for element in lst:\n if element>smallest:\n smallest = element\n lst.remove(smallest)\n s.append(smallest)\n\n return s\n s = top(lst)\n return s[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4185,"func_code":"def top_k(lst, k):\n result = []\n for i in range(len(lst)):\n largest = lst[0]\n for element in lst:\n if element > largest:\n largest = element\n lst.remove(largest)\n result.append(largest)\n return result[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4186,"func_code":"def top_k(lst, k):\n new_list = []\n while k>0:\n new_list.append(max(lst))\n lst.remove(max(lst))\n k-=1\n return new_list\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4187,"func_code":"\ndef biggest(lst):\n big=lst[0]\n for i in range (len(lst)):\n if lst[i]>big:\n big=lst[i]\n else:\n continue\n return big\n \ndef top_k(lst, k):\n l=len(lst)\n new_list=[]\n for i in range (l):\n new_list.append(biggest(lst))\n lst.remove(biggest(lst))\n return new_list[:k]\n\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4188,"func_code":"def top_k(lst, k):\n\tdef merge_sort(lst):\n\t\tif len(lst) == 0 or len(lst) ==1:\n\t\t \treturn lst\n\t\tmid = len(lst) \/\/ 2\n\t\tleft = merge_sort(lst[:mid])\n\t\tright = merge_sort(lst[mid:])\n\t\treturn merge(left, right)\n\tdef merge(left, right):\n\t\ta = []\n\t\twhile left and right:\n\t\t\tif right[0] largest:\n largest = i\n sort.append(largest)\n lst.remove(largest)\n top = sort[:k]\n return top\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4192,"func_code":"def top_k(lst, k):\n new_list = []\n while k>0:\n new_list.append(max(lst))\n lst.remove(max(lst))\n k-=1\n return new_list\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4193,"func_code":"def top_k(lst, k):\n result = []\n length=len(lst)\n while len(lst)>length-k:\n biggest = lst[0]\n for element in lst:\n if element > biggest:\n biggest = element\n result.append(biggest)\n lst.remove(biggest)\n \n return result\n pass\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4194,"func_code":"def top_k(lst, k):\n # Fill in your code here\n sort = []\n while lst:\n biggest = lst[0]\n for element in lst:\n if element > biggest:\n biggest = element\n lst.remove(biggest)\n sort.append(biggest)\n return sort[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4195,"func_code":"def top_k(lst, k):\n #assumes not nested lists\n new = []\n count = 0\n while count < k:\n largest = lst[0]\n for ele in lst:\n if ele > largest:\n largest = ele\n lst.remove(largest)\n new.append(largest)\n count = count + 1\n return new\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4196,"func_code":"def top_k(lst, k):\n new_list= selection_sort(lst)\n results= []\n for i in range(k):\n results.append(new_list.pop(0))\n return results\n \n \n\ndef selection_sort(lst):\n for idx in range(len(lst)):\n minimum=idx\n for i in range(len(lst)):\n if lst[i] < lst[minimum]:\n minimum=i\n lst[minimum], lst[idx]= lst[idx], lst[minimum]\n return lst\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4197,"func_code":"def top_k(lst, k):\n new = []\n while lst:\n largest = lst[0]\n for i in lst:\n if i > largest:\n largest = i\n new.append(largest)\n lst.remove(largest)\n if k > len(new):\n return new\n else:\n return new[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4198,"func_code":"def top_k(lst, k):\n sort = []\n while lst: \n largest = lst[0] \n for element in lst: \n if element > largest: \n largest = element \n lst.remove(largest) \n sort.append(largest) \n return sort[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4199,"func_code":"def top_k(lst, k):\n for i in range(0,len(lst)-1): \n for j in range(i+1,len(lst)): \n if lst[i] largest:\n\n largest = x\n\n lst.remove(largest)\n\n sort.append(largest)\n\n return sort[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4202,"func_code":"def top_k(lst, k):\n lst = sort_descending(lst)\n return lst[:k]\n \n\ndef sort_descending(lst):\n for i in range(len(lst)-1):\n for j in range(i, len(lst)):\n if lst[j] > lst[i]:\n x = lst[i]\n lst[i] = lst[j]\n lst[j] = x\n return lst\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4203,"func_code":"def top_k(lst, k):\n\tres=[]\n\twhile len(res) biggest:\n biggest = i\n else:\n continue\n lst.remove(biggest)\n if len(newlist) == k:\n break\n else:\n newlist.append(biggest)\n return newlist\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4205,"func_code":"def top_k(lst, k):\n newlist = []\n while lst:\n biggest = lst[0]\n for i in lst:\n if i > biggest:\n biggest = i\n else:\n continue\n lst.remove(biggest)\n if len(newlist) == k:\n break\n else:\n newlist.append(biggest)\n return newlist\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4206,"func_code":"def top_k(lst, k):\n for start in range (len(lst) - 1):\n for i in range(start, len(lst)):\n if lst[i] > lst[start]:\n lst[i], lst[start] = lst[start], lst[i]\n return lst[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4207,"func_code":"def top_k(lst, k):\n\tsorted = []\n\twhile lst:\n\t\tlargest = lst[0]\n\t\tfor i in lst:\n\t\t\tif i > largest:\n\t\t\t\tlargest = i\n\t\tsorted.append(largest)\n\t\tlst.remove(largest)\n\treturn sorted[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4208,"func_code":"def top_k(lst, k):\n # Fill in your code here\n sorted = []\n \n while lst:\n smallest = lst[0] # smallest has to exist within this step\n for i in lst:\n if i < smallest:\n smallest = i # take note: you must not reverse this step\n \n sorted.append(smallest)\n lst.remove(smallest)\n \n #ends the while loop, when lst has no elements\n # and every element is sorted into sorted\n sorted.reverse() \n \n return sorted[0:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4209,"func_code":"def top_k(lst, k):\n sort = []\n while lst: \n largest = lst[0] \n for element in lst: \n if element > largest: \n largest = element \n lst.remove(largest) \n sort.append(largest) \n return sort[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4210,"func_code":"def top_k(lst,k):\n result=[]\n while lst:\n minimum=lst[0]\n for i in lst:\n if i lst[j]:\n min = j\n lst[i], lst[min] = lst[min], lst[i]\n lst.reverse()\n return lst \ndef top_k(lst, k):\n ans = sort_list(lst)\n return ans[0:k]# Fill in your code here\n \n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4212,"func_code":"def top_k(lst, k):\n sort = []\n while lst:\n big = max(lst)\n sort.append(big)\n lst.remove(big)\n output = []\n for i in range(k):\n output.append(sort[i])\n return output\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4213,"func_code":"def order (lst):\n\tfor i in range(len(lst)):\n\t\tfor j in range(i+1, len(lst)):\n\t\t\tif lst[j] < lst[i]:\n\t\t\t\tlst[i], lst[j] = lst[j], lst[i]\n\treturn lst\n\t\ndef top_k(lst, k):\n\tresult = []\n\ta = order(lst)\n\tcounter = 0\n\twhile counter < k:\n\t\tresult.append(a.pop())\n\t\tcounter +=1\n\treturn result\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4214,"func_code":"def top_k(lst, k):\n new = []\n ans = []\n for i in lst:\n index = 0\n for x in new:\n if i < x:\n index += 1\n new.insert(index, i)\n for i in range(k):\n ans.append(new[i])\n return ans\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4215,"func_code":"def top_k(lst, k):\n a=[]\n sort =[]\n while lst:\n biggest = lst[0]\n for i in lst:\n if (i)> biggest:\n biggest = i\n lst.remove(biggest)\n sort.append(biggest)\n for i in range(k):\n a = a + [sort[i],]\n return a\n pass\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4216,"func_code":"def top_k(lst, k):\n sotsot = []\n while lst:\n largest = lst[0]\n for element in lst:\n if element > largest:\n largest = element\n lst.remove(largest)\n sotsot.append(largest)\n return sotsot[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4217,"func_code":"def top_k(lst,k):\n nlst = []\n for x in range(k):\n b = max(lst)\n nlst.append(b)\n lst.remove(b)\n return nlst\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4218,"func_code":"def top_k(lst, k):\n a = lst.copy()\n b = lst.copy()\n lst.clear()\n for i in range(len(b)):\n lst.append(max(a))\n a.remove(max(a))\n lst = lst[:k]\n return lst# Fill in your code here\n pass\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4219,"func_code":"def top_k(lst, k):\n a=[]\n for i in range (0,k):\n a=a+[max(lst)]\n lst.remove(max(lst))\n \n for i in range(len(a)):\n for j in range(len(a)-1, i, -1):\n if a[j] > a[j-1]:\n a[j], a[j-1] = a[j-1], a[j]\n\n return a\n \n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4220,"func_code":"def merge_sort(lst):\n if len(lst) < 2: \n return lst\n mid = len(lst) \/\/ 2\n left = merge_sort(lst[:mid])\n right = merge_sort(lst[mid:])\n return merge(left, right)\n \ndef merge(left, right):\n results = [] \n while left and right:\n if left[0] < right[0]:\n results.append(left.pop(0))\n else:\n results.append(right.pop(0))\n results.extend(left)\n results.extend(right)\n return results \ndef top_k(lst, k):\n result=merge_sort(lst)\n result.reverse()\n answer=[]\n for i in range(0,k):\n answer=answer+[result[i]]\n return answer\n pass\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4221,"func_code":"def top_k(lst, k):\n sort = []\n while lst:\n big = max(lst)\n sort.append(big)\n lst.remove(big)\n output = []\n for i in range(k):\n output.append(sort[i])\n return output\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4222,"func_code":"def top_k(lst, k):\n lst2 = []\n largest = lst[0]\n while lst:\n largest = lst[0]\n for element in lst:\n if element > largest:\n largest = element\n lst.remove(largest)\n lst2.append(largest)\n return lst2[0:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4223,"func_code":"def top_k(lst, k):\n def sort_largest(lst):\n result = []\n while lst and k:\n largest = lst[0]\n index = 0\n for i in range(len(lst)):\n if lst[i] > largest:\n index = i\n largest = lst[i]\n result.append(largest)\n lst.remove(largest)\n if len(result) == k:\n break\n return result\n return sort_largest(lst)\n\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4224,"func_code":"def top_k(lst, k):\n new_lst = []\n while lst:\n\t high = lst[0]\n\t for i in lst:\n\t\t if high < i:\n\t\t\t high = i\n\t new_lst.append(high)\n\t lst.remove(high)\n return new_lst[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4225,"func_code":"def top_k(lst, k):\n result = []\n while lst:\n biggest = lst[0]\n for elem in lst:\n if elem > biggest:\n biggest = elem\n lst.remove(biggest)\n result.append(biggest)\n \n return result[:k]\n\n # Fill in your code here\n pass\n\n\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4226,"func_code":"def top_k(lst, k):\n while lst:\n maximum=[]\n for a in range(len(lst)):\n maximum.append(max(lst))\n lst.remove(max(lst))\n \n return maximum[0:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4227,"func_code":"def top_k(lst, k):\n final = []\n while lst:\n biggest = lst[0]\n for i in lst: \n if i>biggest:\n biggest = i \n lst.remove(biggest)\n final.append(biggest)\n return final[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4228,"func_code":"def top_k(lst, k):\n lst2 = []\n\n while lst:\n lst2.append(max(lst))\n lst.remove(max(lst))\n for x in lst:\n if x in lst2:\n lst2.append(x)\n lst.remove(x)\n return lst2[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4229,"func_code":"def top_k(lst, k):\n lst2 = []\n\n while lst:\n lst2.append(max(lst))\n lst.remove(max(lst))\n for x in lst:\n if x in lst2:\n lst2.append(x)\n lst.remove(x)\n return lst2[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4230,"func_code":"def top_k(lst, k):\n for i in range(len(lst)):\n for j in range(len(lst) - 1):\n if lst[j] > lst[j + 1]:\n lst[j], lst[j + 1] = lst[j + 1], lst[j]\n lst.reverse()\n return lst[:k]\n pass\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4231,"func_code":"def top_k(lst, k):\n l = []\n if k > len(lst):\n return False\n elif k == 1:\n return lst\n else:\n while len(l) < k:\n a = max(lst)\n lst.remove(a)\n l.append(a)\n \n return l\n \n # Fill in your code here\n pass\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4232,"func_code":"def top_k(lst, k):\n newlst=[]\n while lst:\n largest=lst[0]\n for i in lst:\n if largest highest:\n highest = x\n new_lst.append(highest)\n lst.remove(highest)\n counter +=1\n \n return new_lst\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4235,"func_code":"def top_k(lst, k):\n new_lst = []\n while lst:\n largest = lst[0]\n for i in lst:\n if i > largest:\n largest = i\n lst.remove(largest)\n new_lst.append(largest)\n return new_lst[0:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4236,"func_code":"def top_k(lst, k):\n newlst=[]\n while lst:\n largest=lst[0]\n for i in lst:\n if largest= a:\n a = ele\n lst.remove(a)\n x.append(a)\n return x\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4239,"func_code":"def top_k(lst, k):\n # Fill in your code here\n sort = []\n while lst:\n largest = lst[0]\n for i in range(len(lst)):\n if lst[i] > largest:\n largest = lst[i]\n sort.append(largest)\n lst.remove(largest)\n return sort[:k]\n \n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4240,"func_code":"def sort(lst):\n if lst==[]:\n return []\n new_lst=[lst[0],]\n for x in lst[1:]:\n if x > new_lst[-1]:\n new_lst += [x,]\n else:\n count=0\n while count new_lst[count]:\n count+=1\n continue\n else:\n new_lst = new_lst[0:count]+[x,]+new_lst[count:]\n break\n return new_lst[::-1]\n\ndef top_k(lst, k):\n return sort(lst)[0:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4241,"func_code":"def top_k(lst, k):\n def sort(lst):\n if lst==[] or len(lst)==1:\n return lst\n else:\n temp=lst[0]\n count=0\n for i in range(len(lst)):\n if lst[i]>temp:\n temp=lst[i]\n count=i\n pop=lst.pop(count)\n return [temp,]+sort(lst)\n lst=sort(lst)\n return lst[:k]\n # Fill in your code here\n pass\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4242,"func_code":"def sort(lst):\n if lst==[]:\n return []\n new_lst=[lst[0],]\n for x in lst[1:]:\n if x > new_lst[-1]:\n new_lst += [x,]\n else:\n count=0\n while count new_lst[count]:\n count+=1\n continue\n else:\n new_lst = new_lst[0:count]+[x,]+new_lst[count:]\n break\n return new_lst[::-1]\n\ndef top_k(lst, k):\n return sort(lst)[0:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4243,"func_code":"def top_k(lst, k):\n final = []\n while lst:\n biggest = lst[0]\n for i in lst: \n if i>biggest:\n biggest = i \n lst.remove(biggest)\n final.append(biggest)\n return final[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4244,"func_code":"def top_k(lst, k):\n sort = []\n while lst:\n largest = lst[0]\n for i in lst:\n if i > largest:\n largest = i\n lst.remove(largest)\n sort.append(largest)\n return sort[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4245,"func_code":"def top_k(lst, k):\n def sort(lst2):\n holder = []\n if lst == [] :\n return [] \n for x in lst : \n if holder == [] :\n holder = x \n elif x > holder :\n holder = x \n lst.remove(holder)\n return [holder]+ sort(lst2)\n counter = k \n final = [] \n new_lst = sort(list)\n while counter > 0 : \n a = new_lst.pop(0)\n final.append(a)\n counter -= 1\n return final \n pass\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4246,"func_code":"def top_k(lst, k):\n sort = []\n while lst:\n largest = lst[0]\n for i in lst:\n if i > largest:\n largest = i\n lst.remove(largest)\n sort.append(largest)\n return sort[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4247,"func_code":"def top_k(lst, k):\n new_list = []\n while k > 0:\n new_list.append(max(lst))\n lst.remove(max(lst))\n k = k-1\n return new_list\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4248,"func_code":"def top_k(lst, k):\n sort = []\n while lst:\n largest = lst[0]\n for i in lst:\n if i>largest:\n largest = i\n lst.remove(largest)\n sort.append(largest)\n return sort[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4249,"func_code":"def top_k(lst, k):\n final = []\n while lst:\n biggest = lst[0]\n for i in lst: \n if i>biggest:\n biggest = i \n lst.remove(biggest)\n final.append(biggest)\n return final[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4250,"func_code":"def top_k(lst, k):\n sort = []\n sort_top_k = []\n while lst:\n biggest = lst[0]\n for element in lst:\n if element > biggest:\n biggest = element\n lst.remove(biggest)\n sort.append(biggest)\n \n if len(sort) < k:\n k = len(sort)\n for i in range(k):\n sort_top_k.append(sort[i])\n \n return sort_top_k\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4251,"func_code":"def top_k(lst, k):\n l = []\n if k > len(lst):\n return False\n elif k == 1:\n return lst\n else:\n while len(l) < k:\n a = max(lst)\n lst.remove(a)\n l.append(a)\n \n return l\n \n # Fill in your code here\n pass\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4252,"func_code":"def top_k(lst, k):\n result=[]\n while k>0:\n result.append(max(lst))\n lst.remove(max(lst))\n k=k-1\n return result\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4253,"func_code":"def top_k(lst, k):\n # Fill in your code here\n sort_lst=sort(lst)\n return sort_lst[:k]\n\ndef sort(lst):\n sort=[]\n while lst:\n largest=lst[0]\n for elem in lst:\n if elem > largest:\n largest = elem\n lst.remove(largest)\n sort.append(largest)\n return sort\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4254,"func_code":"def top_k(lst, k):\n counter=0\n new_lst=[]\n while counter largest:\n largest = element\n lst.remove(largest)\n sort.append(largest)\n return sort[0:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4258,"func_code":"def top_k(lst, k):\n new = []\n ans = []\n for i in lst:\n index = 0\n for x in new:\n if i < x:\n index += 1\n new.insert(index, i)\n for i in range(k):\n ans.append(new[i])\n return ans\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4259,"func_code":"def top_k(lst, k):\n new_lst = []\n if k == 0 or lst == []:\n return []\n else:\n while k > 0:\n new_lst.append(max(lst))\n lst.remove(new_lst[-1])\n k -= 1\n return new_lst\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4260,"func_code":"def top_k(lst, k):\n result = []\n while lst:\n biggest = lst[0]\n for number in lst:\n if number > biggest:\n biggest = number\n lst.remove(biggest)\n result.append(biggest)\n return result[:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4261,"func_code":"def top_k(lst, k):\n\n newlst = []\n for i in range(k):\n newlst.append(max(lst))\n lst.remove(max(lst))\n return newlst\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4262,"func_code":"def top_k(lst, k):\n a = mysort(lst)\n return a[:k]\n pass\ndef mysort(lst):\n\t\tcounter = 0\n\t\ta = list(lst)\n\t\twhile counterprevious:\n\t\t\t\t\ta[i-1]=a[i]\n\t\t\t\t\ta[i]=previous\n\t\t\t\telse:\n\t\t\t\t\tprevious = a[i]\n\t\t\tcounter += 1\n\t\treturn a\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4263,"func_code":"def top_k(lst, k):\n sort = []\n sort_top_k = []\n while lst:\n biggest = lst[0]\n for element in lst:\n if element > biggest:\n biggest = element\n lst.remove(biggest)\n sort.append(biggest)\n \n if len(sort) < k:\n k = len(sort)\n for i in range(k):\n sort_top_k.append(sort[i])\n \n return sort_top_k\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4264,"func_code":"def top_k(lst,k):\n\toutput = []\n\tfor i in range(k):\n\t\tlargest = max(lst)\n\t\tlst.remove(largest)\n\t\toutput.append(largest)\n\treturn output\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4265,"func_code":"def top_k(lst, k):\n sort = []\n while lst:\n largest = lst[0]\n for e in lst:\n if e > largest:\n largest = e\n lst.remove(largest)\n sort.append(largest)\n return sort[:k]\n \n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4266,"func_code":"def top_k(lst, k):\n new_lst = []\n counter = 1\n while counter <= k:\n highest = lst[0] # arbitrary number in list \n for x in lst: \n if x > highest:\n highest = x\n new_lst.append(highest)\n lst.remove(highest)\n counter +=1\n \n return new_lst\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4267,"func_code":"def sort(lst):\n\ta = 0\n\tfor i in range(len(lst)-1):\n\t\tif lst[i]0:\n result.append(max(lst))\n lst.remove(max(lst))\n k=k-1\n return result\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4269,"func_code":"def top_k(lst, k):\n new = []\n while lst:\n largest = lst[0]\n for a in lst:\n if a > largest:\n largest = a\n lst.remove(largest)\n new.append(largest)\n return new[0:k]\n","correct":true,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4270,"func_code":"def top_k(lst, k):\n result = []\n while k >= 0:\n big = max(lst)\n result.append(big)\n lst.remove(big)\n k -= 1\n return result\n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4271,"func_code":"def top_k(lst, k):\n lst_res = lst\n sort = []\n while lst_res:\n largest = lst_res[0]\n for elements in lst_res:\n if element > largest:\n largest = element\n lst_res.remove(largest)\n sort.append(largest)\n return sort[:k]\n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4272,"func_code":"def top_k(lst, k):\n tmp = []\n while len(lst) > 0:\n tmp.append(max(lst))\n lst.remove(max(lst))\n return tmp[:5]\n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4273,"func_code":"def top_k(lst, k):\n sort = []\n while lst: \n biggest = lst[0]\n for element in lst:\n if ele > biggest:\n biggest = ele\n \n lst.remove(element)\n sort.append(element)\n if len(sort)==k:\n break\n return sort\n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4274,"func_code":"def top_k(lst, k):\n sort = []\n while lst: \n biggest = lst[0]\n for element in lst:\n if element > biggest:\n biggest = element\n \n lst.remove(element)\n sort.append(element)\n if len(sort)==k:\n break\n return sort\n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4275,"func_code":"def top_k(lst, k):\n sort = []\n while lst: \n biggest = lst[0]\n for element in lst:\n if element > biggest:\n biggest = element\n \n lst.remove(biggest)\n sort.append(biggest)\n if len(sort)==k:\n break\n return sort\n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4276,"func_code":"def top_k(lst, k):\n lst1 = []\n for i in lst:\n if i >= k:\n lst1.append(i) \n sort = []\n while lst1: \n biggest = lst[0]\n for element in lst1:\n if element > biggest:\n biggest = element\n lst1.remove(biggest)\n sort.append(biggest)\n return sort\n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4277,"func_code":"def top_k(lst, k):\n sort = []\n while lst: \n biggest = lst[0]\n for element in lst:\n if element > biggest:\n biggest = element\n lst.remove(biggest)\n sort.append(biggest)\n return sort[:k+1]\n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4278,"func_code":"def top_k(lst, k):\n n = len(lst) - k\n counter = 0\n while counter < k:\n lst.remove(min(lst))\n counter = counter + 1\n sort_list = []\n while lst != []:\n sort_lst.append(max(lst))\n lst.remove(max(lst))\n return sort_list\n \n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4279,"func_code":"def top_k(lst, k):\n n = len(lst) - k\n counter = 0\n while counter < k:\n lst.remove(min(lst))\n counter = counter + 1\n sort_list = []\n while lst != []:\n sort_list.append(max(lst))\n lst.remove(max(lst))\n return sort_list\n \n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4280,"func_code":"def sort_age(lst):\n new=[]\n while lst !=[]:\n big=lst[0]\n for i in lst:\n if i[1]>big[1]:\n big=i\n lst.remove(big)\n new.append(big)\n return new\ndef top_k(lst, k):\n return sort_age(lst)[:k]\n pass\n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4281,"func_code":"def top_k(lst, k):\n \n if lst == []:\n return lst\n \n lower = []\n higher = []\n plist = []\n \n pivot = lst[0]\n for e in lst:\n if e < pivot:\n lower.append(e)\n if x == pivot:\n plist.append(e)\n if x > pivot:\n higher.append(e)\n sort_list = lower + plist + higher\n \n return sort_list[:k]\n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4282,"func_code":"def top_k(lst, k):\n \n if lst == []:\n return lst\n \n lower = []\n higher = []\n plist = []\n \n pivot = lst[0]\n for e in lst:\n if e < pivot:\n lower.append(e)\n if x == pivot:\n plist.append(e)\n if x > pivot:\n higher.append(e)\n sort_list = higher + plist + lower\n \n return sort_list[:k]\n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4283,"func_code":"def top_k(lst, k):\n \n if lst == []:\n return lst\n \n lower = []\n higher = []\n plist = []\n \n pivot = lst[0]\n for e in lst:\n if e < pivot:\n lower.append(e)\n if e == pivot:\n plist.append(e)\n if e > pivot:\n higher.append(e)\n sort_list = higher + plist + lower\n \n return sort_list[:k]\n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4284,"func_code":"def top_k(lst, k):\n \n if lst == []:\n return lst\n \n lower = []\n higher = []\n plist = []\n \n pivot = lst[0]\n for e in lst:\n if e < pivot:\n lower.append(e)\n if e == pivot:\n plist.append(e)\n if e > pivot:\n higher.append(e)\n sort_list = lower + plist + higher\n sort_list = sort_list[::-1]\n \n return sort_list[:k]\n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4285,"func_code":"def top_k(lst, k):\n \n if lst == []:\n return lst\n \n lower = []\n higher = []\n plist = []\n \n pivot = lst[0]\n for e in lst:\n if e < pivot:\n lower.append(e)\n if e == pivot:\n plist.append(e)\n if e > pivot:\n higher.append(e)\n sort_list = lower + plist + higher\n sort_list = sort_list[::-1]\n \n if k == len(lst):\n return sort_list[:k-1]\n elif k > len(lst):\n return sort_list\n else:\n return sort_list[:k]\n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4286,"func_code":"def top_k(lst, k):\n result = []\n while lst:\n biggest = lst[0]\n for number in lst:\n if number > biggest:\n biggest = number\n lst.remove(biggest)\n result.append(oldest)\n return result[:k]\n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4287,"func_code":"def top_k(lst, k):\n # Fill in your code here\n sort = []\n while lst: # a is not []\n largest = lst[0]\n for element in lst:\n if element > largest:\n largest = element\n lst.remove(largest)\n sort.append(largest)\n return sort[:k+1]\n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4288,"func_code":"def top_k(lst, k):\n arranged = []\n while k>0:\n lst.remove(max(lst))\n arranged.append(max(lst))\n k -= 1\n return arranged\n pass\n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4289,"func_code":"def top_k(lst, k):\n arranged = []\n while k > 0:\n lst.remove(max(lst))\n arranged.append(max(lst))\n k = k-1\n return arranged\n pass\n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4290,"func_code":"def top_k(lst, k):\n r=[]\n for qwerty in range(0,k):\n biggest=lst[0]\n for k in lst:\n if biggest biggest:\n oldest = i\n lst.remove(biggest)\n sort.append(biggest)\n \n n = 1\n sort_k = []\n while n <= k:\n sort_k.append(sort.pop[0])\n \n return sort_k\n \n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4293,"func_code":"def top_k(lst, k):\n sort = []\n while lst:\n biggest = lst[0]\n for i in lst[1:]:\n if i > biggest:\n oldest = i\n lst.remove(biggest)\n sort.append(biggest)\n \n n = 1\n sort_k = []\n while n <= k:\n sort_k.append(sort.pop[0])\n n += 1\n \n return sort_k\n \n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4294,"func_code":"def top_k(lst, k):\n sort = []\n while lst:\n biggest = lst[0]\n for i in lst[1:]:\n if i > biggest:\n oldest = i\n lst.remove(biggest)\n sort.append(biggest)\n \n n = 1\n sort_k = []\n while n <= k:\n sort_k.append(sort.pop(0))\n n += 1\n \n return sort_k\n \n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4295,"func_code":"def top_k(lst, k):\n if lst==[]:\n return []\n sort=[]\n while lst:\n largest = lst[0]\n for i in lst:\n if i[1] > largest[1]:\n largest = i\n lst.remove(largest)\n sort.append(largest)\n return sort[:k]\n pass\n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4296,"func_code":"def top_k(lst, k):\n sorted_lst = lst\n while sorted_lst:\n largest = sorted_lst[0]\n for element in sorted_lst:\n if element > largest:\n largest = element\n sorted_lst.remove(largest)\n sorted_lst.append(largest)\n return sorted_lst[:k-1]\n pass\n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4297,"func_code":"def top_k(lst, k):\n sort = []\n while lst:\n largest = lst[0]\n for i in lst:\n if i > largest:\n largest = i\n sort.append(i)\n return sort[:k-1]\n \n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4298,"func_code":"def top_k(lst, k):\n sorted_list = []\n while lst:\n smallest = lst[0]\n for element in lst:\n if element < smallest:\n smallest = element\n lst.remove(element)\n sorted_list.append(element)\n return list.reverse(sorted_list)[:k-1]\n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4299,"func_code":"def top_k(lst, k):\n sort, output = [], []\n while lst:\n largest = lst[0]\n for i in lst:\n if i > largest:\n largest = i\n lst.remove(largest)\n sort.append(largest)\n for j in sort:\n output.append(j)\n if len(output) == k:\n break\n return output \n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4300,"func_code":"def top_k(lst, k):\n new_lst = []\n while lst:\n largest = lst[0] \n for numbers in lst:\n if numbers > largest:\n largest = numbers\n new_lst.append(lst.pop(largest))\n return new_lst[:k]\n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4301,"func_code":"def top_k(lst, k):\n new_lst = []\n while lst:\n largest = lst[0]\n for numbers in lst:\n if numbers > largest:\n largest = numbers\n new_lst.append(numbers)\n lst.remove(numbers)\n return new_lst[:k]\n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4302,"func_code":"def top_k(lst, k):\n final = []\n while lst:\n largest = lst[0]\n for element in lst:\n if element > largest:\n largest = element\n lst.remove(largest)\n final.append(largest)\n if len(final) == k:\n break\n return final\n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4303,"func_code":"def top_k(lst, k):\n final = []\n while lst:\n element = max(lst)\n final += [element,]\n lst.remove(element)\n if len(final) == k:\n break\n return final\n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4304,"func_code":"def top_k(lst, k):\n if lst == []:\n return []\n else:\n final = []\n while lst:\n element = max(lst)\n final += [element,]\n lst.remove(element)\n if len(final) == k:\n break\n return final\n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4305,"func_code":"def top_k(lst, k):\n if lst == []:\n return []\n elif k == 0:\n return lst\n else:\n final = []\n while lst:\n element = max(lst)\n final += [element,]\n lst.remove(element)\n if len(final) == k:\n break\n return final\n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4306,"func_code":"def top_k(lst, k):\n sort = []\n while lst:\n smallest = lst[0]\n for i in lst:\n if i= x-k:\n largest = lst[0]\n for element in lst:\n if element > largest:\n largest = element\n lst.remove(largest)\n sort.append(largest)\n return sort\n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4312,"func_code":"def top_k(lst, k):\n a=[]\n while lst:\n largest = lst[0]\n for i in lst:\n if i > largest:\n largest = i\n lst.remove(largest)\n a.append(largest)\n return a[:k]\n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4313,"func_code":"def top_k(lst, k):\n af_sort = []\n while lst:\n biggest = lst[0] \n for element in a:\n if element > biggest:\n biggest = element\n lst.remove(biggest)\n af_sort.append(biggest)\n return af_sort[0:k]\n \n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4314,"func_code":"def top_k(lst, k):\n newlst = []\n while len(newlst)<=k:\n maximum = lst[0]\n for i in lst:\n if i > maximum:\n maximum = i\n newlst.append(maximum)\n lst.remove(maximum)\n return newlst\n \n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4315,"func_code":"def top_k(lst, k):\n new_list = []\n while len(new_list) < k:\n maximum = max(lst)\n new_lst.append(lst)\n lst.remove(maximum)\n\n return new_lst\n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4316,"func_code":"def top_k(lst, k):\n sorted_lst = []\n while lst:\n for n in range(1, len(lst)):\n biggest = lst[0]\n if lst[n] > biggest:\n biggest = lst[n]\n lst.remove(biggest)\n sorted_lst.append(biggest)\n return sorted_lst[0:3]\n \n \n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4317,"func_code":"def top_k(lst, k):\n sorted_lst = []\n while lst:\n for n in range(1, len(lst)):\n biggest = lst[0]\n if lst[n] >= biggest:\n biggest = lst[n]\n lst.remove(biggest)\n sorted_lst.append(biggest)\n return sorted_lst[0:k]\n \n \n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4318,"func_code":"def top_k(lst, k):\n sorted_lst = []\n while lst:\n biggest = lst[0]\n for n in lst:\n if lst[n] >= biggest:\n biggest = lst[n]\n lst.remove(biggest)\n sorted_lst.append(biggest)\n return sorted_lst[0:k]\n \n \n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4319,"func_code":"def top_k(lst, k):\n newlist = []\n while len(newlist) < k:\n newlist += [max(lst)]\n for i in range(len(lst)):\n if i == max(lst):\n print(i)\n break\n del lst[i]\n return newlist\n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4320,"func_code":"def top_k(lst, k):\n a=[]\n while lst:\n biggest=lst[0]\n for i in lst:\n if i>biggest:\n biggest=i\n lst.remove(biggest)\n a.append(biggest)\n return a[0:k]\n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4321,"func_code":"def top_k(lst, k):\n a = sort_list(lst)\n return a[0:k]\n \n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4322,"func_code":"def top_k(lst, k):\n count = 0\n op = []\n big = lst[0]\n while count < k:\n op += max(lst)\n count += 1\n return op\n \n \n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4323,"func_code":"def top_k(lst, k):\n count = 0\n op = []\n big = lst[0]\n while count < k:\n op += [max(lst)]\n count += 1\n return op\n \n \n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4324,"func_code":"def top_k(lst, k):\n values = []\n greatest = lst[0]\n while len(values) < k:\n for item in lst:\n if item > greatest:\n greatest = item\n lst.remove(greatest)\n values.append(greatest)\n greatest = lst[0]\n return values\n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4325,"func_code":"def top_k(lst, k):\n values = []\n while len(values) < k:\n for item in lst:\n greatest = lst[0]\n if item > greatest:\n greatest = item\n lst.remove(greatest)\n values.append(greatest)\n \n return values\n\n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4326,"func_code":"def top_k(lst, k):\n sort = []\n while lst:\n biggest = lst[0]\n for element in lst:\n if element > biggest:\n biggest = element\n lst.remove(biggest)\n sort.append(biggest)\n if len(sort) == k:\n return sort\n else:\n continue\n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4327,"func_code":"def top_k(lst, k):\n new_lst = []\n for i in range(k):\n new_lst.append(max(lst))\n return new_lst\n pass\n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4328,"func_code":"def top_k(lst, k):\n new_lst = []\n for i in range(k):\n new_lst.append(lst.remove(max(lst)))\n return new_lst\n pass\n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4329,"func_code":"def top_k(lst, k):\n new_lst = []\n while lst:\n biggest = lst[0]\n for x in lst:\n if x < lst[0]:\n biggest = x\n lst.remove(biggest)\n new_lst.append(biggest)\n return new_lst[0:k]\n \n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4330,"func_code":"def top_k(lst, k):\n new_lst = []\n while lst:\n biggest = lst[0]\n for x in lst:\n if x > lst[0]:\n biggest = x\n lst.remove(biggest)\n new_lst.append(biggest)\n return new_lst[0:k]\n \n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4331,"func_code":"def top_k(lst,k):\n a = []\n while lst:\n biggest = lst[0]\n for element in lst:\n if element > biggest:\n biggest = element\n lst.remove(biggest)\n a.append(biggest)\n return a[:3]\n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4332,"func_code":"def top_k(lst, k):\n if k<=0:\n return []\n else:\n maxi=max(lst)\n length=len(lst)\n for i in range(length):\n if lst[i]==maxi:\n pos=i\n new_list=lst.copy()\n new_list.pop(pos)\n return [maxi]+top_k(new_lst,k-1)\n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4333,"func_code":"def top_k(lst, k):\n results = []\n counter = 0\n while counter < k:\n for i in range(-len(lst),-1):\n if lst[i] == max(lst):\n results.append(lst.pop(i))\n counter += 1\n return results\n pass\n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4334,"func_code":"def top_k(lst, k):\n x = []\n for i in range(k-1):\n y = i\n for j in lst:\n if y < j:\n y = j\n x += y\n return x \n \n \n \n pass\n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4335,"func_code":"def top_k(lst, k):\n # Fill in your code here\n a = lst\n sort = []\n while a:\n largest = a[0]\n for item in a:\n if item[1] >largest[1]:\n largest = item\n a.remove(largest)\n sort.append(largest)\n return(sort)[:k]\n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4336,"func_code":"def top_k(lst, k):\n new = []\n while i in range(k-1):\n new.append(lst.pop(max(lst)))\n \n return new\n \n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4337,"func_code":"def top_k(lst, k):\n new = []\n for i in range(k-1):\n new.append(lst.pop(max(lst)))\n \n return new\n \n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4338,"func_code":"def top_k(lst, k):\n new = []\n while len(lst) > len(lst) - k:\n new.append(lst.pop(max(lst)))\n \n return new\n \n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4339,"func_code":"def top_k(lst, k):\n new = []\n while len(lst) > len(lst) - k:\n new.append(lst.remove(max(lst)))\n \n return new\n \n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4340,"func_code":"def top_k(lst, k):\n new = []\n while len(lst) >= len(lst) - k:\n top = max(lst) \n new.append(lst.remove(top))\n \n return new\n \n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4341,"func_code":"def top_k(lst, k):\n results = []\n counter = 0\n while counter < k:\n for i in range(-len(lst),-1):\n if lst[i] == max(lst):\n results.append(lst.pop(i))\n counter += 1\n return results\n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4342,"func_code":"def top_k(lst, k):\n results = []\n counter = 0\n while counter < k:\n for i in range(-len(lst),0):\n if lst[i] == max(lst):\n results.append(lst.pop(i))\n counter += 1\n continue\n return results\n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4343,"func_code":"def top_k(lst, k):\n results = []\n counter = 0\n while counter < k:\n for i in range(-len(lst),0):\n if lst[i] == max(lst):\n results.append(lst.pop(i))\n counter += 1\n return results\n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4344,"func_code":"def top_k(lst, k):\n new = []\n while len(lst) >= len(lst) - k:\n top = max(lst) \n new.append(top)\n lst.remove(top)\n \n return new\n \n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4345,"func_code":"def top_k(lst, k):\n new = []\n while len(lst) > len(lst) - k:\n top = max(lst) \n new.append(top)\n lst.remove(top)\n \n return new\n \n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4346,"func_code":"\ndef top_k(lst, k):\n # Fill in your code here\n \n result = []\n while lst:\n minimum = lst[0] # arbitrary number in list \n for x in lst: \n if x > minimum:\n minimum = x\n result.append(minimum)\n lst.remove(minimum) \n return lst[:k]\n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4347,"func_code":"def top_k(lst, k):\n sort = []\n while lst:\n largest = lst[0]\n for element in lst:\n if element > largest:\n largest = element\n lst.remove(largest)\n sort.append(largest)\n return sort[:k]\n\n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4348,"func_code":"def top_k(lst, k):\n # Fill in your code here\n sort_lst = []\n while lst: # a is not []\n smallest = lst[0]\n for element in lst:\n if element < smallest:\n smallest = element\n lst.remove(smallest)\n sort_lst.append(smallest)\n return sort_lst[:k]\n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4349,"func_code":"def top_k(lst, k):\n sotsot = []\n while len(sotsot) <=k:\n sotsot.append(max(lst))\n lst.remove(max(lst)) #wont return u any value just modified the list only.\n return sotsot \n \n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4350,"func_code":"def top_k(lst, k):\n sotsot = []\n while lst:\n while len(sotsot) <=k:\n sotsot.append(max(lst))\n lst.remove(max(lst)) #wont return u any value just modified the list only.\n return sotsot \n \n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4351,"func_code":"def top_k(lst, k):\n sotsot = []\n while lst:\n while len(sotsot)<=k :\n sotsot.append(max(lst))\n lst.remove(max(lst)) #wont return u any value just modified the list only.\n return sotsot \n \n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4352,"func_code":"def top_k(lst, k):\n result = []\n for i in range(len(lst)):\n largest = lst[0]\n for element in lst:\n if element > largest:\n largest = element\n lst.remove(largest)\n result.append(largest)\n return lst[:k]\n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4353,"func_code":"def top_k(lst, k):\n new_list = []\n for i in lst:\n if k==0:\n break\n new_list+=max(lst)\n k-1\n return lst\n pass\n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4354,"func_code":"def top_k(lst, k):\n result = []\n \n while len(lst)>len(lst)-k:\n biggest = lst[0]\n for element in lst:\n if element > biggest:\n biggest = element\n result.append(biggest)\n lst.remove(biggest)\n \n return result\n pass\n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4355,"func_code":"def top_k(lst, k):\n list = []\n while len(list) < k:\n a = max(lst)\n lst.remove(a)\n new.append(a)\n return list\n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4356,"func_code":"def top_k(lst, k):\n list = []\n while len(lst) < k:\n a = max(lst)\n lst.remove(a)\n new.append(a)\n return list\n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4357,"func_code":"def top_k(lst, k):\n lst = sort_descending(lst)\n return lst[:k-1]\n \n\ndef sort_descending(lst):\n for i in range(len(lst)-1):\n for j in range(i, len(lst)):\n if lst[j][1] > lst[i][1]:\n x = lst[i]\n lst[i] = lst[j]\n lst[j] = x\n return lst\n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4358,"func_code":"def top_k(lst, k):\n newlist = []\n while lst:\n biggest = lst[0]\n for i in lst:\n if i > biggest:\n biggest = i\n else:\n continue\n lst.remove(biggest)\n if len(newlist) == k:\n break\n else:\n newlist.append(biggest)\n return newlist\n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4359,"func_code":"def top_k(lst, k):\n sort = []\n while lst:\n big = max(lst)\n sort.append(big)\n lst.remove(big)\n \n output = [n for n in lst if lst.index(n) < k]\n return output\n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4360,"func_code":"def top_k(lst, k):\n lst2 = []\n max = lst[0]\n for i in lst:\n if i > max:\n max = i\n while len(lst2) != k:\n lst2.append(max)\n return lst2\n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4361,"func_code":"def top_k(lst, k):\n lst2 = []\n max = lst[0]\n for i in lst:\n if i > max:\n max = i\n lst.pop(max)\n while len(lst2) != k:\n lst2.append(max)\n return lst2\n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4362,"func_code":"def top_k(lst, k):\n result = []\n while lst:\n biggest = lst[0]\n for elem in lst:\n if elem > biggest:\n biggest = elem\n lst.remove(biggest)\n result.append(biggest)\n \n return result[:3]\n\n # Fill in your code here\n pass\n\n\n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4363,"func_code":"def top_k(lst, k):\n for i in range(len(lst)):\n for j in range(len(lst) - 1):\n if lst[j] > lst[j + 1]:\n lst[j] = lst [j + 1]\n lst[j + 1] = lst[j]\n lst.reverse()\n return lst[:k]\n pass\n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4364,"func_code":"def top_k(lst, k):\n for i in range(len(lst)):\n for j in range(len(lst) - 1):\n if lst[j] > lst[j + 1]:\n lst[j] = lst[j + 1]\n lst[j + 1] = lst[j]\n lst.reverse()\n return lst[:k]\n pass\n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4365,"func_code":"def top_k(lst, k):\n for i in range(len(lst)-1):\n if lst[i] largest:\n largest = lst[i]\n sort.append(largest)\n lst.remove(largest)\n return sort[:k + 1]\n \n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4367,"func_code":"def top_k(lst, k):\n l = []\n if k > len(lst):\n return False\n elif k == 1:\n return lst\n else:\n a = max(lst)\n lst.remove(a)\n l.append(a)\n return top_k(lst, k-1)\n \n # Fill in your code here\n pass\n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4368,"func_code":"def top_k(lst, k):\n l = []\n if k > len(lst):\n return False\n elif k == 1:\n return lst\n else:\n a = max(lst)\n lst.remove(a)\n l.append(a)\n top_k(lst, k-1)\n return l\n \n # Fill in your code here\n pass\n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4369,"func_code":"def top_k(lst, k):\n l = []\n if k > len(lst):\n return False\n elif k == 1:\n return lst\n else:\n while len(l) <= k:\n a = max(lst)\n lst.remove(a)\n l.append(a)\n \n return l\n \n # Fill in your code here\n pass\n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4370,"func_code":"def top_k(lst, k):\n # Fill in your code here\n sort=sort(lst)\n return sort[:k]\n\ndef sort(lst):\n sort=[]\n while lst:\n largest=lst[0]\n for elem in lst:\n if elem > largest:\n largest = elem\n lst.remove(largest)\n sort.append(largest)\n return sort\n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4371,"func_code":"def top_k(lst, k):\n counter=0\n new_lst=[]\n while counter largest:\n largest = element\n lst.remove(largest)\n sort.append(largest)\n return sort[0:3]\n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4375,"func_code":"def top_k(lst, k):\n new = []\n lst.sort()\n for i in range(k-1):\n new.append(lst[i])\n return new\n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4376,"func_code":"def top_k(lst, k):\n\n newlst = []\n for i in range(k+1):\n newlst.append(max(lst))\n lst.remove(max(lst))\n return newlst\n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4377,"func_code":"def top_k(lst, k):\n new_lst = []\n counter = 0\n while counter <= k:\n highest = lst[0] # arbitrary number in list \n for x in lst: \n if x > highest:\n highest = x\n new_lst.append(highest)\n lst.remove(highest)\n counter +=1\n \n return new_lst\n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4378,"func_code":"# Reasons why the codes do not work \n\nwrong_05_019.py\n\nInstruction of line 4 and instruction of line 5 should be swapped (swapped lines). \n\nwrong_05_020.py\n\nInstruction of line 4 and instruction of line 5 should be swapped (swapped lines). \n\nwrong_05_040.py\n\nWtf is that solution\n\nwrong_5_46.py\n\nVariable misuse, and variable has the wrong name (typo). \n\nwrong_5_052.py\n\nFunction sort_list is not defined \n\nwrong_5_066.py\n\nThe \"[1]\" is uncessary, must be removed\n\nwrong_084.md\n\n\"+=\" operation should be replaced by the append operation (misconception about what the += can do). \nline 7, k-1, missing the assignment\n\nwrong_086.py\n\nvariable misuse, at line 6, the list to which we append should be \"list\" not a\n\nwrong_5_087.py\n\nuse of wrong variable, at the guard, the lenght of the list checked should be \"list\" not lst \n\nwrong_5_096.py\n\nstrategy: sorting the list then returning the first elements\nhowever, the sorting part is not working at all. \n\nwrong_5_101.py\n\nPerhaps there is a naming collision there\n\nwrong_5_103.py\n\nThe student forgot to increase the value of the counter, reasulting in an infinite loop\nso here, a full line is missing. \n\nwrong_5_106.py\n\nStrategy: sort the list then return a new list which contains different parts \n\n\n\n## Notes to myself\n\nI believe it is interesting to see how there are different \"steps\", which define a strategy for solving a problem. The, each strategy can have different approaches. I define the approach here as being the the specific implementation used in each step for obtaining what is requested. \n\nNow, I have the question: how can we automatically delimitate the code such that the blocks correspond to one step of the problem solving step. \n\n\n\n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4379,"func_code":"def sort_age(lst):\n new=[]\n while lst !=[]:\n big=lst[0]\n for i in lst:\n if i[1]>big[1]:\n big=i\n lst.remove(big)\n new.append(big)\n return new\ndef top_k(lst, k):\n return sort_age(lst)[:k]\n pass\n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4380,"func_code":"def top_k(lst, k):\n arranged = []\n while k>0:\n lst.remove(max(lst))\n arranged.append(max(lst))\n k -= 1\n return arranged\n pass\n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4381,"func_code":"def top_k(lst, k):\n arranged = []\n while k > 0:\n lst.remove(max(lst))\n arranged.append(max(lst))\n k = k-1\n return arranged\n pass\n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4382,"func_code":"def top_k(lst, k):\n i=0\n while i+1largest[1]:\n largest = item\n a.remove(largest)\n sort.append(largest)\n return(sort)[:k]\n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4386,"func_code":"def top_k(lst, k):\n new_list = []\n for i in lst:\n if k==0:\n break\n new_list+=max(lst)\n k-1\n return lst\n pass\n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4387,"func_code":"def top_k(lst, k):\n list = []\n while len(list) < k:\n a = max(lst)\n lst.remove(a)\n new.append(a)\n return list\n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4388,"func_code":"def top_k(lst, k):\n list = []\n while len(lst) < k:\n a = max(lst)\n lst.remove(a)\n new.append(a)\n return list\n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4389,"func_code":"def top_k(lst, k):\n lst = sort_descending(lst)\n return lst[:k-1]\n \n\ndef sort_descending(lst):\n for i in range(len(lst)-1):\n for j in range(i, len(lst)):\n if lst[j][1] > lst[i][1]:\n x = lst[i]\n lst[i] = lst[j]\n lst[j] = x\n return lst\n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4390,"func_code":"def top_k(lst, k):\n for i in range(len(lst)-1):\n if lst[i] largest:\n largest = elem\n lst.remove(largest)\n sort.append(largest)\n return sort\n","correct":false,"assignment_id":5,"func_name":"top_k","test":"import heapq\nassert top_k([9, 9, 4, 9, 7, 9, 3, 1, 6], 5)==[9, 9, 9, 9, 7] and top_k([9, 8, 4, 5, 7, 2, 3, 1, 6], 5)==[9, 8, 7, 6, 5] and top_k([4, 5, 2, 3, 1, 6], 6)==[6, 5, 4, 3, 2, 1] and top_k([4, 5, 2, 3, 1, 6], 3)==[6, 5, 4] and top_k([4, 5, 2, 3, 1, 6], 0)==[]","description":"Task: Top-K\n\n\nWrite a function top_k that accepts a list of integers as the input and returns the greatest\nk number of values as a list, with its elements sorted in descending order. You may use\nany sorting algorithm you wish, but you are not allowed to use sort and sorted."} {"submission_id":4392,"func_code":"def top_k(lst, k):\n counter=0\n new_lst=[]\n while counter