Tuesday, 8 October 2013

CSC 148 SLOG for Week 3

      This week we learned about recursion and how to use list comprehensions that include recursive statements. I went to the ramp up session for 108 last weekend so now I feel much more confident about the materials we covered in 148. I'm surprised by how you don't need to specify a base case if you use list comprehensions, which is a major improvement from java. I stared working on the assignment and find it really hard. Even though I am pretty familiar with recursion, how to use recursion to move the cheeses requires much more knowledge than my previous experience. I tried to finish the first seventy percent of the assignment but there is some error with my code that doesn't produce the right result. I certainly need to work on that. The exercise this week about exceptions was both hard and easy, hard in that I haven't really learned about Exception before so I don't really know how to write one, but easy in that it's actually pretty simple write once I finished reading the documentation. The lab this week was also pretty simple since it only asks us to write a stack and a queue. However, we couldn't figure out why a stack is more efficient than a queue. I think it has something to do with the fact that stack appends to the end and removes from the end which is the most recent one added while in queue you have to find the first one. 

No comments:

Post a Comment