Classic Computer Magazine Archive COMPUTE! ISSUE 48 / MAY 1984 / PAGE 88


Soon Sivakumaran

By making simple selections from a menu, a child can change this arithmetic drill to fit his or her own tutoring needs. Written for the unexpanded VIC, versions also are included for the Commodore 64, Atari, TI-99/4A, Color Computer, Apple, IBM PC, and PCjr.

"Snertle" is designed to help teach children the fundamentals of addition, subtraction, and multiplication. A turtle named Snertle is drawn on the screen to give encouragement and assistance to the player.

An Individual Challenge

Snertle allows children to tailor math problems to fit their individual abilities and weaknesses. Snertle first asks the child to select addition, subtraction, or multiplication problems. If addition or subtraction is selected, the child is then asked to choose the largest and smallest numbers to be used in creating the problems. The largest number that can be chosen is 99 and the smallest number is zero.

If multiplication is chosen, the child can decide to practice a certain "times table," or solve problems created randomly from 0 through the 14 times table.

For example, if the 12 times table is selected, then one number in each question created will always be 12. The other number will be randomly selected from the range 0–14.

If the child chooses to attempt random multiplication problems, he or she must define the range of numbers (within the limits of 0 and 14) from which the problems can be created, similar to the process for random addition or subtraction problems.

Creating The Screen

In Program 1, once the necessary information is entered, the turtle's image is POKEd onto the screen. The two numbers used in the problem are chosen in lines 305, 315, and 1070. The numbers are then displayed on the screen, each digit being four regular characters high and three wide. The large character set is created in a series of subroutines in lines 500–990.

The larger number is always displayed above the smaller number to avoid negative answers to subtraction problems. The appropriate sign for addition, subtraction, or multiplication is drawn on the screen by a subroutine beginning at line 6000. Next, a horizontal line is drawn under the numbers.

Line 394 contains a FOR-NEXT loop that clears the keyboard buffer. This prevents the child from accidentally entering data while the turtle and the problem are being put on the screen.

Another FOR-NEXT loop in lines 395–420 enters the user's response to the problem. Because a GET statement is used, the RETURN key does not have to be pressed when entering the response. An arrow will appear at the bottom of the screen to prompt for each digit of the response.

The Turtle Smiles

Once the response is entered, Snertle checks it against the correct answer. If the child's response is correct the turtle will smile, GOOD! will appear on its shell, and a high beep will sound. If the response is incorrect, Snertle the turtle's head will disappear into his shell and the message TRY AGAIN will appear on his side.

The user will be given a second chance. If the new response is correct, Snertle will poke his head out from his shell. If the answer is again incorrect, the correct answer will be displayed on the screen.

The program will keep producing problems until the X key is pressed in response to a problem. The percentage of correctly answered questions is then calculated in line 410, and displayed. This percentage only includes problems answered correctly on the first attempt. Snertle then returns to the menu where the child may END the program or select more problems.

Program 1 uses all but 84 bytes of the unex-panded VIC's memory.

A subtraction problem—"Snertle" for VIC. Other versions Similar