Friday, 14 February 2014


Week #6 Blog

This week I spent most of my time trying to figure out my solution for the towers of Anne Hoy with four stools. I finally figured it out when I used helper functions that I defined in the function. I tried it with different numbers of cheeses and I was able to get the least amount of moves for them. After that, I did step 6 which was really easy once step 5 was finished. I even had plenty of time to work on the bonus problem. At first I didn’t understand what was different the then __eq__ method but once I looked at the docstring, I think I was able to code the function properly. Overall, I’m very confident with my result.

During the lectures we started talking about trees. I understood everything pretty well but I was a little unsure when we started trying to code some of the functions such as in_order. After a while I was able to get it. During the second class I was able to do most of the coding myself although sometimes I used the base case for the if condition when the professor used the general case but overall, I think I understand trees pretty well.

The lab was pretty easy as well and my partner and I were able to finish early. I was able to code everything easily enough but I don’t exactly understand how the functions any, zip and filter work. I want to see if I can use them on my own in order to see if I can understand what they are doing.

Friday, 7 February 2014


Week #5 Blog

 This week we worked on the recursion function for the towers of Hanoi with 3 stools. We also looked at names and which name gets priority at different parts of the function.

I was a little uneasy about recursion at first but after I started tracing different recursions I started to get the hang of it. Once I worked out the kinks I figured out how to implement recursion myself. Over the weekend I was able to fix the problem I was having with GUIController and I was able get it to work. After that I started to tackle the four stools problem. I didn’t understand what I actually had to do at first but after reading it for the billionth time I was able to grasp what I actually had to do. It helped a lot when we did the recursion for 3 stool in class. I have gotten very close to solving it but i haven’t finished it yet.

I am very happy now that I’ve got a better grip on recursion. Especially during the lab when my partner and I were able to finish all of the exercises and even some of the extra ones.

As for names and scopes, I got the basics down but I still am having trouble tracing the code we did in class. I need to work on that for next time.