Sunday, 8 February 2015
At first glance, recursion looks like a difficult concept, however after some practice tracing it, it isn't too hard. A function that calls upon it's self within it's self is an example of the recursion we have done in CSC148. I found this to be quite useful, specially for calculating a sum in a list of lists. If you don't know the size of the list containing many other variable size of lists, and you don't want to have a loop and an if statement to accumulate the sum, you can just use a simple recursive code. One that would add elements together in a list and return the sum.
Sunday, 1 February 2015
So far csc148 has been a great course. The material is more challenging than csc108, and the first assignment required a lot more thinking. Having a harder assignment brought up more difficulties and discussion within the group. We all discussed our own approaches on the assignment and all decided the best, most fitting way to code it in the way to satisfy the class requirements on the assignment sheet. I am looking forward to further assignments where we make more complex games, as well as strategies for the computer to use. So far Professor Heap is a great and very helpful when it comes to answering the questions. The way he teaches make the lectures more fun and enjoyable. I look forward to the rest of csc148.
Subscribe to:
Comments (Atom)