math-exercises 1.3.24 → 1.3.26

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 (137) hide show
  1. package/lib/exercises/calcul/addAndSub.d.ts.map +1 -1
  2. package/lib/exercises/calcul/addAndSub.js +1 -0
  3. package/lib/exercises/calcul/addAndSubWithoutRelatives.d.ts.map +1 -1
  4. package/lib/exercises/calcul/addAndSubWithoutRelatives.js +1 -0
  5. package/lib/exercises/calcul/fractions/fractionAndIntegerDivision.d.ts.map +1 -1
  6. package/lib/exercises/calcul/fractions/fractionAndIntegerDivision.js +1 -0
  7. package/lib/exercises/calcul/fractions/fractionAndIntegerProduct.d.ts.map +1 -1
  8. package/lib/exercises/calcul/fractions/fractionAndIntegerProduct.js +1 -0
  9. package/lib/exercises/calcul/fractions/fractionAndIntegerSum.d.ts.map +1 -1
  10. package/lib/exercises/calcul/fractions/fractionAndIntegerSum.js +1 -0
  11. package/lib/exercises/calcul/fractions/fractionToPercentToDecimal.d.ts +3 -0
  12. package/lib/exercises/calcul/fractions/fractionToPercentToDecimal.d.ts.map +1 -1
  13. package/lib/exercises/calcul/fractions/fractionToPercentToDecimal.js +55 -39
  14. package/lib/exercises/calcul/fractions/fractionsDivision.d.ts.map +1 -1
  15. package/lib/exercises/calcul/fractions/fractionsDivision.js +1 -0
  16. package/lib/exercises/calcul/fractions/fractionsProduct.d.ts.map +1 -1
  17. package/lib/exercises/calcul/fractions/fractionsProduct.js +1 -0
  18. package/lib/exercises/calcul/fractions/fractionsSum.d.ts.map +1 -1
  19. package/lib/exercises/calcul/fractions/fractionsSum.js +1 -0
  20. package/lib/exercises/calcul/fractions/simplifyFraction.d.ts.map +1 -1
  21. package/lib/exercises/calcul/fractions/simplifyFraction.js +1 -0
  22. package/lib/exercises/calcul/operations/operationsPriorities.d.ts.map +1 -1
  23. package/lib/exercises/calcul/operations/operationsPriorities.js +1 -0
  24. package/lib/exercises/calcul/operations/operationsPrioritiesWithoutRelative.d.ts.map +1 -1
  25. package/lib/exercises/calcul/operations/operationsPrioritiesWithoutRelative.js +1 -0
  26. package/lib/exercises/calcul/rounding/rounding.d.ts.map +1 -1
  27. package/lib/exercises/calcul/rounding/rounding.js +1 -0
  28. package/lib/exercises/calculLitteral/distributivity/doubleDistributivity.d.ts.map +1 -1
  29. package/lib/exercises/calculLitteral/distributivity/doubleDistributivity.js +1 -0
  30. package/lib/exercises/calculLitteral/distributivity/firstIdentity.d.ts.map +1 -1
  31. package/lib/exercises/calculLitteral/distributivity/firstIdentity.js +1 -0
  32. package/lib/exercises/calculLitteral/distributivity/secondIdentity.d.ts.map +1 -1
  33. package/lib/exercises/calculLitteral/distributivity/secondIdentity.js +1 -0
  34. package/lib/exercises/calculLitteral/distributivity/simpleDistributivity.d.ts.map +1 -1
  35. package/lib/exercises/calculLitteral/distributivity/simpleDistributivity.js +1 -0
  36. package/lib/exercises/calculLitteral/distributivity/thirdIdentity.d.ts.map +1 -1
  37. package/lib/exercises/calculLitteral/distributivity/thirdIdentity.js +1 -0
  38. package/lib/exercises/calculLitteral/equation/equationSimpleSquare.d.ts.map +1 -1
  39. package/lib/exercises/calculLitteral/equation/equationSimpleSquare.js +1 -0
  40. package/lib/exercises/calculLitteral/equation/equationType1Exercise.d.ts.map +1 -1
  41. package/lib/exercises/calculLitteral/equation/equationType1Exercise.js +1 -0
  42. package/lib/exercises/calculLitteral/equation/equationType2Exercise.d.ts.map +1 -1
  43. package/lib/exercises/calculLitteral/equation/equationType2Exercise.js +1 -0
  44. package/lib/exercises/calculLitteral/equation/equationType3Exercise.d.ts.map +1 -1
  45. package/lib/exercises/calculLitteral/equation/equationType3Exercise.js +1 -0
  46. package/lib/exercises/calculLitteral/equation/equationType4Exercise.d.ts.map +1 -1
  47. package/lib/exercises/calculLitteral/equation/equationType4Exercise.js +1 -0
  48. package/lib/exercises/calculLitteral/equation/firstDegreeEquation.d.ts.map +1 -1
  49. package/lib/exercises/calculLitteral/equation/firstDegreeEquation.js +1 -0
  50. package/lib/exercises/calculLitteral/equation/firstDegreeGeneralEquation.d.ts.map +1 -1
  51. package/lib/exercises/calculLitteral/equation/firstDegreeGeneralEquation.js +1 -0
  52. package/lib/exercises/calculLitteral/factorisation/factoIdRmq1.d.ts.map +1 -1
  53. package/lib/exercises/calculLitteral/factorisation/factoIdRmq1.js +1 -0
  54. package/lib/exercises/calculLitteral/factorisation/factoIdRmq2.d.ts.map +1 -1
  55. package/lib/exercises/calculLitteral/factorisation/factoIdRmq2.js +1 -0
  56. package/lib/exercises/calculLitteral/factorisation/factoIdRmq3.d.ts.map +1 -1
  57. package/lib/exercises/calculLitteral/factorisation/factoIdRmq3.js +1 -0
  58. package/lib/exercises/calculLitteral/factorisation/factoType1Exercise.d.ts.map +1 -1
  59. package/lib/exercises/calculLitteral/factorisation/factoType1Exercise.js +1 -0
  60. package/lib/exercises/derivation/derivative/thirdDegreeDerivative.d.ts.map +1 -1
  61. package/lib/exercises/derivation/derivative/thirdDegreeDerivative.js +1 -0
  62. package/lib/exercises/derivation/derivative/usualderivative.d.ts.map +1 -1
  63. package/lib/exercises/derivation/derivative/usualderivative.js +1 -0
  64. package/lib/exercises/exercise.d.ts +3 -0
  65. package/lib/exercises/exercise.d.ts.map +1 -1
  66. package/lib/exercises/exercises.d.ts.map +1 -1
  67. package/lib/exercises/exercises.js +10 -5
  68. package/lib/exercises/geometry/cartesian/derivativeNumberReading.d.ts.map +1 -1
  69. package/lib/exercises/geometry/cartesian/derivativeNumberReading.js +9 -18
  70. package/lib/exercises/geometry/cartesian/leadingCoefficient.d.ts.map +1 -1
  71. package/lib/exercises/geometry/cartesian/leadingCoefficient.js +26 -4
  72. package/lib/exercises/geometry/cartesian/midpoint.d.ts.map +1 -1
  73. package/lib/exercises/geometry/cartesian/midpoint.js +1 -0
  74. package/lib/exercises/geometry/vectors/scalarProductViaCoords.d.ts.map +1 -1
  75. package/lib/exercises/geometry/vectors/scalarProductViaCoords.js +2 -0
  76. package/lib/exercises/percent/applyPercent.d.ts.map +1 -1
  77. package/lib/exercises/percent/applyPercent.js +1 -0
  78. package/lib/exercises/percent/averageEvolutionRate.d.ts.map +1 -1
  79. package/lib/exercises/percent/averageEvolutionRate.js +1 -0
  80. package/lib/exercises/percent/globalPercent.d.ts.map +1 -1
  81. package/lib/exercises/percent/globalPercent.js +1 -0
  82. package/lib/exercises/percent/reciprocalPercentage.d.ts.map +1 -1
  83. package/lib/exercises/percent/reciprocalPercentage.js +1 -0
  84. package/lib/exercises/powers/powersDivision.d.ts.map +1 -1
  85. package/lib/exercises/powers/powersDivision.js +1 -0
  86. package/lib/exercises/powers/powersOfTenToDecimal.d.ts.map +1 -1
  87. package/lib/exercises/powers/powersOfTenToDecimal.js +1 -0
  88. package/lib/exercises/powers/powersPower.d.ts.map +1 -1
  89. package/lib/exercises/powers/powersPower.js +1 -0
  90. package/lib/exercises/powers/powersProduct.d.ts.map +1 -1
  91. package/lib/exercises/powers/powersProduct.js +1 -0
  92. package/lib/exercises/powers/scientificToDecimal.d.ts.map +1 -1
  93. package/lib/exercises/powers/scientificToDecimal.js +1 -0
  94. package/lib/exercises/proba/conditionalProbability.d.ts.map +1 -1
  95. package/lib/exercises/proba/conditionalProbability.js +2 -1
  96. package/lib/exercises/proba/marginalAndConditionalFrequency.d.ts.map +1 -1
  97. package/lib/exercises/proba/marginalAndConditionalFrequency.js +9 -1
  98. package/lib/exercises/proba/probabilityTree.d.ts.map +1 -1
  99. package/lib/exercises/proba/probabilityTree.js +42 -7
  100. package/lib/exercises/sequences/arithmetic/arithmeticExplicitFormulaUsage.d.ts.map +1 -1
  101. package/lib/exercises/sequences/arithmetic/arithmeticExplicitFormulaUsage.js +1 -0
  102. package/lib/exercises/sequences/arithmetic/arithmeticFindExplicitFormula.d.ts.map +1 -1
  103. package/lib/exercises/sequences/arithmetic/arithmeticFindExplicitFormula.js +1 -0
  104. package/lib/exercises/sequences/arithmetic/arithmeticFindReason.d.ts.map +1 -1
  105. package/lib/exercises/sequences/arithmetic/arithmeticFindReason.js +1 -0
  106. package/lib/exercises/sequences/arithmetic/arithmeticReasonUsage.d.ts.map +1 -1
  107. package/lib/exercises/sequences/arithmetic/arithmeticReasonUsage.js +1 -0
  108. package/lib/exercises/sequences/arithmetic/arithmeticRecurrenceFormulaUsage.d.ts.map +1 -1
  109. package/lib/exercises/sequences/arithmetic/arithmeticRecurrenceFormulaUsage.js +1 -0
  110. package/lib/exercises/sequences/arithmetic/arithmeticThresholdFind.d.ts.map +1 -1
  111. package/lib/exercises/sequences/arithmetic/arithmeticThresholdFind.js +1 -0
  112. package/lib/exercises/sequences/geometric/geometricExplicitFormulaUsage.d.ts.map +1 -1
  113. package/lib/exercises/sequences/geometric/geometricExplicitFormulaUsage.js +1 -0
  114. package/lib/exercises/sequences/geometric/geometricFindExplicitFormula.d.ts.map +1 -1
  115. package/lib/exercises/sequences/geometric/geometricFindExplicitFormula.js +1 -0
  116. package/lib/exercises/sequences/geometric/geometricFindReason.d.ts.map +1 -1
  117. package/lib/exercises/sequences/geometric/geometricFindReason.js +1 -0
  118. package/lib/exercises/sequences/geometric/geometricReasonUsage.d.ts.map +1 -1
  119. package/lib/exercises/sequences/geometric/geometricReasonUsage.js +1 -0
  120. package/lib/exercises/sequences/geometric/geometricRecurrenceFormulaUsage.d.ts.map +1 -1
  121. package/lib/exercises/sequences/geometric/geometricRecurrenceFormulaUsage.js +1 -0
  122. package/lib/exercises/squareRoots/simpifySquareRoot.d.ts.map +1 -1
  123. package/lib/exercises/squareRoots/simpifySquareRoot.js +1 -0
  124. package/lib/exercises/trigonometry/mainRemarkableValues.d.ts.map +1 -1
  125. package/lib/exercises/trigonometry/mainRemarkableValues.js +1 -0
  126. package/lib/exercises/trigonometry/remarkableValues.d.ts.map +1 -1
  127. package/lib/exercises/trigonometry/remarkableValues.js +1 -0
  128. package/lib/exercises/utils/getDistinctQuestions.d.ts +1 -0
  129. package/lib/exercises/utils/getDistinctQuestions.d.ts.map +1 -1
  130. package/lib/exercises/utils/getDistinctQuestions.js +15 -2
  131. package/package.json +1 -1
  132. package/lib/exercises/derivation/derivative/affineDerivative.d.ts +0 -4
  133. package/lib/exercises/derivation/derivative/affineDerivative.d.ts.map +0 -1
  134. package/lib/exercises/derivation/derivative/affineDerivative.js +0 -27
  135. package/lib/exercises/derivation/derivative/secondDegreeDerivative.d.ts +0 -1
  136. package/lib/exercises/derivation/derivative/secondDegreeDerivative.d.ts.map +0 -1
  137. package/lib/exercises/derivation/derivative/secondDegreeDerivative.js +0 -28
