I'm making a generator of simple addition examples to help a child learn his arithmetics.
I have two fields where random integers are generated, meant as operands for the addition. They use this formula:
=INT(RAND()*(D2-B2)+B2)
where B2 and D2 are the min and max for the range of the operands.
I also have an empty field where the child will type his answer. Another field displays an OK or NO depending on whether that answer is equal to the sum of the two operands:
=IF(C6=B4+D4;"OK";"NO")
where B4 and D4 are the operands, and C6 is the child's answer. The whole setup can of course be modified to teach subtraction, multiplication or division.
The problem is, as the answer is typed, OpenOffice Calc recalculates the whole sheet and the two random operands are generated anew, so the answer is almost always wrong - because obviously it's not generally equal to the sum of the new values.
How can I dissociate the reaction to typing the answer from the regeneration of the random operands?
Ideally, I'd like the operands to only regenerate when some kind of button is pushed, and not when the answer is typed in.
Aucun commentaire:
Enregistrer un commentaire