math-exercises 1.3.69 → 1.3.70

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -58,7 +58,7 @@ function getEuclideanDivisionQuestions() {
58
58
  } while (isDuplicate);
59
59
  res.push(proposition);
60
60
  }
61
- return (0, shuffle_1.shuffle)(res).slice(0, n);
61
+ return (0, shuffle_1.shuffle)([res[0], ...res.slice(1, n - 1)]);
62
62
  };
63
63
  const question = {
64
64
  instruction: `Ecrire la division euclidienne de ${dividend} par ${divisor}`,
@@ -1 +1 @@
1
- {"version":3,"file":"primeNumbers.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calcul/arithmetics/primeNumbers.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAe,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAGjE;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,QAY1B,CAAC;AAQF,wBAAgB,eAAe,IAAI,QAAQ,CA4E1C"}
1
+ {"version":3,"file":"primeNumbers.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calcul/arithmetics/primeNumbers.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAe,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAGjE;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,QAY1B,CAAC;AAQF,wBAAgB,eAAe,IAAI,QAAQ,CA2E1C"}
@@ -78,7 +78,7 @@ function getPrimeNumbers() {
78
78
  format: 'tex',
79
79
  });
80
80
  }
81
- return (0, shuffle_1.shuffle)(res).slice(0, n);
81
+ return (0, shuffle_1.shuffle)([res[0], ...res.slice(1, n - 1)]);
82
82
  };
83
83
  const question = {
84
84
  startStatement: `${prod}`,
@@ -62,7 +62,7 @@ function getFractionAndIntegerDivision() {
62
62
  } while (isDuplicate);
63
63
  res.push(proposition);
64
64
  }
65
- return (0, shuffle_1.shuffle)(res).slice(0, n);
65
+ return (0, shuffle_1.shuffle)([res[0], ...res.slice(1, n - 1)]);
66
66
  };
67
67
  const question = {
68
68
  instruction: '',
@@ -42,7 +42,7 @@ function getExpDerivativeThree() {
42
42
  (0, exercise_1.tryToAddWrongProp)(propositions, new multiplyNode_1.MultiplyNode(new polynomial_1.Polynomial([b + a, -a]).toTree(), new expNode_1.ExpNode(new variableNode_1.VariableNode('x'))).toTex());
43
43
  (0, exercise_1.tryToAddWrongProp)(propositions, a + '');
44
44
  (0, exercise_1.tryToAddWrongProp)(propositions, (0, simplify_1.simplifyNode)(new multiplyNode_1.MultiplyNode(new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(a), new variableNode_1.VariableNode('x')), new expNode_1.ExpNode(new variableNode_1.VariableNode('x')))).toTex());
45
- return (0, shuffle_1.shuffle)(propositions).slice(0, numOptions);
45
+ return (0, shuffle_1.shuffle)([propositions[0], ...propositions.slice(1, numOptions - 1)]);
46
46
  };
47
47
  const question = {
48
48
  instruction: `Déterminer la dérivée de la fonction $f(x) = ${myfunction.toTex()}$.`,
@@ -56,7 +56,7 @@ function getExpDerivative() {
56
56
  } while (isDuplicate);
57
57
  propositions.push(proposition);
58
58
  }
59
- return (0, shuffle_1.shuffle)(propositions).slice(0, numOptions);
59
+ return (0, shuffle_1.shuffle)([propositions[0], ...propositions.slice(1, numOptions - 1)]);
60
60
  };
61
61
  const question = {
62
62
  instruction: `Déterminer la dérivée de la fonction $f(x) = ${myfunction.toTex()}$.`,
@@ -50,7 +50,7 @@ function getFirstDegreeDerivative() {
50
50
  } while (isDuplicate);
51
51
  propositions.push(proposition);
52
52
  }
53
- return (0, shuffle_1.shuffle)(propositions).slice(0, n);
53
+ return (0, shuffle_1.shuffle)([propositions[0], ...propositions.slice(1, n - 1)]);
54
54
  };
55
55
  const question = {
56
56
  instruction: `Déterminer la fonction dérivée $f'$ de la fonction $f$ définie par $f(x) = ${polynomial.toString()}$.`,
@@ -49,7 +49,7 @@ function getInverseFunctionDerivative() {
49
49
  } while (isDuplicate);
50
50
  propositions.push(proposition);
51
51
  }
