This week was a long week for me, with many assignments due and most importantly the first assignment on in this course is due on Thursday. I started the assignment very early in this week, and finished all the codes and got it working on Monday, however I wasn't paying enough attention on reading the weight of assignment 1 handout, which made me to miss read that we have to make 5 class part, so instead of writing 5 classes I only wrote 2. I quickly noticed the mistake by the reminder of a friend and added 3 more classes and got them working before Tuesday evening. I worked pretty hard these days on this assignment and got really tired the next day, but still I managed to finish all the doc strings, and due to I was pretty tired I only did minimal amount of testing, and the next day I did lots of testing and handed in on 9:59 PM, just before the deadline.
In this week's class we learned a very interesting programming technique, which is recursion. It is basically used for finding or getting information from lists with many nested lists, like the example below.
 |
| (From course note January 26, nested list examples.) |
Recursion can be preformed in a program simply by calling itself in the program. Where we must assume L (in the example above) must either an element of int, or list of elements that satisfies the assumption.
This week's tutorial was very good, the best tutorial I have been to so far in my opinion. The lab handout was easier than the ones before, and it really helped me, step by step to get a good understanding of recursion and was a great practice for writing traces for recursions.
No comments:
Post a Comment