name1="Sam"
name2="Paul"
name3="Becky"
name4="Katie"
Activity 1 - READ
Think of something that you do every single day. I would hope that one of those things would be brushing your teeth!
Imagine if every time you brushed your teeth you had to learn how to do it. What would that be like?
There would be quite a few drawbacks of having to do this:
Your brain remembers your routine. You are probably on "auto-pilot" when you brush your teeth because you have your algorithm and just get it done.
This is a little bit like a sub-routine. A sub-routine is used to store instructions that are frequently needed. They have many benefits for programmers:
It is important to note that sub-routines don't use less resources to run the application. Just like when you brush your teeth, you still use energy to carry out the routine.
Activity 2 - WATCH AND LISTEN
Write a sub-routine for an activity that you do quite a bit. The sub-routine should have the ability to be used by any human to perform the same task.
This outcome probably won't take very long for students to grasp. The next step is to learn how to create them in a programming language.
A nice activity would be to distribute "sub-routines" in the form of musical rhythms and get the class to complete a song by playing the various sub-routines in a defined order.