During lectures, our professor gave us hints and tips for the assignment given to us, which involves the Towers of Hanoi. It really helped me and I'm sure others to find a starting point for the assignment. I haven't quite finished the assignment yet and so, I will save it for next week's post.
Another interesting topic which was covered during the lectures was scopes and namespaces. This is the first time I had ever heard of the terms and the examples given in class helped me greatly in understanding what local, nonlocal, and global scopes are, how python searches for similar variable names within a program, and also how python searches for similar methods within different classes and subclasses.
Finally onto the last topic, recursion. Again. During this week's lab, my partner and I worked through several exercises which involved recursion and we had a little trouble with coding the searchLists program. At first we tried recursively searching through every element in the list and nested lists and checking whether it was the number we wanted. The program worked, however we knew this was an inefficient method. What helped us find a better method was to try and trace the problem on paper. This allowed us to find the base case as well as modify the code, which reduced the amount of lines and worked more efficiently.