math-exercises 2.2.94 → 2.2.96

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 (209) hide show
  1. package/lib/exercises/math/calcul/fractions/fractionSquare.d.ts.map +1 -1
  2. package/lib/exercises/math/calcul/fractions/fractionSquare.js +2 -1
  3. package/lib/exercises/math/calcul/fractions/fractionsSum.d.ts.map +1 -1
  4. package/lib/exercises/math/calcul/fractions/fractionsSum.js +2 -1
  5. package/lib/exercises/math/calcul/fractions/fractionsSumsMultiplesDenominators.d.ts.map +1 -1
  6. package/lib/exercises/math/calcul/fractions/fractionsSumsMultiplesDenominators.js +2 -1
  7. package/lib/exercises/math/calcul/fractions/fractionsSumsPrimeDenominators.d.ts.map +1 -1
  8. package/lib/exercises/math/calcul/fractions/fractionsSumsPrimeDenominators.js +2 -1
  9. package/lib/exercises/math/calcul/fractions/fractionsSumsSameDenominators.d.ts.map +1 -1
  10. package/lib/exercises/math/calcul/fractions/fractionsSumsSameDenominators.js +2 -1
  11. package/lib/exercises/math/calcul/proportionality/findCoeffInProportionalTableNonIntegers.d.ts.map +1 -1
  12. package/lib/exercises/math/calcul/proportionality/findCoeffInProportionalTableNonIntegers.js +2 -1
  13. package/lib/exercises/math/calculLitteral/distributivity/doubleDistributivityWithCoeff.d.ts.map +1 -1
  14. package/lib/exercises/math/calculLitteral/distributivity/doubleDistributivityWithCoeff.js +0 -4
  15. package/lib/exercises/math/calculLitteral/distributivity/firstIdentity.d.ts.map +1 -1
  16. package/lib/exercises/math/calculLitteral/distributivity/firstIdentity.js +82 -34
  17. package/lib/exercises/math/calculLitteral/distributivity/identitiesWithNonIntegers.d.ts.map +1 -1
  18. package/lib/exercises/math/calculLitteral/distributivity/identitiesWithNonIntegers.js +2 -1
  19. package/lib/exercises/math/calculLitteral/distributivity/secondIdentity.d.ts.map +1 -1
  20. package/lib/exercises/math/calculLitteral/distributivity/secondIdentity.js +86 -36
  21. package/lib/exercises/math/calculLitteral/distributivity/thirdIdentity.d.ts.map +1 -1
  22. package/lib/exercises/math/calculLitteral/distributivity/thirdIdentity.js +82 -32
  23. package/lib/exercises/math/calculLitteral/equation/equationSimpleSquare.d.ts.map +1 -1
  24. package/lib/exercises/math/calculLitteral/equation/equationSimpleSquare.js +2 -1
  25. package/lib/exercises/math/calculLitteral/factorisation/factoByX.d.ts.map +1 -1
  26. package/lib/exercises/math/calculLitteral/factorisation/factoByX.js +2 -1
  27. package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq1.d.ts.map +1 -1
  28. package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq1.js +2 -1
  29. package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq2.d.ts.map +1 -1
  30. package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq2.js +2 -1
  31. package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq3.d.ts.map +1 -1
  32. package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq3.js +2 -1
  33. package/lib/exercises/math/calculLitteral/factorisation/factoType1Exercise.d.ts.map +1 -1
  34. package/lib/exercises/math/calculLitteral/factorisation/factoType1Exercise.js +3 -1
  35. package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType0.d.ts.map +1 -1
  36. package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType0.js +2 -1
  37. package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType1.d.ts.map +1 -1
  38. package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType1.js +2 -1
  39. package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType2.d.ts.map +1 -1
  40. package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType2.js +2 -1
  41. package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType3.d.ts.map +1 -1
  42. package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType3.js +2 -1
  43. package/lib/exercises/math/calculLitteral/inequations/squareFunctionInequation.d.ts.map +1 -1
  44. package/lib/exercises/math/calculLitteral/inequations/squareFunctionInequation.js +2 -1
  45. package/lib/exercises/math/calculLitteral/simplifying/distributeAndSimplify.d.ts.map +1 -1
  46. package/lib/exercises/math/calculLitteral/simplifying/distributeAndSimplify.js +38 -16
  47. package/lib/exercises/math/calculLitteral/simplifying/reduceExpression.d.ts +3 -3
  48. package/lib/exercises/math/calculLitteral/simplifying/reduceExpression.d.ts.map +1 -1
  49. package/lib/exercises/math/calculLitteral/simplifying/reduceExpression.js +171 -75
  50. package/lib/exercises/math/dataReading/index.d.ts +2 -0
  51. package/lib/exercises/math/dataReading/index.d.ts.map +1 -0
  52. package/lib/exercises/math/dataReading/index.js +17 -0
  53. package/lib/exercises/math/dataReading/tableReading.d.ts +8 -0
  54. package/lib/exercises/math/dataReading/tableReading.d.ts.map +1 -0
  55. package/lib/exercises/math/dataReading/tableReading.js +105 -0
  56. package/lib/exercises/math/derivation/derivative/convexityQuadrinomials.d.ts.map +1 -1
  57. package/lib/exercises/math/derivation/derivative/convexityQuadrinomials.js +2 -1
  58. package/lib/exercises/math/derivation/derivative/expDerivativeFour.d.ts.map +1 -1
  59. package/lib/exercises/math/derivation/derivative/expDerivativeFour.js +2 -1
  60. package/lib/exercises/math/derivation/derivative/expDerivativeThree.d.ts.map +1 -1
  61. package/lib/exercises/math/derivation/derivative/expDerivativeThree.js +2 -1
  62. package/lib/exercises/math/derivation/derivative/lnDerivativeThree.d.ts.map +1 -1
  63. package/lib/exercises/math/derivation/derivative/lnDerivativeThree.js +2 -1
  64. package/lib/exercises/math/derivation/derivative/powerCompositionDerivation.d.ts.map +1 -1
  65. package/lib/exercises/math/derivation/derivative/powerCompositionDerivation.js +75 -11
  66. package/lib/exercises/math/derivation/derivative/quotientDerivative.d.ts.map +1 -1
  67. package/lib/exercises/math/derivation/derivative/quotientDerivative.js +2 -1
  68. package/lib/exercises/math/derivation/derivative/rootFunctionDerivative.d.ts.map +1 -1
  69. package/lib/exercises/math/derivation/derivative/rootFunctionDerivative.js +2 -1
  70. package/lib/exercises/math/derivation/derivative/sqrtCompositionDerivation.d.ts.map +1 -1
  71. package/lib/exercises/math/derivation/derivative/sqrtCompositionDerivation.js +2 -1
  72. package/lib/exercises/math/derivation/derivative/thirdDegreeDerivative.d.ts.map +1 -1
  73. package/lib/exercises/math/derivation/derivative/thirdDegreeDerivative.js +2 -1
  74. package/lib/exercises/math/derivation/derivative/thirdDegreeFunctionVariation.d.ts.map +1 -1
  75. package/lib/exercises/math/derivation/derivative/thirdDegreeFunctionVariation.js +2 -1
  76. package/lib/exercises/math/functions/absolute/absolueValueAffineEquation.d.ts.map +1 -1
  77. package/lib/exercises/math/functions/absolute/absolueValueAffineEquation.js +2 -1
  78. package/lib/exercises/math/functions/absolute/absolueValueInequationsSup.d.ts.map +1 -1
  79. package/lib/exercises/math/functions/absolute/absolueValueInequationsSup.js +2 -1
  80. package/lib/exercises/math/functions/absolute/absoluteValueInequations.d.ts.map +1 -1
  81. package/lib/exercises/math/functions/absolute/absoluteValueInequations.js +2 -1
  82. package/lib/exercises/math/functions/affines/affineExpressionFromTwoImages.d.ts.map +1 -1
  83. package/lib/exercises/math/functions/affines/affineExpressionFromTwoImages.js +2 -2
  84. package/lib/exercises/math/functions/affines/affineExpressionReading.js +2 -1
  85. package/lib/exercises/math/functions/affines/signFunction.d.ts.map +1 -1
  86. package/lib/exercises/math/functions/affines/signFunction.js +2 -1
  87. package/lib/exercises/math/functions/basics/graphicEquation.d.ts.map +1 -1
  88. package/lib/exercises/math/functions/basics/graphicEquation.js +2 -1
  89. package/lib/exercises/math/functions/basics/graphicInequation.d.ts.map +1 -1
  90. package/lib/exercises/math/functions/basics/graphicInequation.js +2 -1
  91. package/lib/exercises/math/functions/basics/graphicInequationAffine.d.ts.map +1 -1
  92. package/lib/exercises/math/functions/basics/graphicInequationAffine.js +2 -1
  93. package/lib/exercises/math/functions/basics/imageFunction.d.ts.map +1 -1
  94. package/lib/exercises/math/functions/basics/imageFunction.js +2 -1
  95. package/lib/exercises/math/functions/basics/twoFunctionsInequation.d.ts.map +1 -1
  96. package/lib/exercises/math/functions/basics/twoFunctionsInequation.js +2 -1
  97. package/lib/exercises/math/functions/exponential/expEquation.d.ts.map +1 -1
  98. package/lib/exercises/math/functions/exponential/expEquation.js +2 -1
  99. package/lib/exercises/math/functions/logarithm/logPowerEquation.d.ts.map +1 -1
  100. package/lib/exercises/math/functions/logarithm/logPowerEquation.js +2 -1
  101. package/lib/exercises/math/functions/sign/affineProductSign.d.ts.map +1 -1
  102. package/lib/exercises/math/functions/sign/affineProductSign.js +2 -1
  103. package/lib/exercises/math/functions/square/squareImageInterval.d.ts.map +1 -1
  104. package/lib/exercises/math/functions/square/squareImageInterval.js +2 -1
  105. package/lib/exercises/math/functions/trinoms/coefficientsIdentification.d.ts.map +1 -1
  106. package/lib/exercises/math/functions/trinoms/coefficientsIdentification.js +2 -1
  107. package/lib/exercises/math/functions/trinoms/secondDegreeInequation.d.ts.map +1 -1
  108. package/lib/exercises/math/functions/trinoms/secondDegreeInequation.js +2 -1
  109. package/lib/exercises/math/functions/trinoms/trinomSignFromRoots.d.ts.map +1 -1
  110. package/lib/exercises/math/functions/trinoms/trinomSignFromRoots.js +2 -1
  111. package/lib/exercises/math/geometry/cartesian/readAbscissOnLine.d.ts.map +1 -1
  112. package/lib/exercises/math/geometry/cartesian/readAbscissOnLine.js +2 -1
  113. package/lib/exercises/math/geometry/cartesian/readAbscissOnSemiLine.d.ts.map +1 -1
  114. package/lib/exercises/math/geometry/cartesian/readAbscissOnSemiLine.js +2 -1
  115. package/lib/exercises/math/geometry/convexity/convexityQuadrinomialsGeo.d.ts.map +1 -1
  116. package/lib/exercises/math/geometry/convexity/convexityQuadrinomialsGeo.js +2 -1
  117. package/lib/exercises/math/geometry/parametric/extractPointFromParametricLine.d.ts.map +1 -1
  118. package/lib/exercises/math/geometry/parametric/extractPointFromParametricLine.js +2 -1
  119. package/lib/exercises/math/geometry/parametric/extractVectorFromParametricLine.d.ts.map +1 -1
  120. package/lib/exercises/math/geometry/parametric/extractVectorFromParametricLine.js +2 -1
  121. package/lib/exercises/math/index.d.ts +1 -0
  122. package/lib/exercises/math/index.d.ts.map +1 -1
  123. package/lib/exercises/math/index.js +1 -0
  124. package/lib/exercises/math/matrices/matrixInversibilityDomain.d.ts.map +1 -1
  125. package/lib/exercises/math/matrices/matrixInversibilityDomain.js +2 -1
  126. package/lib/exercises/math/percent/index.d.ts +1 -0
  127. package/lib/exercises/math/percent/index.d.ts.map +1 -1
  128. package/lib/exercises/math/percent/index.js +1 -1
  129. package/lib/exercises/math/percent/percentWritings.d.ts.map +1 -1
  130. package/lib/exercises/math/percent/percentWritings.js +10 -1
  131. package/lib/exercises/math/powers/powersMixOperations.d.ts.map +1 -1
  132. package/lib/exercises/math/powers/powersMixOperations.js +2 -1
  133. package/lib/exercises/math/probaStat/diceBasicProbas.d.ts.map +1 -1
  134. package/lib/exercises/math/probaStat/diceBasicProbas.js +72 -20
  135. package/lib/exercises/math/probaStat/probabilityTree.d.ts.map +1 -1
  136. package/lib/exercises/math/probaStat/probabilityTree.js +2 -1
  137. package/lib/exercises/math/sampling/confidenceInterval.d.ts.map +1 -1
  138. package/lib/exercises/math/sampling/confidenceInterval.js +2 -1
  139. package/lib/exercises/math/sampling/fluctuationInterval.d.ts.map +1 -1
  140. package/lib/exercises/math/sampling/fluctuationInterval.js +2 -1
  141. package/lib/exercises/math/sequences/geometric/geometricExplicitFormulaUsage.d.ts.map +1 -1
  142. package/lib/exercises/math/sequences/geometric/geometricExplicitFormulaUsage.js +2 -1
  143. package/lib/exercises/math/sets/intervals/inequalityToInterval.d.ts.map +1 -1
  144. package/lib/exercises/math/sets/intervals/inequalityToInterval.js +2 -1
  145. package/lib/exercises/math/sets/intervals/intervalsIntersection.d.ts.map +1 -1
  146. package/lib/exercises/math/sets/intervals/intervalsIntersection.js +2 -1
  147. package/lib/exercises/math/sets/intervals/intervalsUnion.d.ts.map +1 -1
  148. package/lib/exercises/math/sets/intervals/intervalsUnion.js +2 -1
  149. package/lib/exercises/math/trigonometry/degreeToRadians.d.ts.map +1 -1
  150. package/lib/exercises/math/trigonometry/degreeToRadians.js +2 -1
  151. package/lib/exercises/math/trigonometry/mainAngleMeasure.d.ts.map +1 -1
  152. package/lib/exercises/math/trigonometry/mainAngleMeasure.js +2 -1
  153. package/lib/exercises/vea/equationVEA.d.ts.map +1 -1
  154. package/lib/exercises/vea/equationVEA.js +2 -1
  155. package/lib/exercises/vea/rationalVEA.d.ts.map +1 -1
  156. package/lib/exercises/vea/rationalVEA.js +3 -2
  157. package/lib/exercises/vea/sqrtVEA.d.ts.map +1 -1
  158. package/lib/exercises/vea/sqrtVEA.js +2 -1
  159. package/lib/index.d.ts +9 -3
  160. package/lib/index.d.ts.map +1 -1
  161. package/lib/tree/nodes/algebraicNode.d.ts +1 -0
  162. package/lib/tree/nodes/algebraicNode.d.ts.map +1 -1
  163. package/lib/tree/nodes/operators/addNode.d.ts +2 -1
  164. package/lib/tree/nodes/operators/addNode.d.ts.map +1 -1
  165. package/lib/tree/nodes/operators/addNode.js +22 -4
  166. package/lib/tree/nodes/operators/fractionNode.d.ts.map +1 -1
  167. package/lib/tree/nodes/operators/fractionNode.js +1 -1
  168. package/lib/tree/nodes/operators/multiplyNode.d.ts +2 -1
  169. package/lib/tree/nodes/operators/multiplyNode.d.ts.map +1 -1
  170. package/lib/tree/nodes/operators/multiplyNode.js +13 -1
  171. package/lib/tree/nodes/operators/operatorNode.d.ts +5 -0
  172. package/lib/tree/nodes/operators/operatorNode.d.ts.map +1 -1
  173. package/lib/tree/nodes/operators/operatorNode.js +5 -1
  174. package/lib/tree/nodes/polynomials/monomNode.d.ts +2 -6
  175. package/lib/tree/nodes/polynomials/monomNode.d.ts.map +1 -1
  176. package/lib/tree/nodes/polynomials/monomNode.js +102 -94
  177. package/lib/tree/parsers/affineParser.d.ts +1 -1
  178. package/lib/tree/parsers/affineParser.d.ts.map +1 -1
  179. package/lib/tree/parsers/affineParser.js +18 -22
  180. package/lib/tree/parsers/discreteSetParser.d.ts.map +1 -1
  181. package/lib/tree/parsers/discreteSetParser.js +2 -1
  182. package/lib/tree/parsers/equationSolutionParser.d.ts.map +1 -1
  183. package/lib/tree/parsers/equationSolutionParser.js +2 -1
  184. package/lib/tree/parsers/inequationParser.d.ts.map +1 -1
  185. package/lib/tree/parsers/inequationParser.js +2 -1
  186. package/lib/tree/parsers/intervalParser.d.ts.map +1 -1
  187. package/lib/tree/parsers/intervalParser.js +3 -2
  188. package/lib/tree/parsers/latexParser.js +3 -3
  189. package/lib/tree/parsers/monomParser.d.ts.map +1 -1
  190. package/lib/tree/parsers/monomParser.js +2 -1
  191. package/lib/tree/parsers/polynomialParser.d.ts +5 -1
  192. package/lib/tree/parsers/polynomialParser.d.ts.map +1 -1
  193. package/lib/tree/parsers/polynomialParser.js +5 -4
  194. package/lib/tree/parsers/powerParser.d.ts.map +1 -1
  195. package/lib/tree/parsers/powerParser.js +2 -1
  196. package/lib/tree/parsers/purifyLatex.d.ts +1 -1
  197. package/lib/tree/parsers/purifyLatex.js +1 -1
  198. package/lib/tree/parsers/sqrtParser.d.ts.map +1 -1
  199. package/lib/tree/parsers/sqrtParser.js +2 -1
  200. package/lib/tree/parsers/trinomParser.d.ts.map +1 -1
  201. package/lib/tree/parsers/trinomParser.js +2 -1
  202. package/lib/tree/parsers/unionIntervalParser.d.ts.map +1 -1
  203. package/lib/tree/parsers/unionIntervalParser.js +2 -1
  204. package/lib/utils/alea/random.js +1 -1
  205. package/lib/utils/alea/shuffle.js +1 -1
  206. package/lib/utils/errors/handleVEAError.d.ts +2 -0
  207. package/lib/utils/errors/handleVEAError.d.ts.map +1 -0
  208. package/lib/utils/errors/handleVEAError.js +9 -0
  209. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"convexityQuadrinomialsGeo.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/convexity/convexityQuadrinomialsGeo.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAqBlC,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC;AA8JF,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,WAAW,CAc3D,CAAC"}
