Namishu Arithmetic
Printable arithmetic worksheets for integers, fractions, and decimals.
English · 简体中文
Quick start · Level catalog · Commands · Agent guide
Namishu Arithmetic creates printable arithmetic worksheets for parents preparing daily practice, teachers assigning classwork, and learners practicing specific operations. Choose an exercise type and page count to get an A4 PDF ready to print, saving the time spent writing questions and arranging them on a page. Run it again whenever you need a fresh set of questions.
With 68 levels across 3 series, the project covers addition, subtraction, multiplication, and division with integers, fractions, and decimals, including negative numbers, parentheses, mixed operations, and missing-number exercises. Choose a preset for your practice goal, adjust the layout and number of problems per page, or fix the random seed to generate the same set of questions again.
Sample PDFs: Addition · Multiplication · Fractions · Decimals
Installation
Requirements: Python 3.10+ and uv.
git clone https://github.com/namishu/arithmetic.git
cd arithmetic
uv sync
Run the commands below from the project directory.
Quick start
Choose a series and level to generate a worksheet:
Series (--series) |
Levels (--level) |
Content |
|---|---|---|
addsub |
1–24 | Integer addition, subtraction, negative numbers, missing numbers |
muldiv |
1–26 | Integer multiplication/division, parentheses, mixed operations, missing numbers |
fraction |
1–18 | Fractions, decimals, and mixed numeric types |
Each level identifies an exercise preset, described in the level catalog.
For example, addsub level 1 adds two integers from 0 to 10; sums may reach 20.
Generate a PDF
Generate five pages of addition practice, saved to worksheets/addition.pdf:
uv run arithmetic generate --series addsub --level 1 --pages 5 --output worksheets/addition.pdf
generate creates a PDF. The four arguments above specify:
| Argument | Meaning | Required? |
|---|---|---|
--series addsub |
Select the addition/subtraction series | Required |
--level 1 |
Select level 1 within that series | Required |
--pages 5 |
Generate five pages | Optional; default: 10 pages |
--output worksheets/addition.pdf |
Set the PDF file location | Optional; default: worksheets/{series}/level-{level}.pdf |
The command prints the file location when complete. Open the PDF and print at actual size on A4 paper.
You can also add these options:
| Option | Purpose |
|---|---|
--seed 42 |
Reproduce problem content with the same program and dependency versions; omitted seeds are randomly chosen and printed |
--disallow-zero-denominator |
Exclude expressions with a zero denominator or divisor; allowed by default |
--config examples/override.yaml |
Load layout and problems-per-page settings from a YAML file |
--force |
Replace an existing file; existing files cause an error by default |
--json |
Return file locations, page counts, exercises, seeds, and other generation details as JSON for programs or agents |
For example, generate two pages of division practice with no division by zero and a fixed seed:
uv run arithmetic generate --series muldiv --level 5 --pages 2 --seed 42 --disallow-zero-denominator --output worksheets/division.pdf
You can also give the repository URL or local folder to an agent that can run commands, with a request:
Use this project to generate five pages of basic multiplication practice without negative operands, saved in worksheets/. Verify the PDF and provide a file link and the generation settings.
Other commands
List exercises: list
Show every series, level, and exercise name. Use --series to filter by series, or --json for JSON output.
uv run arithmetic list
uv run arithmetic list --series muldiv
Inspect a level: describe
Show operand ranges, operation rules, examples, and problems per page for one level.
Both --series and --level are required; --json returns JSON output.
uv run arithmetic describe --series muldiv --level 5
Generate a complete collection: generate --all
Create a separate PDF for each of the 68 levels. This command generates one page per level:
uv run arithmetic generate --all --pages 1 --output-dir worksheets/collection
--all selects every exercise; --output-dir sets the root directory, defaulting to worksheets.
Files are stored as {series}/level-{level}.pdf.
Batch generation accepts --pages, --seed, --disallow-zero-denominator, --config, --force, and --json.
It cannot be combined with --series, --level, or --output. --output-dir is only available with --all.
Help and version
uv run arithmetic --help
uv run arithmetic generate --help
uv run arithmetic --version
list and describe also accept --help.
Default configuration
| Setting | Default |
|---|---|
| Pages | 10 per PDF |
| Problems per page | Integer series: 10; fraction series: 14, with 12 fixed for levels 8, 9, 17, and 18 |
| Paper | A4 |
| Output path | worksheets/{series}/level-{level}.pdf |
| Zero denominators/divisors | Allowed |
| Output language | English |
Series and level must be selected explicitly. Each blank always requires a unique valid rational solution.
Save an override as worksheet.yaml to adjust problems per page, margins (in millimeters), and line spacing.
Only supplied settings change; other settings keep their defaults.
problems_per_page:
default: 12
layout:
margin:
left_mm: 20
right_mm: 20
typography:
line_spacing_ratio: 1.0
uv run arithmetic generate --series addsub --level 1 --config worksheet.yaml
default sets the integer series capacity; use fraction alongside it to set the fraction series capacity.
The four levels with a fixed 12-question capacity retain that value.
See examples/override.yaml for a ready-to-use file.
License
Code and original documentation use the MIT License. Generated worksheets may be printed, shared, modified, and sold. Third-party assets follow their own license terms.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file namishu_arithmetic-1.0.0.tar.gz.
File metadata
- Download URL: namishu_arithmetic-1.0.0.tar.gz
- Upload date:
- Size: 144.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c93f04d2be5ee554a64f01804cb5b4e2105d61db5bb421c13048ceaedf4591e2
|
|
| MD5 |
a3fecfeda39de1d06ae3e60fd1e49c1e
|
|
| BLAKE2b-256 |
0308d3ec7270f0e17ee71c588d18ac0a082e8033d458b855f73365542faf4d2a
|
Provenance
The following attestation bundles were made for namishu_arithmetic-1.0.0.tar.gz:
Publisher:
publish.yml on namishu/arithmetic
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
namishu_arithmetic-1.0.0.tar.gz -
Subject digest:
c93f04d2be5ee554a64f01804cb5b4e2105d61db5bb421c13048ceaedf4591e2 - Sigstore transparency entry: 2779745921
- Sigstore integration time:
-
Permalink:
namishu/arithmetic@806057411c27764605d970af015a3ce19573e76f -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/namishu
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@806057411c27764605d970af015a3ce19573e76f -
Trigger Event:
release
-
Statement type:
File details
Details for the file namishu_arithmetic-1.0.0-py3-none-any.whl.
File metadata
- Download URL: namishu_arithmetic-1.0.0-py3-none-any.whl
- Upload date:
- Size: 31.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b590693f8a6a5d5b2ec9b832c00eb323f48b876126f97115207291858a26949d
|
|
| MD5 |
b8afa7a624bf8fdf8f5cf80a08a39afc
|
|
| BLAKE2b-256 |
5ea42c13950bc848e03cfda6864acb3ce757ba18b5624f7cc763212cfc1cf4af
|
Provenance
The following attestation bundles were made for namishu_arithmetic-1.0.0-py3-none-any.whl:
Publisher:
publish.yml on namishu/arithmetic
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
namishu_arithmetic-1.0.0-py3-none-any.whl -
Subject digest:
b590693f8a6a5d5b2ec9b832c00eb323f48b876126f97115207291858a26949d - Sigstore transparency entry: 2779745971
- Sigstore integration time:
-
Permalink:
namishu/arithmetic@806057411c27764605d970af015a3ce19573e76f -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/namishu
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@806057411c27764605d970af015a3ce19573e76f -
Trigger Event:
release
-
Statement type: