Bugg Report: Coding in Science with Loops during CSEdWeek

0

This week we are immersing computer science across the elementary curriculum at Bugg Elementary in Raleigh, NC. Each day we will be teaching new and existing lesson ideas that engage students in their regular classroom content areas with a coding twist. Students will use CodeSnaps to explore their mastery of content in fun, engaging lesson ideas. We will culminate each day in a Bugg Report to capture the day's lessons and share some of our #HourOfCode / Computer Science Education Week adventures. So follow along!

Day 5: Science & Loops

Today, we engaged students in their recently acquired knowledge of seasons in their science coursework. While discussing facts and properties of seasons, students wrote programs to navigate a Sphero robot through the four seasons.

CodeSnaps Seasons & Loops activity setup.

Although the navigation and resulting program is quite simple, it is a relatively long and repetitive program. It’s an ideal scenario to introduce loops. To begin, we defined loops by forming a circle and having a student clap once, followed immediately by a clap from the student to their left, and so on until every student had clapped. This represented one loop. Students were then instructed to traverse the loop several times. This provided ample opportunity to identify 1) how much better computers are at repetitive task than humans, 2) computers never get bored of repetitive tasks while humans often do, 3) computers can do it faster than humans ever could, and 4) loops can control repetitive programming tasks with a few lines of code. We culminated the introduction to loops with this video from code.org.

Bringing this newly acquired knowledge of loops back to the seasons activity, we worked as a whole class to assemble the MOVE FORWARD, TURN RIGHT, AND SET COLOR blocks into a loop such that 4 lines were needed, compared to the 12 the students assembled at the onset of the activity. To increase the “boringness” and length we created an outer loop to run the inner, seasons loop for each year of age of the students (See the code and video below.). Thus creating 5 lines of code that would have taken 72 lines without loops.

CodeSnaps Seasons & Loop program demonstrated in the video below.

This report concludes our week at Bugg Elementary. For other ideas integrating coding across the curriculum, check out this post and our other Bugg Reports from CSEdWeek.

Share

About Author

Scott McQuiggan

Scott McQuiggan leads SAS® Curriculum Pathways®, an interdisciplinary team focused on the development of no-cost educational software in the core disciplines at SAS. He received his Ph.D. in Computer Science from North Carolina State University in 2009, where his research focused on affective reasoning in intelligent game-based learning environments. His research has been published in more than 30 journal articles and refereed conference proceedings, and been recognized through several best paper nominations including Best Student Paper Award at the International Conference on Affective Computing and Intelligent Interaction.

Leave A Reply

Back to Top