Sunday, 9 February 2014

Week 5: Start of the First Assignment

    This week, Danny showed the class his code for solving the original Tower of Hanoi problem. After seeing this, even though I did not start on the assignment, I had somewhat of an idea what to do for the assignment. Later this week, I started on the assignment and was able to pretty much finish the whole thing. However, knowing that I had a few mid-term exams coming up next week, I did not take much time making sure I did everything perfectly, without any bugs. I guess I have to do the nasty works later.

    Also in the lecture, scopes and namespaces were introduced. To be honest, I was late for class and missed most of the talks. The lecture slides did not really help me because there does not seem to have much explanations. Over the weekends, or maybe during the reading week, I should definitely find some online materials to read and study.

    The lab was focused on recursion. My partner and I had to traced some codes given certain inputs. Also, we had to write a recursive function, having to do with nested lists. The function that we made failed the test case that we created and a lot of time was spent trying to find what was wrong. We knew that our idea/approach was correct but something must have been faulty because computers don't lie. It turns out we had to put 'return' on the recursive call. Other than that, this week was an easy going one.

No comments:

Post a Comment