From this week, we are also studying the recursion about the binary tree which includes some lists, and some list of list. The main part of tree is three elements, whose first is object, root of tree, second and third parts are tree lists. In the course, we study some function about the tree to spread the list of list to get the object by recursion. the challenging part I feel is that I have no idea how to start when I read the question firstly. According to the instructor`s lecture, a formula to apply these questions is that [statement if else one statement ]other statement. After applying this formular, I feel confident to solve this kind of question.
In the tutorial of this week, the material is about the dot product about zip and recursion, and tester function. Firstly it confused me what the zip is, and second part is tester function which is how to write the unittest. From the slide, I learn that zip is first element of first list, and relevant in second, and so on. Secondly, importing unittest tester is important to study. From this tutorial, it is a kind of not difficult for us to do, compared with the last several times.
Recursion is to solve the questio with list of list to get the element in it.
Anyway, we figures out how to write the testcases!!!
ReplyDeletehaha, we finally got it!
Delete