This week we had our first term test on Wednesday, the test wasn't so difficult but unfortunately I had my MAT137 test on the same day so I couldn't prepare for the term test very well. On Monday there was a snow storm which is why I was not able to attend the class and in our Wednesday lecture time slot we had our term test. From what I understood from lecture's codes posted on the course website, the prof talked about test cases in unittest. She had a code according to which they implemented some test cases. Another thing discussed in class was a 'bracket balancer' code, this code returned whether the given line had balanced brackets i.e. same brackets on both ends of the line. This function basically looks like it's written to ensure that none of the brackets in a line or an equation are missed out. This week's lab was about stacks and queues, and for the first time ever since labs started I was able to finish the lab exercises on time. This week's quiz was also based on queues so it wasn't so difficult.
Recursion
Last week we started learning about recursion. I feel one of the main ideas in Computer Science is recursion. Recursion is basically a method where the solution of a problem depends on smaller instances of the same problem. Recursion is very useful, big problems can efficiently be solved by dividing the problem into smaller versions and then combine the results to get the solution to the big problem. Recursion actually helps in saving up so many lines of code. Recursion is so far my favourite topic. Although sometimes it does get quite hard to trace the code but it is an extremely useful thing. A code with recursion looks beautiful but it is hard to understand at first.
No comments:
Post a Comment