DAY 6 - Coding and Computer Science for Kids 1
Category: Coding & Computer Science 1
Date: June 18, 2018
Description:
Coding and Computer Science for Kids 1 - DAY 6
 
Code.org FUNCTIONS:

Lesson Overview:

 

Students explore how repetitive tasks can be stored in a small group that can be “called” several times, instead of wasting space with lots of copies of the same instruction. In this lesson, students make a sun-catcher out of string, beads, and a special charm, following a series of repetitive steps, and then identify certain sets of “skills” that are duplicated several times and called from a main program. Students “abstract out” the details of their specific materials and use generic placeholders, or variables, to create their own unique sun-catchers.

 
 
Essential Question:
What are functions, and how can they be used to save space when writing programs?
 
 

• I can learn to find patterns in processes.

• I can think about an artistic task in a different way.

I can think about creating more “efficient” solutions to problems.

• I can realize the need for formal programming structures like loops and functions.

 
 
 

Abstraction — (n.) Removing details from a solution so that it can work for many problems.

Algorithm — (n.) A series of instructions on how to accomplish a task.

 

Function — (n.) A piece of code that can be called over and over

Function Call — (n.) The place in your program where you call a function you have defined.

Function Definition — (n.) The place where you assign a series of actions to one easy-to- remember name.

Program — (n.) Instructions that can be understood and followed by a machine.

Variable — (n.) A placeholder for a value that can change.

 


 

 
 
 
 
REVIEW:
Think back to our last Tangrams algorithms lesson.
 
Class Participation Questions:
• What did we do with the Tangrams?
• What are algorithms, and how did we use them in the Tangram lesson?
 
Partner Discussion:
• How would you describe an algorithm for making a snowman?
 
Lesson Steps:
Today we will be creating sun-catchers using beads, spacers, and special charms, and in the process, learn about programs, variables and functions.
 
Bead = “Whatever style, color, or kind of wooden bead”
Spacer = “A long item that is not a bead”
Special Charm = “The crystal prism”
 
First, I will explain how I made my sun-catcher.
 
Next, we will figure out the individual skills necessary to copy it.
 
Finally, we will create a list of skills and steps that everyone can follow to make their own sun-catchers.
 

 
Making the Sun-Catcher
First, I put a bead on the string, then I tied a knot. I put another bead on a string, and tied another knot. Then, I put a spacer on the string and tied another knot.
 
After that, I did it all again. I put a bead on the string, then I tied a knot. I put another bead on a string, and tied another knot. Then, I put a spacer on the string and tied another knot.
 
Finally, I put on the special charm, and tied one last knot.
 
SKILL 1:
Bead, knot, bead, knot, spacer, knot. (Repeat with rhythm.)
 
SKILL 2:
Bead, knot, bead, knot, spacer, knot.
Special charm, final knot.
 
COMBINED:
Bead, knot, bead, knot, spacer, knot.
Bead, knot, bead, knot, spacer, knot. Special charm, final knot.
 
We are now going to review the recorded steps of this program, so that everyone has the instructions in front of them.
 

 


 

Group Discussion:
  • Does anyone notice an issue with our Skill 1 steps?
  • How many instructions do we have left to go through?
  • How many lines do we have left?
  • What should we do?
 
Did anyone think the following: “Why don’t we put more than one item per line?”
 
That is an efficient method of thinking. We want to combine a bunch of instructions together to save space. How might we do that? What would we group together?
 
On your own Skills Sheet, notice that there are two “extra” sections where they can combine steps so that you can write one name to call them all.
 
For instance, everything that you put into the top section, you can call all at once by calling “Skill 1.” This is an example of a function.
 
Your challenge is to fill out your own sheet in a way that makes sense and allows you to fit the entire sequence under the “Program” list in some way.
 
Take a few minutes to complete your sheet and then share your suggestions with our class so that we can explain the process.
 
  • What would you do if you had to repeat this sequence a thousand times?
 
1. Bead
2. Knot
3. Bead
4. Knot
5. Spacer
6. Knot
 
This might help you to understand the concept of functions a little more easily.
 
Let’s re-examine Skill 1, Skill 2, and our Program more closely:
 
 

 
Share your solution with a partner and then the rest of the class to see if we all can understand it. We will also ask if anyone has another solution that works.
 
Finally, follow the steps on your own to make your sun-catcher pieces.

 


♦Check your Accelerated Intro to CS Course Progress

 
 
 
The circles will turn green when they are completed correctly.
 
 
 

 

The Farmer Code Activity

 

In these puzzles, you are a farmer trying to make your field completely flat for crop planting by removing piles of dirt and filling in the holes. You will use functions to tell the farmer how many shovelfuls of dirt to use.
 

Additional Learning Tasks:

 
1) Log in to Edmodo and check notifications for our Coding and Computer Science group. Check your Profile for Edmodo badges earned so far.
 
2) Log in to your Code.org account and work in your Accelerated Intro to CS Course activities.
 
 
3) Explore and study vocabulary words and definitions using the following Quizlet sets:
(Optional: Join our Coding and Computer Science class by clicking here.)
 
(Study Flashcards and play Match game.)
[We will also play Quizlet Live at school.]
 
(Study Flashcards and play Match game.)
[We will also play Quizlet Live at school.]
 
 
4) Check out additional coding apps and resources using your own devices at home.
 

 
 
  Curriculum Attribution: All Accelerated Intro to CS Course lessons are adapted directly from Code.org, an exemplary non-profit organization committed to educating and empowering students, teachers, and parents with essential coding and computer science technology skills.
<print>            <close window>