Looking for the solutions?¶
Here’s the deal with programming: the only way to learn to program is to wrestle with solving your own problems. The best way to learn is to do so actively – if you just look at answers as soon as you get stuck, your process is more passive. You may feel like you’re learning more, but research shows that that’s an illusion – students who learn passively think they’re learning more than they are (a summary of paper is here). Moreover, in coding in particular, the process of debugging your code is a critical skill in and of itself, and the only way you will learn to do it is by literally spending hours working through your own problems. And once you’ve seen an answer, there’s no way to unsee it, so preceed only if you absolutely have to.
OK, if you are still interested in looking at the solutions…¶
OK, with all those warnings in place, the goal of this site is to be a resource to anyone, and so if you’re absolutely stuck and can’t figure something out, I want to provide you with a way forward. And some people, after solving the exercises may wish to see how someone else solved it. And so: here are the solutions.