math-exercises 1.3.47 → 1.3.50

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.
Files changed (112) hide show
  1. package/lib/exercises/calculLitteral/equation/equationSimpleSquare.d.ts.map +1 -1
  2. package/lib/exercises/calculLitteral/equation/equationSimpleSquare.js +21 -21
  3. package/lib/exercises/calculLitteral/equation/equationType1Exercise.d.ts.map +1 -1
  4. package/lib/exercises/calculLitteral/equation/equationType1Exercise.js +13 -11
  5. package/lib/exercises/calculLitteral/equation/equationType2Exercise.d.ts.map +1 -1
  6. package/lib/exercises/calculLitteral/equation/equationType2Exercise.js +4 -7
  7. package/lib/exercises/calculLitteral/equation/firstDegreeEquation.d.ts.map +1 -1
  8. package/lib/exercises/calculLitteral/equation/firstDegreeEquation.js +10 -4
  9. package/lib/exercises/complex/addComplex.d.ts +4 -0
  10. package/lib/exercises/complex/addComplex.d.ts.map +1 -0
  11. package/lib/exercises/complex/addComplex.js +66 -0
  12. package/lib/exercises/complex/mutiplyComplex.d.ts +4 -0
  13. package/lib/exercises/complex/mutiplyComplex.d.ts.map +1 -0
  14. package/lib/exercises/complex/mutiplyComplex.js +65 -0
  15. package/lib/exercises/complex/reAndIm.d.ts +4 -0
  16. package/lib/exercises/complex/reAndIm.d.ts.map +1 -0
  17. package/lib/exercises/complex/reAndIm.js +79 -0
  18. package/lib/exercises/exercise.d.ts +3 -2
  19. package/lib/exercises/exercise.d.ts.map +1 -1
  20. package/lib/exercises/exercises.d.ts.map +1 -1
  21. package/lib/exercises/exercises.js +20 -0
  22. package/lib/exercises/functions/affines/template.d.ts +4 -0
  23. package/lib/exercises/functions/affines/template.d.ts.map +1 -0
  24. package/lib/exercises/functions/affines/template.js +51 -0
  25. package/lib/exercises/functions/basics/inverseImageFunctionGeogebra.js +2 -2
  26. package/lib/exercises/functions/trinoms/alphaBetaFromDevForm.d.ts +4 -0
  27. package/lib/exercises/functions/trinoms/alphaBetaFromDevForm.d.ts.map +1 -0
  28. package/lib/exercises/functions/trinoms/alphaBetaFromDevForm.js +63 -0
  29. package/lib/exercises/functions/trinoms/alphaBetaInCanonicalForm.d.ts +4 -0
  30. package/lib/exercises/functions/trinoms/alphaBetaInCanonicalForm.d.ts.map +1 -0
  31. package/lib/exercises/functions/trinoms/alphaBetaInCanonicalForm.js +91 -0
  32. package/lib/exercises/functions/trinoms/canonicalFromDevForm.d.ts +4 -0
  33. package/lib/exercises/functions/trinoms/canonicalFromDevForm.d.ts.map +1 -0
  34. package/lib/exercises/functions/trinoms/canonicalFromDevForm.js +58 -0
  35. package/lib/exercises/functions/trinoms/extremumFromCanonicalForm.d.ts +4 -0
  36. package/lib/exercises/functions/trinoms/extremumFromCanonicalForm.d.ts.map +1 -0
  37. package/lib/exercises/functions/trinoms/extremumFromCanonicalForm.js +84 -0
  38. package/lib/exercises/functions/trinoms/extremumTypeFromAlgebricForm.d.ts +4 -0
  39. package/lib/exercises/functions/trinoms/extremumTypeFromAlgebricForm.d.ts.map +1 -0
  40. package/lib/exercises/functions/trinoms/extremumTypeFromAlgebricForm.js +59 -0
  41. package/lib/exercises/functions/trinoms/variationsFromAlgebricForm.d.ts +4 -0
  42. package/lib/exercises/functions/trinoms/variationsFromAlgebricForm.d.ts.map +1 -0
  43. package/lib/exercises/functions/trinoms/variationsFromAlgebricForm.js +59 -0
  44. package/lib/exercises/probaStat/medianList.js +1 -1
  45. package/lib/exercises/probaStat/probabilityTree.js +6 -6
  46. package/lib/index.d.ts.map +1 -1
  47. package/lib/math/complex/complex.d.ts +12 -0
  48. package/lib/math/complex/complex.d.ts.map +1 -0
  49. package/lib/math/complex/complex.js +24 -0
  50. package/lib/math/polynomials/trinom.d.ts +24 -0
  51. package/lib/math/polynomials/trinom.d.ts.map +1 -0
  52. package/lib/math/polynomials/trinom.js +67 -0
  53. package/lib/tree/nodes/complex/complexNode.d.ts +15 -0
  54. package/lib/tree/nodes/complex/complexNode.d.ts.map +1 -0
  55. package/lib/tree/nodes/complex/complexNode.js +43 -0
  56. package/lib/tree/nodes/functions/cosNode.d.ts +1 -0
  57. package/lib/tree/nodes/functions/cosNode.d.ts.map +1 -1
  58. package/lib/tree/nodes/functions/cosNode.js +4 -0
  59. package/lib/tree/nodes/functions/expNode.d.ts +1 -0
  60. package/lib/tree/nodes/functions/expNode.d.ts.map +1 -1
  61. package/lib/tree/nodes/functions/expNode.js +4 -0
  62. package/lib/tree/nodes/functions/logNode.d.ts +1 -0
  63. package/lib/tree/nodes/functions/logNode.d.ts.map +1 -1
  64. package/lib/tree/nodes/functions/logNode.js +4 -0
  65. package/lib/tree/nodes/functions/oppositeNode.d.ts +1 -0
  66. package/lib/tree/nodes/functions/oppositeNode.d.ts.map +1 -1
  67. package/lib/tree/nodes/functions/oppositeNode.js +4 -0
  68. package/lib/tree/nodes/functions/sinNode.d.ts +1 -0
  69. package/lib/tree/nodes/functions/sinNode.d.ts.map +1 -1
  70. package/lib/tree/nodes/functions/sinNode.js +4 -0
  71. package/lib/tree/nodes/functions/sqrtNode.d.ts +1 -0
  72. package/lib/tree/nodes/functions/sqrtNode.d.ts.map +1 -1
  73. package/lib/tree/nodes/functions/sqrtNode.js +4 -0
  74. package/lib/tree/nodes/node.d.ts +1 -0
  75. package/lib/tree/nodes/node.d.ts.map +1 -1
  76. package/lib/tree/nodes/numbers/constantNode.d.ts +1 -0
  77. package/lib/tree/nodes/numbers/constantNode.d.ts.map +1 -1
  78. package/lib/tree/nodes/numbers/constantNode.js +4 -0
  79. package/lib/tree/nodes/numbers/numberNode.d.ts +1 -0
  80. package/lib/tree/nodes/numbers/numberNode.d.ts.map +1 -1
  81. package/lib/tree/nodes/numbers/numberNode.js +4 -0
  82. package/lib/tree/nodes/operators/addNode.d.ts +1 -0
  83. package/lib/tree/nodes/operators/addNode.d.ts.map +1 -1
  84. package/lib/tree/nodes/operators/addNode.js +4 -0
  85. package/lib/tree/nodes/operators/divideNode.d.ts +1 -0
  86. package/lib/tree/nodes/operators/divideNode.d.ts.map +1 -1
  87. package/lib/tree/nodes/operators/divideNode.js +4 -0
  88. package/lib/tree/nodes/operators/equalNode.d.ts +1 -0
  89. package/lib/tree/nodes/operators/equalNode.d.ts.map +1 -1
  90. package/lib/tree/nodes/operators/equalNode.js +4 -0
  91. package/lib/tree/nodes/operators/fractionNode.d.ts +1 -0
  92. package/lib/tree/nodes/operators/fractionNode.d.ts.map +1 -1
  93. package/lib/tree/nodes/operators/fractionNode.js +4 -0
  94. package/lib/tree/nodes/operators/multiplyNode.d.ts +1 -0
  95. package/lib/tree/nodes/operators/multiplyNode.d.ts.map +1 -1
  96. package/lib/tree/nodes/operators/multiplyNode.js +4 -0
  97. package/lib/tree/nodes/operators/powerNode.d.ts +1 -0
  98. package/lib/tree/nodes/operators/powerNode.d.ts.map +1 -1
  99. package/lib/tree/nodes/operators/powerNode.js +4 -0
  100. package/lib/tree/nodes/operators/substractNode.d.ts +1 -0
  101. package/lib/tree/nodes/operators/substractNode.d.ts.map +1 -1
  102. package/lib/tree/nodes/operators/substractNode.js +4 -0
  103. package/lib/tree/nodes/variables/variableNode.d.ts +1 -0
  104. package/lib/tree/nodes/variables/variableNode.d.ts.map +1 -1
  105. package/lib/tree/nodes/variables/variableNode.js +4 -0
  106. package/lib/tree/parsers/simplify.d.ts +1 -0
  107. package/lib/tree/parsers/simplify.d.ts.map +1 -1
  108. package/lib/tree/parsers/simplify.js +9 -1
  109. package/lib/utils/diceFlip.d.ts +2 -0
  110. package/lib/utils/diceFlip.d.ts.map +1 -0
  111. package/lib/utils/diceFlip.js +12 -0
  112. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"equationSimpleSquare.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calculLitteral/equation/equationSimpleSquare.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAe,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAO3E,eAAO,MAAM,oBAAoB,EAAE,QAUlC,CAAC;AAOF,wBAAgB,uBAAuB,IAAI,QAAQ,CA+JlD"}