@@ -1 +1 @@
1
- {"version":3,"file":"addAndSub.d.ts","sourceRoot":"","sources":["../../../src/exercises/calcul/addAndSub.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAGjD;;GAEG;AACH,eAAO,MAAM,iBAAiB,EAAE,QAS/B,CAAC;AAEF,wBAAgB,qBAAqB,IAAI,QAAQ,CAkBhD"}
1
+ {"version":3,"file":"addAndSub.d.ts","sourceRoot":"","sources":["../../../src/exercises/calcul/addAndSub.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAGjD;;GAEG;AACH,eAAO,MAAM,iBAAiB,EAAE,QAU/B,CAAC;AAEF,wBAAgB,qBAAqB,IAAI,QAAQ,CAkBhD"}
@@ -17,6 +17,7 @@ exports.addAndSubExercise = {
17
17
  section: 'Calculs',
18
18
  isSingleStep: true,
19
19
  generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getAddAndSubQuestions, nb),
20
+ keys: [],
20
21
  };
21
22
  function getAddAndSubQuestions() {
22
23
  const nbOperations = (0, randint_1.randint)(2, 4);
@@ -1 +1 @@
1
- {"version":3,"file":"addAndSubWithoutRelatives.d.ts","sourceRoot":"","sources":["../../../src/exercises/calcul/addAndSubWithoutRelatives.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAGjD;;GAEG;AACH,eAAO,MAAM,yBAAyB,EAAE,QASvC,CAAC;AAEF,wBAAgB,4BAA4B,IAAI,QAAQ,CAiCvD"}
1
+ {"version":3,"file":"addAndSubWithoutRelatives.d.ts","sourceRoot":"","sources":["../../../src/exercises/calcul/addAndSubWithoutRelatives.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAGjD;;GAEG;AACH,eAAO,MAAM,yBAAyB,EAAE,QAUvC,CAAC;AAEF,wBAAgB,4BAA4B,IAAI,QAAQ,CAiCvD"}
@@ -17,6 +17,7 @@ exports.addAndSubWithoutRelatives = {
17
17
  section: 'Calculs',
18
18
  isSingleStep: true,
19
19
  generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getAddAndSubWithoutRelatives, nb),
20
+ keys: [],
20
21
  };
21
22
  function getAddAndSubWithoutRelatives() {
22
23
  let answer = -1;
@@ -1 +1 @@
1
- {"version":3,"file":"fractionAndIntegerDivision.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calcul/fractions/fractionAndIntegerDivision.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAQ9D,eAAO,MAAM,0BAA0B,EAAE,QASxC,CAAC;AAEF,wBAAgB,6BAA6B,IAAI,QAAQ,CAiBxD"}
1
+ {"version":3,"file":"fractionAndIntegerDivision.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calcul/fractions/fractionAndIntegerDivision.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAQ9D,eAAO,MAAM,0BAA0B,EAAE,QAUxC,CAAC;AAEF,wBAAgB,6BAA6B,IAAI,QAAQ,CAiBxD"}
@@ -16,6 +16,7 @@ exports.fractionAndIntegerDivision = {
16
16
  isSingleStep: false,
17
17
  section: 'Fractions',
18
18
  generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getFractionAndIntegerDivision, nb),
19
+ keys: [],
19
20
  };
20
21
  function getFractionAndIntegerDivision() {
21
22
  const rational = rational_1.RationalConstructor.randomIrreductible();
@@ -1 +1 @@
1
- {"version":3,"file":"fractionAndIntegerProduct.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calcul/fractions/fractionAndIntegerProduct.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAO9D,eAAO,MAAM,yBAAyB,EAAE,QASvC,CAAC;AAEF,wBAAgB,4BAA4B,IAAI,QAAQ,CAcvD"}
1
+ {"version":3,"file":"fractionAndIntegerProduct.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calcul/fractions/fractionAndIntegerProduct.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAO9D,eAAO,MAAM,yBAAyB,EAAE,QAUvC,CAAC;AAEF,wBAAgB,4BAA4B,IAAI,QAAQ,CAcvD"}
@@ -15,6 +15,7 @@ exports.fractionAndIntegerProduct = {
15
15
  isSingleStep: false,
16
16
  section: 'Fractions',
17
17
  generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getFractionAndIntegerProduct, nb),
18
+ keys: [],
18
19
  };
19
20
  function getFractionAndIntegerProduct() {
20
21
  const rational = rational_1.RationalConstructor.randomIrreductible();
@@ -1 +1 @@
1
- {"version":3,"file":"fractionAndIntegerSum.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calcul/fractions/fractionAndIntegerSum.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAO9D,eAAO,MAAM,qBAAqB,EAAE,QASnC,CAAC;AAEF,wBAAgB,wBAAwB,IAAI,QAAQ,CAanD"}
1
+ {"version":3,"file":"fractionAndIntegerSum.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calcul/fractions/fractionAndIntegerSum.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAO9D,eAAO,MAAM,qBAAqB,EAAE,QAUnC,CAAC;AAEF,wBAAgB,wBAAwB,IAAI,QAAQ,CAanD"}
@@ -15,6 +15,7 @@ exports.fractionAndIntegerSum = {
15
15
  isSingleStep: false,
16
16
  section: 'Fractions',
17
17
  generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getFractionAndIntegerSum, nb),
18
+ keys: [],
18
19
  };
19
20
  function getFractionAndIntegerSum() {
20
21
  const rational = rational_1.RationalConstructor.randomIrreductible();
@@ -1 +1,4 @@
1
+ import { Exercise, Question } from '../../../exercises/exercise';
2
+ export declare const fractionToPercentToDecimal: Exercise;
3
+ export declare function getFractionToPercentToDecimal(): Question;
1
4
  //# sourceMappingURL=fractionToPercentToDecimal.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"fractionToPercentToDecimal.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calcul/fractions/fractionToPercentToDecimal.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"fractionToPercentToDecimal.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calcul/fractions/fractionToPercentToDecimal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAQ9D,eAAO,MAAM,0BAA0B,EAAE,QASxC,CAAC;AAEF,wBAAgB,6BAA6B,IAAI,QAAQ,CAqDxD"}
@@ -1,53 +1,69 @@
1
1
  "use strict";
2
- /*import { Exercise, Question } from "../../../exercises/exercise";
3
- import { getDistinctQuestions } from "../../../exercises/utils/getDistinctQuestions";
4
- import { randint } from "../../../math/utils/random/randint";
5
- import { round } from "../../../math/utils/round";
6
-
7
- export const fractionToPercentToDecimal: Exercise = {
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getFractionToPercentToDecimal = exports.fractionToPercentToDecimal = void 0;
4
+ const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
5
+ const randint_1 = require("../../../math/utils/random/randint");
6
+ const round_1 = require("../../../math/utils/round");
7
+ const numberNode_1 = require("../../../tree/nodes/numbers/numberNode");
8
+ const fractionNode_1 = require("../../../tree/nodes/operators/fractionNode");
9
+ const simplify_1 = require("../../../tree/parsers/simplify");
10
+ exports.fractionToPercentToDecimal = {
8
11
  id: 'fractionToPercentToDecimal',
9
12
  connector: '\\iff',
10
13
  instruction: '',
11
- label: 'Résoudre une équation du premier degré du type ax + b = cx',
14
+ label: "Passer d'une écriture d'un nombre à une autre (décimale, fractionnaire, sous forme de pourcentage).",
12
15
  levels: ['2', '1'],
13
- section: 'Pourcentages',
16
+ section: 'Fractions',
14
17
  isSingleStep: false,
15
- generator: (nb: number) => getDistinctQuestions(getFractionToPercentToDecimal, nb),
18
+ generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getFractionToPercentToDecimal, nb),
16
19
  };
17
-
18
- const pgcd = (a: number, b: number): number => {
19
- if (b === 0)
20
- return a;
21
- return pgcd(b, a % b);
22
- }
23
-
24
- export function getFractionToPercentToDecimal(): Question {
25
-
26
- const a = randint(1, 100);
27
- const b = randint(1, 100);
28
- const percent = round(a/b, 4) * 100;
29
- const decimal = round(a/b, 2);
30
- const flip = randint(1,7);
31
-
20
+ function getFractionToPercentToDecimal() {
21
+ const denominator = 2 ** (0, randint_1.randint)(0, 5) * 5 ** (0, randint_1.randint)(0, 5);
22
+ const numerator = (0, randint_1.randint)(1, denominator);
23
+ const fraction = new fractionNode_1.FractionNode(new numberNode_1.NumberNode(numerator), new numberNode_1.NumberNode(denominator));
24
+ const decimal = numerator / denominator;
25
+ const percent = (0, round_1.round)((numerator / denominator) * 100, 2);
26
+ const rand = (0, randint_1.randint)(1, 7);
32
27
  let instruction;
33
- let answer = "";
34
-
35
- switch (flip){
28
+ let answer = '';
29
+ switch (rand) {
36
30
  case 1: {
37
- instruction = `Convertir le nombre suivant $${decimal}$ en pourcentage et en fraction`;
38
- answer = `\\{${percent}\\%\\ ; \\frac{${a/pgcd(a,b)}}{${b/pgcd(a,b)}}\\}`;
31
+ instruction = `Convertir le nombre suivant $${decimal}$ en pourcentage`;
32
+ answer = `${percent}\\%`;
33
+ break;
39
34
  }
40
-
41
35
  case 2: {
42
-
36
+ instruction = `Convertir le nombre suivant $${decimal}$ en fraction`;
37
+ answer = `${(0, simplify_1.simplifyNode)(fraction).toTex()}`;
38
+ break;
39
+ }
40
+ case 3: {
41
+ instruction = `Convertir le nombre suivant $${percent}\\%$ en décimal`;
42
+ answer = `${decimal}`;
43
+ break;
44
+ }
45
+ case 4: {
46
+ instruction = `Convertir le nombre suivant $${percent}\\%$ en fraction`;
47
+ answer = `${(0, simplify_1.simplifyNode)(fraction).toTex()}`;
48
+ break;
49
+ }
50
+ case 5: {
51
+ instruction = `Convertir le nombre suivant $${fraction.toTex()}$ en décimal`;
52
+ answer = `${decimal}`;
53
+ break;
54
+ }
55
+ case 6: {
56
+ instruction = `Convertir le nombre suivant $${fraction.toTex()}$ en pourcentage`;
57
+ answer = `${percent}\\%`;
58
+ break;
43
59
  }
44
60
  }
45
-
46
- const question: Question = {
61
+ const question = {
47
62
  instruction,
48
- startStatement: `s = `,
49
- answer,
50
- };
51
-
52
- return question;
53
- }*/
63
+ //startStatement: `${simplifyNode(fraction).toTex()}`,
64
+ answer: answer.replace('.', ','),
65
+ keys: [],
66
+ };
67
+ return question;
68
+ }
69
+ exports.getFractionToPercentToDecimal = getFractionToPercentToDecimal;
@@ -1 +1 @@
1
- {"version":3,"file":"fractionsDivision.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calcul/fractions/fractionsDivision.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAK9D,eAAO,MAAM,iBAAiB,EAAE,QAS/B,CAAC;AAEF,wBAAgB,oBAAoB,IAAI,QAAQ,CAY/C"}
1
+ {"version":3,"file":"fractionsDivision.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calcul/fractions/fractionsDivision.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAK9D,eAAO,MAAM,iBAAiB,EAAE,QAU/B,CAAC;AAEF,wBAAgB,oBAAoB,IAAI,QAAQ,CAY/C"}
@@ -13,6 +13,7 @@ exports.fractionsDivision = {
13
13
  section: 'Fractions',
14
14
  isSingleStep: false,
15
15
  generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getFractionsDivision, nb),
16
+ keys: [],
16
17
  };
17
18
  function getFractionsDivision() {
18
19
  const rational = rational_1.RationalConstructor.randomIrreductible();
@@ -1 +1 @@
1
- {"version":3,"file":"fractionsProduct.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calcul/fractions/fractionsProduct.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAK9D,eAAO,MAAM,gBAAgB,EAAE,QAS9B,CAAC;AAEF,wBAAgB,mBAAmB,IAAI,QAAQ,CAW9C"}
1
+ {"version":3,"file":"fractionsProduct.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calcul/fractions/fractionsProduct.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAK9D,eAAO,MAAM,gBAAgB,EAAE,QAU9B,CAAC;AAEF,wBAAgB,mBAAmB,IAAI,QAAQ,CAW9C"}
@@ -13,6 +13,7 @@ exports.fractionsProduct = {
13
13
  section: 'Fractions',
14
14
  isSingleStep: false,
15
15
  generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getFractionsProduct, nb),
16
+ keys: [],
16
17
  };
17
18
  function getFractionsProduct() {
18
19
  const rational = rational_1.RationalConstructor.randomIrreductible();
@@ -1 +1 @@
1
- {"version":3,"file":"fractionsSum.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calcul/fractions/fractionsSum.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAK9D,eAAO,MAAM,YAAY,EAAE,QAS1B,CAAC;AAEF,wBAAgB,eAAe,IAAI,QAAQ,CAW1C"}
1
+ {"version":3,"file":"fractionsSum.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calcul/fractions/fractionsSum.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAK9D,eAAO,MAAM,YAAY,EAAE,QAU1B,CAAC;AAEF,wBAAgB,eAAe,IAAI,QAAQ,CAW1C"}
@@ -13,6 +13,7 @@ exports.fractionsSum = {
13
13
  section: 'Fractions',
14
14
  isSingleStep: false,
15
15
  generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getFractionsSum, nb),
16
+ keys: [],
16
17
  };
17
18
  function getFractionsSum() {
18
19
  const rational = rational_1.RationalConstructor.randomIrreductible();
@@ -1 +1 @@
1
- {"version":3,"file":"simplifyFraction.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calcul/fractions/simplifyFraction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAI9D,eAAO,MAAM,gBAAgB,EAAE,QAS9B,CAAC;AAEF,wBAAgB,mBAAmB,IAAI,QAAQ,CAQ9C"}
1
+ {"version":3,"file":"simplifyFraction.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calcul/fractions/simplifyFraction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAI9D,eAAO,MAAM,gBAAgB,EAAE,QAU9B,CAAC;AAEF,wBAAgB,mBAAmB,IAAI,QAAQ,CAQ9C"}
@@ -12,6 +12,7 @@ exports.simplifyFraction = {
12
12
  isSingleStep: false,
13
13
  section: 'Fractions',
14
14
  generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getSimplifyFraction, nb),
15
+ keys: [],
15
16
  };
16
17
  function getSimplifyFraction() {
17
18
  const rational = rational_1.RationalConstructor.randomSimplifiable(10);
@@ -1 +1 @@
1
- {"version":3,"file":"operationsPriorities.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calcul/operations/operationsPriorities.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAS9D,eAAO,MAAM,oBAAoB,EAAE,QASlC,CAAC;AAEF,wBAAgB,oBAAoB,IAAI,QAAQ,CA+F/C"}
1
+ {"version":3,"file":"operationsPriorities.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calcul/operations/operationsPriorities.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAS9D,eAAO,MAAM,oBAAoB,EAAE,QAUlC,CAAC;AAEF,wBAAgB,oBAAoB,IAAI,QAAQ,CA+F/C"}
@@ -24,6 +24,7 @@ exports.operationsPriorities = {
24
24
  section: 'Calculs',
25
25
  isSingleStep: true,
26
26
  generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getPriorityQuestions, nb),
27
+ keys: [],
27
28
  };
28
29
  function getPriorityQuestions() {
29
30
  const type = (0, randint_1.randint)(1, 6);
@@ -1 +1 @@
1
- {"version":3,"file":"operationsPrioritiesWithoutRelative.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calcul/operations/operationsPrioritiesWithoutRelative.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAS9D,eAAO,MAAM,mCAAmC,EAAE,QASjD,CAAC;AAEF,wBAAgB,sCAAsC,IAAI,QAAQ,CAiOjE"}
1
+ {"version":3,"file":"operationsPrioritiesWithoutRelative.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calcul/operations/operationsPrioritiesWithoutRelative.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAS9D,eAAO,MAAM,mCAAmC,EAAE,QAUjD,CAAC;AAEF,wBAAgB,sCAAsC,IAAI,QAAQ,CAiOjE"}
@@ -24,6 +24,7 @@ exports.operationsPrioritiesWithoutRelative = {
24
24
  section: 'Calculs',
25
25
  isSingleStep: true,
26
26
  generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getOperationsPrioritiesWithoutRelative, nb),
27
+ keys: [],
27
28
  };
28
29
  function getOperationsPrioritiesWithoutRelative() {
29
30
  const type = (0, randint_1.randint)(1, 7);
@@ -1 +1 @@
1
- {"version":3,"file":"rounding.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calcul/rounding/rounding.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAK9D;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,QASzB,CAAC;AACF;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,QAS5B,CAAC;AACF;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,QAS7B,CAAC;AACF;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,QAS7B,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,QAS1B,CAAC;AASF,wBAAgB,iBAAiB,CAAC,cAAc,GAAE,MAAU,GAAG,QAAQ,CAUtE"}
1
+ {"version":3,"file":"rounding.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calcul/rounding/rounding.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAK9D;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,QAUzB,CAAC;AACF;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,QAS5B,CAAC;AACF;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,QAS7B,CAAC;AACF;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,QAS7B,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,QAS1B,CAAC;AASF,wBAAgB,iBAAiB,CAAC,cAAc,GAAE,MAAU,GAAG,QAAQ,CAUtE"}
@@ -16,6 +16,7 @@ exports.roundToUnit = {
16
16
  section: 'Calculs',
17
17
  isSingleStep: true,
18
18
  generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(() => getRoundQuestions(0), nb),
19
+ keys: [],
19
20
  };
20
21
  /**
21
22
  * arrondi à l'unité
@@ -1 +1 @@
1
- {"version":3,"file":"doubleDistributivity.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calculLitteral/distributivity/doubleDistributivity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAQ9D,eAAO,MAAM,oBAAoB,EAAE,QASlC,CAAC;AAEF,wBAAgB,+BAA+B,IAAI,QAAQ,CAY1D"}
1
+ {"version":3,"file":"doubleDistributivity.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calculLitteral/distributivity/doubleDistributivity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAQ9D,eAAO,MAAM,oBAAoB,EAAE,QAUlC,CAAC;AAEF,wBAAgB,+BAA+B,IAAI,QAAQ,CAY1D"}
@@ -16,6 +16,7 @@ exports.doubleDistributivity = {
16
16
  isSingleStep: false,
17
17
  section: 'Calcul littéral',
18
18
  generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getDoubleDistributivityQuestion, nb),
19
+ keys: ['x'],
19
20
  };
20
21
  function getDoubleDistributivityQuestion() {
21
22
  const interval = new intervals_1.Interval('[[-10; 10]]').difference(new discreteSet_1.DiscreteSet([new integer_1.Integer(0)]));
@@ -1 +1 @@
1
- {"version":3,"file":"firstIdentity.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calculLitteral/distributivity/firstIdentity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAS9D,eAAO,MAAM,aAAa,EAAE,QAS3B,CAAC;AAEF,wBAAgB,wBAAwB,IAAI,QAAQ,CAYnD"}
1
+ {"version":3,"file":"firstIdentity.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calculLitteral/distributivity/firstIdentity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAS9D,eAAO,MAAM,aAAa,EAAE,QAU3B,CAAC;AAEF,wBAAgB,wBAAwB,IAAI,QAAQ,CAYnD"}
@@ -17,6 +17,7 @@ exports.firstIdentity = {
17
17
  isSingleStep: false,
18
18
  section: 'Calcul littéral',
19
19
  generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getFirstIdentityQuestion, nb),
20
+ keys: ['x'],
20
21
  };
21
22
  function getFirstIdentityQuestion() {
22
23
  const interval = new intervals_1.Interval('[[1; 10]]').difference(new discreteSet_1.DiscreteSet([new integer_1.Integer(0)]));
@@ -1 +1 @@
1
- {"version":3,"file":"secondIdentity.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calculLitteral/distributivity/secondIdentity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAS9D,eAAO,MAAM,cAAc,EAAE,QAS5B,CAAC;AAEF,wBAAgB,yBAAyB,IAAI,QAAQ,CAapD"}
1
+ {"version":3,"file":"secondIdentity.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calculLitteral/distributivity/secondIdentity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAS9D,eAAO,MAAM,cAAc,EAAE,QAU5B,CAAC;AAEF,wBAAgB,yBAAyB,IAAI,QAAQ,CAapD"}
@@ -17,6 +17,7 @@ exports.secondIdentity = {
17
17
  isSingleStep: false,
18
18
  section: 'Calcul littéral',
19
19
  generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getSecondIdentityQuestion, nb),
20
+ keys: ['x'],
20
21
  };
21
22
  function getSecondIdentityQuestion() {
22
23
  const intervalA = new intervals_1.Interval('[[0; 10]]').difference(new discreteSet_1.DiscreteSet([new integer_1.Integer(0)]));
@@ -1 +1 @@
1
- {"version":3,"file":"simpleDistributivity.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calculLitteral/distributivity/simpleDistributivity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAS9D,eAAO,MAAM,oBAAoB,EAAE,QASlC,CAAC;AAEF,wBAAgB,+BAA+B,IAAI,QAAQ,CAY1D"}
1
+ {"version":3,"file":"simpleDistributivity.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calculLitteral/distributivity/simpleDistributivity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAS9D,eAAO,MAAM,oBAAoB,EAAE,QAUlC,CAAC;AAEF,wBAAgB,+BAA+B,IAAI,QAAQ,CAY1D"}
@@ -17,6 +17,7 @@ exports.simpleDistributivity = {
17
17
  isSingleStep: false,
18
18
  section: 'Calcul littéral',
19
19
  generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getSimpleDistributivityQuestion, nb),
20
+ keys: ['x'],
20
21
  };
21
22
  function getSimpleDistributivityQuestion() {
22
23
  const interval = new intervals_1.Interval('[[-10; 10]]').difference(new discreteSet_1.DiscreteSet([new integer_1.Integer(0)]));
@@ -1 +1 @@
1
- {"version":3,"file":"thirdIdentity.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calculLitteral/distributivity/thirdIdentity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAQ9D,eAAO,MAAM,aAAa,EAAE,QAS3B,CAAC;AAEF,wBAAgB,wBAAwB,IAAI,QAAQ,CAYnD"}
1
+ {"version":3,"file":"thirdIdentity.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calculLitteral/distributivity/thirdIdentity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAQ9D,eAAO,MAAM,aAAa,EAAE,QAU3B,CAAC;AAEF,wBAAgB,wBAAwB,IAAI,QAAQ,CAYnD"}
@@ -16,6 +16,7 @@ exports.thirdIdentity = {
16
16
  isSingleStep: false,
17
17
  section: 'Calcul littéral',
18
18
  generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getThirdIdentityQuestion, nb),
19
+ keys: ['x'],
19
20
  };
20
21
  function getThirdIdentityQuestion() {
21
22
  const interval = new intervals_1.Interval('[[-10; 10]]').difference(new discreteSet_1.DiscreteSet([new integer_1.Integer(0)]));
@@ -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;AAI9D,eAAO,MAAM,oBAAoB,EAAE,QASlC,CAAC;AAOF,wBAAgB,uBAAuB,IAAI,QAAQ,CA0BlD"}
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;AAI9D,eAAO,MAAM,oBAAoB,EAAE,QAUlC,CAAC;AAOF,wBAAgB,uBAAuB,IAAI,QAAQ,CA0BlD"}
@@ -12,6 +12,7 @@ exports.equationSimpleSquare = {
12
12
  section: 'Équations',
13
13
  isSingleStep: false,
14
14
  generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getEquationSimpleSquare, nb),
15
+ keys: ['x', 'S', 'equal', 'lbrace', 'rbrace', 'semicolon', 'emptyset'],
15
16
  };
16
17
  const higherFactor = (n) => {
17
18
  for (let i = Math.floor(Math.sqrt(n)); i > 0; i--)
@@ -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;AAQ9D;;GAEG;AACH,eAAO,MAAM,qBAAqB,EAAE,QASnC,CAAC;AAEF,wBAAgB,gCAAgC,IAAI,QAAQ,CAe3D"}
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;AAQ9D;;GAEG;AACH,eAAO,MAAM,qBAAqB,EAAE,QAUnC,CAAC;AAEF,wBAAgB,gCAAgC,IAAI,QAAQ,CAe3D"}
@@ -19,6 +19,7 @@ exports.equationType1Exercise = {
19
19
  section: 'Équations',
20
20
  isSingleStep: true,
21
21
  generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getEquationType1ExerciseQuestion, nb),
22
+ keys: ['x', 'S', 'equal', 'lbrace', 'rbrace', 'semicolon', 'emptyset'],
22
23
  };
23
24
  function getEquationType1ExerciseQuestion() {
24
25
  const interval = new intervals_1.Interval('[[-10; 10]]');
@@ -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;AAU9D;;GAEG;AACH,eAAO,MAAM,qBAAqB,EAAE,QASnC,CAAC;AAEF,wBAAgB,gCAAgC,IAAI,QAAQ,CAe3D"}
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;AAU9D;;GAEG;AACH,eAAO,MAAM,qBAAqB,EAAE,QAUnC,CAAC;AAEF,wBAAgB,gCAAgC,IAAI,QAAQ,CAe3D"}
@@ -21,6 +21,7 @@ exports.equationType2Exercise = {
21
21
  section: 'Équations',
22
22
  isSingleStep: true,
23
23
  generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getEquationType2ExerciseQuestion, nb),
24
+ keys: ['x', 'S', 'equal', 'lbrace', 'rbrace', 'semicolon', 'emptyset'],
24
25
  };
25
26
  function getEquationType2ExerciseQuestion() {
26
27
  const interval = new intervals_1.Interval('[[-10; 10]]');
@@ -1 +1 @@
1
- {"version":3,"file":"equationType3Exercise.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calculLitteral/equation/equationType3Exercise.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAU9D;;GAEG;AACH,eAAO,MAAM,qBAAqB,EAAE,QAUnC,CAAC;AAEF,wBAAgB,gCAAgC,IAAI,QAAQ,CAiB3D"}
1
+ {"version":3,"file":"equationType3Exercise.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calculLitteral/equation/equationType3Exercise.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAU9D;;GAEG;AACH,eAAO,MAAM,qBAAqB,EAAE,QAWnC,CAAC;AAEF,wBAAgB,gCAAgC,IAAI,QAAQ,CAiB3D"}
@@ -21,6 +21,7 @@ exports.equationType3Exercise = {
21
21
  section: 'Équations',
22
22
  isSingleStep: false,
23
23
  generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getEquationType3ExerciseQuestion, nb),
24
+ keys: ['x', 'S', 'equal', 'lbrace', 'rbrace', 'semicolon', 'emptyset'],
24
25
  };
25
26
  function getEquationType3ExerciseQuestion() {
26
27
  const interval = new intervals_1.Interval('[[-10; 10]]');
@@ -1 +1 @@
1
- {"version":3,"file":"equationType4Exercise.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calculLitteral/equation/equationType4Exercise.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAU9D;;GAEG;AACH,eAAO,MAAM,qBAAqB,EAAE,QAUnC,CAAC;AAEF,wBAAgB,gCAAgC,IAAI,QAAQ,CAoB3D"}
1
+ {"version":3,"file":"equationType4Exercise.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calculLitteral/equation/equationType4Exercise.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAU9D;;GAEG;AACH,eAAO,MAAM,qBAAqB,EAAE,QAWnC,CAAC;AAEF,wBAAgB,gCAAgC,IAAI,QAAQ,CAoB3D"}
@@ -21,6 +21,7 @@ exports.equationType4Exercise = {
21
21
  section: 'Équations',
22
22
  isSingleStep: false,
23
23
  generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getEquationType4ExerciseQuestion, nb),
24
+ keys: ['x', 'S', 'equal', 'lbrace', 'rbrace', 'semicolon', 'emptyset'],
24
25
  };
25
26
  function getEquationType4ExerciseQuestion() {
26
27
  const interval = new intervals_1.Interval('[[-10; 10]]');
@@ -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;AAO9D,eAAO,MAAM,mBAAmB,EAAE,QASjC,CAAC;AAEF,wBAAgB,sBAAsB,IAAI,QAAQ,CAYjD"}
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;AAO9D,eAAO,MAAM,mBAAmB,EAAE,QAUjC,CAAC;AAEF,wBAAgB,sBAAsB,IAAI,QAAQ,CAYjD"}
@@ -14,6 +14,7 @@ exports.firstDegreeEquation = {
14
14
  section: 'Équations',
15
15
  isSingleStep: false,
16
16
  generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getFirstDegreeEquation, nb),
17
+ keys: ['x', 'S', 'equal', 'lbrace', 'rbrace', 'semicolon', 'emptyset'],
17
18
  };
18
19
  function getFirstDegreeEquation() {
19
20
  const a = (0, randint_1.randint)(-30, 30, [0]);
@@ -1 +1 @@
1
- {"version":3,"file":"firstDegreeGeneralEquation.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calculLitteral/equation/firstDegreeGeneralEquation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAQ9D,eAAO,MAAM,0BAA0B,EAAE,QASxC,CAAC;AAEF,wBAAgB,6BAA6B,IAAI,QAAQ,CAaxD"}
1
+ {"version":3,"file":"firstDegreeGeneralEquation.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calculLitteral/equation/firstDegreeGeneralEquation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAQ9D,eAAO,MAAM,0BAA0B,EAAE,QAUxC,CAAC;AAEF,wBAAgB,6BAA6B,IAAI,QAAQ,CAaxD"}
@@ -15,6 +15,7 @@ exports.firstDegreeGeneralEquation = {
15
15
  section: 'Pourcentages',
16
16
  isSingleStep: false,
17
17
  generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getFirstDegreeGeneralEquation, nb),
18
+ keys: ['x', 'S', 'equal', 'lbrace', 'rbrace', 'semicolon', 'emptyset'],
18
19
  };
19
20
  function getFirstDegreeGeneralEquation() {
20
21
  let a = (0, randint_1.randint)(-9, 10, [0]);
@@ -1 +1 @@
1
- {"version":3,"file":"factoIdRmq1.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calculLitteral/factorisation/factoIdRmq1.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAc9D,eAAO,MAAM,WAAW,EAAE,QASzB,CAAC;AAEF,wBAAgB,qBAAqB,IAAI,QAAQ,CAWhD"}
1
+ {"version":3,"file":"factoIdRmq1.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calculLitteral/factorisation/factoIdRmq1.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAc9D,eAAO,MAAM,WAAW,EAAE,QAUzB,CAAC;AAEF,wBAAgB,qBAAqB,IAAI,QAAQ,CAWhD"}
@@ -17,6 +17,7 @@ exports.factoIdRmq1 = {
17
17
  levels: ['3', '2'],
18
18
  section: 'Calcul littéral',
19
19
  generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getFactoType1Question, nb),
20
+ keys: ['x'],
20
21
  };
21
22
  function getFactoType1Question() {
22
23
  const interval = new intervals_1.Interval('[[1; 10]]').difference(new discreteSet_1.DiscreteSet([new integer_1.Integer(0)]));
@@ -1 +1 @@
1
- {"version":3,"file":"factoIdRmq2.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calculLitteral/factorisation/factoIdRmq2.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAc9D,eAAO,MAAM,WAAW,EAAE,QASzB,CAAC;AAEF,wBAAgB,qBAAqB,IAAI,QAAQ,CAahD"}
1
+ {"version":3,"file":"factoIdRmq2.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calculLitteral/factorisation/factoIdRmq2.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAc9D,eAAO,MAAM,WAAW,EAAE,QAUzB,CAAC;AAEF,wBAAgB,qBAAqB,IAAI,QAAQ,CAahD"}
@@ -17,6 +17,7 @@ exports.factoIdRmq2 = {
17
17
  levels: ['3', '2'],
18
18
  section: 'Calcul littéral',
19
19
  generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getFactoType1Question, nb),
20
+ keys: ['x'],
20
21
  };
21
22
  function getFactoType1Question() {
22
23
  const intervalA = new intervals_1.Interval('[[0; 10]]').difference(new discreteSet_1.DiscreteSet([new integer_1.Integer(0)]));
@@ -1 +1 @@
1
- {"version":3,"file":"factoIdRmq3.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calculLitteral/factorisation/factoIdRmq3.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAc9D,eAAO,MAAM,WAAW,EAAE,QASzB,CAAC;AAEF,wBAAgB,qBAAqB,IAAI,QAAQ,CAahD"}
1
+ {"version":3,"file":"factoIdRmq3.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calculLitteral/factorisation/factoIdRmq3.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAc9D,eAAO,MAAM,WAAW,EAAE,QAUzB,CAAC;AAEF,wBAAgB,qBAAqB,IAAI,QAAQ,CAahD"}
@@ -16,6 +16,7 @@ exports.factoIdRmq3 = {
16
16
  levels: ['3', '2'],
17
17
  section: 'Calcul littéral',
18
18
  generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getFactoType1Question, nb),
19
+ keys: ['x'],
19
20
  };
20
21
  function getFactoType1Question() {
21
22
  const interval = new intervals_1.Interval('[[-10; 10]]').difference(new discreteSet_1.DiscreteSet([new integer_1.Integer(0)]));
@@ -1 +1 @@
1
- {"version":3,"file":"factoType1Exercise.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calculLitteral/factorisation/factoType1Exercise.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAS9D,eAAO,MAAM,kBAAkB,EAAE,QAShC,CAAC;AAEF,wBAAgB,qBAAqB,IAAI,QAAQ,CA6BhD"}
1
+ {"version":3,"file":"factoType1Exercise.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calculLitteral/factorisation/factoType1Exercise.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAS9D,eAAO,MAAM,kBAAkB,EAAE,QAUhC,CAAC;AAEF,wBAAgB,qBAAqB,IAAI,QAAQ,CA6BhD"}
@@ -20,6 +20,7 @@ exports.factoType1Exercise = {
20
20
  levels: ['3', '2'],
21
21
  section: 'Calcul littéral',
22
22
  generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getFactoType1Question, nb),
23
+ keys: ['x'],
23
24
  };
24
25
  function getFactoType1Question() {
25
26
  const affines = affine_1.AffineConstructor.differentRandoms(3);
@@ -1 +1 @@
1
- {"version":3,"file":"thirdDegreeDerivative.d.ts","sourceRoot":"","sources":["../../../../src/exercises/derivation/derivative/thirdDegreeDerivative.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAK9D,eAAO,MAAM,qBAAqB,EAAE,QASnC,CAAC;AAEF,wBAAgB,wBAAwB,IAAI,QAAQ,CAiBnD"}
1
+ {"version":3,"file":"thirdDegreeDerivative.d.ts","sourceRoot":"","sources":["../../../../src/exercises/derivation/derivative/thirdDegreeDerivative.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAK9D,eAAO,MAAM,qBAAqB,EAAE,QAUnC,CAAC;AAEF,wBAAgB,wBAAwB,IAAI,QAAQ,CAiBnD"}
@@ -13,6 +13,7 @@ exports.thirdDegreeDerivative = {
13
13
  section: 'Dérivation',
14
14
  isSingleStep: false,
15
15
  generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getThirdDegreeDerivative, nb),
16
+ keys: ['x'],
16
17
  };
17
18
  function getThirdDegreeDerivative() {
18
19
  const coefficients = [];
@@ -1 +1 @@
1
- {"version":3,"file":"usualderivative.d.ts","sourceRoot":"","sources":["../../../../src/exercises/derivation/derivative/usualderivative.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAGpD,eAAO,MAAM,eAAe,EAAE,QAS7B,CAAC;AAEF,wBAAgB,kBAAkB,IAAI,QAAQ,CAsD7C"}
1
+ {"version":3,"file":"usualderivative.d.ts","sourceRoot":"","sources":["../../../../src/exercises/derivation/derivative/usualderivative.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAGpD,eAAO,MAAM,eAAe,EAAE,QAU7B,CAAC;AAEF,wBAAgB,kBAAkB,IAAI,QAAQ,CAsD7C"}
@@ -14,6 +14,7 @@ exports.usualDerivative = {
14
14
  section: 'Dérivation',
15
15
  isSingleStep: false,
16
16
  generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getUsualDerivative, nb),
17
+ keys: ['x'],
17
18
  };
18
19
  function getUsualDerivative() {
19
20
  const a = (0, randint_1.randint)(-10, 10, [0]);
@@ -4,6 +4,8 @@ export interface Question {
4
4
  startStatement?: string;
5
5
  answer: string;
6
6
  keys?: string[];
7
+ commands?: string[];
8
+ coords?: number[];
7
9
  }
8
10
  export interface Exercise {
9
11
  id: string;
@@ -13,6 +15,7 @@ export interface Exercise {
13
15
  section: string;
14
16
  levels: string[];
15
17
  connector: '=' | '\\iff' | '\\approx';
18
+ keys?: string[];
16
19
  generator(nb: number, options?: GeneratorOptions): Question[];
17
20
  }
18
21
  //# sourceMappingURL=exercise.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"exercise.d.ts","sourceRoot":"","sources":["../../src/exercises/exercise.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,gBAAgB,GAAG,EAAE,CAAC;AAElC,MAAM,WAAW,QAAQ;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;CACjB;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,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,SAAS,EAAE,GAAG,GAAG,OAAO,GAAG,UAAU,CAAC;IACtC,SAAS,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,gBAAgB,GAAG,QAAQ,EAAE,CAAC;CAC/D"}
1
+ {"version":3,"file":"exercise.d.ts","sourceRoot":"","sources":["../../src/exercises/exercise.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,gBAAgB,GAAG,EAAE,CAAC;AAElC,MAAM,WAAW,QAAQ;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;CACnB;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,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,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"}