Cross-Curricular Connections: Exploring the "Sending a Valentine" Unit

algorithmic thinking algorithms block-based coding coding computer programming content library jr cross-curricular connections geometry interdisciplinary instruction logical reasoning mathematics music problem solving programming programming language project-based learning python scratch text-based coding transferable skills Jan 27, 2024

This month’s unit feature focuses on our “Sending a Valentine” module in Content Library Junior. In this unit, students work in Scratch to create a customized Valentine e-card. From programming sprites to appear in the correct order to practicing adding music as a challenge, this unit is a great place to start for newer and younger coders. The program is simple, teaching students basic computer and programming skills, but also provides opportunities for students to challenge themselves. 

The Scratch Editor

In the first portion of this activity, students learn to work with the Scratch editor to create a backdrop. Scratch has a variety of backdrops that are already created. Students can use these for their program.

However, to provide an added challenge, you may choose to encourage your student to create their own backdrop or upload a backdrop from their computer files. 

Regardless of the backdrop chosen for a project, all can be customized using the Scratch editor. Many of the skills needed to use the editor correctly are transferable to different computer programs. Let’s take a look at some of these.

For example, when adding text to a backdrop using the Text Box tool, blue circles appear around the letters to allow the user to adjust the size and location of the text. Many editors contain similar features, where the text can be moved and adjusted using dots around the box. 

The Scratch editor also contains tools that can be found in other programs, such as 3D design programs like Tinkercad. Text and images can be grouped together. This allows the user to take multiple text boxes or images and “connect” them so that they become a single object. To do this, students learn they need to hold the Shift key and select the multiple images that they want included in the group. This is a transferable skill that works with other computer programs. Additionally, students learn if one of the objects needs to be adjusted, they can be ungrouped, as well.

There are also simple tools within the editor, such as Copy and Paste, that can be used with basic programs like Google Docs or Microsoft Word. Throughout our programs, we also teach students that the keyboard shortcuts Ctrl-C and Ctrl-V (Command-C and Command-V for Mac Users) can be used to copy and paste. There is also the Ctrl-D (or Command-D) option, which will duplicate the text or image.  So, as students work through this project, they will be developing meaningful skills that can apply to general computer use in addition to learning simple programming.

The "Click to Open" Button

 When you consider the typical paper greeting card, there is the front page and a message on the inside. The challenge in this activity is to create a program where you begin with the front of a card and view the inside message with the click of a button. (In Scratch, the “button” and other objects in the program are called sprites.)

To achieve this, students use a combination of when this sprite clicked and switch backdrop to ( ) instructions. This means that there needs to be more than one backdrop before programming the button. Programming trains you to think about the steps that need to happen and the order in which they need to occur to make the program do what it is meant to do. To help with this, we need to break the program into parts or steps. This is known as algorithmic thinking. If students add a switch backdrop to ( ) instruction, they will recognize that they need to have already added the backdrop that shows the inside of the card so that there is another backdrop to switch to. 


Once the inside backdrop is added, students can practice their skills by using the Scratch editor again to create the inside of the card. Additionally, if they learned to upload or choose a backdrop from the Scratch library, they have the opportunity to practice using these techniques again. 

Finally, you need to use the drop down within the switch backdrop to ( ) instruction to select the correct backdrop. While selecting from a drop down menu may seem simple, users need to understand how to work with drop down menus when navigating various websites and programs successfully. Think about making an appointment online. Often you need to select a date and time from a drop down menu. So, though the main focus of our activities is programming, there are a variety of general computer skills that students are practicing and improving upon when they work with our Content Library activities.

The Math in Creating a Message

In this program, when the card is open, a message appears that says “Happy Valentine’s Day!” The letters of the message each show up individually. This requires programming each sprite to appear at a specific time. The Scratch library has letter sprites, so the user needs to place the letters in their desired positions, ensure that the sprites are hidden, and then show the letters when it is that letter sprite’s “turn” to appear.

Students learn to use the wait (1) second(s) instruction from the Control category to program the letters to appear one after the other. This can incorporate simple counting or challenge users to employ basic math skills, depending on what you intend to improve for the learner.

For a simpler program, you can teach students to add a second for each subsequent letter. So, if the “H” sprite waits 1 second, the “A” sprite waits 2, etc. However, sometimes waiting one second actually is a lot slower in a program than it might seem. Here, you can challenge more experienced coders or students in older elementary grades to use half seconds and addition skills to determine the total wait time for each letter sprite. You can continue to incorporate fractions (represented as decimals) by using quarter seconds, etc. Whether your students use basic counting or addition with fractions, this program will exercise their math skills.

Making Candy Hearts Appear

In many of our Content Library Junior programs, we teach students how to write code so that sprites appear randomly on the screen. From falling snowflakes to sprinkling confetti, the main instructions for this code are similar, but small portions are adjusted to achieve the desired outcome. These programs involve creating clone sprites and then writing code for the clones. 


For example, to create snowfall, we have to consider the position of cloned sprites. The Scratch stage is a coordinate plane. Snow falls from the sky, meaning that we need to position the cloned sprites to start at the top of the screen. The Scratch stage ranges from -240 to 240 on the x-axis and -180 to 180 on the y-axis. The cloned snowflakes need to be programmed to start with a y-position of 180 so that they start at the top of the screen. Because snow falls in all different directions and we want the snow to fill up the stage, we can write a program so that they randomly position themselves anywhere from -240 to 240 along the x-axis using instructions from the Operators category.

In this Valentine’s card program, we want the Candy Heart sprite to be cloned and appear randomly anywhere on the Scratch stage. This means the clones can appear using the full range on both the x- and y-axes. To achieve this, users need a combination of a go to x: ( ) y: ( ) instruction from the Motion category and pick random ( ) to ( ) instructions for each axis.

When working with this concept, you can extend student knowledge by exploring probability where students must consider the chances of getting a specific number from the random range.

Using an instruction like pick random (1) to (10), or in this case pick random (-240) to (240), also prepares students to write text code. In Python, randint is an instruction that programs the computer to choose a random integer. Students are exposed to the terminology and the instructions with this block coding program that they will need when they progress to text coding.

Exploring Music

There are a variety of ways to add music to a program in Scratch. Music can be written by the user, uploaded from a device, recorded, or found in the Scratch library. Both the Music Extension and Sound category instructions make using any of these methods possible.


Many of our Content Library Junior programs explore how to use these methods in a program. Some teach writing music with the Music Extension instructions whereas others upload music. Some include both. The “Sending a Valentine” unit practices uploading music from computer files using the Sound category.

Once a music file is downloaded from a site, such as, and then uploaded in Scratch, the student would simply need to add a when green flag clicked instruction from the Events category paired with a play sound ( ) until done instruction from the Sound category to play a song. This is similar to our Winter Scene unit, so if students complete the Seasonal Creations module in order, they will be able to reinforce this concept in this program.

Interdisciplinary Instruction

All our units contain cross-curricular skills, combining skills from various academic areas with programming skills. This means that regardless of the activity you choose for your students, they will be tapping into more than one specific set of skills when working with our Content Library units. 


This particular program combines a variety of math and music skills with programming. Math skills range from simple counting to using the coordinate plane to learning probability. As we explored in different sections of the activity, students can use simple math, but educators and parents may also choose to challenge their students by working with more complex concepts in the program. 


The music instructions employed in this program are also used in other activities in Content Library Junior, as is learning how to write music using the Music Extension category. If this is not your learner’s first activity, you may be wondering if using similar instructions and concepts in multiple activities is beneficial. 

In our Learning through Repetition entry, we discuss why completing programs that have instructions similar to those used in other programs is beneficial. In a program like “Sending a Valentine,” while many instructions are repeated for sprites like the Candy Heart and for including music, portions of the code differ. This can be helpful in multiple ways. Sometimes students do not master concepts on the first try, and multiple exposures can help them understand these concepts further. If students do well with the programs on the first attempt, then their knowledge can be challenged when they need to adjust the code slightly to create a different outcome. Additionally, each program in our Content Libraries taps into knowledge from various academic areas, so even if code is repeated, the combination of skills included will always vary.

Want to try out “Sending a Valentine” and other elementary programs? To get your students started with this unit and others that promote STEM thinking, be sure to head to our website and sign up for a FREE TRIAL of our Content Library.

Stay connected with news and updates!

Join our mailing list to receive the latest news and updates from our team.
Don't worry, your information will not be shared.

We hate SPAM. We will never sell your information, for any reason.

To learn more about how we can help you integrate STEM education at your campus or homeschool, contact us for a consultation. 

Schedule a Consultation