The snowstorm was terrible this week, yet I managed to go to both of the lectures and I am very proud of myself for doing so. In both of the lectures, Professor Heap focused on leading us through the first assignment.
On Monday, he led us through the process of moving cheese and explained basic rules for moving cheeses around. During the lecture, he gave us an example of move_cheeses which prints the intermediate steps of moving a pile of cheeses from a place to another. I think the function is very helpful and gave me basic information about the general rules of moving cheeses. If there are more than 1 cheese, the function uses recursive functions to move cheeses around. I don't think understanding recursive functions is too hard for me. It is not easy, of course, but I can still figure it out after some work.
However, writing recursive functions in the lab was a lot more difficult than I expected. In the first two problems, we were asked to trace codes for greatest common denominator and binary representation. Tracing the codes was fairly simple, and the lab handout helped to specify thing a lot as well. However, I found it a lot harder when it came to me writing the codes myself. At first, I was kind of lost when my TA told me that I am not allowed to use a for loop. But later it got clearer and I was very happy that I could figure things out myself.
No comments:
Post a Comment