Coding safety messages

Learn coding skills by programming your own interactive safety message.

Activity Image
1.3 hours
Hands on


Learn about the various ways electricity can travel that could potentially be hazardous or unsafe. Using Scratch, a free computer coding platform for students, code a safety message to help teach others to stay safe.


What you'll need


  1. Begin by having a discussion on ways we use electricity in our lives using lights, technology, and transport as examples. 
  2. Electricity, like any form of energy, can cause harm if not used correctly. Have students share potential electrical hazards at home like worn electrical cords, young children with electrical sockets, and handling electrical appliances with wet hands. 

Stay safe video

  1. Play the "Stay safe" video above and explain this video is about electrical safety in the community. 
  2. Review key information from the video.  Electricity travels as a current in power lines, at low and high voltage, following the path of least resistance. Something touching a power line like a ladder or a downed power line, drooping or touching the ground, is a danger. Three ways electricity can travel are:
    • Touch potential: The ability electricity has to find its way through your touch to get to ground.
    • Step potential: The ability electricity has to move through your body as you step away from the source of electricity. 
    • Arcing: The ability electricity has to jump through the air to find a path to ground.
  3. Review with students the actions to take if they encounter a downed power line. If a power line is touching the ground, it can cause the ground around it to be energized and we must stay back at least 10 metres, warn others of the danger, and dial 911. Electricity is strongest at its source. If you are within 10 metres of a downed power line shuffle your feet, never lifting a foot from the ground, until you are 10 metres (the length of a school bus) away from the source.

Coding exercise 

  1. Explain that students will learn coding skills using the platform Scratch to create their own interactive safety messages. They can share these messages with others. 
  2. Provide students, individually or in pairs, with computers and ask them to access Scratch
    • Students do not need to sign up for an account to create their own projects. However, they will need an account if they want to save and share projects. 
  3. Pull up the “Safety code” instruction slideshow for step-by-step instructions to get students started.
  4. At slide 2, show the “Getting started” video tutorial
  5. Slide 3 shows the coding page where students start their projects. Share that on the left of the page are the coding categories and the plug and play coding blocks. 
  6. Slide 4 is a close up of how to choose your Sprites (computer characters) for your project. The Sprite icon is on the mid-right of the coding page. Students can also design their own Sprites to upload. 
  7. Slide 5 is a close up of how to choose your story Backdrop. The Backdrop icon is on the far right of the coding page. Students can also design their own Backdrop to upload.
  8. At slide 6, go to tutorials and show the “Create a Story” video tutorial. 
  9. Pause at slide 7 and ask students to brainstorm and share their story safety message ideas. Review the safety messages from the video on what to do if a power line is down like staying 10 metres away, shuffling feet to move at least 10 metres away and dialling 911. Have students make an outline of their story ideas.
  10. At slide 8, share with students the simple story we created, if you want to show them an example. Click on ‘see inside’ to view the code blocks used to create this story.
  11. Invite students to put their safety story ideas into action by coding a safety message that can be shared with others.

Modify or extend this activity


  • Have students share their coded safety messages with younger grades and teach them to stay safe around downed power lines. 

Curriculum Fit

Science 4, 7

Big idea

  • Energy has various forms (Grade 4)
  • Electricity: Electromagnetism (Grade 7)

Curricular competencies

Applying and innovating: 
  • Co-operatively design projects
  • Transfer and apply learning to new situations
  • Represent and communicate ideas and findings in a variety of ways, such as diagrams and simple reports, using digital technologies as appropriate

Physical and Health Education 4, 5, 6, 7


  • Strategies and skills to use in potentially hazardous or unsafe situations (Grade 4)
  • Basic principles for responding to emergency situations: following safety guidelines (Grade 6, 7)

Curricular competencies

Social and community health
  • Identify and describe strategies for avoiding and/or responding to potentially unsafe, abusive, or exploitive situations

Career Education 4, 5, 6, 7


  • Personal development 
    • Goal-setting strategies - emergent leadership skills, safety hazards and rules at school, at home, and in the community (Grade 4, 5)
    • Leadership (Grade 6, 7)

Curricular competencies

  • Demonstrate safe behaviours in a variety of environments (Grade 4, 5, & 6)
  • Demonstrate safety skills in an experiential learning environment (Grade 7)

Applied Design, Skills and Technologies 4, 5, 6, 7


  • Develop foundational mindsets and skills in design thinking and making (Grade 4, 5)
  • Computational thinking (Grade 6, 7)
    • Visual programming, for example, Scratch

Curricular competencies

Applied technologies
  • Demonstrate a willingness to learn new technologies as needed (Grade 4, 5)
Applied design
  • Prototyping (Grade 6, 7)
  • Testing (Grade 6, 7)

Teaching Notes

Electrical safety tips 

  • Never put fingers or other objects in an outlet
  • Keep metal objects out of toasters
  • Never use anything with a cord or plug around water
  • Never pull a plug out by its cord
  • Stay away from substations and power lines
  • Don't climb on power poles
  • Never fly kites near power lines
  • Stay away from broken or fallen power lines
  • Never touch or climb trees that are near power lines
  • Never touch big, metal transformer boxes with warning signs
  • Obey warning signs

Electrical safety, electricity and power lines 

Power lines are conductive meaning the electrical current runs through them with the least resistance. However if something makes contact with a live power line like a tree, kite, or ladder, the electrical current may flow to the ground. The place where the current touches the ground is the highest voltage and from that point the electrical current spreads out in irregular concentric circles. The voltage or electrical intensity decreases as it moves further from the source. 10 metres or more from the source of contact, like a downed power line, is a safe distance. 

Touch potential is the ability electricity has to find its way through touch to get to the ground. If a kite gets tangled in a power line, the electrical current could travel through the kite and you to reach the ground. Birds do not get zapped when standing on a power line, however they would if they straddled two power lines, or touch their beak to the ground while standing on the power line.  

Step potential is the ability electricity has to move through your body as you step away from the source of electricity. As electrical current flows through the ground the voltage decreases in concentric rings or ripples as you move further from the source. However, if you move away by lifting one foot, the change in voltage between the concentric rings can travel up one leg and down the other. Instead by keeping your legs together and shuffling your feet, the electrical current will stay in the ground. 10 metres is the safe distance calculated based on the voltage in the power lines here in B.C. 

Arcing is the ability electricity has to jump through the air to find a path to ground. The term arcing describes the shape the electrical current uses to get to the ground. Some jobs around your home may take you close to power lines, such as trimming trees, working on your roof, or doing exterior renovations. It is important to keep yourself and any tools you’re using at least three metres (the length of a four-door car) away from power lines near your home. This is because electricity can "arc" or jump from power lines across a gap, to tools or ladders that you're using. 

Scratch: Imagine, program, share

Even without an account, you can play other people's projects, read comments and forums, and even create your own projects. But you need an account to save and share projects, write comments and forum posts, and participate in other "social" activities in the community (like "loving" other people's projects).

Check out the Scratch FAQ to access resources and get a teacher account.


  • Assess students’ ability to respond safely to an electrical safety hazard like a downed power line.
  • Assess students’ creativity in coding an effective safety message.
  • Assess students’ participation and cooperation in the game.

Join the Power Smart for Schools community to access:

  • Email newsletter to keep you up-to-date
  • Special events and contests with great prizes
  • Premium, time-limited education resources
  • Dashboard to organize and save your favourite activities and lessons
Sign up