1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Hi Guest, welcome to the TES Community!

    Connect with like-minded education professionals and have your say on the issues that matter to you.

    Don't forget to look at the how to guide.

    Dismiss Notice

Idiot alert - Primary scratch quiz seeking wisdom...

Discussion in 'Computing and ICT' started by slingshotsally, Sep 27, 2015.

  1. slingshotsally

    slingshotsally Star commenter

    Hi all,

    Be merciful.. this is first time I have posted on this forum..

    Question : re defining variable "Do I HAVE to?"

    I will and of course should be hung drawn and quartered for asking this were I teaching KS3 children...

    But I am teaching Y4 who can just about understand "if... then... else"

    eg if answer is 5 then clap else show try again.

    How do I teach variables effectively without f***ing up?

    Any advice given would be brilliant- I have only 2 children in a class of 30 who are able to understand variables at the moment.

    I know that at least 3 quarters of the class can do the if...then...else statements and are there for able to succeed in creating a quiz (which is the end product of this unit)

    Regards
    sss
     
  2. tjra

    tjra Occasional commenter

    I think it's a perfectly valid question actually.

    I gave my KS3 a very simple maze with a background drawn on in a single colour. There is a blob at the end in a different colour and they can direct a character up/down/left/right. The two selections are "if touching RED THEN move to x: y" (ie: resets the character) and "if touching YELLOW then switch to next background" (ie: move to next level). They all constructed this for their first lesson and were required to extend it in a number of different ways, to show they understood what sequencing was.

    For the second lesson (the variables), I asked them to add a counter for 'number of attempts' so that every time the character touched the wall, it went up. They were shown how to do this. They then were asked to add to it in a way of their choice - suggestions were that the character gets smaller for each attempt (to make it easier), the player gets a score which is reduced for each attempt, the player has a timer etc etc. It's a really basic introduction but it showed them what a variable was.
     
  3. JaquesJaquesLiverot

    JaquesJaquesLiverot Established commenter

    Why don't you try it? Create a variable, but don't set the value, and try to "say" it, for example.

    I haven't tried Scratch, but generally the results vary according to the language used - I seem to recall the BASIC variables are 0 (for numbers) or "" (for strings), but Python variables are "undefined" until you give them a value.
     
  4. JaquesJaquesLiverot

    JaquesJaquesLiverot Established commenter

    I've just tried that, and undefined variables have a value of zero. The curious thing about Scratch, though, is that the values of variables persist, so that next time you run the program it starts with the variables having the values that they had at the end of the previous run.

    Because (or, in fact, regardless) of that, I'd say that it's good practice to define your variables before you use them. Some languages (e.g. C/C++, Java, Visual Basic is you use "option explicit") also require you to declare your variables before you use them - I suppose that, in a way, you're doing that in Scratch when you create them in the Data section.
     
  5. lorrainecespedes

    lorrainecespedes New commenter

    Teachers Guide Scratch Beginners written by Nichola Wilkin 2014 there are other publications for Scratch that go into more detail
     
  6. JaquesJaquesLiverot

    JaquesJaquesLiverot Established commenter

Share This Page