math-exercises 2.2.56 → 2.2.57

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 (160) hide show
  1. package/lib/exercises/math/functions/trinoms/coefficientsIdentification.d.ts +11 -0
  2. package/lib/exercises/math/functions/trinoms/coefficientsIdentification.d.ts.map +1 -0
  3. package/lib/exercises/math/functions/trinoms/coefficientsIdentification.js +131 -0
  4. package/lib/exercises/math/functions/trinoms/index.d.ts +1 -0
  5. package/lib/exercises/math/functions/trinoms/index.d.ts.map +1 -1
  6. package/lib/exercises/math/functions/trinoms/index.js +1 -0
  7. package/lib/exercises/math/functions/trinoms/summitAbscissFromDevForm.d.ts.map +1 -1
  8. package/lib/exercises/math/functions/trinoms/summitAbscissFromDevForm.js +39 -1
  9. package/lib/exercises/math/geometry/areas/rightTriangleArea.js +2 -2
  10. package/lib/exercises/math/geometry/areas/triangleArea.js +2 -2
  11. package/lib/exercises/math/geometry/euclidianConstructions/buildTriangleWithSizes.d.ts +7 -0
  12. package/lib/exercises/math/geometry/euclidianConstructions/buildTriangleWithSizes.d.ts.map +1 -0
  13. package/lib/exercises/math/geometry/euclidianConstructions/buildTriangleWithSizes.js +117 -0
  14. package/lib/exercises/math/geometry/euclidianConstructions/index.d.ts +2 -0
  15. package/lib/exercises/math/geometry/euclidianConstructions/index.d.ts.map +1 -1
  16. package/lib/exercises/math/geometry/euclidianConstructions/index.js +2 -0
  17. package/lib/exercises/math/geometry/euclidianConstructions/pointImageFromTranslation.d.ts +10 -0
  18. package/lib/exercises/math/geometry/euclidianConstructions/pointImageFromTranslation.d.ts.map +1 -0
  19. package/lib/exercises/math/geometry/euclidianConstructions/pointImageFromTranslation.js +102 -0
  20. package/lib/exercises/math/geometry/pythagore/pythagore.d.ts +2 -0
  21. package/lib/exercises/math/geometry/pythagore/pythagore.d.ts.map +1 -1
  22. package/lib/exercises/math/geometry/pythagore/pythagore.js +4 -3
  23. package/lib/exercises/math/geometry/pythagore/pythagoreCalcul.d.ts +2 -0
  24. package/lib/exercises/math/geometry/pythagore/pythagoreCalcul.d.ts.map +1 -1
  25. package/lib/exercises/math/geometry/pythagore/pythagoreCalcul.js +4 -3
  26. package/lib/exercises/math/geometry/thales/index.d.ts.map +1 -1
  27. package/lib/exercises/math/geometry/thales/index.js +1 -0
  28. package/lib/exercises/math/geometry/thales/thales.d.ts +7 -0
  29. package/lib/exercises/math/geometry/thales/thales.d.ts.map +1 -1
  30. package/lib/exercises/math/geometry/thales/thales.js +1 -1
  31. package/lib/exercises/math/geometry/thales/thalesCalcul.d.ts +11 -5
  32. package/lib/exercises/math/geometry/thales/thalesCalcul.d.ts.map +1 -1
  33. package/lib/exercises/math/geometry/thales/thalesCalcul.js +166 -118
  34. package/lib/exercises/math/geometry/thales/thalesCalculOld.d.ts +1 -0
  35. package/lib/exercises/math/geometry/thales/thalesCalculOld.d.ts.map +1 -0
  36. package/lib/exercises/math/geometry/thales/thalesCalculOld.js +214 -0
  37. package/lib/exercises/math/probaStat/binomial/binomialInequation.d.ts +16 -0
  38. package/lib/exercises/math/probaStat/binomial/binomialInequation.d.ts.map +1 -0
  39. package/lib/exercises/math/probaStat/binomial/binomialInequation.js +159 -0
  40. package/lib/exercises/math/probaStat/binomial/calculateProbaOfBinomialDistribution.d.ts +13 -0
  41. package/lib/exercises/math/probaStat/binomial/calculateProbaOfBinomialDistribution.d.ts.map +1 -0
  42. package/lib/exercises/math/probaStat/binomial/calculateProbaOfBinomialDistribution.js +106 -0
  43. package/lib/exercises/math/probaStat/binomial/expectedValueOfBinomialProba.d.ts +9 -0
  44. package/lib/exercises/math/probaStat/binomial/expectedValueOfBinomialProba.d.ts.map +1 -0
  45. package/lib/exercises/math/probaStat/binomial/expectedValueOfBinomialProba.js +89 -0
  46. package/lib/exercises/math/probaStat/binomial/index.d.ts +5 -0
  47. package/lib/exercises/math/probaStat/binomial/index.d.ts.map +1 -0
  48. package/lib/exercises/math/probaStat/binomial/index.js +20 -0
  49. package/lib/exercises/math/probaStat/binomial/varianceOfBinomialProba.d.ts +9 -0
  50. package/lib/exercises/math/probaStat/binomial/varianceOfBinomialProba.d.ts.map +1 -0
  51. package/lib/exercises/math/probaStat/binomial/varianceOfBinomialProba.js +94 -0
  52. package/lib/exercises/math/probaStat/cardBasicProbas.d.ts +3 -0
  53. package/lib/exercises/math/probaStat/cardBasicProbas.d.ts.map +1 -1
  54. package/lib/exercises/math/probaStat/cardBasicProbas.js +3 -2
  55. package/lib/exercises/math/probaStat/diceBasicProbas.d.ts +1 -0
  56. package/lib/exercises/math/probaStat/diceBasicProbas.d.ts.map +1 -1
  57. package/lib/exercises/math/probaStat/diceBasicProbas.js +8 -4
  58. package/lib/exercises/math/probaStat/index.d.ts +1 -3
  59. package/lib/exercises/math/probaStat/index.d.ts.map +1 -1
  60. package/lib/exercises/math/probaStat/index.js +1 -3
  61. package/lib/exercises/math/probaStat/issuesCountingForCards.d.ts +2 -0
  62. package/lib/exercises/math/probaStat/issuesCountingForCards.d.ts.map +1 -1
  63. package/lib/exercises/math/probaStat/issuesCountingForCards.js +1 -1
  64. package/lib/exercises/math/probaStat/stats2var/fineAdjustementExercise.d.ts +2 -0
  65. package/lib/exercises/math/probaStat/stats2var/fineAdjustementExercise.d.ts.map +1 -1
  66. package/lib/exercises/math/probaStat/stats2var/fineAdjustementExercise.js +4 -1
  67. package/lib/exercises/math/trigonometry/associatePoint.d.ts +3 -0
  68. package/lib/exercises/math/trigonometry/associatePoint.d.ts.map +1 -1
  69. package/lib/exercises/math/trigonometry/associatePoint.js +5 -1
  70. package/lib/exercises/math/trigonometry/trigonometry.js +2 -2
  71. package/lib/exercises/math/trigonometry/trigonometryAngleCalcul.js +2 -2
  72. package/lib/exercises/math/trigonometry/trigonometrySideCalcul.js +2 -2
  73. package/lib/exercises/pc/calibrationCurveOfSolution.d.ts +1 -0
  74. package/lib/exercises/pc/calibrationCurveOfSolution.d.ts.map +1 -1
  75. package/lib/exercises/pc/calibrationCurveOfSolution.js +2 -0
  76. package/lib/exercises/pc/chemicalReactions/stoichiometricReaction.d.ts +6 -1
  77. package/lib/exercises/pc/chemicalReactions/stoichiometricReaction.d.ts.map +1 -1
  78. package/lib/exercises/pc/chemicalReactions/stoichiometricReaction.js +1 -1
  79. package/lib/exercises/pc/electricity/ohmicConductorOrGenerator.d.ts +4 -1
  80. package/lib/exercises/pc/electricity/ohmicConductorOrGenerator.d.ts.map +1 -1
  81. package/lib/exercises/pc/electricity/ohmicConductorOrGenerator.js +2 -1
  82. package/lib/exercises/pc/identifyAtomicMassOrAtomicNb.d.ts +2 -0
  83. package/lib/exercises/pc/identifyAtomicMassOrAtomicNb.d.ts.map +1 -1
  84. package/lib/exercises/pc/identifyAtomicMassOrAtomicNb.js +2 -0
  85. package/lib/exercises/pc/mole/molarMass.js +1 -1
  86. package/lib/exercises/pc/motion/typeOfAcceleration.d.ts +4 -1
  87. package/lib/exercises/pc/motion/typeOfAcceleration.d.ts.map +1 -1
  88. package/lib/exercises/pc/motion/typeOfAcceleration.js +5 -1
  89. package/lib/exercises/pc/motion/typeOfMovement.d.ts +4 -1
  90. package/lib/exercises/pc/motion/typeOfMovement.d.ts.map +1 -1
  91. package/lib/exercises/pc/motion/typeOfMovement.js +1 -1
  92. package/lib/exercises/pc/recognizeRefractionOrReflectionAngles.d.ts +3 -1
  93. package/lib/exercises/pc/recognizeRefractionOrReflectionAngles.d.ts.map +1 -1
  94. package/lib/exercises/pc/recognizeRefractionOrReflectionAngles.js +1 -1
  95. package/lib/exercises/utils/geogebra/toGGBCommandsProps.d.ts +3 -0
  96. package/lib/exercises/utils/geogebra/toGGBCommandsProps.d.ts.map +1 -1
  97. package/lib/exercises/utils/geogebra/toolBarConstructor.d.ts +4 -0
  98. package/lib/exercises/utils/geogebra/toolBarConstructor.d.ts.map +1 -1
  99. package/lib/exercises/utils/geogebra/toolBarConstructor.js +8 -0
  100. package/lib/exercises/utils/getDistinctQuestions.d.ts.map +1 -1
  101. package/lib/exercises/utils/getDistinctQuestions.js +11 -4
  102. package/lib/index.d.ts +88 -22
  103. package/lib/index.d.ts.map +1 -1
  104. package/lib/math/geometry/CloudPoints.d.ts +5 -1
  105. package/lib/math/geometry/CloudPoints.d.ts.map +1 -1
  106. package/lib/math/geometry/CloudPoints.js +5 -0
  107. package/lib/math/geometry/line.d.ts +23 -1
  108. package/lib/math/geometry/line.d.ts.map +1 -1
  109. package/lib/math/geometry/line.js +53 -2
  110. package/lib/math/geometry/point.d.ts +15 -13
  111. package/lib/math/geometry/point.d.ts.map +1 -1
  112. package/lib/math/geometry/point.js +28 -12
  113. package/lib/math/geometry/segment.d.ts +11 -1
  114. package/lib/math/geometry/segment.d.ts.map +1 -1
  115. package/lib/math/geometry/segment.js +12 -0
  116. package/lib/math/geometry/triangle.d.ts +67 -0
  117. package/lib/math/geometry/triangle.d.ts.map +1 -0
  118. package/lib/math/geometry/triangle.js +227 -0
  119. package/lib/math/numbers/rationals/rational.d.ts +1 -0
  120. package/lib/math/numbers/rationals/rational.d.ts.map +1 -1
  121. package/lib/math/numbers/rationals/rational.js +5 -0
  122. package/lib/math/polynomials/generalTrinom.d.ts +2 -2
  123. package/lib/math/polynomials/generalTrinom.d.ts.map +1 -1
  124. package/lib/math/probability/binomial.d.ts +10 -0
  125. package/lib/math/probability/binomial.d.ts.map +1 -0
  126. package/lib/math/probability/binomial.js +30 -0
  127. package/lib/math/sets/intervals/intervals.d.ts +1 -1
  128. package/lib/math/systems/generalSystem.d.ts +11 -0
  129. package/lib/math/systems/generalSystem.d.ts.map +1 -0
  130. package/lib/math/systems/generalSystem.js +79 -0
  131. package/lib/playground.d.ts.map +1 -1
  132. package/lib/playground.js +1 -4
  133. package/lib/server.js +0 -2
  134. package/lib/tree/nodes/geometry/pointNode.d.ts +1 -10
  135. package/lib/tree/nodes/geometry/pointNode.d.ts.map +1 -1
  136. package/lib/tree/nodes/inequations/inequationNode.js +1 -1
  137. package/lib/tree/nodes/inequations/inequationSolutionNode.d.ts +2 -11
  138. package/lib/tree/nodes/inequations/inequationSolutionNode.d.ts.map +1 -1
  139. package/lib/tree/nodes/node.d.ts +2 -1
  140. package/lib/tree/nodes/node.d.ts.map +1 -1
  141. package/lib/tree/nodes/node.js +1 -0
  142. package/lib/tree/nodes/nodeConstructor.d.ts +4 -3
  143. package/lib/tree/nodes/nodeConstructor.d.ts.map +1 -1
  144. package/lib/tree/nodes/nodeConstructor.js +4 -0
  145. package/lib/tree/nodes/operators/addNode.d.ts.map +1 -1
  146. package/lib/tree/nodes/operators/addNode.js +20 -8
  147. package/lib/tree/nodes/operators/binomialCoefficientNode.d.ts +35 -0
  148. package/lib/tree/nodes/operators/binomialCoefficientNode.d.ts.map +1 -0
  149. package/lib/tree/nodes/operators/binomialCoefficientNode.js +52 -0
  150. package/lib/tree/nodes/operators/fractionNode.d.ts +1 -1
  151. package/lib/tree/nodes/operators/fractionNode.d.ts.map +1 -1
  152. package/lib/tree/nodes/operators/fractionNode.js +2 -2
  153. package/lib/tree/nodes/operators/operatorNode.d.ts +2 -1
  154. package/lib/tree/nodes/operators/operatorNode.d.ts.map +1 -1
  155. package/lib/tree/nodes/operators/operatorNode.js +1 -0
  156. package/lib/tree/nodes/sets/intervalNode.d.ts +9 -10
  157. package/lib/tree/nodes/sets/intervalNode.d.ts.map +1 -1
  158. package/lib/tree/nodes/sets/intervalNode.js +1 -0
  159. package/lib/utils/alea/random.d.ts.map +1 -1
  160. package/package.json +1 -1
