Friday, September 26, 2014

Week 3

This week I enjoyed tackling the folding problem presented on Friday. For starters, I wasn't expecting to be doing an activity for the entire class. In most classes, Professor Heap goes through a powerpoint while the class takes notes. Friday felt like an unexpected yet welcome break from that routine. The folding exercise also gave students a chance to work with one another, which our class hasn't done much of outside of tutorial. My partner was Bill who worked out fine. At some points, there felt like there was a language barrier between us working together. If anything was too complicated to explain in words, we could always write down what we went on paper.

After class, many students stayed behind to ask each other questions about how each of them intended to solve it. Most of the answers we discussed technically worked, but none of us had a firm understanding of how to define a function in Python that would output a sequence of folds based on the number of folds you made. I think I have a way of doing it, but when I try to call my function for any value, I get the message "RuntimeError: maximum recursion depth exceeded." Obviously, something doesn't work. The more I research recursion functions, the trickier they look. My next plan is to see if a loop function might be simpler. So far, this has also been tricky, but I managed to accurately output the fold patterns of one and two folds. For three folds, I got an error list index is out of range. I will return to this problem next week, and hopefully it should be easier.

No comments:

Post a Comment