1
+ {"version":3,"file":"convexityQuadrinomialsGeo.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/convexity/convexityQuadrinomialsGeo.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAsBlC,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC;AA8JF,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,WAAW,CAc3D,CAAC"}
@@ -13,6 +13,7 @@ const closure_1 = require("../../../../tree/nodes/sets/closure");
13
13
  const intervalNode_1 = require("../../../../tree/nodes/sets/intervalNode");
14
14
  const intervalParser_1 = require("../../../../tree/parsers/intervalParser");
15
15
  const coinFlip_1 = require("../../../../utils/alea/coinFlip");
16
+ const handleVEAError_1 = require("../../../../utils/errors/handleVEAError");
16
17
  function generatePolynomialWithIntegerInflexionPoint(degree, inflexionPointX) {
17
18
  let a, b, c, discriminant;
18
19
  do {
@@ -104,7 +105,7 @@ const isAnswerValid = (ans, { answer }) => {
104
105
  return parsed.simplify().toTex() === answer;
105
106
  }
106
107
  catch (err) {
107
- return false;
108
+ return (0, handleVEAError_1.handleVEAError)(err);
108
109
  }
109
110
  };
110
111
  exports.convexityQuadrinomialsGeo = {
@@ -1 +1 @@
1
- {"version":3,"file":"extractPointFromParametricLine.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/parametric/extractPointFromParametricLine.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB,CAAC;AAwHF,eAAO,MAAM,8BAA8B,EAAE,QAAQ,CAAC,WAAW,CAkBhE,CAAC"}
1
+ {"version":3,"file":"extractPointFromParametricLine.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/parametric/extractPointFromParametricLine.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB,CAAC;AAwHF,eAAO,MAAM,8BAA8B,EAAE,QAAQ,CAAC,WAAW,CAkBhE,CAAC"}
@@ -9,6 +9,7 @@ const spaceVector_1 = require("../../../../math/geometry/spaceVector");
9
9
  const numberNode_1 = require("../../../../tree/nodes/numbers/numberNode");
10
10
  const spacePointParser_1 = require("../../../../tree/parsers/spacePointParser");
11
11
  const doWhile_1 = require("../../../../utils/doWhile");
12
+ const handleVEAError_1 = require("../../../../utils/errors/handleVEAError");
12
13
  const getPropositions = (n, { answer, startPoint, vector }) => {
13
14
  const propositions = [];
14
15
  (0, exercise_1.addValidProp)(propositions, answer);
@@ -70,7 +71,7 @@ const isAnswerValid = (ans, { answer, startPoint, vector }) => {
70
71
  return line.hasPoint(point);
71
72
  }
72
73
  catch (err) {
73
- return false;
74
+ return (0, handleVEAError_1.handleVEAError)(err);
74
75
  }
75
76
  };
76
77
  const getExtractPointFromParametricLineQuestion = () => {
@@ -1 +1 @@
1
- {"version":3,"file":"extractVectorFromParametricLine.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/parametric/extractVectorFromParametricLine.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB,CAAC;AA6GF,eAAO,MAAM,+BAA+B,EAAE,QAAQ,CAAC,WAAW,CAiBjE,CAAC"}
1
+ {"version":3,"file":"extractVectorFromParametricLine.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/parametric/extractVectorFromParametricLine.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,0BAA0B,CAAC;AAWlC,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB,CAAC;AA6GF,eAAO,MAAM,+BAA+B,EAAE,QAAQ,CAAC,WAAW,CAiBjE,CAAC"}
@@ -8,6 +8,7 @@ const spacePoint_1 = require("../../../../math/geometry/spacePoint");
8
8
  const spaceVector_1 = require("../../../../math/geometry/spaceVector");
9
9
  const spaceVectorParser_1 = require("../../../../tree/parsers/spaceVectorParser");
10
10
  const doWhile_1 = require("../../../../utils/doWhile");
11
+ const handleVEAError_1 = require("../../../../utils/errors/handleVEAError");
11
12
  const getPropositions = (n, { answer, startPoint, vector }) => {
12
13
  const propositions = [];
13
14
  (0, exercise_1.addValidProp)(propositions, answer);
@@ -70,7 +71,7 @@ const isAnswerValid = (ans, { answer, startPoint, vector }) => {
70
71
  return v.isColinear(vecAnswer);
71
72
  }
72
73
  catch (err) {
73
- return false;
74
+ return (0, handleVEAError_1.handleVEAError)(err);
74
75
  }
75
76
  };
76
77
  const getExtractVectorFromParametricLineQuestion = () => {
@@ -20,4 +20,5 @@ export * from "./squareRoots";
20
20
  export * from "./trigonometry";
21
21
  export * from "./python";
22
22
  export * from "./sampling";
23
+ export * from "./dataReading";
23
24
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/exercises/math/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC;AACvB,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/exercises/math/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC;AACvB,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC"}
@@ -36,3 +36,4 @@ __exportStar(require("./squareRoots"), exports);
36
36
  __exportStar(require("./trigonometry"), exports);
37
37
  __exportStar(require("./python"), exports);
38
38
  __exportStar(require("./sampling"), exports);
39
+ __exportStar(require("./dataReading"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"matrixInversibilityDomain.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/matrices/matrixInversibilityDomain.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AA0BlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAoGF,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,WAAW,CAc3D,CAAC"}
1
+ {"version":3,"file":"matrixInversibilityDomain.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/matrices/matrixInversibilityDomain.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AA2BlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAoGF,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,WAAW,CAc3D,CAAC"}
@@ -18,6 +18,7 @@ const unionIntervalNode_1 = require("../../../tree/nodes/sets/unionIntervalNode"
18
18
  const variableNode_1 = require("../../../tree/nodes/variables/variableNode");
19
19
  const latexParser_1 = require("../../../tree/parsers/latexParser");
20
20
  const unionIntervalParser_1 = require("../../../tree/parsers/unionIntervalParser");
21
+ const handleVEAError_1 = require("../../../utils/errors/handleVEAError");
21
22
  const intervalKeys_1 = require("../../utils/keys/intervalKeys");
22
23
  const getMatrixInversibilityDomainQuestion = () => {
23
24
  const elements = [[], []];
@@ -90,7 +91,7 @@ const isAnswerValid = (ans, { answer }) => {
90
91
  return parsed.simplify().toTex() === answer;
91
92
  }
92
93
  catch (err) {
93
- return false;
94
+ return (0, handleVEAError_1.handleVEAError)(err);
94
95
  }
95
96
  };
96
97
  exports.matrixInversibilityDomain = {
@@ -16,4 +16,5 @@ export * from "./subPopulationEffectifFromPercent";
16
16
  export * from "./populationEffectifFromSubPopulation";
17
17
  export * from "./findEndValueAfterEvolution";
18
18
  export * from "./findRightCalcul";
19
+ export * from "./percentWritings";
19
20
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/percent/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC;AACvC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,oCAAoC,CAAC;AACnD,cAAc,uCAAuC,CAAC;AACtD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/percent/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC;AACvC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,oCAAoC,CAAC;AACnD,cAAc,uCAAuC,CAAC;AACtD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC"}
@@ -32,4 +32,4 @@ __exportStar(require("./subPopulationEffectifFromPercent"), exports);
32
32
  __exportStar(require("./populationEffectifFromSubPopulation"), exports);
33
33
  __exportStar(require("./findEndValueAfterEvolution"), exports);
34
34
  __exportStar(require("./findRightCalcul"), exports);
35
- // export * from "./percentWritings";
35
+ __exportStar(require("./percentWritings"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"percentWritings.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/percent/percentWritings.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,0BAA0B,CAAC;AAWlC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EACF,kBAAkB,GAClB,mBAAmB,GACnB,kBAAkB,GAClB,mBAAmB,CAAC;CACzB,CAAC;AA0IF,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,CAgBjD,CAAC"}
1
+ {"version":3,"file":"percentWritings.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/percent/percentWritings.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,0BAA0B,CAAC;AAYlC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EACF,kBAAkB,GAClB,mBAAmB,GACnB,kBAAkB,GAClB,mBAAmB,CAAC;CACzB,CAAC;AA8JF,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,CAgBjD,CAAC"}
@@ -6,6 +6,7 @@ const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQues
6
6
  const numberVEA_1 = require("../../../exercises/vea/numberVEA");
7
7
  const rationalVEA_1 = require("../../../exercises/vea/rationalVEA");
8
8
  const rational_1 = require("../../../math/numbers/rationals/rational");
9
+ const randfloat_1 = require("../../../math/utils/random/randfloat");
9
10
  const randint_1 = require("../../../math/utils/random/randint");
10
11
  const round_1 = require("../../../math/utils/round");
11
12
  const fractionNode_1 = require("../../../tree/nodes/operators/fractionNode");
@@ -16,12 +17,19 @@ const getPropositions = (n, { answer, percent, target }) => {
16
17
  (0, exercise_1.addValidProp)(propositions, answer);
17
18
  switch (target) {
18
19
  case "decimalToPercent":
20
+ (0, exercise_1.tryToAddWrongProp)(propositions, (0, round_1.round)(percent / 10, 5).frenchify() + "\\%");
21
+ (0, exercise_1.tryToAddWrongProp)(propositions, (0, round_1.round)(percent / 100, 5).frenchify() + "\\%");
22
+ (0, exercise_1.tryToAddWrongProp)(propositions, (0, round_1.round)(percent * 10, 5).frenchify() + "\\%");
19
23
  break;
20
24
  case "fractionToPercent":
21
25
  (0, exercise_1.tryToAddWrongProp)(propositions, (0, round_1.round)(percent / 10, 5).frenchify() + "\\%");
22
26
  (0, exercise_1.tryToAddWrongProp)(propositions, (0, round_1.round)(percent / 100, 5).frenchify() + "\\%");
27
+ (0, exercise_1.tryToAddWrongProp)(propositions, (0, round_1.round)(percent * 10, 5).frenchify() + "\\%");
23
28
  break;
24
29
  case "percentToDecimal":
30
+ (0, exercise_1.tryToAddWrongProp)(propositions, (0, round_1.round)(percent / 10, 5).frenchify());
31
+ (0, exercise_1.tryToAddWrongProp)(propositions, (0, round_1.round)(percent * 100, 5).frenchify());
32
+ (0, exercise_1.tryToAddWrongProp)(propositions, (0, round_1.round)(percent * 10, 5).frenchify());
25
33
  break;
26
34
  case "percentToFraction":
27
35
  (0, exercise_1.tryToAddWrongProp)(propositions, (0, fractionNode_1.frac)(100, percent).toTex());
@@ -32,10 +40,11 @@ const getPropositions = (n, { answer, percent, target }) => {
32
40
  while (propositions.length < n) {
33
41
  switch (target) {
34
42
  case "decimalToPercent":
35
- break;
36
43
  case "fractionToPercent":
44
+ (0, exercise_1.tryToAddWrongProp)(propositions, (0, randint_1.randint)(0, 100) + "\\%");
37
45
  break;
38
46
  case "percentToDecimal":
47
+ (0, exercise_1.tryToAddWrongProp)(propositions, (0, randfloat_1.randfloat)(0.1, 2, 2).frenchify());
39
48
  break;
40
49
  case "percentToFraction":
41
50
  (0, exercise_1.tryToAddWrongProp)(propositions, rational_1.RationalConstructor.randomIrreductible().toTree().toTex());
@@ -1 +1 @@
1
- {"version":3,"file":"powersMixOperations.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/powers/powersMixOperations.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,0BAA0B,CAAC;AAclC,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;CACX,CAAC;AAwFF,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,WAAW,CAgBrD,CAAC"}
1
+ {"version":3,"file":"powersMixOperations.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/powers/powersMixOperations.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,0BAA0B,CAAC;AAelC,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;CACX,CAAC;AAwFF,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,WAAW,CAgBrD,CAAC"}
@@ -9,6 +9,7 @@ const multiplyNode_1 = require("../../../tree/nodes/operators/multiplyNode");
9
9
  const powerNode_1 = require("../../../tree/nodes/operators/powerNode");
10
10
  const powerParser_1 = require("../../../tree/parsers/powerParser");
11
11
  const doWhile_1 = require("../../../utils/doWhile");
12
+ const handleVEAError_1 = require("../../../utils/errors/handleVEAError");
12
13
  const getStatementNode = (identifiers) => {
13
14
  const { a, b, k, l, m } = identifiers;
14
15
  const n = k + l * m;
@@ -53,7 +54,7 @@ const isAnswerValid = (ans, { answer }) => {
53
54
  return parsed.simplify({ keepPowers: true }).toTex() === answer;
54
55
  }
55
56
  catch (err) {
56
- return false;
57
+ return (0, handleVEAError_1.handleVEAError)(err);
57
58
  }
58
59
  };
59
60
  const getPowersMixOperationsQuestion = (ops) => {
@@ -1 +1 @@
1
- {"version":3,"file":"diceBasicProbas.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/probaStat/diceBasicProbas.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,cAAc,EAAE,OAAO,CAAC;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAiFF,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,CAcjD,CAAC"}
1
+ {"version":3,"file":"diceBasicProbas.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/probaStat/diceBasicProbas.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,EAYT,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG;IACjB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,cAAc,EAAE,OAAO,CAAC;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAwIF,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,CAiBjD,CAAC"}
@@ -3,20 +3,66 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.diceBasicProbas = void 0;
4
4
  const exercise_1 = require("../../../exercises/exercise");
5
5
  const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
6
+ const rationalVEA_1 = require("../../../exercises/vea/rationalVEA");
6
7
  const rational_1 = require("../../../math/numbers/rationals/rational");
7
8
  const randint_1 = require("../../../math/utils/random/randint");
8
- const numberNode_1 = require("../../../tree/nodes/numbers/numberNode");
9
9
  const fractionNode_1 = require("../../../tree/nodes/operators/fractionNode");
10
10
  const coinFlip_1 = require("../../../utils/alea/coinFlip");
11
11
  const probaFlip_1 = require("../../../utils/alea/probaFlip");
12
- const getDiceBasicProbasQuestion = () => {
13
- const nbFaces = (0, randint_1.randint)(4, 10);
14
- const isParityQuestion = (0, probaFlip_1.probaFlip)(0.3);
15
- const isEvenQuestion = (0, coinFlip_1.coinFlip)();
16
- const faceAsked = (0, randint_1.randint)(1, nbFaces + 1);
12
+ const getHint = (identifiers) => {
13
+ const { isParityQuestion, isEvenQuestion, nbFaces, faceAsked } = identifiers;
14
+ if (isParityQuestion) {
15
+ const parity = isEvenQuestion ? "paire" : "impaire";
16
+ return `Compte le nombre de faces ${parity}s parmi les $${nbFaces}$ faces du dé. Sur un dé, la plus petite face est $1$.`;
17
+ }
18
+ else {
19
+ return `Il y a une seule face $${faceAsked}$ parmi les $${nbFaces}$ faces du dé. De plus, chaque face a la même probabilité d'apparaître, car le dé est équilibré.`;
20
+ }
21
+ };
22
+ const getCorrection = (identifiers) => {
23
+ const { isParityQuestion, isEvenQuestion, nbFaces, faceAsked } = identifiers;
24
+ const answer = getAnswer(identifiers);
25
+ if (isParityQuestion) {
26
+ const parity = isEvenQuestion ? "paire" : "impaire";
27
+ const count = nbFaces % 2 === 0
28
+ ? nbFaces / 2
29
+ : isEvenQuestion
30
+ ? Math.floor(nbFaces / 2)
31
+ : Math.ceil(nbFaces / 2);
32
+ const faces = isEvenQuestion
33
+ ? Array.from({ length: count }, (_, i) => 2 * (i + 1))
34
+ : Array.from({ length: count }, (_, i) => 2 * i + 1);
35
+ return `Il y a $${count}$ faces ${parity}s parmi les $${nbFaces}$ faces du dé : ce sont les faces $${faces.join(",")}$.
36
+
37
+ Puisque le dé est équilibré, chaque face du dé a autant de chances d'apparaître.
38
+
39
+ Ainsi, la probabilité d'obtenir une face ${parity} est :
40
+
41
+ $$
42
+ ${(0, fractionNode_1.frac)(count, nbFaces).toSimplificationString()}
43
+ $$`;
44
+ }
45
+ else {
46
+ return `Puisque le dé est équilibré, chaque face du dé a autant de chances d'apparaître. Il y a une seule face $${faceAsked}$ parmi les $${nbFaces}$ faces du dé.
47
+
48
+ Ainsi, la probabilité d'obtenir la face $${faceAsked}$ est :
49
+
50
+ $$
51
+ ${answer}
52
+ $$`;
53
+ }
54
+ };
55
+ const getInstruction = (identifiers) => {
56
+ const { isParityQuestion, isEvenQuestion, nbFaces, faceAsked } = identifiers;
17
57
  const target = isParityQuestion
18
58
  ? `un nombre ${isEvenQuestion ? "pair" : "impair"}`
19
59
  : `la face $${faceAsked}$`;
60
+ return `On lance un dé équilibré à $${nbFaces}$ faces.
61
+
62
+ Quelle est la probabilité d'obtenir ${target} ?`;
63
+ };
64
+ const getAnswer = (identifiers) => {
65
+ const { isParityQuestion, isEvenQuestion, nbFaces, faceAsked } = identifiers;
20
66
  const answer = isParityQuestion
21
67
  ? isEvenQuestion
22
68
  ? (0, fractionNode_1.frac)(Math.floor(nbFaces / 2), nbFaces)
@@ -26,12 +72,22 @@ const getDiceBasicProbasQuestion = () => {
26
72
  .simplify()
27
73
  .toTex()
28
74
  : (0, fractionNode_1.frac)(1, nbFaces).toTex();
75
+ return answer;
76
+ };
77
+ const getDiceBasicProbasQuestion = () => {
78
+ const nbFaces = (0, randint_1.randint)(4, 10);
79
+ const isParityQuestion = (0, probaFlip_1.probaFlip)(0.3);
80
+ const isEvenQuestion = (0, coinFlip_1.coinFlip)();
81
+ const faceAsked = (0, randint_1.randint)(1, nbFaces + 1);
82
+ const identifiers = { isParityQuestion, isEvenQuestion, nbFaces, faceAsked };
29
83
  const question = {
30
- answer,
31
- instruction: `On lance un dé équilibré à $${nbFaces}$ faces. Quelle est la probabilité d'obtenir ${target} ?`,
84
+ answer: getAnswer(identifiers),
85
+ instruction: getInstruction(identifiers),
32
86
  keys: [],
33
87
  answerFormat: "tex",
34
- identifiers: { isParityQuestion, isEvenQuestion, nbFaces, faceAsked },
88
+ identifiers,
89
+ hint: getHint(identifiers),
90
+ correction: getCorrection(identifiers),
35
91
  };
36
92
  return question;
37
93
  };
@@ -55,27 +111,23 @@ const getPropositions = (n, { answer, isParityQuestion, isEvenQuestion, nbFaces
55
111
  }
56
112
  return (0, exercise_1.shuffleProps)(propositions, n);
57
113
  };
58
- const isAnswerValid = (ans, { isParityQuestion, isEvenQuestion, nbFaces }) => {
59
- const opts = { allowFractionToDecimal: true };
60
- const answer = isParityQuestion
61
- ? isEvenQuestion
62
- ? new rational_1.Rational(Math.floor(nbFaces / 2), nbFaces).simplify().toTree(opts)
63
- : new rational_1.Rational(Math.ceil(nbFaces / 2), nbFaces).simplify().toTree(opts)
64
- : new fractionNode_1.FractionNode(new numberNode_1.NumberNode(1), new numberNode_1.NumberNode(nbFaces), opts);
65
- const texs = answer.toAllValidTexs();
66
- return texs.includes(ans);
114
+ const isAnswerValid = (ans, { answer, isParityQuestion, isEvenQuestion, nbFaces }) => {
115
+ return (0, rationalVEA_1.rationalVEA)(ans, answer, { decimalPrecision: 2 });
67
116
  };
68
117
  exports.diceBasicProbas = {
69
118
  id: "diceBasicProbas",
70
119
  connector: "=",
71
120
  label: "Calcul de probabilité simple avec un dé",
72
- levels: ["5ème", "4ème", "3ème", "2ndPro", "2nde", "CAP"],
73
121
  isSingleStep: true,
74
- sections: ["Probabilités"],
75
122
  generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getDiceBasicProbasQuestion, nb),
76
123
  qcmTimer: 60,
77
124
  freeTimer: 60,
78
125
  getPropositions,
79
126
  isAnswerValid,
80
127
  subject: "Mathématiques",
128
+ getAnswer,
129
+ getHint,
130
+ getInstruction,
131
+ getCorrection,
132
+ hasHintAndCorrection: true,
81
133
  };
@@ -1 +1 @@
1
- {"version":3,"file":"probabilityTree.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/probaStat/probabilityTree.ts"],"names":[],"mappings":"AAYA,OAAO,EAEL,eAAe,EAChB,MAAM,kCAAkC,CAAC;AAY1C,OAAO,EACL,QAAQ,EAeT,MAAM,gBAAgB,CAAC;AAmCxB,KAAK,WAAW,GAAG;IAIjB,CAAC,EAAE,eAAe,CAAC;IACnB,CAAC,EAAE,eAAe,CAAC;IACnB,EAAE,EAAE,eAAe,CAAC;IACpB,EAAE,EAAE,eAAe,CAAC;IACpB,EAAE,EAAE,eAAe,CAAC;IACpB,EAAE,EAAE,eAAe,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AA4MF,KAAK,OAAO,GAAG;IACb,gBAAgB,EAAE,MAAM,CAAC;IACzB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AA+CF,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAiB1D,CAAC"}
1
+ {"version":3,"file":"probabilityTree.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/probaStat/probabilityTree.ts"],"names":[],"mappings":"AAYA,OAAO,EAEL,eAAe,EAChB,MAAM,kCAAkC,CAAC;AAa1C,OAAO,EACL,QAAQ,EAeT,MAAM,gBAAgB,CAAC;AAmCxB,KAAK,WAAW,GAAG;IAIjB,CAAC,EAAE,eAAe,CAAC;IACnB,CAAC,EAAE,eAAe,CAAC;IACnB,EAAE,EAAE,eAAe,CAAC;IACpB,EAAE,EAAE,eAAe,CAAC;IACpB,EAAE,EAAE,eAAe,CAAC;IACpB,EAAE,EAAE,eAAe,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AA4MF,KAAK,OAAO,GAAG;IACb,gBAAgB,EAAE,MAAM,CAAC;IACzB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AA+CF,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAiB1D,CAAC"}
@@ -14,6 +14,7 @@ const multiplyNode_1 = require("../../../tree/nodes/operators/multiplyNode");
14
14
  const substractNode_1 = require("../../../tree/nodes/operators/substractNode");
15
15
  const random_1 = require("../../../utils/alea/random");
16
16
  const shuffle_1 = require("../../../utils/alea/shuffle");
17
+ const handleVEAError_1 = require("../../../utils/errors/handleVEAError");
17
18
  const exercise_1 = require("../../exercise");
18
19
  const getDistinctQuestions_1 = require("../../utils/getDistinctQuestions");
19
20
  const rebuildIdentifiers = (oldIdentifiers) => {
@@ -233,7 +234,7 @@ const isAnswerValid = (ans, { answer, ...identifiers }, opts) => {
233
234
  });
234
235
  }
235
236
  catch (err) {
236
- return false;
237
+ return (0, handleVEAError_1.handleVEAError)(err);
237
238
  }
238
239
  };
239
240
  const options = [
@@ -1 +1 @@
1
- {"version":3,"file":"confidenceInterval.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/sampling/confidenceInterval.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,0BAA0B,CAAC;AAiBlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAyHF,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,WAAW,CAiBpD,CAAC"}
1
+ {"version":3,"file":"confidenceInterval.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/sampling/confidenceInterval.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,0BAA0B,CAAC;AAkBlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAyHF,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,WAAW,CAiBpD,CAAC"}
@@ -14,6 +14,7 @@ const closure_1 = require("../../../tree/nodes/sets/closure");
14
14
  const intervalNode_1 = require("../../../tree/nodes/sets/intervalNode");
15
15
  const intervalParser_1 = require("../../../tree/parsers/intervalParser");
16
16
  const coinFlip_1 = require("../../../utils/alea/coinFlip");
17
+ const handleVEAError_1 = require("../../../utils/errors/handleVEAError");
17
18
  const alignTex_1 = require("../../../utils/latex/alignTex");
18
19
  const approxOrEqual_1 = require("../../../utils/latex/approxOrEqual");
19
20
  const getPropositions = (nb, { answer, n, k, wordingType }) => {
@@ -93,7 +94,7 @@ const isAnswerValid = (ans, { answer }) => {
93
94
  return parsed.toTex() === answer;
94
95
  }
95
96
  catch (err) {
96
- return false;
97
+ return (0, handleVEAError_1.handleVEAError)(err);
97
98
  }
98
99
  };
99
100
  const getConfidenceIntervalQuestion = (ops) => {
@@ -1 +1 @@
1
- {"version":3,"file":"fluctuationInterval.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/sampling/fluctuationInterval.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,0BAA0B,CAAC;AAiBlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAiHF,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,WAAW,CAiBrD,CAAC"}
1
+ {"version":3,"file":"fluctuationInterval.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/sampling/fluctuationInterval.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,0BAA0B,CAAC;AAkBlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAiHF,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,WAAW,CAiBrD,CAAC"}
@@ -14,6 +14,7 @@ const closure_1 = require("../../../tree/nodes/sets/closure");
14
14
  const intervalNode_1 = require("../../../tree/nodes/sets/intervalNode");
15
15
  const intervalParser_1 = require("../../../tree/parsers/intervalParser");
16
16
  const coinFlip_1 = require("../../../utils/alea/coinFlip");
17
+ const handleVEAError_1 = require("../../../utils/errors/handleVEAError");
17
18
  const alignTex_1 = require("../../../utils/latex/alignTex");
18
19
  const getPropositions = (nb, { answer, n, p, wordingType }) => {
19
20
  const propositions = [];
@@ -90,7 +91,7 @@ const isAnswerValid = (ans, { answer }) => {
90
91
  return parsed.toTex() === answer;
91
92
  }
92
93
  catch (err) {
93
- return false;
94
+ return (0, handleVEAError_1.handleVEAError)(err);
94
95
  }
95
96
  };
96
97
  const getFluctuationIntervalQuestion = (ops) => {
@@ -1 +1 @@
1
- {"version":3,"file":"geometricExplicitFormulaUsage.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sequences/geometric/geometricExplicitFormulaUsage.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,0BAA0B,CAAC;AAWlC,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAyFF,eAAO,MAAM,6BAA6B,EAAE,QAAQ,CAAC,WAAW,CAoB/D,CAAC"}
1
+ {"version":3,"file":"geometricExplicitFormulaUsage.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sequences/geometric/geometricExplicitFormulaUsage.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,0BAA0B,CAAC;AAYlC,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAyFF,eAAO,MAAM,6BAA6B,EAAE,QAAQ,CAAC,WAAW,CAoB/D,CAAC"}
@@ -11,6 +11,7 @@ const variableNode_1 = require("../../../../tree/nodes/variables/variableNode");
11
11
  const alignTex_1 = require("../../../../utils/latex/alignTex");
12
12
  const shuffle_1 = require("../../../../utils/alea/shuffle");
13
13
  const latexParser_1 = require("../../../../tree/parsers/latexParser");
14
+ const handleVEAError_1 = require("../../../../utils/errors/handleVEAError");
14
15
  const getInstruction = (identifiers) => {
15
16
  const { firstValue, reason, askedRank } = identifiers;
16
17
  const formula = new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(firstValue), new powerNode_1.PowerNode(new numberNode_1.NumberNode(reason), new variableNode_1.VariableNode("n")));
@@ -68,7 +69,7 @@ const isAnswerValid = (ans, { answer, askedRank }) => {
68
69
  return parsed.simplify().toTex() === answer;
69
70
  }
70
71
  catch (err) {
71
- return false;
72
+ return (0, handleVEAError_1.handleVEAError)(err);
72
73
  }
73
74
  };
74
75
  const getPropositions = (n, { answer, firstValue, reason, askedRank }) => {
@@ -1 +1 @@
1
- {"version":3,"file":"inequalityToInterval.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sets/intervals/inequalityToInterval.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,0BAA0B,CAAC;AAQlC,OAAO,EAGL,uBAAuB,EACxB,MAAM,oCAAoC,CAAC;AAI5C,KAAK,WAAW,GAAG;IAIjB,mBAAmB,EAAE,uBAAuB,CAAC;CAC9C,CAAC;AAwGF,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,WAAW,CAiBtD,CAAC"}
1
+ {"version":3,"file":"inequalityToInterval.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sets/intervals/inequalityToInterval.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,0BAA0B,CAAC;AAQlC,OAAO,EAGL,uBAAuB,EACxB,MAAM,oCAAoC,CAAC;AAK5C,KAAK,WAAW,GAAG;IAIjB,mBAAmB,EAAE,uBAAuB,CAAC;CAC9C,CAAC;AAwGF,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,WAAW,CAiBtD,CAAC"}
@@ -7,6 +7,7 @@ const infiniteNode_1 = require("../../../../tree/nodes/numbers/infiniteNode");
7
7
  const intervalNode_1 = require("../../../../tree/nodes/sets/intervalNode");
8
8
  const intervalParser_1 = require("../../../../tree/parsers/intervalParser");
9
9
  const shuffle_1 = require("../../../../utils/alea/shuffle");
10
+ const handleVEAError_1 = require("../../../../utils/errors/handleVEAError");
10
11
  const rebuildIdentifiers = (oldIds) => {
11
12
  if (!!oldIds.intervalIdentifiers)
12
13
  return oldIds;
@@ -79,7 +80,7 @@ const isAnswerValid = (ans, { answer }) => {
79
80
  return "x\\in\\ " + parsed.simplify().toTex() === answer;
80
81
  }
81
82
  catch (err) {
82
- return false;
83
+ return (0, handleVEAError_1.handleVEAError)(err);
83
84
  }
84
85
  };
85
86
  exports.inequalityToInterval = {
@@ -1 +1 @@
1
- {"version":3,"file":"intervalsIntersection.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sets/intervals/intervalsIntersection.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,0BAA0B,CAAC;AAYlC,OAAO,EAGL,uBAAuB,EAExB,MAAM,oCAAoC,CAAC;AAK5C,KAAK,WAAW,GAAG;IAOjB,eAAe,EAAE,uBAAuB,CAAC;IACzC,eAAe,EAAE,uBAAuB,CAAC;CAC1C,CAAC;AAgKF,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,WAAW,CAgBvD,CAAC"}
1
+ {"version":3,"file":"intervalsIntersection.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sets/intervals/intervalsIntersection.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,0BAA0B,CAAC;AAYlC,OAAO,EAGL,uBAAuB,EAExB,MAAM,oCAAoC,CAAC;AAM5C,KAAK,WAAW,GAAG;IAOjB,eAAe,EAAE,uBAAuB,CAAC;IACzC,eAAe,EAAE,uBAAuB,CAAC;CAC1C,CAAC;AAgKF,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,WAAW,CAgBvD,CAAC"}
@@ -9,6 +9,7 @@ const intervalNode_1 = require("../../../../tree/nodes/sets/intervalNode");
9
9
  const discreteSetParser_1 = require("../../../../tree/parsers/discreteSetParser");
10
10
  const intervalParser_1 = require("../../../../tree/parsers/intervalParser");
11
11
  const shuffle_1 = require("../../../../utils/alea/shuffle");
12
+ const handleVEAError_1 = require("../../../../utils/errors/handleVEAError");
12
13
  const rebuildIdentifiers = (oldIds) => {
13
14
  if (!!oldIds.int1Identifiers)
14
15
  return oldIds;
@@ -143,7 +144,7 @@ const isAnswerValid = (ans, { answer, int1Identifiers, int2Identifiers }) => {
143
144
  }
144
145
  }
145
146
  catch (err) {
146
- return false;
147
+ return (0, handleVEAError_1.handleVEAError)(err);
147
148
  }
148
149
  };
149
150
  exports.intervalsIntersection = {
@@ -1 +1 @@
1
- {"version":3,"file":"intervalsUnion.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sets/intervals/intervalsUnion.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAWT,MAAM,0BAA0B,CAAC;AAOlC,OAAO,EAGL,uBAAuB,EACxB,MAAM,oCAAoC,CAAC;AAI5C,KAAK,WAAW,GAAG;IAOjB,eAAe,EAAE,uBAAuB,CAAC;IACzC,eAAe,EAAE,uBAAuB,CAAC;CAC1C,CAAC;AA8GF,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,WAAW,CAehD,CAAC"}
1
+ {"version":3,"file":"intervalsUnion.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sets/intervals/intervalsUnion.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAWT,MAAM,0BAA0B,CAAC;AAOlC,OAAO,EAGL,uBAAuB,EACxB,MAAM,oCAAoC,CAAC;AAK5C,KAAK,WAAW,GAAG;IAOjB,eAAe,EAAE,uBAAuB,CAAC;IACzC,eAAe,EAAE,uBAAuB,CAAC;CAC1C,CAAC;AA8GF,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,WAAW,CAehD,CAAC"}
@@ -7,6 +7,7 @@ const infiniteNode_1 = require("../../../../tree/nodes/numbers/infiniteNode");
7
7
  const intervalNode_1 = require("../../../../tree/nodes/sets/intervalNode");
8
8
  const unionIntervalParser_1 = require("../../../../tree/parsers/unionIntervalParser");
9
9
  const shuffle_1 = require("../../../../utils/alea/shuffle");
10
+ const handleVEAError_1 = require("../../../../utils/errors/handleVEAError");
10
11
  const rebuildIdentifiers = (oldIds) => {
11
12
  if (!!oldIds.int1Identifiers)
12
13
  return oldIds;
@@ -97,7 +98,7 @@ const isAnswerValid = (ans, { answer }) => {
97
98
  return parsed.simplify().toTex() === answer;
98
99
  }
99
100
  catch (err) {
100
- return false;
101
+ return (0, handleVEAError_1.handleVEAError)(err);
101
102
  }
102
103
  };
103
104
  exports.intervalsUnion = {
@@ -1 +1 @@
1
- {"version":3,"file":"degreeToRadians.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/trigonometry/degreeToRadians.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAkBT,MAAM,0BAA0B,CAAC;AAgBlC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,GAAG,CAAC;IACnB,gBAAgB,EAAE,OAAO,CAAC;CAC3B,CAAC;AAwJF,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,CAiBjD,CAAC"}
1
+ {"version":3,"file":"degreeToRadians.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/trigonometry/degreeToRadians.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAkBT,MAAM,0BAA0B,CAAC;AAiBlC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,GAAG,CAAC;IACnB,gBAAgB,EAAE,OAAO,CAAC;CAC3B,CAAC;AAwJF,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,CAiBjD,CAAC"}
@@ -14,6 +14,7 @@ const degreeParser_1 = require("../../../tree/parsers/degreeParser");
14
14
  const latexParser_1 = require("../../../tree/parsers/latexParser");
15
15
  const coinFlip_1 = require("../../../utils/alea/coinFlip");
16
16
  const random_1 = require("../../../utils/alea/random");
17
+ const handleVEAError_1 = require("../../../utils/errors/handleVEAError");
17
18
  const getPropositions = (n, { answer, isDegreeToRadian }) => {
18
19
  const propositions = [];
19
20
  (0, exercise_1.addValidProp)(propositions, answer);
@@ -93,7 +94,7 @@ const isAnswerValid = (ans, { answer, degree, isDegreeToRadian, radianNodeIds })
93
94
  }
94
95
  }
95
96
  catch (err) {
96
- return false;
97
+ return (0, handleVEAError_1.handleVEAError)(err);
97
98
  }
98
99
  };
99
100
  const getIdentifiers = (prevIds) => {
@@ -1 +1 @@
1
- {"version":3,"file":"mainAngleMeasure.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/trigonometry/mainAngleMeasure.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAkBT,MAAM,0BAA0B,CAAC;AAelC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,kBAAkB,EAAE,MAAM,CAAC;IAC3B,OAAO,EAAE,GAAG,CAAC;CACd,CAAC;AA4FF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAiBlD,CAAC"}
1
+ {"version":3,"file":"mainAngleMeasure.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/trigonometry/mainAngleMeasure.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAkBT,MAAM,0BAA0B,CAAC;AAgBlC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,kBAAkB,EAAE,MAAM,CAAC;IAC3B,OAAO,EAAE,GAAG,CAAC;CACd,CAAC;AA4FF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAiBlD,CAAC"}
@@ -11,6 +11,7 @@ const addNode_1 = require("../../../tree/nodes/operators/addNode");
11
11
  const multiplyNode_1 = require("../../../tree/nodes/operators/multiplyNode");
12
12
  const latexParser_1 = require("../../../tree/parsers/latexParser");
13
13
  const random_1 = require("../../../utils/alea/random");
14
+ const handleVEAError_1 = require("../../../utils/errors/handleVEAError");
14
15
  const getPropositions = (n, { answer, degree }) => {
15
16
  const propositions = [];
16
17
  (0, exercise_1.addValidProp)(propositions, answer);
@@ -62,7 +63,7 @@ const isAnswerValid = (ans, { answer, degree }) => {
62
63
  // return value.angle.toAllValidTexs().includes(ans);
63
64
  }
64
65
  catch (err) {
65
- return false;
66
+ return (0, handleVEAError_1.handleVEAError)(err);
66
67
  }
67
68
  };
68
69
  const getMainAngleMeasureQuestion = () => {
@@ -1 +1 @@
1
- {"version":3,"file":"equationVEA.d.ts","sourceRoot":"","sources":["../../../src/exercises/vea/equationVEA.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,WAAW,QAAS,MAAM,eAAe,MAAM,YAa3D,CAAC"}
1
+ {"version":3,"file":"equationVEA.d.ts","sourceRoot":"","sources":["../../../src/exercises/vea/equationVEA.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,WAAW,QAAS,MAAM,eAAe,MAAM,YAa3D,CAAC"}
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.equationVEA = void 0;
4
4
  const discreteSetParser_1 = require("../../tree/parsers/discreteSetParser");
5
5
  const equationSolutionParser_1 = require("../../tree/parsers/equationSolutionParser");
6
+ const handleVEAError_1 = require("../../utils/errors/handleVEAError");
6
7
  const rationalVEA_1 = require("./rationalVEA");
7
8
  const equationVEA = (ans, solutionTex) => {
8
9
  try {
@@ -18,7 +19,7 @@ const equationVEA = (ans, solutionTex) => {
18
19
  }
19
20
  }
20
21
  catch (err) {
21
- return false;
22
+ return (0, handleVEAError_1.handleVEAError)(err);
22
23
  }
23
24
  };
24
25
  exports.equationVEA = equationVEA;
@@ -1 +1 @@
1
- {"version":3,"file":"rationalVEA.d.ts","sourceRoot":"","sources":["../../../src/exercises/vea/rationalVEA.ts"],"names":[],"mappings":"AAKA,KAAK,IAAI,GAAG;IACV,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B,CAAC;AACF,eAAO,MAAM,WAAW,eACV,MAAM,UACV,MAAM,6DAC4C,IAAI,YAoC/D,CAAC"}
1
+ {"version":3,"file":"rationalVEA.d.ts","sourceRoot":"","sources":["../../../src/exercises/vea/rationalVEA.ts"],"names":[],"mappings":"AAMA,KAAK,IAAI,GAAG;IACV,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B,CAAC;AACF,eAAO,MAAM,WAAW,eACV,MAAM,UACV,MAAM,6DAC4C,IAAI,YAoC/D,CAAC"}