@@ -25,6 +25,4 @@ __exportStar(require("./independancy"), exports);
25
25
  __exportStar(require("./issuesCountingForCards"), exports);
26
26
  __exportStar(require("./probaFromTableNoContext"), exports);
27
27
  __exportStar(require("./probaFromTableWithContext"), exports);
28
- __exportStar(require("./expectedValueOfBinomialProba"), exports);
29
- __exportStar(require("./varianceOfBinomialProba"), exports);
30
- __exportStar(require("./calculateProbaOfBinomialDistribution"), exports);
28
+ __exportStar(require("./binomial"), exports);
@@ -1,6 +1,8 @@
1
1
  import { Exercise } from "../../../exercises/exercise";
2
2
  type Identifiers = {
3
3
  questionType: string;
4
+ value?: string;
5
+ color?: string;
4
6
  };
5
7
  export declare const issuesCountingForCards: Exercise<Identifiers>;
6
8
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"issuesCountingForCards.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/probaStat/issuesCountingForCards.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAQlC,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAiEF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,CAcxD,CAAC"}
1
+ {"version":3,"file":"issuesCountingForCards.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/probaStat/issuesCountingForCards.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAQlC,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAiEF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,CAcxD,CAAC"}
@@ -47,7 +47,7 @@ const getIssuesCountingForCardsQuestion = () => {
47
47
  instruction: `On tire une carte dans un jeu de 52 cartes. Combien l'événement $A = $ "obtenir ${target}" compte-t-il d'issues ?`,
48
48
  keys: [],
49
49
  answerFormat: "tex",
50
- identifiers: { questionType },
50
+ identifiers: { questionType, value, color },
51
51
  };
