This week's main focus personally came in the form of getting ready for the midterm. I knew I had to finish the first part of Assignment 2 for the following week but first the midterm. I studied a lot less than I would have wanted to during reading week as I honestly focused on way too many different classes. The pain of being in 6 courses.
This week we were given an assigned topic, recursion. Recursion is a way of programming in which defining a function uses the function on itself. So the function is applied within its own definition. Recursion consists of a base case which applies the function to a simple number (eg. if n >0: return None) that will then be used by the recursive step in deeper functions.
Recursion has been (and it is quite evident by my other SLOGs) quite difficult for me to apply. I grasp everything about it. It is super useful as it can break down code that needs deeper comprehension. Lists of lists come to mind. I know I need to create a case that can be applied to the smallest element that needs to be reiterated on. The only issue I have is the following part where you just let go and let the code run itself. I am getting better at it though and hope to be a pro by the end of the course.
No comments:
Post a Comment