| | | |

Fizz Buzz Scratch

The title sounds like a nasty affliction – but I actually want to describe a great lesson!

I was looking for a nice challenge for my Year 9 Computing class to continue developing their understanding of variables, if statements and loops – ideally moving on to nested statements and loops.

As ever Twitter came to the rescue when politely asked.

FizzBuzz was a great idea, having already built a program myself this year on Codecademy I knew it could step nicely through the required skills and work fine in Scratch.

I decided to break this into 4 challenges so that I could scaffold the learning a little for the group, their challenge was to :

  1. Build a program that asked for an input number and then either repeated the number or said ‘Fizz’ if it was a multiple of 3.
  2. Extend so that multiples of 5 reply ‘Buzz’.
  3. Extend so that multiples of 3 and 5 return ‘FizzBuzz!’
  4. Change program so that rather than returning just one value it counts up from 1 to a user inputted number.

This turned out to work really well – particularly part 3. Students tended to duplicate code and check sequentially for the different multiples. Meaning that an entry of 15 would often output all three responses. When I pushed students to adapt their program to return just ‘FizzBuzz’ in this case they began to think in depth about how their If then Else statements worked and to experiment with nesting the statements. Finally part for introduced loops to their previous work.

By then end students had a great understanding of how and why you would nest statements and a much better idea of when a program would cease based on a True If statement and when it would continue.

Here’s an example of a finished Scratch program:

Fizz Buzz Scratch Code

Next steps for this class are to do this all again but with some real code this time. We’re going to work through the Javascript Fundamentals course on www.codecademy.com and tackle the Fizz Buzz challenge there. That will pretty much wrap up their taster of GCSE Computing – hopefully it’ll have some of them hooked and they’ll choose to take the course in Year 10.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *