**Basic Math For Fun And Profit**

J.R. Lowell,

Whitehouse Station, NJ

*Editor's Note: Jim Lowell comments in his cover letter: "The program is aimed at parents, elementary level math teachers, and anyone who wants to brush up on basic math skills. I developed it to aid one of my children who has a learning disability. It succeeded in holding his attention over the recommended one-half hour work periods and in eventually improving his skills."*

"Basic Math For Fun And Profit" is an 8K elementary arithmetic program written for the 16K PET with new ROMs. It makes broad use of the PET's non-destructive cursor, excellent graphics, and programmable sound (with a suitable amplifier).

Though there are many basic math programs available today, each has its own particular shortcomings. One variety treats only a single math mode (addition or subtraction or multiplication or division) in each program. A second may offer all modes in a single program, but randomly choose the level of difficulty for the problems. Others force large numbers of problems in one mode before allowing a new mode to be chosen.

**Program Feature Overview**

"Basic Math For Fun And Profit" not only overcomes these problems, it also provides a whole host of unique features which make it both easy and fun to use:

**Menu selection** for the four math modes;

**level-of-difficulty selection** in each mode;

**mode and level change** opportunity every 10 problems;

**right-to-left entry of answer** (just like on paper);

**Two chances, with prompts,** per problem;

**sound effects** for prompts and rewards;

**randomly generated reward statements;**

**graphics reward** for 10 out of 10 correct answers;

**first-name personalization** throughout program.

Let's look at the program features in more detail.

**Math Mode And Skill Level Selection**

After entering his or her name, the program gives the user a menu choice of the four math modes. As soon as a choice is entered (using a "GET" statement), the computer asks for the desired skill level: one to four digits in the problems.

**Problem Sets And Prompts (addition, subtraction, multiplication)**

The computer now generates — one at a time — 10 randomly configured problems in the chosen mode. The program uses two random problem generators: lines 269-293 for all modes except division and lines 294-316 for division.

Once an answer is entered and RETURN pushed, the computer either rewards or prompts the user. The reward is **a** pulsing laser-type sound effect plus one of four randomly selected "atta-a-person" statements. The prompts, like the rewards, have two parts that are mutually reinforcing. If the user's answer is too low a low tone is generated followed by a statement to the same effect. A high tone and statement follows too large an answer. In the case of **a** wrong answer, the program gives a second chance. A correct answer now receives the same reward as an initial right answer; a second error gets the appropriate "too high/low" sound and statement followed by the correct answer. The computer then generates a new problem.

**Problem Sets And Prompts (Division)**

As above, the computer generates 10 problems at the desired skill level. The prompt system, however, is a bit different because each division problem has two parts: the quotient and the remainder. When the quotient is too high, too low, or correct, the same sounds and statements are generated as in the other modes. If the quotient is correct, but the remainder is wrong, however, a new set of high/low sounds and statements is given. As above, a second chance is provided before the correct answer is given.

**Answer Format And Correction**

The sub-routine in lines 907-931 is included to make the program as compatible with paper and pencil math as possible. It allows the user to enter his or her answers from right to left as is taught in most math classes. As long as the RETURN key isn't pressed, the answer can be corrected. This routine makes full use of the PET's GET and STRING capabilities.

In division problems the quotient and remainder answers are entered separately to allow for individual corrections.

**Problem Set Scores And The Ultimate Reward**

After each problem set, the computer gives the number correct and asks if the user wants another set of problems. If the answer is "yes", the program again presents the menu. If the answer is "no", the program thanks the user and ENDs.

If the user has achieved a perfect score — 10 out of 10 — the PET goes "wild": the screen goes blank; a siren sounds; the screen then announces in 3-D letters, "WOW 10." As above, the user can then choose whether or not to continue with a new problem set.

**Minus And Pluses**

First the minus. If you decide to type up this program, you have about five solid hours of work ahead of you (including debugging any slips in digital dexterity you might make). On the other hand, however, I believe, if you have a need for a really good, complete basic math program, the work will be more than worth it. The major pluses are:

Kids love the program. Compared with the drudgery of paper work alone, the "whistles and bells" provided by this program make math fun.

Kids like the personalization of both the instructions and rewards.

Even mistakes aren't too painful to the user since both sound effects and written prompts are provided to help.

In a one-half hour session, the user can work in several modes at different levels (avoiding the boredom of unchanging masses of single mode problems).

And last, but not least, if you belong to a computer club, you'll be a hero for providing the membership with one of the best basic math programs available for the PET.

Happy typing, and for your kids, happy learning.