In computer science, algorithms are used to set out the steps for a computer program to follow. Algorithms require lots of planning ahead of time, and today we’re going to apply this to getting a puppy out of an obstacle course!
MATERIALS:
Template: Computer Puppy Algorithms Template.docx - Google Docs
4 colors of markers/crayons/pens/colored pencils
Scissors
TIME ESTIMATED:
20 minutes
DIRECTIONS:
Create obstacles on the template by coloring some of the squares different colors.
Create an algorithm by drawing different symbols on the squares to get the puppy through the obstacle course from start to finish. Follow the key to get symbols, and make sure that your algorithm accounts for which colors can be jumped over, crawled under, or cannot be passed.
Cut out the dog from the template.
Use the dog to follow the algorithm you created to see if it succeeds in getting the dog from start to finish! Try again until it works.
THINK LIKE A SCIENTIST!
Have you ever seen something on an electronic device (such as a website or game) crash? What do you think would happen if you gave a computer a code that is incorrect, or a robot a command to walk into a wall?
Do you have a routine that you repeat over and over (i.e. a morning routine: get out of bed, brush your teeth, wash your face, shower, and get dressed)? If you were to write out every time you brushed your teeth or showered it would take a super long time. If you wanted a computer to do a series of commands over and over, would you type out every time you wanted it to happen? How do you think an algorithm could be helpful in coding those commands faster?
HOW DOES IT WORK?
A computer, in many ways, responds to computer algorithms like a dog responds to commands. Computers can only do one thing at a time. If we asked a dog to “sit” and “come” at the same time it would get confused! But if you ask the dog to “come” first then “sit”, it can follow those instructions. Computers also don’t understand double meanings and neither do dogs. If you taught your dog to shake your hand with the command “shake”, but then you tried to teach the dog to shake its whole body with the same command, the dog would get confused and still try to shake hands! It helps to keep in mind that a computer can think just as simply as a dog!
FURTHER EXPLORATION:
Computer algorithms are important for computer science because they allow scientists to solve a particular problem efficiently! By writing out an algorithm, you are planning a solution for the computer that consumes the least amount of resources and is as fast as possible!
Looking for more fun at-home STEM activities for your young scientist? Check out our workbook full of exciting science experiments and empowering activities!
Learn more and purchase today!