# Coding in the Classroom | Patterns, location and movement

Patterns, location, movement and code in the primary grades
By: Steven Floyd and Lisa Anne Floyd

In this article, we will share an idea to teach coding and spatial sense concepts using ScratchJr in primary grades. A guided video tutorial is shared along with teaching ideas and support.

In the primary grades, students can work with concepts related to patterns, location, movement, and coding all at the same time, by creating their own projects in ScratchJr. Scratchjr is an introductory programming language for young children, inspired by Scratch and is a free app available for ipads and android tablets (and chromebooks).

The programming code below demonstrates an AB pattern, where the green fish is programmed to move forward 3 places and complete a full spin.

You will notice that a full spin has a value of 12. The fact that ScratchJr uses 12 for a full spin is convenient because it can be divided evenly by 2,3,4, and 6 and is familiar with students because of the clock face.

Notice how this code above is very repetitive? The “forward 3 spaces, full spin” code repeats four times.

Students can use a repeat block, or a loop, to repeat this code 4 times, which is much more efficient:

The video below demonstrates how to create this simple AB pattern with code, which uses sequential code that repeats:

Students can extend this program to create other patterns.

As an example, the code below demonstrates an ABC pattern that repeats 4 times:

Possible connections and extensions:

• Educators may want to connect these coding activities to curriculum expectations in the Arts, including those related to dance and music.
• The ScratchJr coding blocks can be printed here, and possibly laminated, so that students can do “unplugged” coding and perhaps assemble printed blocks to code their classmate to navigate the classroom, or perform a dance.
• Students might be encouraged to create a story that incorporates patterns
• ScratchJr is only one programming application that students can use to work with patterns, location, movement, and code. Students may also want to program physical robots, such as a Beebot or a Dash and Dot robot.

Curriculum Expectations:

Scroll to Top