# Teaching functions

Huh. Maybe I’ll finally crack the code to read crochet patterns - they’re functions!

In the gym, functions can be compared to various ‘plays’ in a game. For example a give and go or a pick and roll. These are simple functions.

In my country students already know what functions is. They learn it in math class.

A function is like a set of daily tasks bundled together. You can liken it to come in, put away things, sit down, write paper, turn in paper, write paper, turn it paper, check with teacher, listen, learn, listen, learn, listen learn, write paper, if paper needs work revise… etc, etc,

As I mentioned in an earlier post, my students love Minecraft. So to introduce functions I would show them how people who often build worlds in Minecraft use schematics. Schematics are prebuilt structures that people can easily important into their worlds.

I think it’s good for students to know what a program is. Once understand, functions can be explained as a sub-program. A program can call sub-programs, functions.

I think I will use the song analogy. Also I’ll explain that it is something that is done repeatedly, so we write the directions for it once, then tell the program to “read the directions” each time it comes toe the function.

To solidfy their understanding, I think that I would introduce, define and provide examples of the terms before the activity. Then see if they couldn’t identify the part of the activity that is a function or a variable. I believe this activating strategy would increase understanding at the end of the lesson while still allowing students to feel ownership of their learning.

I like Chris’ video about the functions in basketball. I will show them that video and ask them to work with a partner(s) to make a dance with just 3 moves. They can name it and teach it to the class -that’s their function. Once we all learn them, we can make a dance by combining them by their name. It would be great to get the gym and music teachers to discuss this also.

To explain functions to students I would revisit loops. I would explain that just like loops other algorithms repeat over and over but unlike loops they may not repeat right away and only appear later in the code. When we have this situation instead of writing those same sets of algorithms over and over we can use a set holder called a function. A function is simply a set of algorithms represented by a single name. So once you define your function, instead of writing the entire set of algorithms over and over each time the set is needed, now all you have to do is write the function name. This saves times and simplifies your code for easier troubleshooting when problems arise.

1 Like

I would have my students make bracelets. They would first create a loop or a pattern, and then turn it into a function.

1 Like

I would use the unplugged activity because my students have not learned about functions in math yet, so this will help them understand how these instructions are the set of rules of these steps.

A function is a set of instructions that are given a name and then repeated over and over using just the name of the set of steps. Like the chorus in a song. You do not have to re[peat the words for the chorus simply the instruction chorus.

We do bootcamp at our school. A set of movements would be the function. IE, a burpee - hands on ground, jump legs back to land on feet, body in plank position. jump legs up to hands, raise hands up whilst jumping up. repeat. Might do that (or a song - that might be easier)

I would look for other ways to apply this concept in unplugged activities. Simple directional activities may be appealing to my students who may struggle with the concept presented in the video.

Thanks to unplugged lessons plan is easy expain about this topic.
But my English is good enough for this forum??

I would begin teaching the concept of functions by discussing a sport that the class has learned about in gym (i.e. soccer). I would use terms that they learned and break those terms down in steps that need to be taken in order to perform that term.

For example: kicking - 1. square your body with the ball, 2. run toward the ball, 3. kick the ball (this could be used as a variable because the strength of a kick is different depending on where or how far the ball needs to go).

I would explain to the class that kicking is the name of the function that we just described in the steps. Then I would have them create a new type of soccer move, describe it, and have a partner demonstrate it while they are dictating the steps.

For my students I think I could entice them with the thought of it being a “shortcut” instead of having to say/write or type the same thing repetitively (looping) they can use their shortcut. The idea of less work would definitely get their attention. The sun catcher activity will be a great start for my students.

Robin had some great ideas for introducing functions to kinders. I like the idea of taking an everyday task that they are familiar with and using that set of directions to make a function.

In my Pre-K classroom I would teach functions by talking about simple patterns using colors, shapes, objects, or actions. The pattern/function tell us what object/action will come next. To make the activity more interactive I would play a follow the leader game where the students would repeat an action in a pattern in turn a function.