Logotron educational software. Partners with the teaching profession - Pioneers in Learning
menubar search this site my shopping cart support products about home
 

Step by Step Instructions

Plan | Step 1 | Step 2Step 3 | Step 4Step 5| Step 6

Plan Your Steps First!

 

This project will help you to create an activity where you can practice counting using coins.

Here is how the activity works.

Clicking on the 'New' button starts a new activity. The computer generates an amount to pay (being any number between 1 and 100). In this example, it is 69 pence.

The yellow area is the 'counting area' where coins are dragged into to be counted by the computer. Once an amount has been dragged into the yellow area, the 'OK?' button must be clicked. If the amount of money is correct, then the computer displays 'OK'. If not, then the message 'Wrong' is displayed.

The creation of the activity is in two parts - firstly all the graphic elements such as the coins, buttons and text boxes must be created. Logo procedures are then added to this structure to make the activity work.

To download an Imagine file of this activity right click here. Then choose the 'Save' option.

Back to top

Step 1 - Creating the background for your activity

Click on the icon of the multi-coloured turtle on the toolbar. This will display the Paint Bar.
 

Create a yellow rectangle. This will be the area to which coins are dragged to be counted by the computer.

Select the yellow colour from the palette. You can change the hue of this colour by clicking on the slider and dragging it left or right. Experiment to see how the colour changes.

 

Click and choose the filled rectangle tool. Click on the screen and drag out the required box shape.

 
Make the rest of the screen green (or any other colour you wish to choose). Select a colour from the palette and then click on the Paint Fill tool. Click anywhere on the white area and the whole screen around the yellow rectangle will change colour.
 

Back to top

Step 2 - Adding Turtles to the activity and changing their shape

All the coins in this activity are turtles. In the centre of your screen you will see just one. Here you will learn how to change its shape, name, and position on the screen.

To change a turtle's position on the screen is easy. Move the turtle by right clicking on it with the mouse button and choosing 'Move t1'. The cursor changes into a hand tool that allows you to reposition the turtle anywhere.

In this activity all the turtles need to be positioned at the top of the screen on the green background and away from the yellow rectangle.

 

To change the appearance of the turtle click on the turtle with the right mouse button and choose 'Change t1' from the drop-down menu.

 

Click on the 'Set Shape...' button and locate the images folder in which you will find a graphic folder called 'Coins'. In here you will find images of coins already created for you.

If you click on one of the listed .LGFs, a preview of the graphic should appear on the right-hand side of the window. Here you can see that a 1 pence graphic has been chosen.

Click on the Open button to confirm your selection.

 

In the 'Change t1' dialogue:

  • Select the 'Basics' tab. Give your turtle a new name. This can be anything you choose.
  • Untick the 'Pen down' box in the 'Basics' tab section. This will allow the turtle to move around the screen WITHOUT drawing a line (the standard setting for a logo turtle).
  • Select the 'Shape' tab. Make sure that the 'Auto Drag' box is ticked. This will let your turtle move freely round the screen when it is clicked on (without having to right click and bring up the dialogue box each time to make it move).
 

Go to the 'Position' tab of the 'Change t1' dialogue. This will allow you to specify co-ordinates for your turtle's screen position. Click on the 'Set Current' button. This means that the turtle will always appear in the same place on the screen when the activity is loaded into Imagine Logo.

Click 'OK' to exit the dialogue.

 

Back to top

Step 3 - Copying a turtle and adding more turtles

You may decide that you need several of the same coins/turtles. An easy way to do this is to copy and paste your initial coin/turtle.

Click on the turtle/coin with the right mouse button. From the menu list that appears choose the option 'Copy to Clipboard'.

Click on the background with the right mouse button. From the menu list that appears choose the option 'Paste from Clipboard' to create your duplicate turtle on the screen.

For new coins/turtles, go to the Toolbar and click on the 'New Turtle' icon. Your cursor will change into the shape of an outlined turtle. When Click on the background screen and a turtle icon will appear.

To change its shape, you will have to repeat 'Step 2' above and create as many coins as you need. In the project shown here, there is a 1 pence, two 2 pences, one 5 pence, one 10 pence, two 20 pences and a 50 pence. The coins are named 1a, 2a, 2b, 5a, 10a, 20a, 20b and 50a respectively.

Back to top

Step 4 - Adding text to your activity

To add text, go to the Toolbar and click on the 'New Text Box' icon. Your cursor will change into the shape of an outlined letter 'a'.

Click on the background with the left mouse button and, holding the button down, drag out a text box.


 

A dialogue box will appear allowing you to set the font type, size, colour and style (bold, italic, underlined). DO NOT TYPE ANYTHING INTO THIS BOX. You are simply setting the style of its content. This will become clear at a later stage.

Once you are happy with the look of your text, click on the Close button in the top right hand corner of the dialogue box.

 

You will need to create two such text boxes; the first will display the computer-generated amount to pay, and the second will show an outcome message of either 'OK' or 'Wrong'.

Use copy and paste to create the second text box.

Click on the first text box with the right mouse button. From the menus list that appears choose 'Paste to Clipboard'. Click on the background with the right mouse button and choose 'Paste from the Clipboard' from the menu list.

 

Back to top

Step 5 - Creating buttons, adding procedures to them, and adding them to your activity

To add a button, go to the Toolbar and click on the 'New Button' icon. Your cursor will change into the shape of an outlined rectangle.

Click on the background with the left mouse button to create a square button called 'b1'.




 

Click on the button with the right mouse button. From the menu list choose 'Change b1'.

You are going to give this button a procedure - that is a command. This button, when clicked on, will start the activity and generate the question (i.e. the number of pence the user must collect in the yellow rectangle using the coins).

 

Make sure that the 'Basics' tab is selected in the 'Change b1' dialogue box.

On the 'Caption' line type 'New'. This is the word that will appear on the button.

In the 'Events' section for 'onPush' type 'newGame'. The 'newGame' procedure will run when your button is clicked.

 
 

The procedure that you are going to create will do three things:

  • it makes sure that all the coins are at their home positions when a new activity begins.
  • it hides text2 (this being the outcome message of 'OK' or 'Wrong'
  • it generates a number between 1 and 100 and displays it (the question) in the text1 box.

In the 'Change b1' dialogue select the 'Procedures' tab.

Click the 'Add' button.

In the 'Add procedure' dialogue write the name of the new procedure 'newGame'. Then click 'OK'.

In the new window that has opened, type the following code:

to newGame
home
text2'hideMe
text1setValue 1+random 100
end

Close the window by clicking on 'OK'.

 

If you now look at the button you have created, you will see that it now displays the word 'New' rather than its original name of 'b1'.

You may wish to enlarge the 'New' button to make it easier to click on. This is also good practice if, in the future, you want a longer sentence displayed on the button.

To enlarge the size of a button click on the 'Ctrl' key on your keyboard and, at the same time, click with the right mouse button on the 'New' button itself. A cursor will appear in the bottom right-hand corner of your button. This allows you to drag the button rectangle until it is the size you want.

In the Command line at the bottom of the Imagine Logo screen type:

tell all

... to make all the turtles active.

You are now ready to try out the 'New' button.

 

A second button is also needed.

Choose the 'New button' option from the Toolbar and create a button on the screen background. This button will be called 'b2'.

 

Click on 'b2' with the right mouse button. From the menu list choose 'Change b2'.

You are going to give this button a procedure - that is a command. This button, when clicked on, will count the value of the coins in the yellow rectangle and then issue the outcome message of 'OK' or 'Wrong'.

 

In both the 'Caption' option and the 'onPush' event option type:

OK?

 
 

The procedure that you are going to create will do three things:

  • it counts the coins inside the yellow rectangle
  • it compares the sum of the value of text1 with the value of the coins in the rectangle and...
    • if they are equal, it writes 'OK' to text2
    • if they are not equal, it writes 'WRONG' to text2
  • it shows the outcome message in the text2 box

In the 'Change b2' dialogue select the Procedures tab.

Click the 'Add' button.

In the 'Add procedure' dialogue write the name of the new procedure 'ok?'. Then click 'OK'.

In the new window that has opened, type the following code:

to ok?
let "p 0
each
[if doColour="yellow11
[make "p :p+butLast myName]]
ifElse :p=text1
[text2'setValue "OK]
[text2'setValue "Wrong]
text2'showMe
end

Close the window by clicking on 'OK'.

 

Back to top

Step 6 - Running the software and making other changes

 

Your activity is now finished and ready to run.

  To make the activity easier or harder, change the number '100' in procedure 'newGame'.
  You can have more coins in your project if you wish - see Step 3; don't forget to write the command 'Tell all' to make all the turtles active.

 
   
  back to top