Programming from Scratch Traveling Circuits

Transcription

Programming from Scratch Traveling Circuits
®
Traveling Circuits
Programming from Scratch
Copyright ©2014 Thinkersmith
PO Box 42186, Eugene, OR, 97404
This Traveling Circuits lesson, “Programming from Scratch”, is owned by Thinkersmith, including all
associated text, artwork, photographs, images, and material preparations.
Thinkersmith hereby grants the purchaser the permission to use, re-use, edit and duplicate any section
of this document for personal and/or individual classroom use only.
No part of this lesson can be re-sold or commercialized in any way without the express written
consent of Thinkersmith. We do not support the distribution, or distribution of adaptations, without
Thinkersmith’s written consent.
All other rights reserved..
Disclaimer
Neither Thinkersmith nor any other party involved in the creation of this curriculum can be held
responsible for damage, mishap, or injury incurred because of this lesson. Adult supervision and
supervisor caution is recommended at all times. When necessary, every effort has been made to
locate copyright and permission information.
Programming from Scratch
Main Goal:
Teach students to construct a program from concept to product.
Overview:
This lesson can be done as two one hour sessions, one two hour session, or four
30 minute sessions.
The first step is to get students familiar with the Scratch program from MIT. This is
accomplished by sending them through a small tutorial before assigning them a
“Magic Answer” type program. Next, we turn the students loose to come up with
their own project, and complete it with little or no instructor help.
Objectives: Students will
• • • • Practice following written directions
Learn to program according to pre-defined guidelines
Engage in brainstorming new software ideas
Take concepts from inception to completion
Materials and Preparation:
Estimated lesson time: 2 hours
Estimated prep time: 20 min
Materials
• Computer with Internet Connection (1 per pair)
• Instruction Pack (1 per pair)
• Scratch pad & pencils (1 per pair)
Preparation
• Complete the Scratch tutorial
• Create a sample “Magic Answers” application
• Print one Instruction Pack for each pair of students
• Create a Scratch account for yourself, and (optionally) get permission from
parents to have students create their own accounts for saving projects.
Key Lesson
Vocabulary:
Algorithm - A series of instructions on how to accomplish a task
Backstage - The area of the screen, below the stage, where characters are listed
Cabinet - The distinct tabs in the center of the Scratch program: Scripts, Costumes, & Sounds
Cabinet Window - The work area to the right of the cabinets
Debugging - Finding and fixing issues in code
Drawers - The categories inside the Scripts tab: Motion, Looks, Sound, etc.
Stage - The area of the Scratch screen where you see the characters acting out their scripts
TRAVELING CIRCUITS - SERIES 1 COMPUTER SCIENCE
© 2013 www.thinkersmith.org
1
Traveling Circuits
TM
Programming from Scratch
Lesson Plan: Part 1 (30 minutes)
Introduce:
This lesson doesn’t require as much presentation and talking as it does selfcontrol and lack of interference. The one thing you may need to cover is how to
use the program itself. Scratch has a simple intro tutorial, but even so, it can be
helpful to give some terminology to the different areas of the screen when using
Scratch.
If you have a way to project your monitor for your students, that is ideal.
Otherwise, have them follow along on their screens, making sure to stop when
you instruct them to do so.
If your students have made accounts, help them get logged in so that they can
save their progress. Otherwise, consider making a class login that everyone can
use.
Have everybody start at the beginning. Let them know that you’re going to
introduce them to the important areas of the screen so that you’re all on the same
page when following instructions.
Beginning in the top left, we have the Stage. That’s where all of the characters act
out their scripts. Just below that is the Backstage area. You can add characters,
delete or duplicate them from that section.
Adjustments:
Grades K-2
• This age group may find Scratch frustrating, depending on reading skills. Encourage
students to follow along with you as you do each instruction step-by-step.
• Using pair programming (two kids per computer) is a good way to get them to try
something before asking for help.
• If you find that Scratch is too difficult for your student, attempt using Scratch Jr. or
Hopscotch.
Grades 3-5
• Pair programming is ideal for this age group.
• You may want to have your sample “Magic Answers” application on screen for
students to emulate during that exercise.
Grades 6+
• You should be able to follow this lesson pretty well as written.
• Encourage students to work on their own computers, if possible, but welcome them
to share ideas.
2
®
Programming from Scratch
In the middle of the screen are three tabs. We will call those Cabinets. When we refer to the
Scripts Cabinet, that means we’ll be working with the window that results when clicking the
Scripts Tab. The same is true for the Costumes Cabinet and the Sounds Cabinet. The window on
the right hand side of the screen that is associated with each tab is called the Cabinet Window.
Now that they are familiar with some terminology, point out the tutorial window in the bottom
right-hand corner. For the remainder of Part 1, they should be encouraged to step through the
tutorial and get to know their various cabinets, drawers, and stages.
Young students may find themselves
getting a little frustrated with all of the
reading and sequential dependencies
of programming. This can be mitigated
by allowing students to play with their
character costumes, backgrounds, and
sounds for a while before carrying on with
the tutorials.
TRAVELING CIRCUITS - SERIES 1 COMPUTER SCIENCE
© 2013 www.thinkersmith.org
3
Traveling Circuits
TM
Programming from Scratch
Lesson Plan: Part 2 (30 minutes)
Introduce:
For this part of the lesson, we’re going to give the students a hybrid between
following a tutorial and making their own magic. Ideally, you will have some
classroom time to introduce the concept behind this exercise.
Our next game is based off of the Magic 8-Ball. You may find that you need to
explain to your class what one of those is. In short, a Magic 8-Ball is an object
with a multi-sided die inside, each side containing a different answer to a yes or
no question. A user would ask a question that they would like answered with
some version of yes or no, then pick up the Magic 8-Ball to look at which answer is
presented.
A sample of possible answers is:
• Yes
• No
• Maybe
• Ask Again Later
Now that the idea of a Magic 8-Ball has been explained, you’re ready to cover the
algorithm for programming one.
Think about the process of using a Magic 8-Ball. Challenge the students to
describe using an 8-Ball, step-by-step. Their list will likely look something like this.
Using 8-Ball:
1) Ask a question
2) Shake 8-Ball to submit question
3) Look at answer the 8-Ball gives
That’s a great description of what the user experiences when using a Magic 8-Ball,
but what is happening from the 8-Ball side? When you program applications,
you need to think about experiences from both sides. With this knowledge, have
the class make a new list of questions describing the process as if they were the
8-ball.
Being 8-Ball:
1) Wait for user to submit a question
2) Respond with random answer
If those steps are all you need to be the 8-Ball, they should also be all you need to
do to create an 8-Ball-like program. We’ll call ours a “Magic Answers” program.
Turn your students loose to attempt to create one on their own. Allow them to
look at yours if they’re stuck, but don’t offer verbal explanation. There is value in
allowing them to trace the blocks back to their cabinet to try to figure out what
they do and why they work so they can customize their own program.
4
®
Programming from Scratch
Letting the students take “detours” (such as playing with costumes and sounds) can refresh
their interest and allow them breaks in tension when they begin to get frustrated by their task.
Lesson Plan: Part 3 (60 minutes)
Introduce:
This is Free Play! You can set a vague goal, like “create a racing game” or “make
something that changes colors”, but in the end you want the students to feel like
they’ve built their own game “from scratch”.
Warn the students that there will likely be a lot of debugging required. It’s rare
to create a program from start to finish without making mistakes every now and
again. This is totally normal, and actually a learning experience all on it’s own!
Depending on the age of the students, 60 minutes in a sitting can be a bit
too much. Take a break every 20 or 30 minutes to stretch and walk around.
Orchestrate a moment during each break to walk about and allow students to
show off to one another what they are doing. If time is short, break this lesson
into two sets of 30 minutes. Such a format also allows students to take more time
to think, reflect, and plan for their program.
If students finish early, allow them to browse http://scratch.mit.edu/explore to see
what other people have done, and modify those projects into something unique.
TRAVELING CIRCUITS - SERIES 1 COMPUTER SCIENCE
© 2013 www.thinkersmith.org
5
For more lessons, please visit
www.thinkersmith.org