Solutions to Quiz 6, Version A ------------------------------ SOLUTION 1 ------------ def setSubtraction(L1, L2): L3=[] i=0 while i < len(L1): if not (L1[i] in L2): L3.append(L1[i]) i=i+1 return L3 Rubric: ------- 2 pts - Correct syntax for the function 2 pts - Correct structuring of the loop 2 pts - Appropriate conditional statement 2 pts - Initializing and appending to new list 2 pts - Correct Output SOLUTION 2 ----------- def expand(wordList, freqList): expandedList=[] for i in range(len(wordList)): for j in range(freqList[i]): expandedList.append(wordList[i]) return expandedList Rubric: --------- 2 pts - Correct syntax for the function 2 pts - Appropriate construction of outer loop 2 pts - Appropriate construction of inner loop 2 pts - Correct output 2 pts - Appropriate use of variables and append operation