Skip to content

jhon287/arj-written-calculations-trainer-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ARJ Written Calculations Trainer (CLI)

A small CLI tool to generate written arithmetic exercises (addition, subtraction, multiplication) tailored by belt color difficulty.

This is based on tests that have been done at "Le Petit Athénée de Jodoigne" which is part of "Athénée Royale de Jodoigne" school.

Belt Colors

  1. ⚪️: L'addition (395 + 228)
  2. 🟡: La soustraction avec retenue (544 - 306)
  3. 🟠: La multiplication par un nombre à un chiffre (72 x 9)
  4. 🩷: La multiplication par un nombre à un chiffre (455 x 4)
  5. 🟢: L'addition (6199 + 4566)
  6. 🔵: La soustraction avec retenue (5206 - 2355)
  7. 🟣: La multiplication par un nombre à deux chiffres (45 x 23)
  8. 🟤: La multiplication par un nombre à deux chiffres (541 x 54)
  9. ⚫️: L'addition de nombres décimaux (297,7 + 37,05)
  10. 🔴: La soustraction de nombres décimaux (982,7 - 64,47)

Features

  • Generate vertical (written) integer and float calculations.
  • Color-based difficulty levels (e.g. white, yellow, orange, ... red, black).
  • Control number of exercises with --quantity and limit with MAX_QUANTITY.
  • Optionally show results with -r / --show-result.

Requirements

  • Python 3.8+

Installation

Clone the repository and run the script from the project folder:

git clone <repo-url>
cd path/to/arj-written-calculations-trainer-cli
python3 src/main.py [options]

Usage

Basic usage (default color, default quantity):

python3 src/main.py

Specify a belt color (choices are listed in the COLORS constant):

python3 src/main.py --color red

Generate a fixed number of calculations (up to the maximum):

python3 src/main.py --quantity 5

Show results inline (useful for worksheets or verification):

python3 src/main.py --color red --quantity 5 --show-result
# or using the short flag
python3 src/main.py -r

Use --color random to pick a random color per generated calculation.

Configuration

Defaults and limits are defined in src/config.py:

  • COLORS — list of available belt colors
  • QUANTITY — default number of calculations generated
  • MAX_QUANTITY — hard cap for --quantity
  • DISPLAY_RESULT — whether results are shown by default

Notes & Suggestions

  • The tool prints each exercise in a vertical, written format (aligned columns). For float exercises results are formatted to two decimals.
  • Consider adding:
    • unit tests for the number generation functions,
    • a --seed option for reproducible outputs,
    • an installable pyproject.toml and a small test suite.

Example

python3 src/main.py --color red --quantity 3 --show-result
Belt Color: Red - Generating 3 calculations

  74.01
- 56.62
-------
  17.39

  486.22
-  12.03
--------
  474.19

  824.24
- 664.00
--------
  160.24

About

ARJ Written Calculations Trainer (CLI)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors