Friday, January 31, 2014

Week 4: Exercise 2 and Recursions~

I started this week's CSC148 by doing exercise 2. Compared to Exercise1, this exercise needs more thinking. Without some understanding of exception, I don't think I can do it. Actually, this exercise is a good opportunity to review and further think about exception. I struggled with what would happen if the input is a list. I think I have done both the old version and the updated version correctly. The old version is trickier, I spent a relatively long time to think of a solution for that.

Lectures were about recursion. I found that recursion is a strange thing to me: when I look at the code someone has already finished (like the examples from the lecture), I can understand them easily and analyze them correctly, however, when I try to write the code by myself, I struggled a lot. Probably, I need more practice on recursions. I like the "turtle" example, because, we can actually see what happens from the pictures.

During the lab, my partner and I reviewed testing modules. We spent quite a lot of time doing testing. But I think it is worthwhile because writing some test functions will save us a lot of time. We don't need to test every single case again and again.

Assignment 1 is coming, I am looking forward to it.

No comments:

Post a Comment