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.

Scratch Teacher Accounts

I’m testing out the new Scratch Teacher Account option with the 3rd grade math class that I am working with.

screen-shot-2016-11-08-at-9-32-07-pm

The class is using Chromebooks so using Scratch 2.0 offline editor was not an option this time. Luckily I knew that Scratch was offering teacher accounts – I was there when they announced it at the Scratch@MIT Conference 2016.

It wasn’t difficult to set up my teacher account. After I was approved, I had to come up with 20 student account names. I wanted ones that had an easy pattern, were easy to spell, remember and would not identify the students in any way.  I chose a “color-Sprite name” pattern, for example “bluegobo”.

Once I had all 20 accounts set up in my class, I printed out the account names, cut them apart, put them in a jar and had the students draw a random one out.  I have recorded their names & account names together in case someone forgets, and for grading.

After we got logged into the Chromebooks and into their accounts, we started with some of the lessons I did last year with 3rd graders (see 3rd Grade Scratch Game Makers).  I introduced drawing their initial with glides on the coordinate grid earlier than last year and they struggled with both their unfamiliarity with the program and with coordinate grids. I was somewhat disappointed with how the lesson went. I did more troubleshooting than I expected. After the hour lesson as over, I thought I would be able to see their projects but I realize now that I can only see projects they share.  I didn’t think we got far enough in the coordinate grid project to have time to talk about sharing their projects.

I missed a week, but their math teacher had them work in their Scratch accounts even with me not there. She had them create a Halloween scene and said she was impressed that they were able log in and to make the Sprites move around.  I’m impressed that she had them do Scratch without me. But it was a perfect segue into our Trick or Treat lesson on decisions in programming.

This time I remembered to save enough time for them to share and show their projects.

I know some of them didn’t feel they had enough time. But everyone enjoyed seeing their project playing out on the front board.

Note: no one noticed (that I heard) that what you type in has to exactly equal the answer for the “if” part to work.

 

Chatbot Decisions

This week both code clubs did the same project – Code Club World’s Chatbot. I like this one because it is not a game and students can be very creative at asking questions for the user to answer.  My goal was for them to learn about 1) user input, 2) if-then-else and 3) operators. That’s a lot. At a minimum, I think most everyone was able to use the “ask and answer” blocks, the “join” block and try one “if-then-else” block.

Screen Shot 2015-10-25 at 7.45.32 AMScreen Shot 2015-10-25 at 8.38.11 AM

Some were able to add animations at the end which I thought was pretty cool.  Some went back to their previous maze game and added some talking.  Also cool.

Screen Shot 2015-10-25 at 7.09.39 AM Screen Shot 2015-10-25 at 7.08.51 AM

The Wednesday club wore out my high school student with their needs, despite my call for them to ask a neighbor for help first before you ask an adult.Screen Shot 2015-10-25 at 7.50.35 AM

Thursday’s club figured out that if the answer is not typed exactly, then the “else” clause runs.  So if the user types “sure” instead of “yes” the program will think it is wrong.  One student had an extra space in the operator clause, as in answer = “yes “.  That bug took a bit to fix.  Another student was looking for a really big number:

Screen Shot 2015-10-25 at 7.47.21 AM

One of the tricky parts to this lesson is a defining variable and setting the answer to it. The students can follow the directions, but I don’t know that they understand why they are doing that or what it going on.  I have to remember these are pre-pre-algebra students.  Still, they will most likely want to keep track of a score or timer, so for now, they will try it and later we will come back to this concept when they need it in their projects.Screen Shot 2015-10-25 at 7.49.59 AM

While I love the creativity and extensions this project allows for, you do have to set expectations for appropriateness.  I had to ask a few students to change their responses to the questions.  I like to go around and test out their programs, putting my name in as the answer to “What’s your name?”.  When the response is “That’s a dumb name” or something equally as inappropriate, I get a bit disappointed and tell them to change it to something appropriate.  One student responded, “I didn’t think you’d play the game.” He obviously knew he was being inappropriate but was, at least, embarrassed by it.

Here’s one more creative take on Chatbot:Screen Shot 2015-10-25 at 7.15.26 AM Screen Shot 2015-10-25 at 7.15.16 AM