52
52
  return question;
53
53
  };
@@ -1,6 +1,8 @@
1
1
  import { Exercise } from "../../../../exercises/exercise";
2
+ import { CloudPointsIdentifiers } from "../../../../math/geometry/CloudPoints";
2
3
  type Identifiers = {
3
4
  isJustified: boolean;
5
+ cloudPointsIdentifiers: CloudPointsIdentifiers;
4
6
  };
5
7
  export declare const fineAdjustementExercise: Exercise<Identifiers>;
6
8
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"fineAdjustementExercise.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/stats2var/fineAdjustementExercise.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAWlC,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,OAAO,CAAC;CACtB,CAAC;AAsHF,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,WAAW,CAezD,CAAC"}
1
+ {"version":3,"file":"fineAdjustementExercise.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/stats2var/fineAdjustementExercise.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAGlC,OAAO,EAGL,sBAAsB,EACvB,MAAM,iCAAiC,CAAC;AAKzC,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,OAAO,CAAC;IACrB,sBAAsB,EAAE,sBAAsB,CAAC;CAChD,CAAC;AAyHF,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,WAAW,CAezD,CAAC"}
@@ -40,7 +40,10 @@ const getFineAdjustementExerciseQuestion = () => {
40
40
  }),
41
41
  keys: [],
