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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.3
    9
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.3
    9
  • 1.0.2
    2
  • 1.0.1
    2
  • 1.0.0
    2

Package Sidebar

Install

npm i random-math-question

Weekly Downloads

6

Version

1.0.3

License

ISC

Unpacked Size

5.19 kB

Total Files

3

Last publish

Collaborators

  • tokyojack