Author: Mr Stratton

Computing teacher and a PT at Coltness High School.

It’s a snake!

Today’s task was create a game like Snake. The snake would draw a line as it moved around the screen. Objects to be collected would appear at random places. If the snake touched it’s tail it would lose a life.

We broke down this task as a class into the following manageable pieces.

  1. Move the snake (like the etch-a-sketch program)
  2. Detect if you touch its tail (Maze program)
  3. Display objects and keep score (Maze program)

There are lots of solutions, so give it a shot.

Thursday’s brain tickler

Create a program that simulates an electronic till.

The operator must enter the pin 1066 to get access before entering all of the items in the basket (3 baskets below). To finish a basket the operator enters a price of zero, the program will then display the total and ask for the cash tendered before displaying the change and going on to the next basket.

Basket 1 Basket 2 Basket 3
£0.67

£0.99

£0.34

£0.99

£0.78

£0.65

£0.12

£0.15

£1.99

£12.99

£1.50

£5.43

£8.99

£0.54

£1.99

£0.01

£18.99

£192

£67.50

£24.99

Kodu Day!

We spent the last day of the term using Kodu to make some computer games. This is a great development tool that gives you results straight away. There are a lot of built in tutorials within the game and a number of websites, that will help you to learn it as well.

However, the best way to learn to use Kodu is just to try it out and look at other people’s worlds. Remember for this YouTube could help you out.

[kml_flashembed movie="http://www.youtube.com/v/8-FjskAHgN0" width="425" height="344" allowfullscreen="true" fvars="fs=1" /]

Loops and IF Statement Revision

After last weeks struggle over the IF statement and REPEAT loops, I thought a little refresher might be in order.

Today’s lesson was taken from the Scratch Your Nose website. We opened the Pong tutorial and followed it to create the game. Time was spent in the lesson looking at the roles Variables, the IF statement and REPEAT loops had in the program.

We then went on to expand the game but increasing the difficulty and adding sound.

Extension tasks after the break.

Read more

Scratch revision task

You have to create a program that generates a random number between 1 and 15. The user has to make as many guesses as they need to get the correct number. To make it easier on the user, the computer will tell them if each guess is higher or lower.

  • Task 1 – Design the program (Completed below)
  • Task 2 – Implement the program in scratch
  • Task 3 – Test the program

Read more