Skip to Content

Teaching elementary students about variables...

« Teaching with Scratch
7 replies [Last post]
Dimitris Nikolos
Member

Variables appear in Scratch curricula for elementary students ( http://scratched.media.mit.edu/discussions/teaching-scratch/introductory-scratch-based-curriculum-elementary-aged-children-recommen ).

Have you ever teached variables to elementary students; What was your approach; How did it go;

Replies
Dimitris Nikolos
Member

Thank you all for your response...

I would like to add an interesting response to the @ScratchEdTeam tweet about this question (Thanks @ScratchEdTeam btw):

@KarlBarrs "@ScratchEdTeam I have used Variables for the usual 'lives' and 'timers' but my favourite use was to give a game variable difficulty :-)"

Gathering from the responses, some approaches to variables introduction are:

1. Game scenarios: Variables as scores/lives in the beginning and timers/difficulty later on

2. The ready-made "Answer" variable

3. More complex problems like "clocks" and "calculators"

 

 

 

 

susan evans
Member

I have taught 3rd graders using Scratch before and I have found that starting with a score variable is the easiest way to get them engaged since most of them know what a score is and know what they want it to do ahead of time. There is no hurdle of trying to explain why we want the variable and why it is useful. This also makes it easy to reenforce resetting the variable at the beginning since most students want their score to reset to zero at the beginning.

Dimitris Pantazopoulos
Member

Based on the fact that students are usually "afraid" of variables -either because of their dull names (x) or their arithmetic values, I think an easy way to teach them is using the following very simple Scratch scenarion:

Scratch dialogue

where "answer" is indeed a variable with a very nice, human-friendly name and an obvious value!

My students even got to love the math variables ;)

susan evans
Member

 I totally agree, these chat-bot type lessons are also very intuitive for students.

Harry Roxberry
Member

You should explain what a variable is in both uses, math and science.

 

A variable is aan unknown and can be anything.

 

In computer science, variables are used to hold temporary/changing data.

 

Using the variable "i" as a counter in a loop is a basic use; but demonstrates the temporary and changing data structure of a variable.

But variables can hold other data types also; words/text, booleans(true/false, on/off, 0/1,..) and can be very usefuls in programming.

One Scratch project I developed for teaching is a clock. (This can be viewed and downloaded on the scratch site at http://scratch.mit.edu/projects/TinkerZone/2025446) This clock uses 8 variable throughout the scripts. The clocks movement and time keeping is math and scripting. If you download the program and study it, you will see how I used the variables throughout to accomplish this.The clock actually keeps time reasonably well. (especially since there is no connection between it and the system clock)

 

Other uses for variable involve user interaction. Certain user input should be held by a variable. a calculator is a good example of using variables. When you input the first number it is assigned to a variable. Then you choose an operation and input a second number which is held by another variable.  Then the calculation is done and the answer is stored in another variable.  If the calculator stored these input values permanently, the application would eventually become unusable due to size.  By storing temporary information in a variable, the program remains intact and the temp information is deleted when it is not needed.

 

If you open a Word doc and start typing, everything you type will be placed into a variable(s) until it is no longer needed or saved. The blank document that is created when you open the program is being held in variable until it is saved or deleted.

 

OK. I got long winded. Sorry. :)

 

I hope I have helped to shed some light upon variable and the uses and reasons.

 

 

Dimitris Nikolos
Member

Thank you Teresa,

It is very helpful.

Dimitris

Teresa Ferrer
Member

 I have been teaching 7th grade students (so they are nor really elementary..) to use variables trough scratch. What I did , was to let them discover how to create a new one and how to call it when they wanted to use it, I remember using counters basically.

 

The truth it is that they didn´t find it difficult at all, it was a  natural step that they took, when they were "advanced" users, like after a semester.

Hope this helps,

 

Teresa