Ontario 09 Academic (MPM1D)
topic badge
Following directions (Investigation)
Lesson
An algorithm is a process or set of rules to be followed to solve a calculation or other problem, or to complete a task. When we are coding, we write algorithms for the computer. We can also write algorithms or instructions for real life activities too. Take a minute to think of some now.
Recipes, instruction books and giving directions are real life examples of algorithms.
When you're giving directions it's really important to be clear and precise! Imagine if your friend was blindfolded and you had to direct them through an obstacle course. What might happen if your instructions weren't clear? Well your friend could run into a wall or slip into a muddy pond- yuk!
So let's practice giving clear instructions now.

Online: Vegetarian Zombies

 

Direct this hungry zombie towards the sunflower so it can eat. Make sure you avoid the chompers!

See if you can do it in the fewest steps possible.

Click here to go to the activity.

 

Questions

  1. Click on the "show code" button when you have finished each puzzle. What similarities do you notice between the blocks you used and the code that is written?
  2. What happened to the number of steps when you used the repeat function? What might the benefits of this be?
  3. What challenges did you face as you worked through this task? How did you overcome these? What did you learn from them?

 

Unplugged Class Activity: Get to the Canteen

Work in groups of four to complete this task.

  1. Come up with your own step-by-step algorithm to tell someone how to get from your classroom to the school canteen. 
  2. List the steps in order, numbering them $1,2,3$1,2,3 and so on.
  3. Pretend that this person has no idea how to get around your school, and needs to be told absolutely everything! Tell them how many steps to take/ how far they need to walk, when to turn left or right, and whether to go down stairs.
  4. After you have worked with your group to come up with your algorithm, take a stop watch and time how long it takes to walk from the classroom to the canteen using your algorithm. Make sure that everyone in the class is walking at the same speed (no running!).
  5. After every group has finished timing their algorithms, return to the classroom. 

 

Discussion

Compare your results as a class and answer the following questions.

  1.  Which group had the shortest time? What was their algorithm?
  2. Which group had the longest time? What was their algorithm?
  3. Which group had the algorithm with the most written steps? What was their time?
  4. Which group had the algorithm with the least written steps? What was their time?
  5. Will an algorithm with the least amount of steps always take the least time?
  6. Keeping the same steps, could you have changed the order of any steps, and still arrived at the canteen?

What is Mathspace

About Mathspace