In the week 5, we continuous learning recursion.I think the lecture is very helpful for our first assignment- towel of hanoi. In the lecture, professor talk about the recursion for 2, 3 cheeses case.Although in our assignment, we need to deal with 4 cheeses cases. But this is still a big help. When professor teaching this recursion, I don't know how this recursion work until professor show us the base case of the function. And this made me know more about the recursion. Before this lecture, I have some trouble for the assignment. But this recursion give me a big idea for the step 5 in the first assignment. Professor also give me some example about how to find names in different scopes. I think I have some trouble in this and I will come back to read the example then ask my classmate for help.
In this week's lab,it's my first time to write recursion function by myself. At first, we need to have recursion insight.In the lab, I first use paper and pencil to do the first two exercise. I think doing these two exercise help me make the recursion insight. After this step, I write my recursion code for structured list. And this exercise did not give me any troubles.
In short, I need to comeback to see the example of find names in different scopes since I have trouble for this. And I have learned more about how to write a recursion function and do some practice on it.
2014年2月22日星期六
2014年2月20日星期四
Week 4
In the week 4, I learned the recursion in the lecture. In the lecture, professor used the example of nest list to introduce recursion. And I have learned how to trace the recursion. I really like this part because after tracing a recursion function, I always can surprised by the result and I will know how this recursion function work. Professor always give another recursion example - draw turtles.This is very helpful for me to understand how the recursion work. And I think this week's content is easy to follow and I think I'm able to tracing a recursion function.
In this week's lab, I have written classes representing various kinds of vehicles. And this lab's goal is to make me explore and understand inheritance.I have learned how to build a class and how to use subclass.
In this lab, it's my first time to use unittest framework to test my class. Then I know how to determine good test cases and use unittest.However, I think I still need some practice to remember the style of unittest framework.
In short, in this week, I start to learn recursion function and practice on building class and use unittest to test my code.
In this week's lab, I have written classes representing various kinds of vehicles. And this lab's goal is to make me explore and understand inheritance.I have learned how to build a class and how to use subclass.
In this lab, it's my first time to use unittest framework to test my class. Then I know how to determine good test cases and use unittest.However, I think I still need some practice to remember the style of unittest framework.
In short, in this week, I start to learn recursion function and practice on building class and use unittest to test my code.
订阅:
博文 (Atom)