Activity

Code Your Walk

Overview
Grades 3-8
45 min
Topics
Computer Science
Status

In this activity, you’ll use symbols to write a code for a walk, break down instructions that someone else can follow, and make your walking code better by listening to feedback.

Hello, super coder! Are you ready to write some code that will send your friends and family through an obstacle course?

 



1
Show What You Mean: Symbols

Before humans used letters and words, we used symbols and pictures to tell stories. This is a picture from the Lascaux Caves in France. Even though the pictures in this cave are more than 17,000 years old, we can still see the story they tell. Humans also used symbols to communicate or provide instructions, and that’s exactly what you’ll be doing today!

Did you know?

Computer coders use symbols, too! They have to write code in a set of symbols that other people can learn and understand.

Coding languages always use the same symbols so the computer can read the code. You will write your own code today using sidewalk chalk. You will make your own sidewalk chalk code obstacle course for your family or friends to follow!

2
Learning About Code

When you are writing a code, the first step is to make sure people can read it! To do this, you need to decide what you want people to do. But how will people know what each symbol means? You’ll have to make a key! A key will tell other people how to use your code. You will draw your key on the sidewalk before you start the obstacle course. Here’s an example:

Now it is time to create your algorithm! Algorithm is a computer science word, and it is a step-by-step set of instructions a computer or person can follow to do something. For example, an algorithm could be:

  1. Jump up and down
  2. Spin three times
  3. Run in a circle

When you write your sidewalk algorithm, you need to include the symbol for the action and the number of times the action should be done.  If you wanted your friend to spin three times, your algorithm might look like three of the swirl symbols.

Finally, you’ll get someone to test your code out! In the next step, you’ll use what you’ve learned to make your own sidewalk code!

3
Making Your Code

It is time to make your own code! In this section, you can either make your own things up, or you can use the worksheet to help get you started.  Here are the steps you can follow:

  1. Decide what the people following your code will do. Create actions like walking in a certain direction, jumping, or twirling.
  2. Make a key for each of your actions. Match each action you decided on to a symbol.
  3. Create your algorithm. Using  your symbols, write a list of instructions for people to follow.
  4. Test your algorithm. Get a friend, family member, or neighbor to go through your code!

If you need some help, below is an example of what your algorithm might look like!

Did you know?

Testing code is an important part of computer coding! When coders test the code, they are looking to see if the computer does what it should. Usually, they have to change their code so the computer can understand it better. This part of coding is called debugging because a mistake in code is called a bug! Coders rewrite or make changes to their code until all the bugs are gone!

4
Debug and Redesign

When your friend tried to follow your code, did they do what you expected them to do? You might need to do some debugging in your code to help your friend better understand it! Even if your friend followed your code perfectly, it is time to improve it by creating a new version. In computer science, this is called an iteration!

Before you begin your iteration, ask yourself the following questions.
  • Do you like your code?
  • Could you make changes to make it easy enough for a preschooler to follow?
  • Could you make changes to the movements to make it easy for a grandparent to do?
  • Would you have to change your code if you used it in your home or at school?

It is time to redesign! Make your code better using the questions you asked yourself above, and have fun!

1

Did your algorithm work correctly the first time? Did you have to make changes to make it easier to follow?

2

Did you create your own symbol or use the symbols from our example? How did you decide which symbols to use in your coding language?

3

Who will most likely use your code? Your brothers or sisters? Neighborhood friends? Dog walkers? How could you change your code to meet the needs of a different audience?

4

How is your chalk code like a computer program?

Did you enjoy the process of thinking through computer code? You can learn more about coding using Google’s CS First program! Do a Google search for “CS First” to get started. You won’t need an account, but if you make an account, you can save your progress!


There are lots of fields that use coding, not just computer programming!

  • Education: Though some teachers do teach students how to code, learning how to code can be helpful for all teachers! The type of thinking coding requires, called computational thinking, can help teachers develop better lessons.
  • Natural Resources: Unfortunately, we haven’t taken great care of our planet, and there is a lot of plastic in the ocean. But, we are using computers to help find the plastic and clean it up!
  • Firefighting: Wildfires are unplanned fires that often happen in forests. Sometimes they are caused by something natural, like lightning, or sometimes they are caused by humans. Computers running a special code can help predict when and where a fire might happen, and they can also show where a fire might spread if it does start.

Did you enjoy this activity?

No endorsement by 4-H is implied or intended. 4-H is the youth development program for our nation’s cooperative extension system.