arithmetic - improve your arithmetic skills
arithmetic [-o +-x/] [-r range]
arithmetic prompts you with simple arithmetic exercises, and verifies your answers. arithmetic will reply with Right! if you answered correctly, and with What? if you answered incorrectly. If arithmetic thinks your answer is not a number, it will respond with Please type a number! and repeat the exercise.
After 20 questions, arithmetic will tell you how many exercises you answered correctly, and how much time it took. Interrupting the game triggers the same reports; the game is then terminated.
If you answer an exercise incorrectly, arithmetic will remember the numbers involved, and favour those over others.
arithmetic accepts the following options:
By default, arithmetic only asks addition exercises. By giving the -o option, arithmetic will randomly choose from the given operators. If an operator is given multiple times, that operator will be picked more often. The more it is repeated, the more it will be picked.
For addition and multiplication, arithmetic will pick both operands in the range from 0 to range, inclusively. For subtraction and division, both the answer, and the right operand will be in this range. The default range is 10.
The working of arithmetic is not influenced by any environment variables.
This implementation of arithmetic does not respect the end of file character.
$Log: arithmetic,v $ Revision 1.2 2004/08/05 14:17:43 cwest cleanup, new version number on website Revision 1.1 2004/07/23 20:09:59 cwest initial import Revision 1.1 1999/03/14 07:44:35 abigail Initial revision
The Perl implementation of arithmetic was written by Abigail, email@example.com.
This program is copyright by Abigail 1999.
This program is free and open software. You may use, copy, modify, distribute, and sell this program (and any modified variants) in any way you wish, provided you do not restrict others from doing the same.