Thursday, 30 January 2014

Week 4: Recursion

We've already briefly gone over recursion a couple of weeks ago, but it was nice to review it again. I still don't know if I have the hang of it because we've practiced tracing multiple examples, but I don't know if I'm proficient at writing recursive functions myself. So far, we've done the tree_burst example and the sum_list example. What other functions could I write myself? I think looking for some examples online might help.

I've looked over the assignment 1 handout a few times already, and I know I understand the Cheese class. The hardest part is writing all of the headers and function calls for the TOAHModel class. I don't quite understand how to model the stools. Is it a list? How do I add "n" cheese to each stool? Why do I need a function that asks how many moves I've made so far? There's already one in the MoveSequence class. I'm definitely going to ask for help on that. Once I understand what to do, I think I'll be able to get a good head start on the assignment. There's no way I'm leaving it to the last minute. Sometimes when I'm walking to class I'll suddenly come up with a way to solve the problem. It's the best feeling ever.

No comments:

Post a Comment