Friday, 7 February 2014

Week5

During this week, we continued dealing with the recursive code, and also we were introduced to the new topic, how python's scope operate and look for names/values. First, at the beginning of the Monday's lecture, Professor. Heap briefly mentioned the strategy we can implement for the tower of hanoi's code. By understanding the the recursive structure of the code used to move cheeses (code for the tower of hanoi), it gave me a good start-off point in completing the assignment. In the Week5 labs, my partner and I again worked on tracing/creating recursive code. Mainly, we wrote the body of the function SearchList function. Since it was the first trial in my coding experience to write recursive function, I struggled with writing the base case. On top of the course material discussed today, supplemental readings on the course website was useful for my lab partner and I to implement the function. As well, communicating with other classmate also helped us see the variation in coding. One tip I would recommend for future reference is to remember creating a simple test cases before moving on to defining the function.

No comments:

Post a Comment