math-exercises 3.0.127 → 3.0.128

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 (187) hide show
  1. package/lib/exercises/math/calcul/arithmetics/isMultipleOrDivisor.d.ts.map +1 -1
  2. package/lib/exercises/math/calcul/arithmetics/isMultipleOrDivisor.js +0 -10
  3. package/lib/exercises/math/calcul/mentalCaluls/mentalProgramSolve.d.ts.map +1 -1
  4. package/lib/exercises/math/calcul/mentalCaluls/mentalProgramSolve.js +14 -4
  5. package/lib/exercises/math/calcul/operations/expressionNature.d.ts.map +1 -1
  6. package/lib/exercises/math/calcul/operations/expressionNature.js +0 -4
  7. package/lib/exercises/math/calcul/ordering/compareA10N.d.ts.map +1 -1
  8. package/lib/exercises/math/calcul/ordering/compareA10N.js +0 -1
  9. package/lib/exercises/math/calcul/ordering/compareABUsingQuotient.d.ts.map +1 -1
  10. package/lib/exercises/math/calcul/ordering/compareABUsingQuotient.js +1 -2
  11. package/lib/exercises/math/calcul/ordering/compareFracABWithFracAPlusCBPlusC.d.ts.map +1 -1
  12. package/lib/exercises/math/calcul/ordering/compareFracABWithFracAPlusCBPlusC.js +0 -1
  13. package/lib/exercises/math/calcul/ordering/compareFracAndDec.d.ts.map +1 -1
  14. package/lib/exercises/math/calcul/ordering/compareFracAndDec.js +0 -1
  15. package/lib/exercises/math/calcul/ordering/compareWithSquareRoots.d.ts.map +1 -1
  16. package/lib/exercises/math/calcul/ordering/compareWithSquareRoots.js +20 -11
  17. package/lib/exercises/math/calcul/ordering/decimalOrdering.d.ts.map +1 -1
  18. package/lib/exercises/math/calcul/ordering/decimalOrdering.js +0 -4
  19. package/lib/exercises/math/calcul/ordering/decimalOrderingNoRelatives.d.ts.map +1 -1
  20. package/lib/exercises/math/calcul/ordering/decimalOrderingNoRelatives.js +0 -4
  21. package/lib/exercises/math/calcul/ordering/integerOrdering.d.ts.map +1 -1
  22. package/lib/exercises/math/calcul/ordering/integerOrdering.js +0 -4
  23. package/lib/exercises/math/calcul/proportionality/findCoeffInProportionalTableNonIntegers.d.ts.map +1 -1
  24. package/lib/exercises/math/calcul/proportionality/findCoeffInProportionalTableNonIntegers.js +0 -1
  25. package/lib/exercises/math/calcul/proportionality/isTableProportional.d.ts.map +1 -1
  26. package/lib/exercises/math/calcul/proportionality/isTableProportional.js +0 -4
  27. package/lib/exercises/math/calcul/proportionality/isTableProportionalNonInteger.d.ts.map +1 -1
  28. package/lib/exercises/math/calcul/proportionality/isTableProportionalNonInteger.js +0 -4
  29. package/lib/exercises/math/calcul/rounding/estimateAroundPow10NTimesAroundPow10N.d.ts.map +1 -1
  30. package/lib/exercises/math/calcul/rounding/estimateAroundPow10NTimesAroundPow10N.js +0 -1
  31. package/lib/exercises/math/calcul/rounding/estimatePow10NPlusPow10MinusN.d.ts.map +1 -1
  32. package/lib/exercises/math/calcul/rounding/estimatePow10NPlusPow10MinusN.js +0 -1
  33. package/lib/exercises/math/calcul/rounding/getPhysicalOrderOfMagnitude.d.ts.map +1 -1
  34. package/lib/exercises/math/calcul/rounding/getPhysicalOrderOfMagnitude.js +28 -14
  35. package/lib/exercises/math/calcul/sign/signFromAx.d.ts.map +1 -1
  36. package/lib/exercises/math/calcul/sign/signFromAx.js +0 -10
  37. package/lib/exercises/math/calculLitteral/equation/equationFromProblem.d.ts.map +1 -1
  38. package/lib/exercises/math/calculLitteral/equation/equationFromProblem.js +6 -7
  39. package/lib/exercises/math/calculLitteral/inequations/isInequalityTrue.d.ts.map +1 -1
  40. package/lib/exercises/math/calculLitteral/inequations/isInequalityTrue.js +0 -10
  41. package/lib/exercises/math/calculLitteral/ordering/compareAMinusB.d.ts.map +1 -1
  42. package/lib/exercises/math/calculLitteral/ordering/compareAMinusB.js +38 -34
  43. package/lib/exercises/math/calculLitteral/ordering/compareFromPiMinusFrac.d.ts.map +1 -1
  44. package/lib/exercises/math/calculLitteral/ordering/compareFromPiMinusFrac.js +0 -1
  45. package/lib/exercises/math/calculLitteral/simplifying/valuateExpression.d.ts.map +1 -1
  46. package/lib/exercises/math/calculLitteral/simplifying/valuateExpression.js +0 -10
  47. package/lib/exercises/math/calculLitteral/writing/writeLitExpFromFrenchExp.d.ts.map +1 -1
  48. package/lib/exercises/math/calculLitteral/writing/writeLitExpFromFrenchExp.js +0 -1
  49. package/lib/exercises/math/conversion/kmPerMinToKmPerHourConversion.d.ts.map +1 -1
  50. package/lib/exercises/math/conversion/kmPerMinToKmPerHourConversion.js +0 -1
  51. package/lib/exercises/math/conversion/minutesToHours.d.ts.map +1 -1
  52. package/lib/exercises/math/conversion/minutesToHours.js +0 -1
  53. package/lib/exercises/math/conversion/secondsToHours.d.ts.map +1 -1
  54. package/lib/exercises/math/conversion/secondsToHours.js +0 -1
  55. package/lib/exercises/math/dataRepresentations/compareBoxPlot.d.ts.map +1 -1
  56. package/lib/exercises/math/dataRepresentations/compareBoxPlot.js +0 -1
  57. package/lib/exercises/math/derivation/convexity/convexityQuadrinomials.d.ts.map +1 -1
  58. package/lib/exercises/math/derivation/convexity/convexityQuadrinomials.js +0 -1
  59. package/lib/exercises/math/equaDiff/equaDiffCheckSolutionFirstOrder.d.ts.map +1 -1
  60. package/lib/exercises/math/equaDiff/equaDiffCheckSolutionFirstOrder.js +0 -4
  61. package/lib/exercises/math/functions/affines/affineAdjustmentComplete.d.ts.map +1 -1
  62. package/lib/exercises/math/functions/affines/affineAdjustmentComplete.js +0 -1
  63. package/lib/exercises/math/functions/affines/coordsOfPointOnAffineFindX.d.ts.map +1 -1
  64. package/lib/exercises/math/functions/affines/coordsOfPointOnAffineFindX.js +0 -1
  65. package/lib/exercises/math/functions/affines/coordsOfPointOnAffineFindY.d.ts.map +1 -1
  66. package/lib/exercises/math/functions/affines/coordsOfPointOnAffineFindY.js +0 -1
  67. package/lib/exercises/math/functions/affines/drawAffineFromProgCalc.d.ts.map +1 -1
  68. package/lib/exercises/math/functions/affines/recognizeAffineGraph.d.ts.map +1 -1
  69. package/lib/exercises/math/functions/affines/recognizeAffineGraph.js +0 -4
  70. package/lib/exercises/math/functions/basics/coordsOfPointOnCurveFindY.d.ts.map +1 -1
  71. package/lib/exercises/math/functions/basics/coordsOfPointOnCurveFindY.js +0 -1
  72. package/lib/exercises/math/functions/basics/isPointOnFunction.d.ts.map +1 -1
  73. package/lib/exercises/math/functions/basics/isPointOnFunction.js +0 -10
  74. package/lib/exercises/math/functions/basics/signOfFunction.d.ts.map +1 -1
  75. package/lib/exercises/math/functions/basics/signOfFunction.js +0 -10
  76. package/lib/exercises/math/functions/cube/isPointOnCubicFunction.d.ts.map +1 -1
  77. package/lib/exercises/math/functions/cube/isPointOnCubicFunction.js +0 -10
  78. package/lib/exercises/math/functions/exponentials/exponentialsVariations.d.ts.map +1 -1
  79. package/lib/exercises/math/functions/exponentials/exponentialsVariations.js +0 -4
  80. package/lib/exercises/math/functions/inverse/compareInverseValues.d.ts.map +1 -1
  81. package/lib/exercises/math/functions/inverse/compareInverseValues.js +0 -1
  82. package/lib/exercises/math/functions/inverse/isPointOnReciprocalFunction.d.ts.map +1 -1
  83. package/lib/exercises/math/functions/inverse/isPointOnReciprocalFunction.js +0 -10
  84. package/lib/exercises/math/functions/parity/parityFromAlgebra.d.ts.map +1 -1
  85. package/lib/exercises/math/functions/parity/parityFromAlgebra.js +0 -4
  86. package/lib/exercises/math/functions/square/compareSquaredValues.d.ts.map +1 -1
  87. package/lib/exercises/math/functions/square/compareSquaredValues.js +0 -10
  88. package/lib/exercises/math/geometry/convexity/convexityTrinomialsGeo.d.ts.map +1 -1
  89. package/lib/exercises/math/geometry/convexity/convexityTrinomialsGeo.js +0 -4
  90. package/lib/exercises/math/geometry/euclidian/pythagoreOrThales.d.ts.map +1 -1
  91. package/lib/exercises/math/geometry/euclidian/pythagoreOrThales.js +0 -4
  92. package/lib/exercises/math/geometry/lines/isPointOnCartesianLine.d.ts.map +1 -1
  93. package/lib/exercises/math/geometry/lines/isPointOnCartesianLine.js +0 -4
  94. package/lib/exercises/math/geometry/lines/isPointOnLine.d.ts.map +1 -1
  95. package/lib/exercises/math/geometry/lines/isPointOnLine.js +0 -4
  96. package/lib/exercises/math/geometry/lines/linesRelativePositions.d.ts.map +1 -1
  97. package/lib/exercises/math/geometry/lines/linesRelativePositions.js +0 -4
  98. package/lib/exercises/math/geometry/parametric/pointFromParametricLine.d.ts.map +1 -1
  99. package/lib/exercises/math/geometry/parametric/pointFromParametricLine.js +0 -4
  100. package/lib/exercises/math/geometry/pythagore/isTriangleRight.d.ts.map +1 -1
  101. package/lib/exercises/math/geometry/pythagore/isTriangleRight.js +0 -4
  102. package/lib/exercises/math/geometry/quadrilaterals/parallelogramRectangle.d.ts.map +1 -1
  103. package/lib/exercises/math/geometry/quadrilaterals/parallelogramRectangle.js +0 -4
  104. package/lib/exercises/math/geometry/quadrilaterals/parallelogramRhombus.d.ts.map +1 -1
  105. package/lib/exercises/math/geometry/quadrilaterals/parallelogramRhombus.js +0 -4
  106. package/lib/exercises/math/geometry/quadrilaterals/quadrilateralRecognition.d.ts.map +1 -1
  107. package/lib/exercises/math/geometry/quadrilaterals/quadrilateralRecognition.js +0 -4
  108. package/lib/exercises/math/geometry/shapes/basicShapesRecognition.d.ts.map +1 -1
  109. package/lib/exercises/math/geometry/shapes/basicShapesRecognition.js +6 -7
  110. package/lib/exercises/math/geometry/vectors/colinearity/colinearityFromBasis.d.ts.map +1 -1
  111. package/lib/exercises/math/geometry/vectors/colinearity/colinearityFromBasis.js +0 -10
  112. package/lib/exercises/math/geometry/vectors/colinearity/colinearityFromPicture.d.ts.map +1 -1
  113. package/lib/exercises/math/geometry/vectors/colinearity/colinearityFromPicture.js +0 -10
  114. package/lib/exercises/math/geometry/vectors/equalCaracteristicFromGraph.d.ts.map +1 -1
  115. package/lib/exercises/math/geometry/vectors/equalCaracteristicFromGraph.js +0 -4
  116. package/lib/exercises/math/percent/evolutions/findRightCalculForPriceEvolution.d.ts.map +1 -1
  117. package/lib/exercises/math/percent/evolutions/findRightCalculForPriceEvolution.js +0 -4
  118. package/lib/exercises/math/probaStat/basicProbas/mostLeastProbable.d.ts.map +1 -1
  119. package/lib/exercises/math/probaStat/basicProbas/mostLeastProbable.js +0 -10
  120. package/lib/exercises/math/probaStat/checkEquiprobability.d.ts.map +1 -1
  121. package/lib/exercises/math/probaStat/checkEquiprobability.js +0 -10
  122. package/lib/exercises/math/probaStat/conditionalProbaWriteFromFrench.d.ts.map +1 -1
  123. package/lib/exercises/math/probaStat/conditionalProbaWriteFromFrench.js +0 -1
  124. package/lib/exercises/math/probaStat/events/describeEvent.d.ts.map +1 -1
  125. package/lib/exercises/math/probaStat/events/describeEvent.js +0 -10
  126. package/lib/exercises/math/probaStat/events/eventNotation.d.ts.map +1 -1
  127. package/lib/exercises/math/probaStat/events/eventNotation.js +0 -10
  128. package/lib/exercises/math/probaStat/stats1var/compareSeriesDispersion.d.ts.map +1 -1
  129. package/lib/exercises/math/probaStat/stats1var/compareSeriesDispersion.js +0 -4
  130. package/lib/exercises/math/probaStat/stats1var/getQuartileProportionQuestion.d.ts.map +1 -1
  131. package/lib/exercises/math/probaStat/stats1var/getQuartileProportionQuestion.js +0 -10
  132. package/lib/exercises/math/probaStat/stats2var/fineAdjustementExercise.d.ts.map +1 -1
  133. package/lib/exercises/math/probaStat/stats2var/fineAdjustementExercise.js +0 -4
  134. package/lib/exercises/math/python/pythonForLoopInstructionCompletion.d.ts.map +1 -1
  135. package/lib/exercises/math/python/pythonForLoopInstructionCompletion.js +0 -10
  136. package/lib/exercises/math/python/pythonIfStatementCompletion.d.ts.map +1 -1
  137. package/lib/exercises/math/python/pythonIfStatementCompletion.js +7 -8
  138. package/lib/exercises/math/python/pythonSimpleFunctionInstructionCompletion.d.ts.map +1 -1
  139. package/lib/exercises/math/python/pythonSimpleFunctionInstructionCompletion.js +0 -10
  140. package/lib/exercises/math/python/pythonWhileStatementCompletion.d.ts.map +1 -1
  141. package/lib/exercises/math/python/pythonWhileStatementCompletion.js +5 -6
  142. package/lib/exercises/math/python/pythonWhileStatementOperationCompletion.d.ts.map +1 -1
  143. package/lib/exercises/math/python/pythonWhileStatementOperationCompletion.js +5 -6
  144. package/lib/exercises/math/python/variableType.d.ts.map +1 -1
  145. package/lib/exercises/math/python/variableType.js +0 -10
  146. package/lib/exercises/math/sampling/isSamplingRepresentative.d.ts.map +1 -1
  147. package/lib/exercises/math/sampling/isSamplingRepresentative.js +0 -4
  148. package/lib/exercises/math/sequences/arithmetic/recognizeArithmeticFromFirstTerms.d.ts.map +1 -1
  149. package/lib/exercises/math/sequences/arithmetic/recognizeArithmeticFromFirstTerms.js +0 -4
  150. package/lib/exercises/math/sequences/arithmetic/recognizeArithmeticFromGraph.d.ts.map +1 -1
  151. package/lib/exercises/math/sequences/arithmetic/recognizeArithmeticFromGraph.js +0 -4
  152. package/lib/exercises/math/sequences/geometric/geometricVariations.d.ts.map +1 -1
  153. package/lib/exercises/math/sequences/geometric/geometricVariations.js +0 -4
  154. package/lib/exercises/math/sets/intervals/isNumberInInterval.d.ts.map +1 -1
  155. package/lib/exercises/math/sets/intervals/isNumberInInterval.js +0 -10
  156. package/lib/exercises/math/sets/isNumberDecimal.d.ts.map +1 -1
  157. package/lib/exercises/math/sets/isNumberDecimal.js +0 -10
  158. package/lib/exercises/math/sets/nameOfNumberSets.d.ts.map +1 -1
  159. package/lib/exercises/math/sets/nameOfNumberSets.js +0 -10
  160. package/lib/exercises/pc/chemicalElements/atomicStructureOfNucleus.d.ts.map +1 -1
  161. package/lib/exercises/pc/chemicalElements/atomicStructureOfNucleus.js +0 -1
  162. package/lib/exercises/pc/chemicalElements/identifyRightElectronicConfiguration.d.ts.map +1 -1
  163. package/lib/exercises/pc/chemicalElements/identifyRightElectronicConfiguration.js +0 -4
  164. package/lib/exercises/pc/chemicalReactions/identifyLimitingReagent.d.ts.map +1 -1
  165. package/lib/exercises/pc/chemicalReactions/identifyLimitingReagent.js +0 -4
  166. package/lib/exercises/pc/chemicalReactions/identifyStoichiometricMixture.d.ts.map +1 -1
  167. package/lib/exercises/pc/chemicalReactions/identifyStoichiometricMixture.js +0 -4
  168. package/lib/exercises/pc/chemicalReactions/stoichiometricReaction.d.ts.map +1 -1
  169. package/lib/exercises/pc/chemicalReactions/stoichiometricReaction.js +0 -4
  170. package/lib/exercises/pc/electricity/ohmicConductorOrGenerator.d.ts.map +1 -1
  171. package/lib/exercises/pc/electricity/ohmicConductorOrGenerator.js +0 -4
  172. package/lib/exercises/pc/moleculeNomenclature.d.ts.map +1 -1
  173. package/lib/exercises/pc/moleculeNomenclature.js +0 -4
  174. package/lib/exercises/pc/motion/motionReference.d.ts.map +1 -1
  175. package/lib/exercises/pc/motion/motionReference.js +0 -4
  176. package/lib/exercises/pc/motion/typeOfAcceleration.d.ts.map +1 -1
  177. package/lib/exercises/pc/motion/typeOfAcceleration.js +0 -4
  178. package/lib/exercises/pc/sound/frequencyComparison.d.ts.map +1 -1
  179. package/lib/exercises/pc/sound/frequencyComparison.js +0 -4
  180. package/lib/math/progCalc/progCalc.d.ts +3 -3
  181. package/lib/math/progCalc/progCalc.d.ts.map +1 -1
  182. package/lib/math/progCalc/progCalc.js +13 -3
  183. package/lib/tests/exoTest.d.ts.map +1 -1
  184. package/lib/tests/exoTest.js +7 -0
  185. package/lib/tests/questionTest.d.ts.map +1 -1
  186. package/lib/tests/questionTest.js +3 -2
  187. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"isMultipleOrDivisor.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/arithmetics/isMultipleOrDivisor.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAIrC,OAAO,EACL,eAAe,EAEhB,MAAM,qCAAqC,CAAC;AAM7C,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,eAAe,CAAC;IACnB,CAAC,EAAE,eAAe,CAAC;CACpB,CAAC;AAgHF,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,WAAW,CAkBrD,CAAC"}