52
- return (0, shuffle_1.shuffle)(propositions).slice(0, n);
52
+ return (0, shuffle_1.shuffle)([propositions[0], ...propositions.slice(1, n - 1)]);
53
53
  };
54
54
  const question = {
55
55
  instruction: `Déterminer la fonction dérivée $f'$ de la fonction $f$ définie par $f(x) =\\frac{${a}}{x}$.`,
@@ -46,7 +46,7 @@ function getLnDerivative() {
46
46
  (0, exercise_1.tryToAddWrongProp)(propositions, polynom.toTree().toTex());
47
47
  (0, exercise_1.tryToAddWrongProp)(propositions, `\\frac{${a}}{${logTree.toTex()}}`);
48
48
  (0, exercise_1.tryToAddWrongProp)(propositions, `\\frac{1}{${polynom.toTree().toTex()}}`);
49
- return (0, shuffle_1.shuffle)(propositions).slice(0, numOptions);
49
+ return (0, shuffle_1.shuffle)([propositions[0], ...propositions.slice(1, numOptions - 1)]);
50
50
  };
51
51
  const question = {
52
52
  instruction: `Déterminer la dérivée de la fonction $f(x) = ${logTree.toTex()}$.`,
@@ -64,7 +64,7 @@ function getLnDerivative() {
64
64
  } while (isDuplicate);
65
65
  propositions.push(proposition);
66
66
  }
67
- return (0, shuffle_1.shuffle)(propositions).slice(0, numOptions);
67
+ return (0, shuffle_1.shuffle)([propositions[0], ...propositions.slice(1, numOptions - 1)]);
68
68
  };
69
69
  const question = {
70
70
  instruction: `Déterminer la dérivée de la fonction $f(x) = ${myfunction.toTex()} $.`,
@@ -40,7 +40,7 @@ function getPowerFunctionDerivative() {
40
40
  (0, exercise_1.tryToAddWrongProp)(propositions, new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(a), new powerNode_1.PowerNode(new variableNode_1.VariableNode('x'), new numberNode_1.NumberNode(n - 1))).toTex());
41
41
  (0, exercise_1.tryToAddWrongProp)(propositions, new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(a * n), new powerNode_1.PowerNode(new variableNode_1.VariableNode('x'), new numberNode_1.NumberNode(n))).toTex());
42
42
  (0, exercise_1.tryToAddWrongProp)(propositions, new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(a - 1), new powerNode_1.PowerNode(new variableNode_1.VariableNode('x'), new numberNode_1.NumberNode(n))).toTex());
43
- const missing = n - propositions.length;
43
+ const missing = numOptions - propositions.length;
44
44
  for (let i = 0; i < missing; i++) {
45
45
  let isDuplicate;
46
46
  let proposition;
@@ -56,7 +56,7 @@ function getPowerFunctionDerivative() {
56
56
  } while (isDuplicate);
57
57
  propositions.push(proposition);
58
58
  }
59
- return (0, shuffle_1.shuffle)(propositions).slice(0, n);
59
+ return (0, shuffle_1.shuffle)([propositions[0], ...propositions.slice(1, numOptions - 1)]);
60
60
  };
61
61
  const question = {
62
62
  instruction: `Déterminer la fonction dérivée $f'$ de la fonction $f$ définie par $f(x) =${statement.toTex()}$.`,
@@ -37,7 +37,7 @@ function getSequenceGeometricLimitQuestion() {
37
37
  (0, exercise_1.tryToAddWrongProp)(res, '0');
38
38
  (0, exercise_1.tryToAddWrongProp)(res, sequence.reason.tex + '');
39
39
  (0, exercise_1.tryToAddWrongProp)(res, sequence.firstTerm.tex + '');
40
- return (0, shuffle_1.shuffle)(res).slice(0, n);
40
+ return (0, shuffle_1.shuffle)([res[0], ...res.slice(1, n - 1)]);
41
41
  };
42
42
  const question = {
43
43
  answer: answer,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "math-exercises",
3
- "version": "1.3.69",
3
+ "version": "1.3.70",
4
4
  "description": "Math exercises generator for middle school and high school",
5
5
  "main": "lib/index.js",
6
6
  "files": [