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.
没有评论:
发表评论