In my syllabus, we have done a reasonable amount of programming, using Scratch, Kodu, Code.org and many other resources along the way, but a lot of this is teacher led. For some of the Micro:Bit projects, I think it is important that I begin to get the children to plot and scheme their way to an answer.
As soon as I showed the 'Shake' sensor in the previous lesson, the children talked about making dice. Seizing on this opportunity to create items that they would like to do, I devised a very quick and easy die. Takes about 30 minutes to make, if the children are encouraged to think about the next step each time.
First off, creating the random number using the shake.
Cue discussions about why we only create a number from 0 to 5 and not make 6 the highest. (Really useful to get them to understand that computers start counting at 0, not 1 like us.)
Next came MY input which was to store the number as a variable. We had discussed variables in the past, but using one was not a natural experience.
The final part, guided by me, was to manufacture a way by which the screen would show the number like they would see on dice. We had a good discussion about this, slowly giving enough information that they came up with the following use of the 'IF' statement to state that IF the random number is = 0, then is should show just the 1 dot.
From here, completing the die was easy. Just duplicate the IF statement and adapt it for all 6 numbers...
With the dice completed, came the next idea and the next question... could we play Higher Or Lower with this? Or a game where you were out, if you rolled the same number as someone else. A kind of elimination game.
Higher Or Lower next post.
No comments:
Post a Comment