Math Worksheet Generator
Background
My best friend tests his 5 year old basic math questions from store-bought material which is good for one time use (his son memorizes the answers) …. but he wants to give him more practice.
Two solutions:
- keep buying more one time usage materials (less beer budget); or
- make question sets with the number pairs and calculate the answer for each question manually (less beer time)
Not ideal.
That's the reason for me to look into an automate way to get the job done.
Benefit of the Math Worksheet Generator
With the Maths Worksheet Generator, you can create a PDF with unique questions, as needed, in a fraction of second.
There are four choices:
- Addition
- Subtraction
- Multiplication
- Mixed
Requirements
How to Use
- Generate the worksheet in pdf format with the following command:
python3 run.py --type [+|-|x|mix] --digits [1|2|3]
For addition only worksheet, use the following command:
python3 run.py --type +
For calculation up to 3 digit range, use the following command:
python3 run.py --digits 3
-
Print out the generated file
worksheet.pdf
-
You can generate more questions by editing the parameter
total_question
underrun.py
Sample
Code Overview
Everything is written in python in run.py
. You can play with the font and grid size with the variables under the # Basic settings
section.
Contributing
I appreciate all suggestions or PRs which will help kids learn math better. Feel free to fork the project and create a pull request with your idea.
TODO
- Add date/name/score section to the front page
- Add support for Division
- Pass in the number of questions with a flag (currently the default is 80)
Special Thanks
My long time friend San for the inspiration of this project and lovely sons Tim and Hin. Thanks thedanimal for reviewing this README and adding new features.