Giter Club home page Giter Club logo

generate-soroban-training2's Introduction

Генератор примеров по методологии "соробан"

Установка

npm i -S generate-soroban-training2

API

Методы

Получение массива примеров
...

let examples = s.getArray();
console.log(examples);
/*
[
	{ example: [ 422, 201 ], sum: 623 },
	{ example: [ 135, -201 ], sum: -66 },
 ]
*/
Получение строк примеров
...

let examples = s.getString();
console.log(examples);
/*
[ 
	'332-430+214-204=-88',
	'111-532+111+540=230',
]
*/

...

Пример

import SorobanGenerator from 'generate-soroban-training2';

const config = {
    debug: true, // дебагинг
    digit: 1, // разрядность числа
    examples: 10, // количество генерируемых примеров
    actions_length: 99, // количество математических операций
    topic_number: 4,
    exceptions: [
        '1+4',
        '2+3', '2+4',
        '3+2', '3+3', '3+4',
        '4+1', '4+2', '4+4',
        '5-1', '5-2', '5-3',
        '6-2', '6-3', '6-4',
        '7-3', '7-4',
        '8-4',
    ] // исключает вхождение определенных операций
}

const s = new SorobanGenerator(config);

s.generateSimpleExamples(); 

generate-soroban-training2's People

Contributors

romanits avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.