Quiz 6 Feedback

Here are some general statistics and feedback for your Quiz 6:

The overall mean was 11.9/22. Q1: 3.6/5; Q2: 4.1/7; Q3: 4.1/10

Question 1

This question was designed to test your grasp of syntax and concepts, which is the required criteria for getting a "C" in COMP 201.

There are three mistakes in this program:

Most of you got the indentation error, which is good. If you didn't catch that error, you really need to start being worried about your grasp of the concepts. The ord(i+1) error is harder, but just trying out that loop in the Python interactive shell and printing out the values of i and i+1 should have shown you what was wrong. You need to start trying things out on your own, there's only so much that we can teach you in class!

Question 2

This question mainly tests your grasp of concepts, specifically, the concepts of references that we went over last week. What you need to do here is to make a new list in the squareList() function, and then return the reference of that list to main()

Added on Nov 2 2009: The concepts tested in this question are:

Some of the wrong solutions are here:

def squareList(list):
    for i in list:
        i = i**2
    return list

Two errors here:

def squareList(list1):
    for i in list1:
        list1[i] = list1[i]*list1[i]
        return list1

Two problems here:

Question 3

Question 3 is not that hard when it comes to the logic, but we were surprised that a lot of you had trouble with it. From what we can tell, it seems that most people spent too much time on Questions 1 and 2, and didn't have enough time for this question.

Other common mistakes

That's it. We hope that by providing this feedback, it will help you to avoid making the same mistakes next time. Hope that this is useful.