33. Back to Front


General Description

This program is an old mathematical favourite. Once you get the 'knack' it is easy but for the first years through to the fifth years it has provided great entertainment in trying to get the knack. It is a test of logical thinking.
   You are given a line of numbers, in this case digits 1-9. They can be in any order. The object is to re-order the line of numbers in as few steps as possible using the following rule:
   You specify the number of digits at the left of the line that you wish to reverse from their currently displayed order.
e.g. line of digits >>>   3   2   1   5   6   8   7   9    4
If I specify three digits reversed I will end up with a line line like this:
new line of digits >>>   1   2   3   5   6   8   7   9   4
Then if I specify eight digits reversed I will end up with a line like this:
new lines of digits >>>   9   7   8   6   5   3   2   1   4
If you don't know the puzzle, can't solve it but need to solve it to save losing face in the classroom, the solution is in the educational hints. This program uses sound and colour well. It runs on a Model 'A'.

Detailed Description

   Lines 10-330 Mode 7. Initialises variables, disables cursor, displays titles with sound and waits for user response.
   340-500 Main structure of program. Line 490 checks user's answer.
   510-720 Reverses the required number of digits.
   740-880 Locates the string the user has to solve. Line 830 ensures that no number is repeated.
   920-990 Ask how many numbers required by user (range 2-9).
   1030-1070 Display number of tries.
   1110-1410 Gives example of play.
   1430-1470 Closing credits
   1480-1610 Correct answer procedure and invitation for another game.

Educational Note

This program captivates. I have watched and listened to groups of children in heated discussion about which numbers to reverse, and it gives the lie to the theory that the computer stifles conversation. It can actively encourage discussion amongst young people. The solution by the way is, repeating from the highest digit down to the lowest digit, bring it to the left-hand end of the line before sending it into its final position.
   I would suggest that you can safely use this program for 15 minutes with a group of children before they show signs of restlessness. The only problem is how to lead up in the classroom to using it, and I have tended to offer it as a lesson 'break'.