tag:blogger.com,1999:blog-18677687.post6792697915562958605..comments2024-03-27T15:13:24.764-04:00Comments on Computer Science Teacher: Teaching Looping as a ConceptAlfred Thompsonhttp://www.blogger.com/profile/05575057876858763822noreply@blogger.comBlogger4125tag:blogger.com,1999:blog-18677687.post-90448991693428573042016-01-07T13:02:25.211-05:002016-01-07T13:02:25.211-05:00It is interesting that your examples are all While...It is interesting that your examples are all While loops. Keep counting until you run out of things to count. I can get the kids to understand loops fairly easily. "Pick up the pencil. Put the pencil down. Do it 18 times. A For loop." "Take a marble out of bucket 1 and put it in bucket 2. When you run out of marbles in bucket 1, quit. A While loop." They pick up the syntax and can use For loops right away. While loops get ugly. The when to quit confuses some. They also have issues when to use which.Garthnoreply@blogger.comtag:blogger.com,1999:blog-18677687.post-83722937982443556512016-01-07T08:29:30.352-05:002016-01-07T08:29:30.352-05:00"An Empty Loop"
Imagine yourself on a ..."An Empty Loop" <br /><br />Imagine yourself on a merry-go-round, not a particularly fast one. You sit on the bench, not a horse. With your eyes, closed, you might only barely know you were moving. After a bunch of revolutions, you get off at the ramp you got on. Nothing accomplished.<br /><br />Visualize (or better yet, create) turtle art composed of a set of circles, not drawn one on top of the others like a merry-go-round, but with a small turn before each. After a while, you'll have something that looks something like a flower.<br /><br />The visual loop with it's potential to make something real and beautiful was a part of the LOGO language's goal.<br /><br />The more visual the loop concept is, the easier it is to appreciate the power of it, I think.<br /><br />The exploration can be done in the browser using an online site like <a href="artscript.co.uk/Draw" rel="nofollow">artscript.co.uk</a><br /><br />Algot Runemanhttps://www.blogger.com/profile/10564181695797916699noreply@blogger.comtag:blogger.com,1999:blog-18677687.post-71334513288463136662016-01-06T21:47:27.731-05:002016-01-06T21:47:27.731-05:00I also struggle to find good examples to introduce...I also struggle to find good examples to introduce loops. Interestingly, I've been teaching a Saturday Scratch programming classes to Grade 3-7 kids, and the kids had no issue with using loops - they seemed intuitive for those kids.<br /><br />I've introduced the topic by giving kids a small packet of candies (Smarties, here in Canada, M&M's elsewhere) with a flowchart that asks "Do you have any left?" From the yes side, I have them eat one and then loop back to the question. From the No side, we are done. We "follow" the flowchart to eat the candies and the kids can visually see the loop in the flowchart. <br /><br />I think the comments about increment are very valid as well and I'm not sure how to incorporate this.Aurohttps://www.blogger.com/profile/17066843170578484175noreply@blogger.comtag:blogger.com,1999:blog-18677687.post-91014705198654240972016-01-06T14:28:35.559-05:002016-01-06T14:28:35.559-05:00One aspect of a loop is "Doing the same thing...One aspect of a loop is "Doing the same thing over and over" since that really isn't the case.<br /><br />The iterative piece usually has an impact on the looped job. The output is usually shifted or updated from one step to the next. A loop which simply put the same output into the same place on the screen 100 times would not impress anybody. Nor would just going from the floor to the first step of a stairway accomplish much (not counting the physical exercise [cpu cycles?]).<br /><br />Impressing the importance of the increment in the iteration process might be useful.Algot Runemanhttps://www.blogger.com/profile/10564181695797916699noreply@blogger.com