Trick or Treat

Today was the second Scratch session with a 3rd grade math class and it was a blast.  Last week I introduced Scratch to them and they also tried out the Etch-a-sketch project from Simon Haughton’s Scratch Progamming lessons.   Some of them spent some time during the week playing with Scratch during free time in math class.

This week I wanted to introduce the “ask and answer” blocks and “if-then-else” so I came up with this Trick or Treat lesson, just in time for Halloween.

First I verbally asked them “Trick or Treat?” Most of them said, “treat” of course.  Then we brainstormed what a “treat” would look like in Scratch – do something (animation), change the costume, say something, play a sound.  They of course had big ideas like candy falling from the sky or the Sprite eating a pile of candy.  I tried to translate that into more programable language.  Then we brainstormed what a “trick” would look like.

I showed them my sample project where a ghost asks “Trick or Treat” and if you say “treat” he turns into a bowl of cheesepuffs otherwise he turns into a scary ghost.  I also had different sounds and a bit of animation (the Sprite turns and grows).

Next it was their turn. I directed them to picked a background for the stage and a Sprite.  Their choice.  We had a lot of ghost and ghouls, but quite a variety of backgrounds.

Screen Shot 2015-10-27 at 9.25.50 PM

Then they asked the question “Trick or Treat?” and set up the answer to equal trick or treat.  Also their choice.Screen Shot 2015-10-27 at 9.28.58 PM

We tested it and they noted it didn’t do anything. Well, not yet.  So we added a “say” block for each condition depending on if what they were looking for, trick or treat, and the opposite in the else clause.

Then I had them add two sounds, one for each condition.  In hindsight, I should have saved the sounds for last as noise level went up both from excitement and the random sounds playing in the room.

Screen Shot 2015-10-27 at 9.08.07 PM

Finally we added some costumes to the Sprite, one for each condition.  (There was a bit of confusion here because we weren’t adding more Sprites but costumes to our Sprite.)

Screen Shot 2015-10-27 at 9.41.58 PM

That was it, with just enough time to share their work. Their math teacher suggested this and it turned out to be a great idea. The projects were saved in a shared directory and all the laptops were closed and I displayed each project up on the screen for all to enjoy.  When it was their turn, I asked the project creator if they wanted me to answer “trick” or “treat” first, then played both cases for all their classmates to see. Screen Shot 2015-10-27 at 9.21.32 PM

I’m very pleased with how this project went with this group of 3rd graders.  I would definitely do it again- just have them add sound last.

Advertisements

If Ask, Then Answer

Last week was the first week with the full complement of code club members, new and returning.  We filled the computer lab again.  I had a Code Club World project that was new to all of them called Chatbot. I picked this Scratch project because it introduces “ask and answer” code blocks and “if statement” code blocks. Also, the project wasn’t your typical video game.

Chatbot is a new project that has just come out of “beta” testing so it used some aspects of Scratch 2.0 that aren’t available to us as our lab has version Scratch 1.4 installed.  For example the characters the project says to choose from are all 2.0 sprites.

Sprites from Scratch 2.0

Sprites from Scratch 2.0

So I wrote a couple of my own versions of the project to demo to the students and let the students pick a sprite of their choice for the project.

Chatbot Star, a Scratch ver 1.4 demo project

Chatbot Star, a Scratch ver 1.4 demo project

Screen Shot 2015-02-01 at 11.45.03 AM

Another demo of mine

It seemed to be a basic project that with a bit of creativity on the student’s part could become really fun.

I also liked that the project introduced the “join” block.  It reminds me of the Java print command.  The students noticed that if you want a space between the things you are joining, like words and the name variable, you have to actually add it.

Join blocks in action

Join blocks in action.

The project didn’t take too long.  Some students were finished and wanted to work on last weeks projects or projects from the first session, others were really getting creative with Chatbot.

Alex, my high school volunteer, and I were noticing how smoothly things were going.  There was energy in the room, but it was all focused on the tasks at hand. We stopped to enjoy the moment where everyone was enjoying themselves and playing with Scratch.

My husband asked if anyone asked the question “What’s your favorite color?” and had the Sprite change it’s color effect to match the answer.  What a cool idea.  I’m not sure how to do cases in Scratch, so I just went with if statements.  I’ll ask my high school student volunteers (yes, I’ve got a second high school student this term). It’s very exciting.

Favorite color cases

Favorite color cases

Here are a couple of innovative Chatbots from Code Club students last week:

Screen Shot 2015-02-03 at 10.00.33 PM

This coder drew her own Sprite like Scratch 2.0 Tera with different costumes for different emotions.

Extensive conversation from a veteran coder

Extensive conversation from a veteran coder