If Math Games, Then Hour of Code

Computer Science Education Week is upon us and my first batch of 4th grade Scratch math games are shared.  More will be completed tomorrow.  3rd graders have also been working on math games within my Scratch teacher account. I need to post those on our school website, too.screen-shot-2016-12-04-at-7-39-55-pm

I’ve been noticing a subtle misconception showing up with how my student are using the ask and answer blocks in their math quiz games.  When introducing the ask and answer block, I state that the two blocks work together. I talk about how the ask and wait is a Sensing block and is waiting for the user to type something and that something is held by the answer block.  I specifically say that these blocks come in a pair because I’ve had other issues with students type “answer” in the operator instead of using the answer block.

screen-shot-2016-12-04-at-7-26-27-pm

 

This year, I guess, the students have more complicated scenarios with multiple Sprites in play.  They set up one Sprite to ask the question.

screen-shot-2016-12-04-at-8-20-58-pm

and another Sprite to face the consequences of a right or wrong answer.

screen-shot-2016-12-04-at-6-57-26-pm

The logic seems okay unless you realize that other Sprite is not waiting for the input.  That is subtle for them to understand.

I realize that the answer block is a global variable and can be separated from the ask block. The code below works on a separate Sprite from the one asking.

screen-shot-2016-12-04-at-8-08-30-pm

However, my solution for the students was to create two broadcast messages: “correct” and “incorrect”. The broadcast event block is a powerful tool and a good block to get to know. Fourth grade teams were able to work on separate Sprites and code the ask/answer decisions in one and the receive broadcast events in the other and put them together to make cool projects.

screen-shot-2016-12-04-at-7-38-18-pm

 

Then, of course, there is what happens when you show a certain 4th grader how to make random math fact variables:

screen-shot-2016-12-04-at-6-54-49-pm

Yikes! I’m not sure how Scratch does it, but I love the fail soft aspects that make this a super awesome programming platform for kids.

More about Hour of Code as the week progresses.  I’m really looking forward to the week’s events.

3rd Grade Scratch Game Makers

Screen Shot 2015-12-20 at 9.31.58 PM

The 3rd graders that have been learning Scratch really came through during Computer Science Education Week and produced 11 goofy and wonderful little math games.  Last week we took the time to reflect and give feedback.  I am really impressed with their coding and want to jot down the lessons that occurred so I can repeat this again if I get the chance.

Here’s the list of lessons:

1. Intro to Scratch (Sprite, Stage, events, move, looks) -the basics introduced, time given to explore.

2. Etch-a-sketch (more events, pen)

3. Trick or Treat (if-then-else, ask-answer)

4. Draw Your Initial (coordinate system, glide, pen)   -for this lesson I had in mind to teach the Scratch coordinate system where (0,0) is the center of the screen.  I had them pick a Sprite of their choice and code it to glide around in the shape of their first (or last) initial.  I modeled gliding in a square while they followed first.Screen Shot 2015-12-20 at 9.04.32 PM

I handed out half sheets with the scratch grid on it so they could draw out their initial, figure out the coordinates then add the glide blocks.  Pen down and repeats were added at the end for extra flair.

5. Math game design outline (design sheet)

6. Math game coding (Pair programming)

7. Sharing and giving feedback

My expectation was that they’d code one math questions with two different outcomes like the Trick of Treat lesson.Screen Shot 2015-12-20 at 9.32.12 PM

Only this time they were working in pairs and had to come up with their own theme and math question.  They worked on it for almost two math sessions and then I put them up on the Scratch website.

Screen Shot 2015-12-20 at 10.01.57 PM.png

 

Last week they got to play all the games and give each other feedback. One student thought they were going to get to rate the games and he declared he always gives bad ratings to online games.  Instead I handed out sheets for them to give each game “2 stars and a wish” (This is something I came across in a FutureLearn MOOC on Teaching Computing)

20151220_214303.jpg

Giving good feedback is actually a lot of work.  I asked them to play each game twice, one time get the math question correct and then play it again and give the wrong answer.  Then they had to find two things they liked about the game and one thing they wished it would do differently.  I enjoy this feedback part of the game making.

Oh yeah, 4th graders made math games, too. What a difference a year and a bit of Code Club does to the complexity of the games made.  They also worked on giving 2 stars and a wish feedback this week.

Like a Dream

I taught so many hours of code yesterday that I dreamed in code.  (It was the only way to move in my dream.  Thanks Anna & Elsa.)

Code.org puzzle with Frozen characters

Code.org puzzle with Frozen characters

But it was an awesome day.  Three classes of Hour of Code 2014 activities from Code.org, Tynker, & Code Kingdoms for 2nd and 4th graders plus two classes of Scratch and then Code Club after school.  A few 4th graders were with me for couple of these hours, too. I wonder if they dreamed about coding too?

For Computer Science Education Week, or “Hour of Code” week, I had the 4th grade math group I work with write math games in Scratch.  The project idea comes from the Scratch resources on Computers for Creativity‘s website.  The students were paired up and given two math periods to work on the project.   I showed them the two math games that students had made last year:

4th grade math quiz game in Scratch, 2013

4th grade math quiz game in Scratch, 2013

Screen Shot 2014-12-11 at 8.28.20 PM

4th grade math quiz game in Scratch, 2013

I handed out a one page project outline form and a print out of the guidelines to each pair.

Math Scratch Project Outline – Google Docs

With not very much time to work on it, I warned them to keep the project simple.  Get the game working with one math question, then build on it. I also made sure there was a Code Club member in each pairing, so at least one person had some knowledge of Scratch. I then I let them go.

I set their teacher up on Scratch online and he started a math game himself.  That was Monday.  Yesterday my plan was to have them finish up. My friend and co-worker in this class suggested they might need more time.  She had gone home and tried to make a Scratch math game and had some questions.  (How cool it that?  I’ll have to give both adults their “Hour of Code” certificate.)  But it is true,  I did give the students a big, creative project and only a little bit of time to do it.  From what I saw on Monday, only a couple of pairs were making their game too complicated and or not working well together.  We decided to conference with the each pair during the period to see if they had questions, needed feedback and as a general check-in to see if they were going to make the deadline.  First, though, the students “conferenced” and helped their teacher with his math game.

By the end of math on Wednesday, most of the groups were very close to having a working game.  We decided another half period might be warranted.  Then we’ll share them and try them out.

I heard one student say this coding stuff was great and he wanted to sign up for the next round of Code Club.

Oh, yeah, Code Club was great too. Everyone busy working on their own games.  Recording their voices.  Being successful, or at least satisfied, in drawing their sprites and backgrounds. I really enjoy troubleshooting Scratch projects and seeing all the creative and interesting ideas these 4th graders have.  My volunteers are really great, too.