1
+ {"version":3,"file":"isMultipleOrDivisor.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/arithmetics/isMultipleOrDivisor.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAIrC,OAAO,EACL,eAAe,EAEhB,MAAM,qCAAqC,CAAC;AAK7C,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,eAAe,CAAC;IACnB,CAAC,EAAE,eAAe,CAAC;CACpB,CAAC;AAyGF,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,WAAW,CAiBrD,CAAC"}
@@ -6,7 +6,6 @@ import { reifyAlgebraic, } from "../../../../tree/nodes/nodeConstructor.js";
6
6
  import { DivideNode } from "../../../../tree/nodes/operators/divideNode.js";
7
7
  import { coinFlip } from "../../../../utils/alea/coinFlip.js";
8
8
  import { random } from "../../../../utils/alea/random.js";
9
- import { handleVEAError } from "../../../../utils/errors/handleVEAError.js";
10
9
  function isMultiple(a, b) {
11
10
  return a !== 0 && b % a === 0;
12
11
  }
@@ -66,14 +65,6 @@ $$`;
66
65
  const getKeys = () => {
67
66
  return [];
68
67
  };
69
- const isAnswerValid = () => {
70
- try {
71
- throw Error("VEA not implemented");
72
- }
73
- catch (err) {
74
- return handleVEAError(err);
75
- }
76
- };
77
68
  const getIsMultipleOrDivisorQuestion = () => {
78
69
  const isMultiple = coinFlip();
79
70
  const a = randint(10, 100);
@@ -105,7 +96,6 @@ export const isMultipleOrDivisor = {
105
96
  qcmTimer: 60,
106
97
  freeTimer: 60,
107
98
  getPropositions,
108
- isAnswerValid,
109
99
  subject: "Mathématiques",
110
100
  getInstruction,
111
101
  getHint,
@@ -1 +1 @@
1
- {"version":3,"file":"mentalProgramSolve.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/mentalCaluls/mentalProgramSolve.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAiBT,MAAM,6BAA6B,CAAC;AAIrC,OAAO,EAEL,eAAe,EAChB,MAAM,qCAAqC,CAAC;AAG7C,OAAO,EAGL,mBAAmB,EACpB,MAAM,iCAAiC,CAAC;AAgCzC,KAAK,WAAW,GAAG;IACjB,qBAAqB,EAAE,eAAe,CAAC;IACvC,WAAW,EAAE,mBAAmB,CAAC;CAClC,CAAC;AA8MF,KAAK,OAAO,GAAG;IACb,UAAU,EAAE,QAAQ,GAAG,SAAS,CAAC;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAiCF,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CA0B7D,CAAC"}
1
+ {"version":3,"file":"mentalProgramSolve.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/mentalCaluls/mentalProgramSolve.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAiBT,MAAM,6BAA6B,CAAC;AAIrC,OAAO,EAEL,eAAe,EAChB,MAAM,qCAAqC,CAAC;AAG7C,OAAO,EAGL,mBAAmB,EACpB,MAAM,iCAAiC,CAAC;AAgCzC,KAAK,WAAW,GAAG;IACjB,qBAAqB,EAAE,eAAe,CAAC;IACvC,WAAW,EAAE,mBAAmB,CAAC;CAClC,CAAC;AAkNF,KAAK,OAAO,GAAG;IACb,UAAU,EAAE,QAAQ,GAAG,SAAS,CAAC;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAiCF,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAyB7D,CAAC"}
@@ -42,10 +42,16 @@ const getPropositions = (n, { answer, progCalcIds, nodeIdsStartingNumber }) => {
42
42
  const progCalc = ProgCalcConstructor.fromIdentifiers(progCalcIds);
43
43
  const nodeFinalNumber = progCalc.apply(nodeStartingNumber).simplify();
44
44
  //applies progCalc to finalNumber
45
- tryToAddWrongProp(propositions, progCalc.apply(nodeFinalNumber).simplify().toTex());
45
+ const node1 = progCalc.apply(nodeFinalNumber);
46
+ if (node1) {
47
+ tryToAddWrongProp(propositions, node1.simplify().toTex());
48
+ }
46
49
  //applies progCalc operations in reverse to finalNumber
47
50
  const progCalcReversed = new ProgCalc(progCalc.operations.toReversed());
48
- tryToAddWrongProp(propositions, progCalcReversed.apply(nodeFinalNumber).simplify().toTex());
51
+ const node2 = progCalcReversed.apply(nodeFinalNumber);
52
+ if (node2) {
53
+ tryToAddWrongProp(propositions, node2.simplify().toTex());
54
+ }
49
55
  //stops at intermediary step (stops before goal)
50
56
  const progCalcInverse = progCalc.getInverseProgCalc();
51
57
  const inverseOperations = progCalcInverse.operations;
@@ -54,7 +60,12 @@ const getPropositions = (n, { answer, progCalcIds, nodeIdsStartingNumber }) => {
54
60
  const nodePrevious = arrStepNodes[arrStepNodes.length - 1].simplify();
55
61
  const operation = inverseOperations[i];
56
62
  const nodeStep = operation.func(nodePrevious);
57
- arrStepNodes.push(nodeStep);
63
+ if (nodeStep) {
64
+ arrStepNodes.push(nodeStep);
65
+ }
66
+ else {
67
+ break;
68
+ }
58
69
  }
59
70
  shuffle(arrStepNodes).forEach((nodeStep) => {
60
71
  if (propositions.length < n) {
@@ -227,5 +238,4 @@ export const mentalProgramSolve = {
227
238
  getAnswer,
228
239
  getQuestionFromIdentifiers,
229
240
  hasHintAndCorrection: true,
230
- answerType: "QCU",
231
241
  };
@@ -1 +1 @@
1
- {"version":3,"file":"expressionNature.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/operations/expressionNature.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,6BAA6B,CAAC;AAIrC,OAAO,EACL,eAAe,EAEhB,MAAM,qCAAqC,CAAC;AAO7C,KAAK,WAAW,GAAG;IAAE,OAAO,EAAE,eAAe,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AA2M/E,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAelD,CAAC"}
1
+ {"version":3,"file":"expressionNature.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/operations/expressionNature.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAWT,MAAM,6BAA6B,CAAC;AAIrC,OAAO,EACL,eAAe,EAEhB,MAAM,qCAAqC,CAAC;AAO7C,KAAK,WAAW,GAAG;IAAE,OAAO,EAAE,eAAe,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAuM/E,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAclD,CAAC"}
@@ -173,9 +173,6 @@ const getPropositions = (n, { answer }) => {
173
173
  tryToAddWrongProp(propositions, "un quotient", "raw");
174
174
  return shuffleProps(propositions, n);
175
175
  };
176
- const isAnswerValid = (ans, { answer }) => {
177
- return ans === answer;
178
- };
179
176
  export const expressionNature = {
180
177
  id: "expressionNature",
181
178
  connector: "=",
@@ -185,7 +182,6 @@ export const expressionNature = {
185
182
  qcmTimer: 60,
186
183
  freeTimer: 60,
187
184
  getPropositions,
188
- isAnswerValid,
189
185
  subject: "Mathématiques",
190
186
  answerType: "QCU",
191
187
  getQuestionFromIdentifiers,
@@ -1 +1 @@
1
- {"version":3,"file":"compareA10N.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/ordering/compareA10N.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAkBT,MAAM,6BAA6B,CAAC;AAmBrC,KAAK,IAAI,GAAG;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAEF,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,IAAI,EAAE,CAAC;CACf,CAAC;AAwTF,KAAK,OAAO,GAAG;IACb,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB,CAAC;AA0CF,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAgBtD,CAAC"}
1
+ {"version":3,"file":"compareA10N.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/ordering/compareA10N.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAkBT,MAAM,6BAA6B,CAAC;AAmBrC,KAAK,IAAI,GAAG;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAEF,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,IAAI,EAAE,CAAC;CACf,CAAC;AAwTF,KAAK,OAAO,GAAG;IACb,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB,CAAC;AA0CF,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAetD,CAAC"}
@@ -322,6 +322,5 @@ export const compareA10N = {
322
322
  subject: "Mathématiques",
323
323
  maxAllowedQuestions: 30,
324
324
  getQuestionFromIdentifiers,
325
- answerType: "QCU",
326
325
  hasHintAndCorrection: true,
327
326
  };
@@ -1 +1 @@
1
- {"version":3,"file":"compareABUsingQuotient.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/ordering/compareABUsingQuotient.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAIrC,OAAO,EAEL,eAAe,EAChB,MAAM,qCAAqC,CAAC;AAK7C,KAAK,WAAW,GAAG;IACjB,cAAc,EAAE,eAAe,EAAE,CAAC;CACnC,CAAC;AA+IF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,CAiBxD,CAAC"}
1
+ {"version":3,"file":"compareABUsingQuotient.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/ordering/compareABUsingQuotient.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAIrC,OAAO,EAEL,eAAe,EAChB,MAAM,qCAAqC,CAAC;AAK7C,KAAK,WAAW,GAAG;IACjB,cAAc,EAAE,eAAe,EAAE,CAAC;CACnC,CAAC;AA+IF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,CAgBxD,CAAC"}
@@ -42,7 +42,7 @@ $$
42
42
  const getAnswer = (identifiers) => {
43
43
  const { orderedNodeIds } = identifiers;
44
44
  const [A, B] = orderedNodeIds.map((nodeIds) => NodeConstructor.fromIdentifiers(nodeIds).toTex());
45
- return `${B} > ${A}`;
45
+ return `${B}>${A}`;
46
46
  };
47
47
  const isAnswerValid = (ans, { ...identifiers }) => {
48
48
  const { orderedNodeIds } = identifiers;
@@ -118,6 +118,5 @@ export const compareABUsingQuotient = {
118
118
  subject: "Mathématiques",
119
119
  maxAllowedQuestions: 30,
120
120
  getQuestionFromIdentifiers,
121
- answerType: "QCU",
122
121
  hasHintAndCorrection: true,
123
122
  };
@@ -1 +1 @@
1
- {"version":3,"file":"compareFracABWithFracAPlusCBPlusC.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/ordering/compareFracABWithFracAPlusCBPlusC.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAIrC,OAAO,EAEL,eAAe,EAChB,MAAM,qCAAqC,CAAC;AAY7C,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,eAAe,EAAE,CAAC;IAC3B,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB,CAAC;AA4LF,eAAO,MAAM,iCAAiC,EAAE,QAAQ,CAAC,WAAW,CAoBnE,CAAC"}
1
+ {"version":3,"file":"compareFracABWithFracAPlusCBPlusC.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/ordering/compareFracABWithFracAPlusCBPlusC.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAIrC,OAAO,EAEL,eAAe,EAChB,MAAM,qCAAqC,CAAC;AAY7C,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,eAAe,EAAE,CAAC;IAC3B,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB,CAAC;AA4LF,eAAO,MAAM,iCAAiC,EAAE,QAAQ,CAAC,WAAW,CAmBnE,CAAC"}
@@ -144,6 +144,5 @@ export const compareFracABWithFracAPlusCBPlusC = {
144
144
  subject: "Mathématiques",
145
145
  maxAllowedQuestions: 30,
146
146
  getQuestionFromIdentifiers,
147
- answerType: "QCU",
148
147
  hasHintAndCorrection: true,
149
148
  };
@@ -1 +1 @@
1
- {"version":3,"file":"compareFracAndDec.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/ordering/compareFracAndDec.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAiBT,MAAM,6BAA6B,CAAC;AAIrC,OAAO,EAEL,eAAe,EAChB,MAAM,qCAAqC,CAAC;AAY7C,KAAK,OAAO,GAAG;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,aAAa,EAAE,OAAO,CAAC;CACxB,CAAC;AAEF,KAAK,aAAa,GAAG;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,eAAe,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,2BAA2B,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;IAC3D,KAAK,EAAE,OAAO,EAAE,CAAC;CAClB,CAAC;AAkYF,KAAK,OAAO,GAAG;IACb,QAAQ,EAAE,OAAO,CAAC;IAClB,eAAe,EAAE,MAAM,CAAC;IACxB,yBAAyB,EAAE,OAAO,CAAC;CACpC,CAAC;AA+BF,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAiB5D,CAAC"}
1
+ {"version":3,"file":"compareFracAndDec.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/ordering/compareFracAndDec.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAiBT,MAAM,6BAA6B,CAAC;AAIrC,OAAO,EAEL,eAAe,EAChB,MAAM,qCAAqC,CAAC;AAY7C,KAAK,OAAO,GAAG;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,aAAa,EAAE,OAAO,CAAC;CACxB,CAAC;AAEF,KAAK,aAAa,GAAG;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,eAAe,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,2BAA2B,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;IAC3D,KAAK,EAAE,OAAO,EAAE,CAAC;CAClB,CAAC;AAkYF,KAAK,OAAO,GAAG;IACb,QAAQ,EAAE,OAAO,CAAC;IAClB,eAAe,EAAE,MAAM,CAAC;IACxB,yBAAyB,EAAE,OAAO,CAAC;CACpC,CAAC;AA+BF,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAgB5D,CAAC"}
@@ -363,6 +363,5 @@ export const compareFracAndDec = {
363
363
  subject: "Mathématiques",
364
364
  maxAllowedQuestions: 30,
365
365
  getQuestionFromIdentifiers,
366
- answerType: "QCU",
367
366
  hasHintAndCorrection: true,
368
367
  };
@@ -1 +1 @@
1
- {"version":3,"file":"compareWithSquareRoots.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/ordering/compareWithSquareRoots.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAQrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,OAAO,CAAC;CAChB,CAAC;AAmKF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,CAgBxD,CAAC"}
1
+ {"version":3,"file":"compareWithSquareRoots.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/ordering/compareWithSquareRoots.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAWrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,OAAO,CAAC;CAChB,CAAC;AA+KF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,CAexD,CAAC"}
@@ -1,6 +1,9 @@
1
1
  import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
2
2
  import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
3
3
  import { randint } from "../../../../math/utils/random/randint.js";
4
+ import { sqrt } from "../../../../tree/nodes/functions/sqrtNode.js";
5
+ import { add } from "../../../../tree/nodes/operators/addNode.js";
6
+ import { substract } from "../../../../tree/nodes/operators/substractNode.js";
4
7
  import { parseAlgebraic } from "../../../../tree/parsers/latexParser.js";
5
8
  import { coinFlip } from "../../../../utils/alea/coinFlip.js";
6
9
  import { handleVEAError } from "../../../../utils/errors/handleVEAError.js";
@@ -45,16 +48,23 @@ $$
45
48
 
46
49
  `;
47
50
  };
51
+ const getAnswerNodes = (identifiers) => {
52
+ const { a, b, isAdd } = identifiers;
53
+ const addSub = isAdd ? add : substract;
54
+ const nodeWithA = addSub(b, sqrt(a));
55
+ const nodeWithAPlus1 = addSub(b, sqrt(add(a, 1)));
56
+ return isAdd ? [nodeWithA, nodeWithAPlus1] : [nodeWithAPlus1, nodeWithA];
57
+ };
48
58
  const getAnswer = (identifiers) => {
49
59
  const { a, b, isAdd } = identifiers;
50
- return `${b} ${isAdd ? "+" : "-"} \\sqrt{${a}} ${isAdd ? "<" : ">"} ${b} ${isAdd ? "+" : "-"} \\sqrt{${a + 1}}`;
60
+ return `${b}${isAdd ? "+" : "-"}\\sqrt{${a}}${isAdd ? "<" : ">"}${b}${isAdd ? "+" : "-"}\\sqrt{${a + 1}}`;
51
61
  };
52
- const isAnswerValid = (ans, { answer }) => {
62
+ const isAnswerValid = (ans, { answer, ...identifiers }) => {
53
63
  function getOrderedNodesFromTex(tex, compSymbol) {
54
64
  return tex
55
65
  .split(compSymbol)
56
66
  .map((str) => parseAlgebraic(str))
57
- .toSorted(() => (compSymbol === "<" ? -1 : +1));
67
+ .toSorted(() => (compSymbol === "<" ? +1 : -1));
58
68
  }
59
69
  try {
60
70
  const compSymbol = ans.includes("<")
@@ -64,9 +74,9 @@ const isAnswerValid = (ans, { answer }) => {
64
74
  : undefined;
65
75
  if (compSymbol) {
66
76
  const [ansNode1, ansNode2] = getOrderedNodesFromTex(ans, compSymbol);
67
- const [answerNode1, answerNode2] = getOrderedNodesFromTex(answer, "<");
68
- return (ansNode1.simplify().equals(answerNode1.simplify()) &&
69
- ansNode2.simplify().equals(answerNode2.simplify()));
77
+ const [answerNode1, answerNode2] = getAnswerNodes(identifiers);
78
+ return (substract(ansNode1, answerNode1).simplify().evaluate() === 0 &&
79
+ substract(ansNode2, answerNode2).simplify().evaluate() === 0);
70
80
  }
71
81
  else {
72
82
  return false;
@@ -79,8 +89,8 @@ const isAnswerValid = (ans, { answer }) => {
79
89
  const getPropositions = (nbProps, { answer, ...identifiers }) => {
80
90
  const { a, b, isAdd } = identifiers;
81
91
  const propositions = [];
82
- addValidProp(propositions, `${b} ${isAdd ? "+" : "-"} \\sqrt{${a}} ${isAdd ? "<" : ">"} ${b} ${isAdd ? "+" : "-"} \\sqrt{${a + 1}}`, "tex");
83
- tryToAddWrongProp(propositions, `${b} ${isAdd ? "+" : "-"} \\sqrt{${a}} ${!isAdd ? "<" : ">"} ${b} ${isAdd ? "+" : "-"} \\sqrt{${a + 1}}`, "tex");
92
+ addValidProp(propositions, `${b}${isAdd ? "+" : "-"}\\sqrt{${a}}${isAdd ? "<" : ">"}${b}${isAdd ? "+" : "-"}\\sqrt{${a + 1}}`, "tex");
93
+ tryToAddWrongProp(propositions, `${b}${isAdd ? "+" : "-"}\\sqrt{${a}}${!isAdd ? "<" : ">"}${b}${isAdd ? "+" : "-"}\\sqrt{${a + 1}}`, "tex");
84
94
  return shuffleProps(propositions, nbProps);
85
95
  };
86
96
  const getKeys = (identifiers) => {
@@ -89,8 +99,8 @@ const getKeys = (identifiers) => {
89
99
  "inf",
90
100
  "sup",
91
101
  ...[
92
- `${b} ${isAdd ? "+" : "-"} \\sqrt{${a}}`,
93
- `${b} ${isAdd ? "+" : "-"} \\sqrt{${a + 1}}`,
102
+ `${b}${isAdd ? "+" : "-"}\\sqrt{${a}}`,
103
+ `${b}${isAdd ? "+" : "-"}\\sqrt{${a + 1}}`,
94
104
  ].map((tex) => {
95
105
  return {
96
106
  id: "custom",
@@ -135,6 +145,5 @@ export const compareWithSquareRoots = {
135
145
  subject: "Mathématiques",
136
146
  maxAllowedQuestions: 30,
137
147
  getQuestionFromIdentifiers,
138
- answerType: "QCU",
139
148
  hasHintAndCorrection: true,
140
149
  };
@@ -1 +1 @@
1
- {"version":3,"file":"decimalOrdering.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/ordering/decimalOrdering.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,6BAA6B,CAAC;AAMrC,KAAK,WAAW,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAuF1D,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,CAcjD,CAAC"}
1
+ {"version":3,"file":"decimalOrdering.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/ordering/decimalOrdering.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAWT,MAAM,6BAA6B,CAAC;AAMrC,KAAK,WAAW,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAmF1D,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,CAajD,CAAC"}
@@ -76,9 +76,6 @@ const getPropositions = (n, { answer }) => {
76
76
  tryToAddWrongProp(propositions, "=");
77
77
  return shuffleProps(propositions, n);
78
78
  };
79
- const isAnswerValid = (ans, { answer }) => {
80
- return ans === answer;
81
- };
82
79
  export const decimalOrdering = {
83
80
  id: "decimalOrdering",
84
81
  connector: "\\iff",
@@ -88,7 +85,6 @@ export const decimalOrdering = {
88
85
  qcmTimer: 60,
89
86
  freeTimer: 60,
90
87
  getPropositions,
91
- isAnswerValid,
92
88
  subject: "Mathématiques",
93
89
  answerType: "QCU",
94
90
  getQuestionFromIdentifiers,
@@ -1 +1 @@
1
- {"version":3,"file":"decimalOrderingNoRelatives.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/ordering/decimalOrderingNoRelatives.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,6BAA6B,CAAC;AAMrC,KAAK,WAAW,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAuF1D,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,WAAW,CAc5D,CAAC"}
1
+ {"version":3,"file":"decimalOrderingNoRelatives.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/ordering/decimalOrderingNoRelatives.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAWT,MAAM,6BAA6B,CAAC;AAMrC,KAAK,WAAW,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAmF1D,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,WAAW,CAa5D,CAAC"}
@@ -72,9 +72,6 @@ const getPropositions = (n, { answer }) => {
72
72
  tryToAddWrongProp(propositions, "=");
73
73
  return shuffleProps(propositions, n);
74
74
  };
75
- const isAnswerValid = (ans, { answer }) => {
76
- return ans === answer;
77
- };
78
75
  export const decimalOrderingNoRelatives = {
79
76
  id: "decimalOrderingNoRelatives",
80
77
  connector: "\\iff",
@@ -84,7 +81,6 @@ export const decimalOrderingNoRelatives = {
84
81
  qcmTimer: 60,
85
82
  freeTimer: 60,
86
83
  getPropositions,
87
- isAnswerValid,
88
84
  subject: "Mathématiques",
89
85
  answerType: "QCU",
90
86
  getQuestionFromIdentifiers,
@@ -1 +1 @@
1
- {"version":3,"file":"integerOrdering.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/ordering/integerOrdering.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,6BAA6B,CAAC;AAMrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAoEF,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,CAcjD,CAAC"}
1
+ {"version":3,"file":"integerOrdering.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/ordering/integerOrdering.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAWT,MAAM,6BAA6B,CAAC;AAMrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAgEF,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,CAajD,CAAC"}
@@ -58,9 +58,6 @@ const getPropositions = (n, { answer }) => {
58
58
  tryToAddWrongProp(propositions, "=");
59
59
  return shuffleProps(propositions, n);
60
60
  };
61
- const isAnswerValid = (ans, { answer }) => {
62
- return ans === answer;
63
- };
64
61
  export const integerOrdering = {
65
62
  id: "integerOrdering",
66
63
  connector: "\\iff",
@@ -70,7 +67,6 @@ export const integerOrdering = {
70
67
  qcmTimer: 60,
71
68
  freeTimer: 60,
72
69
  getPropositions,
73
- isAnswerValid,
74
70
  answerType: "QCU",
75
71
  subject: "Mathématiques",
76
72
  getQuestionFromIdentifiers,
@@ -1 +1 @@
1
- {"version":3,"file":"findCoeffInProportionalTableNonIntegers.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/proportionality/findCoeffInProportionalTableNonIntegers.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAiBT,MAAM,6BAA6B,CAAC;AAMrC,OAAO,EAEL,eAAe,EAChB,MAAM,qCAAqC,CAAC;AAS7C,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,eAAe,CAAC;IAC1B,OAAO,EAAE,eAAe,EAAE,CAAC;IAC3B,OAAO,EAAE,eAAe,EAAE,CAAC;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AA+HF,KAAK,OAAO,GAAG;IACb,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,iBAAiB,EAAE,MAAM,EAAE,CAAC;CAC7B,CAAC;AAoBF,eAAO,MAAM,uCAAuC,EAAE,QAAQ,CAC5D,WAAW,EACX,OAAO,CAuBR,CAAC"}
1
+ {"version":3,"file":"findCoeffInProportionalTableNonIntegers.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/proportionality/findCoeffInProportionalTableNonIntegers.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAiBT,MAAM,6BAA6B,CAAC;AAMrC,OAAO,EAEL,eAAe,EAChB,MAAM,qCAAqC,CAAC;AAS7C,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,eAAe,CAAC;IAC1B,OAAO,EAAE,eAAe,EAAE,CAAC;IAC3B,OAAO,EAAE,eAAe,EAAE,CAAC;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AA+HF,KAAK,OAAO,GAAG;IACb,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,iBAAiB,EAAE,MAAM,EAAE,CAAC;CAC7B,CAAC;AAoBF,eAAO,MAAM,uCAAuC,EAAE,QAAQ,CAC5D,WAAW,EACX,OAAO,CAsBR,CAAC"}
@@ -141,7 +141,6 @@ export const findCoeffInProportionalTableNonIntegers = {
141
141
  // getHint,
142
142
  // getCorrection,
143
143
  getAnswer,
144
- answerType: "QCU",
145
144
  options,
146
145
  getQuestionFromIdentifiers,
147
146
  };
@@ -1 +1 @@
1
- {"version":3,"file":"isTableProportional.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/proportionality/isTableProportional.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAUrC,KAAK,WAAW,GAAG;IAAE,OAAO,EAAE,MAAM,EAAE,CAAC;IAAC,OAAO,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC;AAoG5D,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,WAAW,CAerD,CAAC"}
1
+ {"version":3,"file":"isTableProportional.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/proportionality/isTableProportional.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAUrC,KAAK,WAAW,GAAG;IAAE,OAAO,EAAE,MAAM,EAAE,CAAC;IAAC,OAAO,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC;AAgG5D,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,WAAW,CAcrD,CAAC"}
@@ -86,9 +86,6 @@ const getPropositions = (n, { answer }) => {
86
86
  tryToAddWrongProp(propositions, "On ne peut pas savoir", "raw");
87
87
  return shuffleProps(propositions, n);
88
88
  };
89
- const isAnswerValid = (ans, { answer }) => {
90
- return ans === answer;
91
- };
92
89
  export const isTableProportional = {
93
90
  id: "isVTableProportional",
94
91
  label: "Reconnaître un tableau de proportionnalité",
@@ -97,7 +94,6 @@ export const isTableProportional = {
97
94
  qcmTimer: 60,
98
95
  freeTimer: 60,
99
96
  getPropositions,
100
- isAnswerValid,
101
97
  answerType: "QCU",
102
98
  subject: "Mathématiques",
103
99
  hasHintAndCorrection: true,
@@ -1 +1 @@
1
- {"version":3,"file":"isTableProportionalNonInteger.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/proportionality/isTableProportionalNonInteger.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAgBT,MAAM,6BAA6B,CAAC;AAMrC,OAAO,EAEL,eAAe,EAChB,MAAM,qCAAqC,CAAC;AAS7C,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,eAAe,CAAC;IAC1B,OAAO,EAAE,eAAe,EAAE,CAAC;IAC3B,OAAO,EAAE,eAAe,EAAE,CAAC;IAC3B,eAAe,EAAE,OAAO,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAqCF,KAAK,OAAO,GAAG;IACb,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,iBAAiB,EAAE,MAAM,EAAE,CAAC;CAC7B,CAAC;AAmGF,eAAO,MAAM,6BAA6B,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAqBxE,CAAC"}
1
+ {"version":3,"file":"isTableProportionalNonInteger.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/proportionality/isTableProportionalNonInteger.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAMrC,OAAO,EAEL,eAAe,EAChB,MAAM,qCAAqC,CAAC;AAS7C,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,eAAe,CAAC;IAC1B,OAAO,EAAE,eAAe,EAAE,CAAC;IAC3B,OAAO,EAAE,eAAe,EAAE,CAAC;IAC3B,eAAe,EAAE,OAAO,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAkCF,KAAK,OAAO,GAAG;IACb,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,iBAAiB,EAAE,MAAM,EAAE,CAAC;CAC7B,CAAC;AAmGF,eAAO,MAAM,6BAA6B,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAoBxE,CAAC"}
@@ -37,9 +37,6 @@ ${mdTable([xTexs.map((v) => dollarize(v)), yTexs.map((v) => dollarize(v))])}
37
37
  const getKeys = () => {
38
38
  return [];
39
39
  };
40
- const isAnswerValid = () => {
41
- throw Error("VEA not implemented");
42
- };
43
40
  // ["Entier", "Décimal", "Fraction"],
44
41
  // ["Entières", "Décimales", "Fractions"],
45
42
  const getIsTableProportionalNonIntegerQuestion = (opts) => {
@@ -128,7 +125,6 @@ export const isTableProportionalNonInteger = {
128
125
  qcmTimer: 60,
129
126
  freeTimer: 60,
130
127
  getPropositions,
131
- isAnswerValid,
132
128
  subject: "Mathématiques",
133
129
  // getHint,
134
130
  // getCorrection,
@@ -1 +1 @@
1
- {"version":3,"file":"estimateAroundPow10NTimesAroundPow10N.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/rounding/estimateAroundPow10NTimesAroundPow10N.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAerC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA+EF,eAAO,MAAM,qCAAqC,EAAE,QAAQ,CAAC,WAAW,CAoBvE,CAAC"}
1
+ {"version":3,"file":"estimateAroundPow10NTimesAroundPow10N.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/rounding/estimateAroundPow10NTimesAroundPow10N.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAerC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA+EF,eAAO,MAAM,qCAAqC,EAAE,QAAQ,CAAC,WAAW,CAmBvE,CAAC"}
@@ -79,6 +79,5 @@ export const estimateAroundPow10NTimesAroundPow10N = {
79
79
  subject: "Mathématiques",
80
80
  maxAllowedQuestions: 30,
81
81
  getQuestionFromIdentifiers,
82
- answerType: "QCU",
83
82
  hasHintAndCorrection: true,
84
83
  };
@@ -1 +1 @@
1
- {"version":3,"file":"estimatePow10NPlusPow10MinusN.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/rounding/estimatePow10NPlusPow10MinusN.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAQrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAwFF,eAAO,MAAM,6BAA6B,EAAE,QAAQ,CAAC,WAAW,CAoB/D,CAAC"}
1
+ {"version":3,"file":"estimatePow10NPlusPow10MinusN.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/rounding/estimatePow10NPlusPow10MinusN.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAQrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAwFF,eAAO,MAAM,6BAA6B,EAAE,QAAQ,CAAC,WAAW,CAmB/D,CAAC"}
@@ -85,6 +85,5 @@ export const estimatePow10NPlusPow10MinusN = {
85
85
  subject: "Mathématiques",
86
86
  maxAllowedQuestions: 30,
87
87
  getQuestionFromIdentifiers,
88
- answerType: "QCU",
89
88
  hasHintAndCorrection: true,
90
89
  };
@@ -1 +1 @@
1
- {"version":3,"file":"getPhysicalOrderOfMagnitude.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/rounding/getPhysicalOrderOfMagnitude.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AA0HrC,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAmFF,eAAO,MAAM,2BAA2B,EAAE,QAAQ,CAAC,WAAW,CAuB7D,CAAC"}
1
+ {"version":3,"file":"getPhysicalOrderOfMagnitude.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/rounding/getPhysicalOrderOfMagnitude.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAwHrC,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAqGF,eAAO,MAAM,2BAA2B,EAAE,QAAQ,CAAC,WAAW,CAsB7D,CAAC"}
@@ -1,9 +1,7 @@
1
1
  import { addValidProp, shuffleProps, tryToAddWrongProp, propWhile, } from "../../../../exercises/exercise.js";
2
2
  import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
3
3
  import { randint } from "../../../../math/utils/random/randint.js";
4
- import { parseAlgebraic } from "../../../../tree/parsers/latexParser.js";
5
4
  import { doWhile } from "../../../../utils/doWhile.js";
6
- import { handleVEAError } from "../../../../utils/errors/handleVEAError.js";
7
5
  const physicalFacts = [
8
6
  {
9
7
  question: "du diamètre d'un atome d'hydrogène",
@@ -132,7 +130,7 @@ const getPropositions = (n, { answer, factIndex }) => {
132
130
  };
133
131
  const getAnswer = ({ factIndex }) => {
134
132
  const item = physicalFacts[factIndex];
135
- const power = Math.floor(Math.log10(item.value));
133
+ const power = Math.round(Math.log10(item.value));
136
134
  return `10^{${power}}\\ ${item.unit}`;
137
135
  };
138
136
  const getInstruction = ({ factIndex }) => {
@@ -151,16 +149,33 @@ On cherche la puissance de $10$ la plus proche : c'est $10^{${power}}$.
151
149
  Un ordre de grandeur ${item.question} est donc $10^{${power}}\\ ${item.unit}$.`;
152
150
  };
153
151
  const getKeys = () => [];
154
- const isAnswerValid = (ans, { answer }) => {
155
- try {
156
- const ansNode = parseAlgebraic(ans);
157
- const answerNode = parseAlgebraic(answer);
158
- return ansNode.simplify().equals(answerNode.simplify());
159
- }
160
- catch (err) {
161
- return handleVEAError(err);
162
- }
163
- };
152
+ // const getKeys: GetKeys<Identifiers> = ({ factIndex }) => {
153
+ // const item = physicalFacts[factIndex];
154
+ // return [
155
+ // {
156
+ // id: "custom",
157
+ // label: item.unit,
158
+ // labelType: "tex",
159
+ // mathfieldInstructions: {
160
+ // method: "write",
161
+ // content: `\\ ${item.unit}`,
162
+ // },
163
+ // },
164
+ // ] as KeyProps[];
165
+ // };
166
+ // const isAnswerValid: VEA<Identifiers> = (ans, { answer, factIndex }) => {
167
+ // const item = physicalFacts[factIndex];
168
+ // if (!ans.includes(item.unit.replaceAll("textrm", "text"))) {
169
+ // return false;
170
+ // }
171
+ // try {
172
+ // const ansNode = parseAlgebraic(ans.split("\\")[0]);
173
+ // const answerNode = parseAlgebraic(answer.split("\\")[0]);
174
+ // return substract(ansNode, answerNode).simplify().evaluate() === 0;
175
+ // } catch (err) {
176
+ // return handleVEAError(err);
177
+ // }
178
+ // };
164
179
  const getGetPhysicalOrderOfMagnitudeQuestion = () => {
165
180
  const factIndex = Math.floor(Math.random() * physicalFacts.length);
166
181
  const identifiers = { factIndex };
@@ -185,7 +200,6 @@ export const getPhysicalOrderOfMagnitude = {
185
200
  qcmTimer: 60,
186
201
  freeTimer: 60,
187
202
  getPropositions,
188
- isAnswerValid,
189
203
  subject: "Mathématiques",
190
204
  getInstruction,
191
205
  getHint,
@@ -1 +1 @@
1
- {"version":3,"file":"signFromAx.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/sign/signFromAx.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAQrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AA6GF,eAAO,MAAM,UAAU,EAAE,QAAQ,CAAC,WAAW,CAkB5C,CAAC"}
1
+ {"version":3,"file":"signFromAx.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/sign/signFromAx.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAOrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAsGF,eAAO,MAAM,UAAU,EAAE,QAAQ,CAAC,WAAW,CAiB5C,CAAC"}
@@ -4,7 +4,6 @@ import { randint } from "../../../../math/utils/random/randint.js";
4
4
  import { multiply } from "../../../../tree/nodes/operators/multiplyNode.js";
5
5
  import { monom } from "../../../../tree/nodes/polynomials/monomNode.js";
6
6
  import { probaLawFlip } from "../../../../utils/alea/probaLawFlip.js";
7
- import { handleVEAError } from "../../../../utils/errors/handleVEAError.js";
8
7
  //-x pos/nég/nul
9
8
  //ax pos/nég/nul avec a>0 donné ou <0
10
9
  const getPropositions = (n, { answer }) => {
@@ -63,14 +62,6 @@ const getCorrection = (identifiers) => {
63
62
  const getKeys = () => {
64
63
  return [];
65
64
  };
66
- const isAnswerValid = () => {
67
- try {
68
- throw Error("VEA not implemented");
69
- }
70
- catch (err) {
71
- return handleVEAError(err);
72
- }
73
- };
74
65
  const getSignFromAxQuestion = () => {
75
66
  const identifiers = {
76
67
  a: randint(-9, 10, [0, 1]),
@@ -102,7 +93,6 @@ export const signFromAx = {
102
93
  qcmTimer: 60,
103
94
  freeTimer: 60,
104
95
  getPropositions,
105
- isAnswerValid,
106
96
  subject: "Mathématiques",
107
97
  getInstruction,
108
98
  getHint,
@@ -1 +1 @@
1
- {"version":3,"file":"equationFromProblem.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/equation/equationFromProblem.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAKrC,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAKlE,OAAO,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAgBtE,KAAK,WAAW,GAAG;IACjB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,yBAAyB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC;IACzE,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,EAAE,EAAE,CAAC;IAC1B,YAAY,EAAE,eAAe,CAAC;CAC/B,CAAC;AA6qBF,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,WAAW,CAcrD,CAAC"}
1
+ {"version":3,"file":"equationFromProblem.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/equation/equationFromProblem.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAKrC,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAKlE,OAAO,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAetE,KAAK,WAAW,GAAG;IACjB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,yBAAyB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC;IACzE,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,EAAE,EAAE,CAAC;IAC1B,YAAY,EAAE,eAAe,CAAC;CAC/B,CAAC;AA6qBF,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,WAAW,CAcrD,CAAC"}
@@ -10,7 +10,6 @@ import { multiply } from "../../../../tree/nodes/operators/multiplyNode.js";
10
10
  import { substract } from "../../../../tree/nodes/operators/substractNode.js";
11
11
  import { random, randomMany } from "../../../../utils/alea/random.js";
12
12
  import { isOperatorNode, OperatorIds, } from "../../../../tree/nodes/operators/operatorNode.js";
13
- import { parseLatex } from "../../../../tree/parsers/latexParser.js";
14
13
  import { mdTable } from "../../../../utils/markdown/mdTable.js";
15
14
  import { alignTex } from "../../../../utils/latex/alignTex.js";
16
15
  class ProblemConstructor {
@@ -433,11 +432,11 @@ const getPropositions = (n, { answer, ...identifiers }) => {
433
432
  }
434
433
  return shuffleProps(propositions, n);
435
434
  };
436
- const isAnswerValid = (ans, { answer, ...identifiers }) => {
437
- const answerNode = getAnswerNode(identifiers); //!TODO: this call crashes but it's a mystery
438
- const ansNode = parseLatex(ans);
439
- return substract(ansNode, answerNode).evaluate() === 0;
440
- };
435
+ // const isAnswerValid: VEA<Identifiers> = (ans, { answer, ...identifiers }) => {
436
+ // const answerNode = getAnswerNode(identifiers); //!TODO: this call crashes but it's a mystery
437
+ // const ansNode = parseLatex(ans);
438
+ // return substract(ansNode, answerNode).evaluate() === 0;
439
+ // };
441
440
  export const equationFromProblem = {
442
441
  id: "equationFromProblem",
443
442
  label: "Traduire un problème en une équation mathématique",
@@ -446,7 +445,7 @@ export const equationFromProblem = {
446
445
  qcmTimer: 60,
447
446
  freeTimer: 60,
448
447
  getPropositions,
449
- isAnswerValid,
448
+ // isAnswerValid,
450
449
  subject: "Mathématiques",
451
450
  getQuestionFromIdentifiers,
452
451
  answerType: "QCU",
@@ -1 +1 @@
1
- {"version":3,"file":"isInequalityTrue.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/inequations/isInequalityTrue.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAOrC,OAAO,EACL,eAAe,EAEhB,MAAM,qCAAqC,CAAC;AAE7C,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,IAAI,EAAE,eAAe,CAAC;IACtB,KAAK,EAAE,eAAe,CAAC;IACvB,cAAc,EAAE,OAAO,CAAC;IACxB,QAAQ,EAAE,OAAO,CAAC;CACnB,CAAC;AAgKF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAkBlD,CAAC"}
1
+ {"version":3,"file":"isInequalityTrue.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/inequations/isInequalityTrue.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAMrC,OAAO,EACL,eAAe,EAEhB,MAAM,qCAAqC,CAAC;AAE7C,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,IAAI,EAAE,eAAe,CAAC;IACtB,KAAK,EAAE,eAAe,CAAC;IACvB,cAAc,EAAE,OAAO,CAAC;IACxB,QAAQ,EAAE,OAAO,CAAC;CACnB,CAAC;AAyJF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAiBlD,CAAC"}
@@ -1,7 +1,6 @@
1
1
  import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
2
2
  import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
3
3
  import { randint } from "../../../../math/utils/random/randint.js";
4
- import { handleVEAError } from "../../../../utils/errors/handleVEAError.js";
5
4
  import { coinFlip } from "../../../../utils/alea/coinFlip.js";
6
5
  import { multiply } from "../../../../tree/nodes/operators/multiplyNode.js";
7
6
  import { add } from "../../../../tree/nodes/operators/addNode.js";
@@ -106,14 +105,6 @@ Puisque $${leftSimTex} ${isTrue ? sign : reverseSign(sign)} ${rightSimTex}$, l'i
106
105
  const getKeys = () => {
107
106
  return [];
108
107
  };
109
- const isAnswerValid = (ans, { answer }) => {
110
- try {
111
- return ans === answer;
112
- }
113
- catch (err) {
114
- return handleVEAError(err);
115
- }
116
- };
117
108
  const getIsInequalityTrueQuestion = () => {
118
109
  const a = randint(-10, 10, [0]);
119
110
  const b = randint(-10, 10, [0]);
@@ -156,7 +147,6 @@ export const isInequalityTrue = {
156
147
  qcmTimer: 60,
157
148
  freeTimer: 60,
158
149
  getPropositions,
159
- isAnswerValid,
160
150
  subject: "Mathématiques",
161
151
  getInstruction,
162
152
  getHint,