Skip to main content

Namishu Arithmetic

Printable arithmetic worksheets for integers, fractions, and decimals.

Python 3.10+ License: MIT PDF: A4

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.

Metadata

Release files for namishu-arithmetic 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for namishu-arithmetic 1.0.0
File Size Uploaded Provenance Actions
namishu_arithmetic-1.0.0.tar.gz 144.5 kB With provenance Details for namishu_arithmetic-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for namishu-arithmetic 1.0.0
File Interpreter ABI Platform Actions
namishu_arithmetic-1.0.0-py3-none-any.whl Python 3 none any Details for namishu_arithmetic-1.0.0-py3-none-any.whl

Total release size: 175.5 kB

Release files / namishu_arithmetic-1.0.0.tar.gz

Download URL namishu_arithmetic-1.0.0.tar.gz
Size 144.5 kB
Tags Source
SHA-256 checksum
How to use checksums
c93f04d2be5ee554a64f01804cb5b4e2105d61db5bb421c13048ceaedf4591e2
BLAKE2b-256 checksum
How to use checksums
0308d3ec7270f0e17ee71c588d18ac0a082e8033d458b855f73365542faf4d2a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 10, 2026.

Transparency log

Release files / namishu_arithmetic-1.0.0-py3-none-any.whl

Download URL namishu_arithmetic-1.0.0-py3-none-any.whl
Size 31.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b590693f8a6a5d5b2ec9b832c00eb323f48b876126f97115207291858a26949d
BLAKE2b-256 checksum
How to use checksums
5ea42c13950bc848e03cfda6864acb3ce757ba18b5624f7cc763212cfc1cf4af
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 10, 2026.

Transparency log

Security for namishu-arithmetic 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for namishu_arithmetic-1.0.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 10, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page