1
+ {"version":3,"file":"equationSimpleSquare.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calculLitteral/equation/equationSimpleSquare.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAe,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAU3E,eAAO,MAAM,oBAAoB,EAAE,QAUlC,CAAC;AAOF,wBAAgB,uBAAuB,IAAI,QAAQ,CA2JlD"}
@@ -4,8 +4,11 @@ exports.getEquationSimpleSquare = exports.equationSimpleSquare = void 0;
4
4
  const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
5
5
  const randint_1 = require("../../../math/utils/random/randint");
6
6
  const coinFlip_1 = require("../../../utils/coinFlip");
7
+ const diceFlip_1 = require("../../../utils/diceFlip");
8
+ const random_1 = require("../../../utils/random");
7
9
  const shuffle_1 = require("../../../utils/shuffle");
8
10
  const uuid_1 = require("uuid");
11
+ const squares = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12].map((el) => el ** 2);
9
12
  exports.equationSimpleSquare = {
10
13
  id: 'equationSimpleSquare',
11
14
  connector: '=',
@@ -24,22 +27,26 @@ const higherFactor = (n) => {
24
27
  return 1;
25
28
  };
26
29
  function getEquationSimpleSquare() {
27
- let randNbr = (0, randint_1.randint)(-20, 100);
30
+ let randNbr = (0, randint_1.randint)(-20, 101);
28
31
  let answer;
29
- if (randNbr >= 0)
30
- while (higherFactor(randNbr) === 1)
31
- randNbr = (0, randint_1.randint)(1, 100);
32
- const instruction = `Résoudre l'équation suivante : $x^2 = ${randNbr}$`;
32
+ const rand = (0, diceFlip_1.diceFlip)(3);
33
+ if (rand === 0)
34
+ randNbr = (0, randint_1.randint)(-20, 0);
35
+ else if (rand === 1)
36
+ randNbr = (0, random_1.random)(squares);
37
+ else
38
+ randNbr = (0, randint_1.randint)(2, 100);
39
+ const instruction = `Résoudre l'équation : $x^2 = ${randNbr}$`;
33
40
  const ans = Math.sqrt(randNbr);
34
- if (ans === Math.floor(ans))
35
- answer = `\\{${ans}\\ ; -${ans}\\}`;
41
+ if (randNbr < 0)
42
+ answer = `S=\\emptyset`;
43
+ else if (ans === Math.floor(ans))
44
+ answer = `S=\\left\\{${ans}\\ ; -${ans}\\right\\}`;
36
45
  else {
37
46
  const factor = higherFactor(randNbr);
38
47
  const radicand = randNbr / factor ** 2;
39
- answer = `\\{${factor}\\sqrt{${radicand}}\\ ; -${factor}\\sqrt{${radicand}} \\}`;
48
+ answer = `S=\\left\\{${factor === 1 ? '' : factor}\\sqrt{${radicand}}\\ ; -${factor === 1 ? '' : factor}\\sqrt{${radicand}} \\right\\}`;
40
49
  }
41
- if (randNbr < 0)
42
- answer = `\\emptyset`;
43
50
  const getPropositions = (n) => {
44
51
  const res = [];
45
52
  res.push({
@@ -51,25 +58,18 @@ function getEquationSimpleSquare() {
51
58
  if (ans === Math.floor(ans)) {
52
59
  res.push({
53
60
  id: (0, uuid_1.v4)() + '',
54
- statement: `${ans}`,
61
+ statement: `S=\\left\\{${ans}\\right\\}`,
55
62
  isRightAnswer: false,
56
63
  format: 'tex',
57
64
  });
58
- if (n > 2)
59
- res.push({
60
- id: (0, uuid_1.v4)() + '',
61
- statement: `${ans + (0, randint_1.randint)(-ans + 1, 7, [0])}`,
62
- isRightAnswer: false,
63
- format: 'tex',
64
- });
65
- for (let i = 0; i < n - 3; i++) {
65
+ for (let i = 0; i < n - 2; i++) {
66
66
  let isDuplicate;
67
67
  let proposition;
68
68
  do {
69
69
  const tempAns = ans + (0, randint_1.randint)(-ans + 1, 7, [0]);
70
70
  proposition = {
71
71
  id: (0, uuid_1.v4)() + '',
72
- statement: (0, coinFlip_1.coinFlip)() ? `\\{${tempAns}\\ ; -${tempAns}\\}` : `\\emptyset`,
72
+ statement: (0, coinFlip_1.coinFlip)() ? `S=\\left\\{${tempAns}\\ ; -${tempAns}\\right\\}` : `S=\\emptyset`,
73
73
  isRightAnswer: false,
74
74
  format: 'tex',
75
75
  };
@@ -123,7 +123,7 @@ function getEquationSimpleSquare() {
123
123
  else {
124
124
  res.push({
125
125
  id: (0, uuid_1.v4)() + '',
126
- statement: `-\\sqrt${-randNbr}`,
126
+ statement: `-\\sqrt{${-randNbr}}`,
127
127
  isRightAnswer: false,
128
128
  format: 'tex',
129
129
  });
@@ -1 +1 @@
1
- {"version":3,"file":"equationType1Exercise.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calculLitteral/equation/equationType1Exercise.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAe,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAW3E;;GAEG;AACH,eAAO,MAAM,qBAAqB,EAAE,QAUnC,CAAC;AAEF,wBAAgB,gCAAgC,IAAI,QAAQ,CAiD3D"}
1
+ {"version":3,"file":"equationType1Exercise.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calculLitteral/equation/equationType1Exercise.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAe,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAY3E;;GAEG;AACH,eAAO,MAAM,qBAAqB,EAAE,QAUnC,CAAC;AAEF,wBAAgB,gCAAgC,IAAI,QAAQ,CAoD3D"}
@@ -2,11 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getEquationType1ExerciseQuestion = exports.equationType1Exercise = void 0;
4
4
  const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
5
- const integer_1 = require("../../../math/numbers/integer/integer");
6
5
  const affine_1 = require("../../../math/polynomials/affine");
7
- const discreteSet_1 = require("../../../math/sets/discreteSet");
8
- const intervals_1 = require("../../../math/sets/intervals/intervals");
9
6
  const randint_1 = require("../../../math/utils/random/randint");
7
+ const numberNode_1 = require("../../../tree/nodes/numbers/numberNode");
10
8
  const equalNode_1 = require("../../../tree/nodes/operators/equalNode");
11
9
  const shuffle_1 = require("../../../utils/shuffle");
12
10
  const uuid_1 = require("uuid");
@@ -25,13 +23,11 @@ exports.equationType1Exercise = {
25
23
  keys: ['x', 'S', 'equal', 'lbrace', 'rbrace', 'semicolon', 'emptyset'],
26
24
  };
27
25
  function getEquationType1ExerciseQuestion() {
28
- const interval = new intervals_1.Interval('[[-10; 10]]');
29
- const intervalStar = new intervals_1.Interval('[[-10; 10]]').difference(new discreteSet_1.DiscreteSet([new integer_1.Integer(0)]));
30
- const b = interval.getRandomElement();
31
- const a = intervalStar.getRandomElement();
32
- const solution = b.value - a.value;
33
- const affine = new affine_1.Affine(1, a.value).toTree();
34
- const tree = new equalNode_1.EqualNode(affine, b.toTree());
26
+ const b = (0, randint_1.randint)(-10, 11);
27
+ const a = (0, randint_1.randint)(-10, 11, [0]);
28
+ const solution = b - a;
29
+ const affine = new affine_1.Affine(1, a).toTree();
30
+ const tree = new equalNode_1.EqualNode(affine, new numberNode_1.NumberNode(b));
35
31
  const getPropositions = (n) => {
36
32
  const res = [];
37
33
  res.push({
@@ -40,7 +36,13 @@ function getEquationType1ExerciseQuestion() {
40
36
  isRightAnswer: true,
41
37
  format: 'tex',
42
38
  });
43
- for (let i = 0; i < n - 1; i++) {
39
+ res.push({
40
+ id: (0, uuid_1.v4)() + '',
41
+ statement: `x = ${b + a}`,
42
+ isRightAnswer: false,
43
+ format: 'tex',
44
+ });
45
+ for (let i = 0; i < n - 2; i++) {
44
46
  let isDuplicate;
45
47
  let proposition;
46
48
  do {
@@ -1 +1 @@
1
- {"version":3,"file":"equationType2Exercise.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calculLitteral/equation/equationType2Exercise.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAe,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAa3E;;GAEG;AACH,eAAO,MAAM,qBAAqB,EAAE,QAUnC,CAAC;AAEF,wBAAgB,gCAAgC,IAAI,QAAQ,CAqD3D"}
1
+ {"version":3,"file":"equationType2Exercise.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calculLitteral/equation/equationType2Exercise.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAe,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAa3E;;GAEG;AACH,eAAO,MAAM,qBAAqB,EAAE,QAUnC,CAAC;AAEF,wBAAgB,gCAAgC,IAAI,QAAQ,CAoD3D"}
@@ -2,10 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getEquationType2ExerciseQuestion = exports.equationType2Exercise = void 0;
4
4
  const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
5
- const integer_1 = require("../../../math/numbers/integer/integer");
6
5
  const rational_1 = require("../../../math/numbers/rationals/rational");
7
6
  const affine_1 = require("../../../math/polynomials/affine");
8
- const discreteSet_1 = require("../../../math/sets/discreteSet");
9
7
  const intervals_1 = require("../../../math/sets/intervals/intervals");
10
8
  const randint_1 = require("../../../math/utils/random/randint");
11
9
  const equalNode_1 = require("../../../tree/nodes/operators/equalNode");
@@ -28,11 +26,10 @@ exports.equationType2Exercise = {
28
26
  };
29
27
  function getEquationType2ExerciseQuestion() {
30
28
  const interval = new intervals_1.Interval('[[-10; 10]]');
31
- const intervalStar = new intervals_1.Interval('[[-10; 10]]').difference(new discreteSet_1.DiscreteSet([new integer_1.Integer(0)]));
32
29
  const b = interval.getRandomElement();
33
- const a = intervalStar.getRandomElement();
34
- const solution = new rational_1.Rational(b.value, a.value).simplify();
35
- const affine = new affine_1.Affine(a.value, 0).toTree();
30
+ const a = (0, randint_1.randint)(-9, 10, [0, 1]);
31
+ const solution = new rational_1.Rational(b.value, a).simplify();
32
+ const affine = new affine_1.Affine(a, 0).toTree();
36
33
  const tree = new equalNode_1.EqualNode(affine, b.toTree());
37
34
  const answer = new equalNode_1.EqualNode(new variableNode_1.VariableNode('x'), solution.toTree());
38
35
  const getPropositions = (n) => {
@@ -47,7 +44,7 @@ function getEquationType2ExerciseQuestion() {
47
44
  let isDuplicate;
48
45
  let proposition;
49
46
  do {
50
- const wrongAnswer = new rational_1.Rational(b.value + (0, randint_1.randint)(-7, 8, [0, -b.value]), a.value + (0, randint_1.randint)(-7, 8, [-a.value, 0])).simplify();
47
+ const wrongAnswer = new rational_1.Rational(b.value + (0, randint_1.randint)(-7, 8, [0, -b.value]), a + (0, randint_1.randint)(-7, 8, [-a, 0])).simplify();
51
48
  proposition = {
52
49
  id: (0, uuid_1.v4)() + '',
53
50
  statement: new equalNode_1.EqualNode(new variableNode_1.VariableNode('x'), wrongAnswer.toTree()).toTex(),
@@ -1 +1 @@
1
- {"version":3,"file":"firstDegreeEquation.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calculLitteral/equation/firstDegreeEquation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAe,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAQ3E,eAAO,MAAM,mBAAmB,EAAE,QAUjC,CAAC;AAEF,wBAAgB,sBAAsB,IAAI,QAAQ,CA6CjD"}
1
+ {"version":3,"file":"firstDegreeEquation.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calculLitteral/equation/firstDegreeEquation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAe,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAQ3E,eAAO,MAAM,mBAAmB,EAAE,QAUjC,CAAC;AAEF,wBAAgB,sBAAsB,IAAI,QAAQ,CAoDjD"}
@@ -25,17 +25,23 @@ function getFirstDegreeEquation() {
25
25
  const res = [];
26
26
  res.push({
27
27
  id: (0, uuid_1.v4)() + '',
28
- statement: (0, simplify_1.simplifyNode)(new numberNode_1.NumberNode(a / b)).toTex(),
28
+ statement: `x=${(0, simplify_1.simplifyNode)(new numberNode_1.NumberNode(a / b)).toTex()}`,
29
29
  isRightAnswer: true,
30
30
  format: 'tex',
31
31
  });
32
- for (let i = 0; i < n - 1; i++) {
32
+ res.push({
33
+ id: (0, uuid_1.v4)() + '',
34
+ statement: `x=${(0, simplify_1.simplifyNode)(new numberNode_1.NumberNode(b / a)).toTex()}`,
35
+ isRightAnswer: false,
36
+ format: 'tex',
37
+ });
38
+ for (let i = 0; i < n - 2; i++) {
33
39
  let isDuplicate;
34
40
  let proposition;
35
41
  do {
36
42
  proposition = {
37
43
  id: (0, uuid_1.v4)() + '',
38
- statement: (0, simplify_1.simplifyNode)(new numberNode_1.NumberNode((a + (0, randint_1.randint)(-7, 8, [-a])) / (b + (0, randint_1.randint)(-7, 8, [-b])))).toTex(),
44
+ statement: `x=${(0, simplify_1.simplifyNode)(new numberNode_1.NumberNode((a + (0, randint_1.randint)(-7, 8, [-a])) / (b + (0, randint_1.randint)(-7, 8, [-b])))).toTex()}`,
39
45
  isRightAnswer: false,
40
46
  format: 'tex',
41
47
  };
@@ -48,7 +54,7 @@ function getFirstDegreeEquation() {
48
54
  const question = {
49
55
  instruction: `Résoudre l'équation suivante : $\\frac{${a}}{x} = ${b}$`,
50
56
  startStatement: `x`,
51
- answer: (0, simplify_1.simplifyNode)(new numberNode_1.NumberNode(a / b)).toTex(),
57
+ answer: `x=${(0, simplify_1.simplifyNode)(new numberNode_1.NumberNode(a / b)).toTex()}`,
52
58
  keys: ['x', 'S', 'equal', 'lbrace', 'rbrace', 'semicolon', 'emptyset'],
53
59
  getPropositions,
54
60
  answerFormat: 'tex',
@@ -0,0 +1,4 @@
1
+ import { Exercise, Question } from '../../exercises/exercise';
2
+ export declare const addComplex: Exercise;
3
+ export declare function getAddComplexQuestion(): Question;
4
+ //# sourceMappingURL=addComplex.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"addComplex.d.ts","sourceRoot":"","sources":["../../../src/exercises/complex/addComplex.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAe,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAU3E,eAAO,MAAM,UAAU,EAAE,QASxB,CAAC;AAEF,wBAAgB,qBAAqB,IAAI,QAAQ,CAqDhD"}
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getAddComplexQuestion = exports.addComplex = void 0;
4
+ const getDistinctQuestions_1 = require("../../exercises/utils/getDistinctQuestions");
5
+ const complex_1 = require("../../math/complex/complex");
6
+ const addNode_1 = require("../../tree/nodes/operators/addNode");
7
+ const substractNode_1 = require("../../tree/nodes/operators/substractNode");
8
+ const simplify_1 = require("../../tree/parsers/simplify");
9
+ const shuffle_1 = require("../../utils/shuffle");
10
+ const uuid_1 = require("uuid");
11
+ exports.addComplex = {
12
+ id: 'addComplex',
13
+ connector: '=',
14
+ instruction: '',
15
+ label: 'Ajouter deux nombres complexes',
16
+ levels: ['MathExp'],
17
+ isSingleStep: true,
18
+ sections: ['Nombres complexes'],
19
+ generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getAddComplexQuestion, nb),
20
+ };
21
+ function getAddComplexQuestion() {
22
+ const z1 = complex_1.ComplexConstructor.random();
23
+ const z2 = complex_1.ComplexConstructor.random();
24
+ const answer = (0, simplify_1.simplifyComplex)(new addNode_1.AddNode(z1.toTree(), z2.toTree()));
25
+ const getPropositions = (n) => {
26
+ const res = [];
27
+ res.push({
28
+ id: (0, uuid_1.v4)() + '',
29
+ statement: answer.toTex(),
30
+ isRightAnswer: true,
31
+ format: 'tex',
32
+ });
33
+ res.push({
34
+ id: (0, uuid_1.v4)(),
35
+ statement: (0, simplify_1.simplifyComplex)(new substractNode_1.SubstractNode(z1.toTree(), z2.toTree())).toTex(),
36
+ isRightAnswer: false,
37
+ format: 'tex',
38
+ });
39
+ const missing = n - res.length;
40
+ for (let i = 0; i < missing; i++) {
41
+ let isDuplicate;
42
+ let proposition;
43
+ do {
44
+ const wrongAnswer = complex_1.ComplexConstructor.random();
45
+ proposition = {
46
+ id: (0, uuid_1.v4)() + '',
47
+ statement: wrongAnswer.toTree().toTex(),
48
+ isRightAnswer: false,
49
+ format: 'tex',
50
+ };
51
+ isDuplicate = res.some((p) => p.statement === proposition.statement);
52
+ } while (isDuplicate);
53
+ res.push(proposition);
54
+ }
55
+ return (0, shuffle_1.shuffle)(res);
56
+ };
57
+ const question = {
58
+ answer: answer.toTex(),
59
+ instruction: `Soit $z=${z1.toTree().toTex()}$ et $z'=${z2.toTree().toTex()}$. Calculer $z + z'$.`,
60
+ keys: ['i', 'z', 'quote'],
61
+ getPropositions,
62
+ answerFormat: 'tex',
63
+ };
64
+ return question;
65
+ }
66
+ exports.getAddComplexQuestion = getAddComplexQuestion;
@@ -0,0 +1,4 @@
1
+ import { Exercise, Question } from '../../exercises/exercise';
2
+ export declare const mutiplyComplex: Exercise;
3
+ export declare function getMutiplyComplexQuestion(): Question;
4
+ //# sourceMappingURL=mutiplyComplex.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mutiplyComplex.d.ts","sourceRoot":"","sources":["../../../src/exercises/complex/mutiplyComplex.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAe,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAW3E,eAAO,MAAM,cAAc,EAAE,QAS5B,CAAC;AAEF,wBAAgB,yBAAyB,IAAI,QAAQ,CAsDpD"}
@@ -0,0 +1,65 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getMutiplyComplexQuestion = exports.mutiplyComplex = void 0;
4
+ const getDistinctQuestions_1 = require("../../exercises/utils/getDistinctQuestions");
5
+ const complex_1 = require("../../math/complex/complex");
6
+ const multiplyNode_1 = require("../../tree/nodes/operators/multiplyNode");
7
+ const simplify_1 = require("../../tree/parsers/simplify");
8
+ const shuffle_1 = require("../../utils/shuffle");
9
+ const uuid_1 = require("uuid");
10
+ exports.mutiplyComplex = {
11
+ id: 'mutiplyComplex',
12
+ connector: '=',
13
+ instruction: '',
14
+ label: 'Multiplier deux nombres complexes',
15
+ levels: ['MathExp'],
16
+ isSingleStep: true,
17
+ sections: ['Nombres complexes'],
18
+ generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getMutiplyComplexQuestion, nb),
19
+ };
20
+ function getMutiplyComplexQuestion() {
21
+ const z1 = complex_1.ComplexConstructor.random();
22
+ const z2 = complex_1.ComplexConstructor.random();
23
+ const answer = (0, simplify_1.simplifyComplex)(new multiplyNode_1.MultiplyNode(z1.toTree(), z2.toTree()));
24
+ const getPropositions = (n) => {
25
+ const res = [];
26
+ res.push({
27
+ id: (0, uuid_1.v4)(),
28
+ statement: answer.toTex(),
29
+ isRightAnswer: true,
30
+ format: 'tex',
31
+ });
32
+ res.push({
33
+ id: (0, uuid_1.v4)(),
34
+ statement: answer.toComplex().conjugate().toTree().toTex(),
35
+ isRightAnswer: true,
36
+ format: 'tex',
37
+ });
38
+ const missing = n - res.length;
39
+ for (let i = 0; i < missing; i++) {
40
+ let isDuplicate;
41
+ let proposition;
42
+ do {
43
+ const wrongAnswer = complex_1.ComplexConstructor.random();
44
+ proposition = {
45
+ id: (0, uuid_1.v4)() + '',
46
+ statement: wrongAnswer.toTree().toTex(),
47
+ isRightAnswer: false,
48
+ format: 'tex',
49
+ };
50
+ isDuplicate = res.some((p) => p.statement === proposition.statement);
51
+ } while (isDuplicate);
52
+ res.push(proposition);
53
+ }
54
+ return (0, shuffle_1.shuffle)(res);
55
+ };
56
+ const question = {
57
+ answer: answer.toTex(),
58
+ instruction: `Soit $z=${z1.toTree().toTex()}$ et $z'=${z2.toTree().toTex()}$. Calculer $z\\times z'$.`,
59
+ keys: ['i', 'z', 'quote'],
60
+ getPropositions,
61
+ answerFormat: 'tex',
62
+ };
63
+ return question;
64
+ }
65
+ exports.getMutiplyComplexQuestion = getMutiplyComplexQuestion;
@@ -0,0 +1,4 @@
1
+ import { Exercise, Question } from '../../exercises/exercise';
2
+ export declare const reAndIm: Exercise;
3
+ export declare function getReAndImQuestion(): Question;
4
+ //# sourceMappingURL=reAndIm.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reAndIm.d.ts","sourceRoot":"","sources":["../../../src/exercises/complex/reAndIm.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAe,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAW3E,eAAO,MAAM,OAAO,EAAE,QASrB,CAAC;AAEF,wBAAgB,kBAAkB,IAAI,QAAQ,CAmE7C"}
@@ -0,0 +1,79 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getReAndImQuestion = exports.reAndIm = void 0;
4
+ const getDistinctQuestions_1 = require("../../exercises/utils/getDistinctQuestions");
5
+ const complex_1 = require("../../math/complex/complex");
6
+ const randint_1 = require("../../math/utils/random/randint");
7
+ const coinFlip_1 = require("../../utils/coinFlip");
8
+ const shuffle_1 = require("../../utils/shuffle");
9
+ const uuid_1 = require("uuid");
10
+ exports.reAndIm = {
11
+ id: 'getReAndImQuestion',
12
+ connector: '=',
13
+ instruction: '',
14
+ label: 'Identifier partie réelle et partie imaginaire',
15
+ levels: ['MathExp'],
16
+ isSingleStep: true,
17
+ sections: ['Nombres complexes'],
18
+ generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getReAndImQuestion, nb),
19
+ };
20
+ function getReAndImQuestion() {
21
+ const z1 = complex_1.ComplexConstructor.random();
22
+ const isRe = (0, coinFlip_1.coinFlip)();
23
+ const answer = isRe ? z1.re : z1.im;
24
+ const getPropositions = (n) => {
25
+ const res = [];
26
+ res.push({
27
+ id: (0, uuid_1.v4)() + '',
28
+ statement: answer.toString(),
29
+ isRightAnswer: true,
30
+ format: 'tex',
31
+ });
32
+ res.push({
33
+ id: (0, uuid_1.v4)() + '',
34
+ statement: z1.im + 'i',
35
+ isRightAnswer: false,
36
+ format: 'tex',
37
+ });
38
+ if (!res.some((prop) => prop.statement === (isRe ? z1.im.toString() : z1.re.toString())))
39
+ res.push({
40
+ id: (0, uuid_1.v4)() + '',
41
+ statement: isRe ? z1.im.toString() : z1.re.toString(),
42
+ isRightAnswer: false,
43
+ format: 'tex',
44
+ });
45
+ if (!res.some((prop) => prop.statement === (-z1.im).toString()))
46
+ res.push({
47
+ id: (0, uuid_1.v4)() + '',
48
+ statement: (-z1.im).toString(),
49
+ isRightAnswer: false,
50
+ format: 'tex',
51
+ });
52
+ const missing = n - res.length;
53
+ for (let i = 0; i < missing; i++) {
54
+ let isDuplicate;
55
+ let proposition;
56
+ do {
57
+ const wrongAnswer = (0, randint_1.randint)(-10, 11) + '';
58
+ proposition = {
59
+ id: (0, uuid_1.v4)() + '',
60
+ statement: wrongAnswer,
61
+ isRightAnswer: false,
62
+ format: 'tex',
63
+ };
64
+ isDuplicate = res.some((p) => p.statement === proposition.statement);
65
+ } while (isDuplicate);
66
+ res.push(proposition);
67
+ }
68
+ return (0, shuffle_1.shuffle)(res);
69
+ };
70
+ const question = {
71
+ answer: answer.toString(),
72
+ instruction: `Soit $z=${z1.toTree().toTex()}$. Quelle est la partie ${isRe ? 'réelle' : 'imaginaire'} de $z$ ?`,
73
+ keys: ['i', 'z'],
74
+ getPropositions,
75
+ answerFormat: 'tex',
76
+ };
77
+ return question;
78
+ }
79
+ exports.getReAndImQuestion = getReAndImQuestion;
@@ -10,6 +10,7 @@ export interface Question {
10
10
  startStatement?: string;
11
11
  answer: string;
12
12
  answerFormat: 'tex' | 'raw';
13
+ questionType?: 'QCM' | 'free';
13
14
  keys?: string[];
14
15
  commands?: string[];
15
16
  coords?: number[];
@@ -23,10 +24,10 @@ export interface Exercise {
23
24
  label: string;
24
25
  sections: MathSection[];
25
26
  levels: MathLevel[];
26
- connector: '=' | '\\iff' | '\\approx';
27
+ connector?: '=' | '\\iff' | '\\approx';
27
28
  keys?: string[];
28
29
  generator(nb: number, options?: GeneratorOptions): Question[];
29
30
  }
30
31
  export type MathLevel = '6ème' | '5ème' | '4ème' | '3ème' | '2nde' | '1reTech' | '1reESM' | '1reSpé' | 'TermSpé' | 'TermTech' | 'MathExp' | 'MathComp';
31
- export type MathSection = 'Calcul littéral' | 'Équations' | 'Racines carrées' | 'Fractions' | 'Calculs' | 'Géométrie cartésienne' | 'Vecteurs' | 'Puissances' | 'Suites' | 'Pourcentages' | 'Dérivation' | 'Probabilités' | 'Droites' | 'Géométrie euclidienne' | 'Conversions' | 'Arithmétique' | 'Fonctions affines' | 'Proportionnalité' | 'Logarithme népérien' | 'Exponentielle' | 'Fonctions' | 'Statistiques' | 'Limites' | 'Intégration' | 'Primitives' | 'Équations différentielles' | 'Trigonométrie';
32
+ export type MathSection = 'Calcul littéral' | 'Équations' | 'Racines carrées' | 'Fractions' | 'Calculs' | 'Géométrie cartésienne' | 'Vecteurs' | 'Puissances' | 'Suites' | 'Pourcentages' | 'Dérivation' | 'Probabilités' | 'Droites' | 'Géométrie euclidienne' | 'Conversions' | 'Arithmétique' | 'Fonctions affines' | 'Proportionnalité' | 'Logarithme népérien' | 'Exponentielle' | 'Fonctions' | 'Statistiques' | 'Limites' | 'Intégration' | 'Primitives' | 'Équations différentielles' | 'Trigonométrie' | 'Second degré' | 'Nombres complexes';
32
33
  //# sourceMappingURL=exercise.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"exercise.d.ts","sourceRoot":"","sources":["../../src/exercises/exercise.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,gBAAgB,GAAG,EAAE,CAAC;AAElC,MAAM,MAAM,WAAW,GAAG;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,OAAO,CAAC;IACvB,MAAM,EAAE,KAAK,GAAG,KAAK,CAAC;CACvB,CAAC;AACF,MAAM,WAAW,QAAQ;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,KAAK,GAAG,KAAK,CAAC;IAC5B,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,CAAC,EAAE,GAAG,CAAC;IACd,eAAe,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,WAAW,EAAE,CAAC;CAC/C;AAED,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,OAAO,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,WAAW,EAAE,CAAC;IACxB,MAAM,EAAE,SAAS,EAAE,CAAC;IACpB,SAAS,EAAE,GAAG,GAAG,OAAO,GAAG,UAAU,CAAC;IACtC,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,SAAS,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,gBAAgB,GAAG,QAAQ,EAAE,CAAC;CAC/D;AAED,MAAM,MAAM,SAAS,GACjB,MAAM,GACN,MAAM,GACN,MAAM,GACN,MAAM,GACN,MAAM,GACN,SAAS,GACT,QAAQ,GACR,QAAQ,GACR,SAAS,GACT,UAAU,GACV,SAAS,GACT,UAAU,CAAC;AAEf,MAAM,MAAM,WAAW,GACnB,iBAAiB,GACjB,WAAW,GACX,iBAAiB,GACjB,WAAW,GACX,SAAS,GACT,uBAAuB,GACvB,UAAU,GACV,YAAY,GACZ,QAAQ,GACR,cAAc,GACd,YAAY,GACZ,cAAc,GACd,SAAS,GACT,uBAAuB,GACvB,aAAa,GACb,cAAc,GACd,mBAAmB,GACnB,kBAAkB,GAClB,qBAAqB,GACrB,eAAe,GACf,WAAW,GACX,cAAc,GACd,SAAS,GACT,aAAa,GACb,YAAY,GACZ,2BAA2B,GAC3B,eAAe,CAAC"}
1
+ {"version":3,"file":"exercise.d.ts","sourceRoot":"","sources":["../../src/exercises/exercise.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,gBAAgB,GAAG,EAAE,CAAC;AAElC,MAAM,MAAM,WAAW,GAAG;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,OAAO,CAAC;IACvB,MAAM,EAAE,KAAK,GAAG,KAAK,CAAC;CACvB,CAAC;AACF,MAAM,WAAW,QAAQ;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,KAAK,GAAG,KAAK,CAAC;IAC5B,YAAY,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;IAC9B,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,CAAC,EAAE,GAAG,CAAC;IACd,eAAe,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,WAAW,EAAE,CAAC;CAC/C;AAED,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,OAAO,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,WAAW,EAAE,CAAC;IACxB,MAAM,EAAE,SAAS,EAAE,CAAC;IACpB,SAAS,CAAC,EAAE,GAAG,GAAG,OAAO,GAAG,UAAU,CAAC;IACvC,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,SAAS,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,gBAAgB,GAAG,QAAQ,EAAE,CAAC;CAC/D;AAED,MAAM,MAAM,SAAS,GACjB,MAAM,GACN,MAAM,GACN,MAAM,GACN,MAAM,GACN,MAAM,GACN,SAAS,GACT,QAAQ,GACR,QAAQ,GACR,SAAS,GACT,UAAU,GACV,SAAS,GACT,UAAU,CAAC;AAEf,MAAM,MAAM,WAAW,GACnB,iBAAiB,GACjB,WAAW,GACX,iBAAiB,GACjB,WAAW,GACX,SAAS,GACT,uBAAuB,GACvB,UAAU,GACV,YAAY,GACZ,QAAQ,GACR,cAAc,GACd,YAAY,GACZ,cAAc,GACd,SAAS,GACT,uBAAuB,GACvB,aAAa,GACb,cAAc,GACd,mBAAmB,GACnB,kBAAkB,GAClB,qBAAqB,GACrB,eAAe,GACf,WAAW,GACX,cAAc,GACd,SAAS,GACT,aAAa,GACb,YAAY,GACZ,2BAA2B,GAC3B,eAAe,GACf,cAAc,GACd,mBAAmB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"exercises.d.ts","sourceRoot":"","sources":["../../src/exercises/exercises.ts"],"names":[],"mappings":"AAgJA,eAAO,MAAM,SAAS,iCA8LrB,CAAC"}
1
+ {"version":3,"file":"exercises.d.ts","sourceRoot":"","sources":["../../src/exercises/exercises.ts"],"names":[],"mappings":"AAyJA,eAAO,MAAM,SAAS,iCA2MrB,CAAC"}
@@ -135,6 +135,15 @@ const inverseImageFunction_1 = require("./functions/basics/inverseImageFunction"
135
135
  const imageFunctionGeogebra_1 = require("./functions/basics/imageFunctionGeogebra");
136
136
  const inverseImageFunctionGeogebra_1 = require("./functions/basics/inverseImageFunctionGeogebra");
137
137
  const signFunction_1 = require("./functions/affines/signFunction");
138
+ const alphaBetaInCanonicalForm_1 = require("./functions/trinoms/alphaBetaInCanonicalForm");
139
+ const canonicalFromDevForm_1 = require("./functions/trinoms/canonicalFromDevForm");
140
+ const alphaBetaFromDevForm_1 = require("./functions/trinoms/alphaBetaFromDevForm");
141
+ const extremumFromCanonicalForm_1 = require("./functions/trinoms/extremumFromCanonicalForm");
142
+ const extremumTypeFromAlgebricForm_1 = require("./functions/trinoms/extremumTypeFromAlgebricForm");
143
+ const variationsFromAlgebricForm_1 = require("./functions/trinoms/variationsFromAlgebricForm");
144
+ const mutiplyComplex_1 = require("./complex/mutiplyComplex");
145
+ const reAndIm_1 = require("./complex/reAndIm");
146
+ const addComplex_1 = require("./complex/addComplex");
138
147
  exports.exercises = [
139
148
  /**
140
149
  * calcul litteral
@@ -313,4 +322,15 @@ exports.exercises = [
313
322
  usualPrimitives_1.usualPrimitives,
314
323
  equaDiffGeneralForme_1.exponentialDifferentialEquation,
315
324
  equaDiffGeneralFormeWithIC_1.exponentialDifferentialEquationWithIC,
325
+ /**Trinomes */
326
+ alphaBetaInCanonicalForm_1.alphaBetaInCanonicalForm,
327
+ canonicalFromDevForm_1.canonicalFromDevForm,
328
+ alphaBetaFromDevForm_1.alphaBetaFromDevForm,
329
+ extremumFromCanonicalForm_1.extremumFromCanonicalForm,
330
+ extremumTypeFromAlgebricForm_1.extremumTypeFromAlgebricForm,
331
+ variationsFromAlgebricForm_1.variationsFromAlgebricForm,
332
+ /**Complexes */
333
+ mutiplyComplex_1.mutiplyComplex,
334
+ reAndIm_1.reAndIm,
335
+ addComplex_1.addComplex,
316
336
  ];
@@ -0,0 +1,4 @@
1
+ import { Exercise, Question } from '../../../exercises/exercise';
2
+ export declare const exo: Exercise;
3
+ export declare function getExoQuestion(): Question;
4
+ //# sourceMappingURL=template.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"template.d.ts","sourceRoot":"","sources":["../../../../src/exercises/functions/affines/template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAe,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAK3E,eAAO,MAAM,GAAG,EAAE,QASjB,CAAC;AAEF,wBAAgB,cAAc,IAAI,QAAQ,CAyCzC"}
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getExoQuestion = exports.exo = void 0;
4
+ const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
5
+ const shuffle_1 = require("../../../utils/shuffle");
6
+ const uuid_1 = require("uuid");
7
+ exports.exo = {
8
+ id: 'name',
9
+ connector: '',
10
+ instruction: '',
11
+ label: '',
12
+ levels: [],
13
+ isSingleStep: true,
14
+ sections: [],
15
+ generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getExoQuestion, nb),
16
+ };
17
+ function getExoQuestion() {
18
+ const getPropositions = (n) => {
19
+ const res = [];
20
+ res.push({
21
+ id: (0, uuid_1.v4)() + '',
22
+ statement: '',
23
+ isRightAnswer: true,
24
+ format: 'tex',
25
+ });
26
+ for (let i = 0; i < n - 1; i++) {
27
+ let isDuplicate;
28
+ let proposition;
29
+ do {
30
+ const wrongAnswer = '';
31
+ proposition = {
32
+ id: (0, uuid_1.v4)() + '',
33
+ statement: wrongAnswer,
34
+ isRightAnswer: false,
35
+ format: 'tex',
36
+ };
37
+ isDuplicate = res.some((p) => p.statement === proposition.statement);
38
+ } while (isDuplicate);
39
+ res.push(proposition);
40
+ }
41
+ return (0, shuffle_1.shuffle)(res);
42
+ };
43
+ const question = {
44
+ answer: '',
45
+ keys: [],
46
+ getPropositions,
47
+ answerFormat: 'tex',
48
+ };
49
+ return question;
50
+ }
51
+ exports.getExoQuestion = getExoQuestion;
@@ -40,8 +40,8 @@ function getInverseImageFunctionGeogebra() {
40
40
  roots = polynome2.getRoots();
41
41
  }
42
42
  const statement = rand
43
- ? `Déterminer le ou les antécédents de ${polynome1.calculate(xValue)}$ par la fonction $f$ représentée ci dessous.`
44
- : `Déterminer le ou les antécédents de ${yValue}$ par la fonction $f$ représentée ci dessous.`;
43
+ ? `Déterminer le ou les antécédents de $${polynome1.calculate(xValue)}$ par la fonction $f$ représentée ci dessous.`
44
+ : `Déterminer le ou les antécédents de $${yValue}$ par la fonction $f$ représentée ci dessous.`;
45
45
  const answer = rand
46
46
  ? xValue
47
47
  : roots.length === 2
@@ -0,0 +1,4 @@
1
+ import { Exercise, Question } from '../../../exercises/exercise';
2
+ export declare const alphaBetaFromDevForm: Exercise;
3
+ export declare function getAlphaBetaFromDevFormQuestion(): Question;
4
+ //# sourceMappingURL=alphaBetaFromDevForm.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"alphaBetaFromDevForm.d.ts","sourceRoot":"","sources":["../../../../src/exercises/functions/trinoms/alphaBetaFromDevForm.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAe,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAU3E,eAAO,MAAM,oBAAoB,EAAE,QASlC,CAAC;AAEF,wBAAgB,+BAA+B,IAAI,QAAQ,CAmD1D"}