Saturday, 22 February 2014
Week 6
This week we continued learning about recursion. In the lab, we have worked on coding dot product and matrix vector product. During the process, we were asked to write a code without using the list comprehension. Mostly, our task was to simply write a code the uses for loop (in some cases, multiple loops) . The task was relatively easy compared to previous labs. The difficult job assigned was the A1, the Tower of Hanoi assignment. Personally, I spent most of my time with my partner debugging TOAHModel and discussing over and over about tour.py. In order to to approach the part 5 to part 6 of the assignment which required our concrete understanding of how recursion works, we first traced the simple cases of the function that moves cheeses recursively. After then we were able to get a clue how to apply three_stool method into four_stool method. Since my learning style was passive during the lectures, I had to revisit lecture notes and review it. One good tips I can suggest for future reference is to try to trace as many example cases as possible, from the most simple to a bit complicated ones that suits into the recursive function, before actually writing the code.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment