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
Revision 1.1 1999/03/14 07:44:35 abigail
The Perl implementation of arithmetic was written by Abigail, firstname.lastname@example.org.
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.
To install PerlPowerTools, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell
For more information on module installation, please visit the detailed CPAN module installation guide.