swcarpentry/bc — pull request #84 by wltrimbl (2013-10-19 15:26:58+00:00)
Title: Simplified knights example to use straightfoward if instead of for...else.

The for...else syntax is not as important as the idea of nesting of control structures. For those learners seeing programming for the first time, this is a potentially confusing bit of syntax that is not the clearest way to accomplish the task. Here I've split the knights example into two cells, one to define the data structures and print them out, and one to conduct the loop. We get lots of questions on this cell, and I think the for...else is a little distracting at this point.