I never really understood why exceptions were important. During lectures when I first learned about them, they just seemed like empty classes in Python that did nothing. However, during the exercise I found out that they can be used for some exceptional situations. The exercise was simple for me and I finished it quickly, however it made me realize that exceptions, in addition with a try block, can be used to stop your program from causing errors and run normally. Additionally, I figured this can be useful when debugging your code to fix the bugs and errors in your program
Moving onto unit tests, last Tuesday, I had a lab which involved the making a Vehicle class and using unit tests to test the code. At first, my partner and I found it difficult to implement a unit test with a variety of test cases. What we found helped us were looking at previous week's lectures and documentation for unit test as well as brainstorming test cases.
Finally onto the last topic, recursion. This past week, we learned about recursion through the use of nested lists and a class called Turtle. I thought that the Turtle class was really cool because it helped me (and I'm sure many others) visually see how recursion works which helped further my understanding of recursion and the levels of recursion.
No comments:
Post a Comment