random-math-question

1.0.3 • Public • Published

Random-Math-Question

A function that generates a math question

💿 Installation

Simpley run this with-in your console and you're good to go!

npm install random-math-question --save

📏 Usage

var randomMathQuestion = require('random-math-question');

var mathQuestion1 = randomMathQuestion.get();

var mathQuestion2 = randomMathQuestion.get(randomMathQuestion.get({
numberRange: '1-5000',
amountOfNumber: '5-10',
operations: ['/', '*', '+', '-'],
nagative: {
    containsNagatives: true,
    negativeChance: '10%'
},
exponent: {
    containsExponents: true,
    exponentChance: '10%',
    exponentRange: '1-10'
},
}));


console.log("Question 1: " + mathQuestion1.question);
console.log("Answer: " + mathQuestion1.answer);

console.log("Question 2: " + mathQuestion2.question);
console.log("Answer: " + mathQuestion2.answer);

Author

Jack Clarke ---| Jack Clarke

Readme

Keywords

none

Package Sidebar

Install

npm i random-math-question

Weekly Downloads

0

Version

1.0.3

License

ISC

Unpacked Size

5.19 kB

Total Files

3

Last publish

Collaborators

  • tokyojack