GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - ArtemZhyto/math-tasks-generator: Math Tasks Generator - TypeScript library for dynamic math problem creation. Features variables, constraints, auto-answer generation, multiple-choice options, and fraction support. Perfect for educational platforms.

BranchesTags
Open more actions menu

Latest commit

 

History

23 Commits
23 Commits

Folders and files

NameName
Last commit message
Last commit date
core
core
 
 
evaluation
evaluation
 
 
generation
generation
 
 
utils
utils
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
constants.ts
constants.ts
 
 
index.ts
index.ts
 
 
types.ts
types.ts
 
 

Repository files navigation

Math Task Generator / Генератор Математичних Завдань

TypeScript Node.js JavaScript Mathematics

English Українська

Table of Contents / Зміст

English

  1. Project Description
  2. Features
  3. How to Use
  4. Configuration Object
  5. Supporting the Project
  6. Supporters Hall of Fame
  7. Created & Maintained by

Українська

  1. Опис проекту
  2. Можливості
  3. Як використовувати
  4. Об’єкт конфігурації
  5. Підтримка проекту
  6. Зала слави меценатів
  7. Автор та розробник

Math Task Generator

Project Description

A universal generator of mathematical problems with automatic answer generation. Generates problems for calculating perimeters, arithmetic operations, and more. Includes validation and customizable constraints.

Features

  • Generates math tasks with correct answers
  • Supports variables and constraints
  • Auto-generates multiple-choice options
  • Handles units of measurement (cm, mm, etc.)
  • Works with fractions, integers, and decimals
  • Configurable number ranges and validation rules

How to Use

Pass a config object to generateTask():

const config = {
  condition: "Calculate the perimeter of a rectangle with sides @A cm and @B cm",
  template: "concat(multiply(2, sum(@A, @B)), ' см')",
  variables: {
    A: { range: [5, 12] },
    B: { range: [8, 15] }
  },
  constraints: {
    canBeNegative: false,
    integerResult: true,
    canGenerateWrongAnswer: true
  }
};

const task = generateTask(config);

Example Output:

{
  condition: "Calculate the perimeter of a rectangle with sides 7 cm and 10 cm",
  answers: ["34 см", "17 см", "24 см", "70 см"],
  correctAnswer: "34 см"
}

Configuration Object

Field Type Description
condition string Problem text with variables (e.g., @A, @B)
template string Math expression using supported functions.
variables Object Range/value definitions for variables (range: [min,max] or values: [...]).
constraints Object Rules for answers (minResult, maxResult, integerResult, etc.).

Supported Functions

  • Arithmetic: sum, multiply, minus, divide, modulus
  • Fractions: fraction, fractionAdd, toDecimal
  • Comparisons: greater, less, equal
  • Utilities: concat, round, sqrt

Full list: math-functions.ts.

Supporting the Project

If this tool helps you in your work or studies, consider supporting its development:

Support Development

Your support helps improve and maintain this generator!

💎 Supporters Hall of Fame

We appreciate every contribution! 🎉

  • 🥇 Your name could be here!

Join our supporters family!

🎯 2025 • Artem Zhyto

Math Task Generator

📚 Education ⚡ Open Source 💙 Ukraine

Artem Zhyto Profile View All Projects

Empowering educators worldwide


Генератор Математичних Завдань

Опис проекту

Універсальний генератор математичних задач із автоматичним підбором відповідей. Генерує завдання на обчислення периметрів, арифметичні дії тощо. Має вбудовану перевірку обмежень.

Можливості

  • Генерує задачі з правильними відповідями
  • Підтримує змінні та обмеження
  • Автоматично створює варіанти вибору
  • Працює з одиницями виміру (см, мм, грн)
  • Обробляє дроби, цілі та десяткові числа
  • Налаштовувані діапазони чисел

Як використовувати

Передайте об’єкт конфігурації у generateTask():

const config = {
  condition: "Обчисліть периметр прямокутника зі сторонами @A см і @B см",
  template: "concat(multiply(2, sum(@A, @B)), ' см')",
  variables: {
    A: { range: [5, 12] },
    B: { range: [8, 15] }
  },
  constraints: {
    canBeNegative: false,
    integerResult: true,
    canGenerateWrongAnswer: true
  }
};

const task = generateTask(config);

Приклад результату:

{
  condition: "Обчисліть периметр прямокутника зі сторонами 7 см і 10 см",
  answers: ["34 см", "17 см", "24 см", "70 см"],
  correctAnswer: "34 см"
}

Об’єкт конфігурації

Поле Тип Опис
condition string Текст задачі із змінними (напр., @A, @B).
template string Математичний вираз зі списком функцій.
variables Object Діапазони/значення змінних (range: [min,max] або values: [...]).
constraints Object Обмеження (minResult, maxResult, integerResult тощо).

Підтримувані функції

  • Арифметика: sum, multiply, minus, divide, modulus
  • Дроби: fraction, fractionAdd, toDecimal
  • Порівняння: greater, less, equal
  • Додатково: concat, round, sqrt

Повний список: math-functions.ts.

Підтримка проекту

Якщо цей генератор корисний у вашій роботі чи навчанні, ви можете підтримати його розвиток:

Підтримати розробку

Ваша підтримка допомагає покращувати та підтримувати цей проект!

💎 Зала слави меценатів

Цінуємо кожен внесок! 🎉

  • 🥇 Ваше ім'я може бути тут!

Приєднуйтесь до родини меценатів!

🎯 2025 • Artem Zhyto

Генератор Математичних Завдань

📚 Освіта ⚡ Відкритий код

Artem Zhyto Профіль Всі проекти

Надаємо можливості вчителям у всьому світі

About

Math Tasks Generator - TypeScript library for dynamic math problem creation. Features variables, constraints, auto-answer generation, multiple-choice options, and fraction support. Perfect for educational platforms.

Topics

arithmeticautomated-answersconfigurableedtecheducationfractionsjavascriptlearning-toolsmathmulti-languagenodejsopen-sourceproblem-generatortask-generatortypescript

Resources

Readme
Apache-2.0 license
Activity

Stars

1 star

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.