Sample solutions and grading discussion:

(a) was worth five out of the eight marks. In that term, given that assignment four, I wrote in detail about the sorting algorithm in insertionsort.html, so I'll let that page speak to the answer here. Although in grading, pretty much any description of some major parts of the algorithm was accepted. And no python code was required.

For part (b), you did not need to write correct python code for the list manipulation, but you did have to answer the question (as opposed to writing code or parts of code which did something else). The three points in grading were:

Also, there was a deduction if you put some elements of the above inside a loop of some kind.


(press 'back' in your web browser to get back to where you were in the exam)