42
42
  answerFormat: "raw",
43
- identifiers: { isJustified: exercise.isJustified },
43
+ identifiers: {
44
+ isJustified: exercise.isJustified,
45
+ cloudPointsIdentifiers: cloudPoints.toIdentifiers(),
46
+ },
44
47
  };
45
48
  return question;
46
49
  };
@@ -1,6 +1,9 @@
1
1
  import { Exercise } from "../../../exercises/exercise";
2
+ import { NodeIdentifiers } from "../../../tree/nodes/nodeConstructor";
2
3
  type Identifiers = {
3
4
  angleValue: number;
5
+ angleIdentifiers: NodeIdentifiers;
6
+ point: string;
4
7
  };
5
8
  export declare const associatePoint: Exercise<Identifiers>;
6
9
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"associatePoint.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/trigonometry/associatePoint.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAMlC,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAqDF,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,WAAW,CAchD,CAAC"}
1
+ {"version":3,"file":"associatePoint.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/trigonometry/associatePoint.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAGlC,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAInE,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,gBAAgB,EAAE,eAAe,CAAC;IAClC,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAyDF,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,WAAW,CAchD,CAAC"}
@@ -33,7 +33,11 @@ const getAssociatePointQuestion = () => {
33
33
  `,
34
34
  keys: points,
35
35
  answerFormat: "tex",
36
- identifiers: { angleValue: remarkableValue.mainAngle.evaluate({}) },
36
+ identifiers: {
37
+ angleValue: remarkableValue.mainAngle.evaluate({}),
38
+ point: answer,
39
+ angleIdentifiers: remarkableValue.angle.toIdentifiers(),
40
+ },
37
41
  };
38
42
  return question;
39
43
  };
@@ -4,7 +4,7 @@ exports.trigonometry = void 0;
4
4
  const exercise_1 = require("../../../exercises/exercise");
5
5
  const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
6
6
  const geogebraConstructor_1 = require("../../../geogebra/geogebraConstructor");
7
- const triangles_1 = require("../../../math/geometry/triangles");
7
+ const triangle_1 = require("../../../math/geometry/triangle");
8
8
  const randint_1 = require("../../../math/utils/random/randint");
9
9
  const lengthNode_1 = require("../../../tree/nodes/geometry/lengthNode");
10
10
  const fractionNode_1 = require("../../../tree/nodes/operators/fractionNode");
@@ -14,7 +14,7 @@ const getTrigonometry = () => {
14
14
  const code = 65 + (0, randint_1.randint)(0, 24); // Générer un code de caractère majuscule aléatoire (A-Z)
15
15
  for (let i = 0; i < 3; i++)
16
16
  vertices.push(String.fromCharCode(code + i));
17
- const triangle = triangles_1.TriangleConstructor.createRandomRightTriangle({
17
+ const triangle = triangle_1.TriangleConstructor.createRandomRightTriangle({
18
18
  minRapport: 0.7,
19
19
  maxRapport: 1.3,
20
20
  names: vertices,
@@ -4,7 +4,7 @@ exports.trigonometryAngleCalcul = void 0;
4
4
  const exercise_1 = require("../../../exercises/exercise");
5
5
  const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
6
6
  const geogebraConstructor_1 = require("../../../geogebra/geogebraConstructor");
7
- const triangles_1 = require("../../../math/geometry/triangles");
7
+ const triangle_1 = require("../../../math/geometry/triangle");
8
8
  const randint_1 = require("../../../math/utils/random/randint");
9
9
  const round_1 = require("../../../math/utils/round");
10
10
  const shuffle_1 = require("../../../utils/alea/shuffle");
@@ -13,7 +13,7 @@ const getTrigonometryAngleCalcul = () => {
13
13
  const code = 65 + (0, randint_1.randint)(0, 24); // Générer un code de caractère majuscule aléatoire (A-Z)
14
14
  for (let i = 0; i < 3; i++)
15
15
  vertices.push(String.fromCharCode(code + i));
16
- const triangle = triangles_1.TriangleConstructor.createRandomRightTriangle({
16
+ const triangle = triangle_1.TriangleConstructor.createRandomRightTriangle({
17
17
  minRapport: 0.5,
18
18
  maxRapport: 1.5,
19
19
  names: vertices,
@@ -4,7 +4,7 @@ exports.trigonometrySideCalcul = void 0;
4
4
  const exercise_1 = require("../../../exercises/exercise");
5
5
  const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
6
6
  const geogebraConstructor_1 = require("../../../geogebra/geogebraConstructor");
7
- const triangles_1 = require("../../../math/geometry/triangles");
7
+ const triangle_1 = require("../../../math/geometry/triangle");
8
8
  const randint_1 = require("../../../math/utils/random/randint");
9
9
  const round_1 = require("../../../math/utils/round");
10
10
  const numberNode_1 = require("../../../tree/nodes/numbers/numberNode");
@@ -14,7 +14,7 @@ const getTrigonometrySideCalcul = () => {
14
14
  const code = 65 + (0, randint_1.randint)(0, 24); // Générer un code de caractère majuscule aléatoire (A-Z)
15
15
  for (let i = 0; i < 3; i++)
16
16
  vertices.push(String.fromCharCode(code + i));
17
- const triangle = triangles_1.TriangleConstructor.createRandomRightTriangle({
17
+ const triangle = triangle_1.TriangleConstructor.createRandomRightTriangle({
18
18
  minRapport: 0.5,
19
19
  maxRapport: 1.5,
20
20
  names: vertices,
@@ -2,6 +2,7 @@ import { Exercise } from "../../exercises/exercise";
2
2
  type Identifiers = {
3
3
  epsilon: number;
4
4
  l: number;
5
+ molecule: string;
5
6
  };
6
7
  export declare const calibrationCurveOfSolution: Exercise<Identifiers>;
7
8
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"calibrationCurveOfSolution.d.ts","sourceRoot":"","sources":["../../../src/exercises/pc/calibrationCurveOfSolution.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AAYlC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAwFF,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,WAAW,CAc5D,CAAC"}
1
+ {"version":3,"file":"calibrationCurveOfSolution.d.ts","sourceRoot":"","sources":["../../../src/exercises/pc/calibrationCurveOfSolution.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AAYlC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,CAAC,EAAE,MAAM,CAAC;IACV,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AA0FF,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,WAAW,CAc5D,CAAC"}
@@ -39,6 +39,7 @@ const getCalibrationCurveOfSolutionQuestion = () => {
39
39
  identifiers: {
40
40
  epsilon: exo.epsilon,
41
41
  l: exo.l,
42
+ molecule: exo.molecule.formula,
42
43
  },
43
44
  };
44
45
  return question;
@@ -66,6 +67,7 @@ const generateExercise = () => {
66
67
  correction: getCorrection(),
67
68
  epsilon,
68
69
  l,
70
+ molecule,
69
71
  };
70
72
  };
71
73
  const getCorrection = () => {
@@ -1,5 +1,10 @@
1
1
  import { Exercise } from "../../../exercises/exercise";
2
- type Identifiers = {};
2
+ type Identifiers = {
3
+ instruction: string;
4
+ answer: string;
5
+ nA: number;
6
+ nB: number;
7
+ };
3
8
  export declare const stoichiometricReaction: Exercise<Identifiers>;
4
9
  export {};
5
10
  //# sourceMappingURL=stoichiometricReaction.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"stoichiometricReaction.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/chemicalReactions/stoichiometricReaction.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAOlC,KAAK,WAAW,GAAG,EAAE,CAAC;AAyDtB,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,CAcxD,CAAC"}
1
+ {"version":3,"file":"stoichiometricReaction.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/chemicalReactions/stoichiometricReaction.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAOlC,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAyDF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,CAcxD,CAAC"}
@@ -14,7 +14,7 @@ const getStoichiometricReactionQuestion = () => {
14
14
  instruction: exo.instruction,
15
15
  keys: [],
16
16
  answerFormat: "raw",
17
- identifiers: {},
17
+ identifiers: { ...exo },
18
18
  };
19
19
  return question;
20
20
  };
@@ -1,5 +1,8 @@
1
1
  import { Exercise } from "../../../exercises/exercise";
2
- type Identifiers = {};
2
+ type Identifiers = {
3
+ ggbCommands: string[];
4
+ type: string;
5
+ };
3
6
  export declare const ohmicConductorOrGenerator: Exercise<Identifiers>;
4
7
  export {};
5
8
  //# sourceMappingURL=ohmicConductorOrGenerator.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ohmicConductorOrGenerator.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/electricity/ohmicConductorOrGenerator.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAMlC,KAAK,WAAW,GAAG,EAAE,CAAC;AAkGtB,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,WAAW,CAiB3D,CAAC"}
1
+ {"version":3,"file":"ohmicConductorOrGenerator.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/electricity/ohmicConductorOrGenerator.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAMlC,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAmGF,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,WAAW,CAiB3D,CAAC"}
@@ -18,7 +18,7 @@ const getOhmicConductorOrGeneratorQuestion = () => {
18
18
  hint: exo.hint,
19
19
  correction: exo.correction,
20
20
  answerFormat: "raw",
21
- identifiers: {},
21
+ identifiers: { type: exo.type, ggbCommands: exo.ggb.commands },
22
22
  };
23
23
  return question;
24
24
  };
@@ -47,6 +47,7 @@ const generateExercise = () => {
47
47
  answer: type,
48
48
  hint,
49
49
  correction,
50
+ type,
50
51
  };
51
52
  };
52
53
  const getGgb = (type) => {
@@ -2,6 +2,8 @@ import { Exercise } from "../../exercises/exercise";
2
2
  type Identifiers = {
3
3
  atomicMass: number;
4
4
  atomicNumber: number;
5
+ isAsking: string;
6
+ symbol: string;
5
7
  };
6
8
  export declare const identifyAtomicMassOrAtomicNb: Exercise<Identifiers>;
7
9
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"identifyAtomicMassOrAtomicNb.d.ts","sourceRoot":"","sources":["../../../src/exercises/pc/identifyAtomicMassOrAtomicNb.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AA0EF,eAAO,MAAM,4BAA4B,EAAE,QAAQ,CAAC,WAAW,CAa9D,CAAC"}
1
+ {"version":3,"file":"identifyAtomicMassOrAtomicNb.d.ts","sourceRoot":"","sources":["../../../src/exercises/pc/identifyAtomicMassOrAtomicNb.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AA4EF,eAAO,MAAM,4BAA4B,EAAE,QAAQ,CAAC,WAAW,CAa9D,CAAC"}
@@ -19,6 +19,8 @@ const getIdentifyAtomicMassOrAtomicNbQuestion = () => {
19
19
  identifiers: {
20
20
  atomicMass: exo.atomicMasss,
21
21
  atomicNumber: exo.atomicNumber,
22
+ isAsking: exo.isAsking,
23
+ symbol: exo.atom.symbole,
22
24
  },
23
25
  };
24
26
  return question;
@@ -17,7 +17,7 @@ const getMolarMassQuestion = () => {
17
17
  instruction: `Calculer la masse molaire ${article}${molecule.name.toLocaleLowerCase()} $${molecule.formula}$.`,
18
18
  keys: [],
19
19
  answerFormat: "tex",
20
- identifiers: {},
20
+ identifiers: { molecule: molecule.formula },
21
21
  };
22
22
  return question;
23
23
  };
@@ -1,5 +1,8 @@
1
1
  import { Exercise } from "../../../exercises/exercise";
2
- type Identifiers = {};
2
+ type Identifiers = {
3
+ typeOfAcceleration: string;
4
+ ggbCommands: string[];
5
+ };
3
6
  export declare const typeOfAcceleration: Exercise<Identifiers>;
4
7
  export {};
5
8
  //# sourceMappingURL=typeOfAcceleration.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"typeOfAcceleration.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/motion/typeOfAcceleration.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAOlC,KAAK,WAAW,GAAG,EAAE,CAAC;AAoFtB,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,WAAW,CAepD,CAAC"}
1
+ {"version":3,"file":"typeOfAcceleration.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/motion/typeOfAcceleration.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAOlC,KAAK,WAAW,GAAG;IACjB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB,CAAC;AAwFF,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,WAAW,CAepD,CAAC"}
@@ -16,7 +16,10 @@ const getTypeOfAccelerationQuestion = () => {
16
16
  }),
17
17
  keys: [],
18
18
  answerFormat: "raw",
19
- identifiers: {},
19
+ identifiers: {
20
+ typeOfAcceleration: exo.typeOfAcceleration,
21
+ ggbCommands: exo.ggb.object.commands,
22
+ },
20
23
  };
21
24
  return question;
22
25
  };
@@ -46,6 +49,7 @@ const generateExo = () => {
46
49
  instruction,
47
50
  answer: typeOfAcceleration,
48
51
  ggb,
52
+ typeOfAcceleration,
49
53
  };
50
54
  };
51
55
  const generateGgb = (typeOfAcceleration) => {
@@ -1,5 +1,8 @@
1
1
  import { Exercise } from "../../../exercises/exercise";
2
- type Identifiers = {};
2
+ type Identifiers = {
3
+ ggbCommands: string[];
4
+ movementType: string;
5
+ };
3
6
  export declare const typeOfMovement: Exercise<Identifiers>;
4
7
  export {};
5
8
  //# sourceMappingURL=typeOfMovement.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"typeOfMovement.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/motion/typeOfMovement.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAOlC,KAAK,WAAW,GAAG,EAAE,CAAC;AAkHtB,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,WAAW,CAchD,CAAC"}
1
+ {"version":3,"file":"typeOfMovement.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/motion/typeOfMovement.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAOlC,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAkHF,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,WAAW,CAchD,CAAC"}
@@ -18,7 +18,7 @@ const getTypeOfMovementQuestion = () => {
18
18
  }),
19
19
  keys: [],
20
20
  answerFormat: "raw",
21
- identifiers: {},
21
+ identifiers: { movementType: exo.answer, ggbCommands: ggb.commands },
22
22
  };
23
23
  return question;
24
24
  };
@@ -1,5 +1,7 @@
1
1
  import { Exercise } from "../../exercises/exercise";
2
- type Identifiers = {};
2
+ type Identifiers = {
3
+ commands: string[];
4
+ };
3
5
  export declare const recognizeRefractionOrReflectionAngles: Exercise<Identifiers>;
4
6
  export {};
5
7
  //# sourceMappingURL=recognizeRefractionOrReflectionAngles.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"recognizeRefractionOrReflectionAngles.d.ts","sourceRoot":"","sources":["../../../src/exercises/pc/recognizeRefractionOrReflectionAngles.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAOlC,KAAK,WAAW,GAAG,EAAE,CAAC;AAmHtB,eAAO,MAAM,qCAAqC,EAAE,QAAQ,CAAC,WAAW,CAcvE,CAAC"}
1
+ {"version":3,"file":"recognizeRefractionOrReflectionAngles.d.ts","sourceRoot":"","sources":["../../../src/exercises/pc/recognizeRefractionOrReflectionAngles.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAOlC,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB,CAAC;AAmHF,eAAO,MAAM,qCAAqC,EAAE,QAAQ,CAAC,WAAW,CAcvE,CAAC"}
@@ -27,7 +27,7 @@ const getRecognizeRefractionOrReflectionAnglesQuestion = () => {
27
27
  coords: exo.coords,
28
28
  }),
29
29
  answerFormat: "raw",
30
- identifiers: {},
30
+ identifiers: { commands: exo.commands },
31
31
  };
32
32
  return question;
33
33
  };
@@ -2,5 +2,8 @@ export type ToGGBCommandsProps = {
2
2
  isFixed?: boolean;
3
3
  showLabel?: boolean;
4
4
  showUnderlyingPointsLabel?: boolean;
5
+ style?: number;
6
+ size?: number;
7
+ color?: string;
5
8
  };
6
9
  //# sourceMappingURL=toGGBCommandsProps.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"toGGBCommandsProps.d.ts","sourceRoot":"","sources":["../../../../src/exercises/utils/geogebra/toGGBCommandsProps.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,kBAAkB,GAAG;IAC/B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,yBAAyB,CAAC,EAAE,OAAO,CAAC;CACrC,CAAC"}
1
+ {"version":3,"file":"toGGBCommandsProps.d.ts","sourceRoot":"","sources":["../../../../src/exercises/utils/geogebra/toGGBCommandsProps.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,kBAAkB,GAAG;IAC/B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC"}
@@ -6,5 +6,9 @@ export declare const toolBarConstructor: (options: {
6
6
  intersect?: boolean;
7
7
  vector?: boolean;
8
8
  circleTwoPoints?: boolean;
9
+ circleRadius?: boolean;
10
+ segment?: boolean;
11
+ segmentFixed?: boolean;
12
+ polygon?: boolean;
9
13
  }) => string;
10
14
  //# sourceMappingURL=toolBarConstructor.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"toolBarConstructor.d.ts","sourceRoot":"","sources":["../../../../src/exercises/utils/geogebra/toolBarConstructor.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB,YAAa;IAC1C,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B,WAUA,CAAC"}
1
+ {"version":3,"file":"toolBarConstructor.d.ts","sourceRoot":"","sources":["../../../../src/exercises/utils/geogebra/toolBarConstructor.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB,YAAa;IAC1C,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,WAcA,CAAC"}
@@ -17,6 +17,14 @@ const toolBarConstructor = (options) => {
17
17
  customToolBar += "||7";
18
18
  if (options.circleTwoPoints)
19
19
  customToolBar += "||10";
20
+ if (options.segment)
21
+ customToolBar += "||15";
22
+ if (options.segmentFixed)
23
+ customToolBar += "||45";
24
+ if (options.circleRadius)
25
+ customToolBar += "||34";
26
+ if (options.polygon)
27
+ customToolBar += "||16";
20
28
  return customToolBar;
21
29
  };
22
30
  exports.toolBarConstructor = toolBarConstructor;
@@ -1 +1 @@
1
- {"version":3,"file":"getDistinctQuestions.d.ts","sourceRoot":"","sources":["../../../src/exercises/utils/getDistinctQuestions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,WAOnD;AAED;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,cACpB,MAAM,SAAS,GAAG,EAAE,GAAG,CAAC,MAC/B,MAAM,QACJ,MAAM,wBACS,SAAS,GAAG,EAAE,GAAG,CAAC,MAAM,SAAS,GAAG,EAAE,GAAG,CAAC,KAAK,OAAO,kBAC1E,SAAS,GAAG,EAAE,GAAG,CAAC,EAapB,CAAC"}
1
+ {"version":3,"file":"getDistinctQuestions.d.ts","sourceRoot":"","sources":["../../../src/exercises/utils/getDistinctQuestions.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,WAOnD;AAED;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,cACpB,MAAM,SAAS,GAAG,EAAE,GAAG,CAAC,MAC/B,MAAM,QACJ,MAAM,wBACS,SAAS,GAAG,EAAE,GAAG,CAAC,MAAM,SAAS,GAAG,EAAE,GAAG,CAAC,KAAK,OAAO,kBAC1E,SAAS,GAAG,EAAE,GAAG,CAAC,EAapB,CAAC"}
@@ -1,6 +1,10 @@
1
1
  "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
3
6
  exports.getDistinctQuestions = exports.equalTab = void 0;
7
+ const lodash_isequal_1 = __importDefault(require("lodash.isequal"));
4
8
  function equalTab(array1, array2) {
5
9
  if (!array1 && !array2)
6
10
  return true;
@@ -38,8 +42,11 @@ const compare = (q1, q2, discriminator) => {
38
42
  if (!!discriminator) {
39
43
  return discriminator(q1, q2);
40
44
  }
41
- return (q1.instruction === q2.instruction &&
42
- q1.answer === q2.answer &&
43
- (!q1.ggbOptions?.commands ||
44
- equalTab(q1.ggbOptions?.commands, q2.ggbOptions?.commands)));
45
+ return (0, lodash_isequal_1.default)(q1.identifiers, q2.identifiers);
46
+ // return (
47
+ // q1.instruction === q2.instruction &&
48
+ // q1.answer === q2.answer &&
49
+ // (!q1.ggbOptions?.commands ||
50
+ // equalTab(q1.ggbOptions?.commands, q2.ggbOptions?.commands!))
51
+ // );
45
52
  };