math-exercises 3.0.67 → 3.0.69

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 (236) hide show
  1. package/lib/exercises/math/calcul/fractions/fractionToPercentToDecimal.d.ts.map +1 -1
  2. package/lib/exercises/math/calcul/fractions/fractionToPercentToDecimal.js +55 -37
  3. package/lib/exercises/math/calcul/fractions/fractionsSumsMultiplesDenominators.d.ts.map +1 -1
  4. package/lib/exercises/math/calcul/fractions/fractionsSumsMultiplesDenominators.js +4 -4
  5. package/lib/exercises/math/calcul/fractions/fractionsSumsPrimeDenominators.d.ts.map +1 -1
  6. package/lib/exercises/math/calcul/fractions/fractionsSumsPrimeDenominators.js +31 -18
  7. package/lib/exercises/math/calcul/fractions/fractionsSumsSameDenominators.d.ts.map +1 -1
  8. package/lib/exercises/math/calcul/fractions/fractionsSumsSameDenominators.js +59 -35
  9. package/lib/exercises/math/calculLitteral/systems/basicNiceValuesSystemResolution.js +1 -1
  10. package/lib/exercises/math/combinatory/anagrams.d.ts.map +1 -1
  11. package/lib/exercises/math/combinatory/anagrams.js +18 -7
  12. package/lib/exercises/math/combinatory/ballsCounting.d.ts.map +1 -1
  13. package/lib/exercises/math/combinatory/ballsCounting.js +8 -6
  14. package/lib/exercises/math/combinatory/diceCounting.d.ts.map +1 -1
  15. package/lib/exercises/math/combinatory/diceCounting.js +62 -27
  16. package/lib/exercises/math/functions/absolute/absolueValueAffineEquation.d.ts.map +1 -1
  17. package/lib/exercises/math/functions/absolute/absolueValueAffineEquation.js +4 -0
  18. package/lib/exercises/math/functions/absolute/absolueValueInequationsSup.d.ts.map +1 -1
  19. package/lib/exercises/math/functions/absolute/absolueValueInequationsSup.js +4 -4
  20. package/lib/exercises/math/functions/absolute/absoluteValueEquations.d.ts.map +1 -1
  21. package/lib/exercises/math/functions/absolute/absoluteValueEquations.js +22 -10
  22. package/lib/exercises/math/functions/absolute/absoluteValueInequations.d.ts.map +1 -1
  23. package/lib/exercises/math/functions/absolute/absoluteValueInequations.js +22 -8
  24. package/lib/exercises/math/functions/affines/affineAdjustment.d.ts.map +1 -1
  25. package/lib/exercises/math/functions/affines/affineAdjustment.js +4 -4
  26. package/lib/exercises/math/functions/affines/affineAdjustmentComplete.d.ts.map +1 -1
  27. package/lib/exercises/math/functions/affines/affineAdjustmentComplete.js +4 -4
  28. package/lib/exercises/math/functions/affines/affineAdjustmentRsquared.d.ts.map +1 -1
  29. package/lib/exercises/math/functions/affines/affineAdjustmentRsquared.js +4 -4
  30. package/lib/exercises/math/functions/affines/affineExpressionFromTwoImages.d.ts.map +1 -1
  31. package/lib/exercises/math/functions/affines/affineExpressionFromTwoImages.js +4 -4
  32. package/lib/exercises/math/functions/affines/affineExpressionReading.d.ts.map +1 -1
  33. package/lib/exercises/math/functions/affines/affineExpressionReading.js +1 -0
  34. package/lib/exercises/math/functions/affines/affineMeanValue.d.ts.map +1 -1
  35. package/lib/exercises/math/functions/affines/affineMeanValue.js +33 -14
  36. package/lib/exercises/math/functions/affines/algebricExpressionOfAffine.d.ts.map +1 -1
  37. package/lib/exercises/math/functions/affines/algebricExpressionOfAffine.js +4 -4
  38. package/lib/exercises/math/functions/affines/leadingCoeffAndOriginOrdinate.d.ts.map +1 -1
  39. package/lib/exercises/math/functions/affines/leadingCoeffAndOriginOrdinate.js +4 -0
  40. package/lib/exercises/math/functions/affines/leadingCoefficient.d.ts.map +1 -1
  41. package/lib/exercises/math/functions/affines/leadingCoefficient.js +4 -5
  42. package/lib/exercises/math/functions/affines/leadingCoefficientCalculV1.d.ts.map +1 -1
  43. package/lib/exercises/math/functions/affines/leadingCoefficientCalculV1.js +4 -2
  44. package/lib/exercises/math/functions/basics/graphicEquation.d.ts.map +1 -1
  45. package/lib/exercises/math/functions/basics/graphicEquation.js +4 -2
  46. package/lib/exercises/math/functions/basics/graphicInequation.d.ts.map +1 -1
  47. package/lib/exercises/math/functions/basics/graphicInequation.js +4 -2
  48. package/lib/exercises/math/functions/basics/graphicInequationAffine.d.ts.map +1 -1
  49. package/lib/exercises/math/functions/basics/graphicInequationAffine.js +4 -5
  50. package/lib/exercises/math/functions/basics/imageAntecedentFromSentence.d.ts.map +1 -1
  51. package/lib/exercises/math/functions/basics/imageAntecedentFromSentence.js +4 -3
  52. package/lib/exercises/math/functions/basics/inverseImageFunction.d.ts.map +1 -1
  53. package/lib/exercises/math/functions/basics/inverseImageFunction.js +4 -6
  54. package/lib/exercises/math/functions/basics/inverseImageFunctionGeogebra.d.ts.map +1 -1
  55. package/lib/exercises/math/functions/basics/inverseImageFunctionGeogebra.js +0 -2
  56. package/lib/exercises/math/functions/basics/inverseImageFunctionTable.d.ts.map +1 -1
  57. package/lib/exercises/math/functions/basics/inverseImageFunctionTable.js +16 -15
  58. package/lib/exercises/math/functions/basics/twoFunctionsEquation.d.ts +1 -0
  59. package/lib/exercises/math/functions/basics/twoFunctionsEquation.d.ts.map +1 -1
  60. package/lib/exercises/math/functions/basics/twoFunctionsEquation.js +46 -32
  61. package/lib/exercises/math/functions/basics/twoFunctionsInequation.d.ts.map +1 -1
  62. package/lib/exercises/math/functions/basics/twoFunctionsInequation.js +4 -2
  63. package/lib/exercises/math/functions/cube/cubicEquation.d.ts.map +1 -1
  64. package/lib/exercises/math/functions/cube/cubicEquation.js +4 -3
  65. package/lib/exercises/math/functions/exponentials/exponentialsVariations.d.ts.map +1 -1
  66. package/lib/exercises/math/functions/exponentials/exponentialsVariations.js +4 -1
  67. package/lib/exercises/math/functions/integral/integralAffines.d.ts.map +1 -1
  68. package/lib/exercises/math/functions/integral/integralAffines.js +4 -2
  69. package/lib/exercises/math/functions/integral/integralDerivatedUCosU.d.ts.map +1 -1
  70. package/lib/exercises/math/functions/integral/integralDerivatedUCosU.js +27 -12
  71. package/lib/exercises/math/functions/integral/integralDerivatedUSinU.d.ts.map +1 -1
  72. package/lib/exercises/math/functions/integral/integralDerivatedUSinU.js +26 -11
  73. package/lib/exercises/math/functions/integral/integralExpAxPlusB.d.ts.map +1 -1
  74. package/lib/exercises/math/functions/integral/integralExpAxPlusB.js +26 -11
  75. package/lib/exercises/math/functions/integral/integralExpU.d.ts.map +1 -1
  76. package/lib/exercises/math/functions/integral/integralExpU.js +38 -20
  77. package/lib/exercises/math/functions/integral/integralFractions.d.ts.map +1 -1
  78. package/lib/exercises/math/functions/integral/integralFractions.js +40 -21
  79. package/lib/exercises/math/functions/integral/integralKCosinus.d.ts.map +1 -1
  80. package/lib/exercises/math/functions/integral/integralKCosinus.js +29 -12
  81. package/lib/exercises/math/functions/integral/integralKSinus.d.ts.map +1 -1
  82. package/lib/exercises/math/functions/integral/integralKSinus.js +29 -12
  83. package/lib/exercises/math/functions/integral/integralTrinomials.d.ts.map +1 -1
  84. package/lib/exercises/math/functions/integral/integralTrinomials.js +4 -2
  85. package/lib/exercises/math/functions/logarithm/log10PowerSimplifying.d.ts +0 -1
  86. package/lib/exercises/math/functions/logarithm/log10PowerSimplifying.d.ts.map +1 -1
  87. package/lib/exercises/math/functions/logarithm/log10PowerSimplifying.js +36 -15
  88. package/lib/exercises/math/functions/logarithm/log10Simplifying.d.ts.map +1 -1
  89. package/lib/exercises/math/functions/logarithm/log10Simplifying.js +43 -22
  90. package/lib/exercises/math/functions/logarithm/logEquation.d.ts.map +1 -1
  91. package/lib/exercises/math/functions/logarithm/logEquation.js +20 -11
  92. package/lib/exercises/math/functions/logarithm/logPowerEquation.d.ts.map +1 -1
  93. package/lib/exercises/math/functions/logarithm/logPowerEquation.js +26 -14
  94. package/lib/exercises/math/functions/logarithm/logSimplifiying.d.ts.map +1 -1
  95. package/lib/exercises/math/functions/logarithm/logSimplifiying.js +4 -3
  96. package/lib/exercises/math/functions/parity/parityFromAlgebra.d.ts.map +1 -1
  97. package/lib/exercises/math/functions/parity/parityFromAlgebra.js +29 -13
  98. package/lib/exercises/math/functions/parity/parityFromGraph.d.ts.map +1 -1
  99. package/lib/exercises/math/functions/parity/parityFromGraph.js +30 -12
  100. package/lib/exercises/math/functions/rationalFraction/rationalFractionForbiddenValue.d.ts.map +1 -1
  101. package/lib/exercises/math/functions/rationalFraction/rationalFractionForbiddenValue.js +27 -14
  102. package/lib/exercises/math/functions/sign/affineProductSign.d.ts.map +1 -1
  103. package/lib/exercises/math/functions/sign/affineProductSign.js +4 -4
  104. package/lib/exercises/math/functions/square/squareImageInterval.d.ts.map +1 -1
  105. package/lib/exercises/math/functions/square/squareImageInterval.js +39 -19
  106. package/lib/exercises/math/functions/trinoms/devForm/coefficientsIdentification.d.ts.map +1 -1
  107. package/lib/exercises/math/functions/trinoms/devForm/coefficientsIdentification.js +4 -3
  108. package/lib/exercises/math/functions/trinoms/devForm/variationsFromAlgebricForm.d.ts +1 -0
  109. package/lib/exercises/math/functions/trinoms/devForm/variationsFromAlgebricForm.d.ts.map +1 -1
  110. package/lib/exercises/math/functions/trinoms/devForm/variationsFromAlgebricForm.js +26 -9
  111. package/lib/exercises/math/functions/trinoms/equation/deltaTrinom.d.ts.map +1 -1
  112. package/lib/exercises/math/functions/trinoms/equation/deltaTrinom.js +25 -10
  113. package/lib/exercises/math/functions/trinoms/equation/solveSecondDegreeEquationByFactorisation.d.ts.map +1 -1
  114. package/lib/exercises/math/functions/trinoms/equation/solveSecondDegreeEquationByFactorisation.js +4 -2
  115. package/lib/exercises/math/functions/trinoms/equation/solveSecondDegreeEquationFromCano.d.ts.map +1 -1
  116. package/lib/exercises/math/functions/trinoms/equation/solveSecondDegreeEquationFromCano.js +4 -2
  117. package/lib/exercises/math/functions/trinoms/factoForm/factorizedFormFromRoots.d.ts.map +1 -1
  118. package/lib/exercises/math/functions/trinoms/factoForm/factorizedFormFromRoots.js +4 -4
  119. package/lib/exercises/math/functions/trinoms/parabole/paraboleExpressionReading.d.ts.map +1 -1
  120. package/lib/exercises/math/functions/trinoms/parabole/paraboleExpressionReading.js +4 -5
  121. package/lib/exercises/math/functions/trinoms/parabole/trinomSymetryAxisFromFacto.d.ts.map +1 -1
  122. package/lib/exercises/math/functions/trinoms/parabole/trinomSymetryAxisFromFacto.js +4 -4
  123. package/lib/exercises/math/functions/trinoms/roots/findSecondRoot.d.ts.map +1 -1
  124. package/lib/exercises/math/functions/trinoms/roots/findSecondRoot.js +4 -4
  125. package/lib/exercises/math/functions/trinoms/roots/niceRootsFromDevForm.d.ts.map +1 -1
  126. package/lib/exercises/math/functions/trinoms/roots/niceRootsFromDevForm.js +4 -2
  127. package/lib/exercises/math/functions/trinoms/roots/rootsFromDevForm.d.ts.map +1 -1
  128. package/lib/exercises/math/functions/trinoms/roots/rootsFromDevForm.js +4 -2
  129. package/lib/exercises/math/functions/trinoms/roots/rootsFromFactorizedForm.d.ts.map +1 -1
  130. package/lib/exercises/math/functions/trinoms/roots/rootsFromFactorizedForm.js +4 -2
  131. package/lib/exercises/math/functions/trinoms/roots/rootsProduct.d.ts.map +1 -1
  132. package/lib/exercises/math/functions/trinoms/roots/rootsProduct.js +4 -4
  133. package/lib/exercises/math/functions/trinoms/roots/rootsReading.d.ts.map +1 -1
  134. package/lib/exercises/math/functions/trinoms/roots/rootsReading.js +4 -3
  135. package/lib/exercises/math/functions/trinoms/roots/rootsSum.d.ts.map +1 -1
  136. package/lib/exercises/math/functions/trinoms/roots/rootsSum.js +4 -4
  137. package/lib/exercises/math/functions/trinoms/sign/trinomSignFromFacto.d.ts.map +1 -1
  138. package/lib/exercises/math/functions/trinoms/sign/trinomSignFromFacto.js +4 -0
  139. package/lib/exercises/math/functions/trinoms/sign/trinomSignFromRoots.d.ts.map +1 -1
  140. package/lib/exercises/math/functions/trinoms/sign/trinomSignFromRoots.js +4 -0
  141. package/lib/exercises/math/functions/trinoms/summitAndCanonical/alphaBetaFromDevForm.d.ts.map +1 -1
  142. package/lib/exercises/math/functions/trinoms/summitAndCanonical/alphaBetaFromDevForm.js +32 -11
  143. package/lib/exercises/math/functions/trinoms/summitAndCanonical/canonicalFromDevForm.d.ts.map +1 -1
  144. package/lib/exercises/math/functions/trinoms/summitAndCanonical/canonicalFromDevForm.js +24 -9
  145. package/lib/exercises/math/functions/trinoms/summitAndCanonical/extremumFromCanonicalForm.d.ts.map +1 -1
  146. package/lib/exercises/math/functions/trinoms/summitAndCanonical/extremumFromCanonicalForm.js +24 -9
  147. package/lib/exercises/math/functions/trinoms/summitAndCanonical/extremumTypeFromAlgebricForm.d.ts +1 -0
  148. package/lib/exercises/math/functions/trinoms/summitAndCanonical/extremumTypeFromAlgebricForm.d.ts.map +1 -1
  149. package/lib/exercises/math/functions/trinoms/summitAndCanonical/extremumTypeFromAlgebricForm.js +29 -12
  150. package/lib/exercises/math/functions/trinoms/summitAndCanonical/summitAbscissFromDevForm.d.ts.map +1 -1
  151. package/lib/exercises/math/functions/trinoms/summitAndCanonical/summitAbscissFromDevForm.js +4 -0
  152. package/lib/exercises/math/functions/trinoms/summitAndCanonical/summitAbscissFromRoots.d.ts.map +1 -1
  153. package/lib/exercises/math/functions/trinoms/summitAndCanonical/summitAbscissFromRoots.js +4 -0
  154. package/lib/exercises/math/functions/trinoms/summitAndCanonical/summitReading.d.ts.map +1 -1
  155. package/lib/exercises/math/functions/trinoms/summitAndCanonical/summitReading.js +3 -0
  156. package/lib/exercises/math/functions/trinoms/trinomialMeanValue.d.ts.map +1 -1
  157. package/lib/exercises/math/functions/trinoms/trinomialMeanValue.js +33 -14
  158. package/lib/exercises/math/geometry/cartesian/cartesianFromTwoPoints.js +1 -1
  159. package/lib/exercises/math/geometry/euclidianConstructions/buildMediatriceWithCompass.d.ts +2 -0
  160. package/lib/exercises/math/geometry/euclidianConstructions/buildMediatriceWithCompass.d.ts.map +1 -1
  161. package/lib/exercises/math/geometry/euclidianConstructions/buildMediatriceWithCompass.js +55 -27
  162. package/lib/exercises/math/geometry/euclidianConstructions/buildPointFromAxialSymetry.d.ts.map +1 -1
  163. package/lib/exercises/math/geometry/euclidianConstructions/buildPointFromAxialSymetry.js +4 -0
  164. package/lib/exercises/math/geometry/euclidianConstructions/buildTriangleWithSizes.d.ts.map +1 -1
  165. package/lib/exercises/math/geometry/euclidianConstructions/buildTriangleWithSizes.js +4 -0
  166. package/lib/exercises/math/geometry/euclidianConstructions/pointImageFromTranslation.d.ts.map +1 -1
  167. package/lib/exercises/math/geometry/euclidianConstructions/pointImageFromTranslation.js +6 -2
  168. package/lib/exercises/math/geometry/lines/isPointOnCartesianLine.d.ts.map +1 -1
  169. package/lib/exercises/math/geometry/lines/isPointOnCartesianLine.js +7 -5
  170. package/lib/exercises/math/geometry/lines/isPointOnLine.d.ts.map +1 -1
  171. package/lib/exercises/math/geometry/lines/isPointOnLine.js +4 -0
  172. package/lib/exercises/math/geometry/parametric/extractPointFromParametricLine.d.ts.map +1 -1
  173. package/lib/exercises/math/geometry/parametric/extractPointFromParametricLine.js +4 -0
  174. package/lib/exercises/math/geometry/parametric/extractVectorFromParametricLine.d.ts.map +1 -1
  175. package/lib/exercises/math/geometry/parametric/extractVectorFromParametricLine.js +4 -0
  176. package/lib/exercises/math/geometry/parametric/pointFromParametricLine.d.ts.map +1 -1
  177. package/lib/exercises/math/geometry/parametric/pointFromParametricLine.js +4 -0
  178. package/lib/exercises/math/geometry/perimeters/circleRadiusFromPerimeter.d.ts.map +1 -1
  179. package/lib/exercises/math/geometry/perimeters/circleRadiusFromPerimeter.js +4 -0
  180. package/lib/exercises/math/geometry/perimeters/rectangleSideFromPerimeter.d.ts.map +1 -1
  181. package/lib/exercises/math/geometry/perimeters/rectangleSideFromPerimeter.js +4 -0
  182. package/lib/exercises/math/geometry/perimeters/squareSideFromPerimeter.d.ts.map +1 -1
  183. package/lib/exercises/math/geometry/perimeters/squareSideFromPerimeter.js +4 -0
  184. package/lib/exercises/math/geometry/pythagore/isTriangleRight.d.ts.map +1 -1
  185. package/lib/exercises/math/geometry/pythagore/isTriangleRight.js +4 -0
  186. package/lib/exercises/math/geometry/quadrilaterals/parallelogramAngles.d.ts.map +1 -1
  187. package/lib/exercises/math/geometry/quadrilaterals/parallelogramAngles.js +4 -0
  188. package/lib/exercises/math/geometry/quadrilaterals/quadrilateralRecognition.d.ts.map +1 -1
  189. package/lib/exercises/math/geometry/quadrilaterals/quadrilateralRecognition.js +4 -0
  190. package/lib/exercises/math/geometry/shapes/basicShapesRecognition.d.ts.map +1 -1
  191. package/lib/exercises/math/geometry/shapes/basicShapesRecognition.js +42 -23
  192. package/lib/exercises/math/geometry/thales/thalesCalcul.d.ts.map +1 -1
  193. package/lib/exercises/math/geometry/thales/thalesCalcul.js +8 -4
  194. package/lib/exercises/math/geometry/vectors/chasles.d.ts.map +1 -1
  195. package/lib/exercises/math/geometry/vectors/chasles.js +36 -12
  196. package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductOrthoInSquare.d.ts.map +1 -1
  197. package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductOrthoInSquare.js +4 -0
  198. package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductViaCoords.d.ts.map +1 -1
  199. package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductViaCoords.js +4 -2
  200. package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductViaCos.d.ts.map +1 -1
  201. package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductViaCos.js +4 -0
  202. package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductViaNorms.d.ts.map +1 -1
  203. package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductViaNorms.js +4 -0
  204. package/lib/exercises/math/percent/index.d.ts +1 -0
  205. package/lib/exercises/math/percent/index.d.ts.map +1 -1
  206. package/lib/exercises/math/percent/index.js +1 -0
  207. package/lib/exercises/pc/energy/calorificValue.d.ts.map +1 -1
  208. package/lib/exercises/pc/energy/calorificValue.js +58 -29
  209. package/lib/exercises/pc/energy/combustionTransferEnergy.d.ts.map +1 -1
  210. package/lib/exercises/pc/energy/combustionTransferEnergy.js +52 -29
  211. package/lib/exercises/pc/energy/combustionTransferEnergy2.d.ts.map +1 -1
  212. package/lib/exercises/pc/energy/combustionTransferEnergy2.js +96 -67
  213. package/lib/exercises/pc/energy/efficencyOfConverter.d.ts.map +1 -1
  214. package/lib/exercises/pc/energy/efficencyOfConverter.js +53 -40
  215. package/lib/exercises/pc/energy/efficiencyCalculation.d.ts.map +1 -1
  216. package/lib/exercises/pc/energy/efficiencyCalculation.js +66 -38
  217. package/lib/exercises/pc/energy/energyTransfer.d.ts +0 -2
  218. package/lib/exercises/pc/energy/energyTransfer.d.ts.map +1 -1
  219. package/lib/exercises/pc/energy/energyTransfer.js +27 -11
  220. package/lib/exercises/pc/energy/kineticEnergyOrMassOrSpeed.d.ts.map +1 -1
  221. package/lib/exercises/pc/energy/kineticEnergyOrMassOrSpeed.js +111 -64
  222. package/lib/exercises/pc/energy/thermalEnergyTransferCalculation.d.ts.map +1 -1
  223. package/lib/exercises/pc/energy/thermalEnergyTransferCalculation.js +86 -38
  224. package/lib/exercises/pc/fluids/mariotte.d.ts.map +1 -1
  225. package/lib/exercises/pc/fluids/mariotte.js +40 -23
  226. package/lib/exercises/pc/forces/calculateNormalOrFrictionForce.d.ts.map +1 -1
  227. package/lib/exercises/pc/forces/calculateNormalOrFrictionForce.js +81 -52
  228. package/lib/exercises/pc/forces/electroStaticForce.d.ts.map +1 -1
  229. package/lib/exercises/pc/forces/electroStaticForce.js +73 -58
  230. package/lib/exercises/pc/forces/forceWork.d.ts.map +1 -1
  231. package/lib/exercises/pc/forces/forceWork.js +22 -7
  232. package/lib/exercises/pc/math/proportionnalityCoeffFromLine.d.ts.map +1 -1
  233. package/lib/exercises/pc/math/proportionnalityCoeffFromLine.js +0 -2
  234. package/lib/index.d.ts +17 -4
  235. package/lib/index.d.ts.map +1 -1
  236. package/package.json +1 -1
@@ -1,22 +1,38 @@
1
1
  import { addValidProp, tryToAddWrongProp, } from "../../../../../exercises/exercise.js";
2
2
  import { getDistinctQuestions } from "../../../../../exercises/utils/getDistinctQuestions.js";
3
- import { TrinomConstructor } from "../../../../../math/polynomials/trinom.js";
3
+ import { Trinom, TrinomConstructor } from "../../../../../math/polynomials/trinom.js";
4
4
  import { randint } from "../../../../../math/utils/random/randint.js";
5
5
  import { shuffle } from "../../../../../utils/alea/shuffle.js";
6
- const getDeltaTrinomQuestion = () => {
7
- const trinom = TrinomConstructor.random();
6
+ const getInstruction = (identifiers) => {
7
+ const trinom = new Trinom(identifiers.a, identifiers.b, identifiers.c);
8
+ return `Soit $f$ la fonction polynôme du second degré définie par
9
+
10
+ $$
11
+ f(x) = ${trinom.toTree().toTex()}
12
+ $$
13
+
14
+ Calculer le discriminant $\\Delta$ de $f$.`;
15
+ };
16
+ const getAnswer = (identifiers) => {
17
+ const trinom = new Trinom(identifiers.a, identifiers.b, identifiers.c);
8
18
  const answer = trinom.getDelta() + "";
19
+ return answer;
20
+ };
21
+ const getQuestionFromIdentifiers = (identifiers) => {
9
22
  const question = {
10
- answer: answer,
11
- instruction: `Soit $f(x) = ${trinom
12
- .toTree()
13
- .toTex()}$. Calculer le discriminant $\\Delta$.`,
23
+ answer: getAnswer(identifiers),
24
+ instruction: getInstruction(identifiers),
14
25
  keys: [],
15
26
  answerFormat: "tex",
16
- identifiers: { a: trinom.a, b: trinom.b, c: trinom.c },
27
+ identifiers,
17
28
  };
18
29
  return question;
19
30
  };
31
+ const getDeltaTrinomQuestion = () => {
32
+ const trinom = TrinomConstructor.random();
33
+ const identifiers = { a: trinom.a, b: trinom.b, c: trinom.c };
34
+ return getQuestionFromIdentifiers(identifiers);
35
+ };
20
36
  const getPropositions = (n, { answer, a, b, c }) => {
21
37
  const propositions = [];
22
38
  addValidProp(propositions, answer);
@@ -39,12 +55,11 @@ export const deltaTrinom = {
39
55
  connector: "=",
40
56
  getPropositions,
41
57
  label: "Calculer le discriminant d'un trinôme",
42
- levels: ["1reSpé", "TermSpé", "MathComp"],
43
58
  isSingleStep: true,
44
- sections: ["Second degré"],
45
59
  generator: (nb) => getDistinctQuestions(getDeltaTrinomQuestion, nb),
46
60
  qcmTimer: 60,
47
61
  freeTimer: 60,
48
62
  isAnswerValid,
49
63
  subject: "Mathématiques",
64
+ getQuestionFromIdentifiers,
50
65
  };
@@ -1 +1 @@
1
- {"version":3,"file":"solveSecondDegreeEquationByFactorisation.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/trinoms/equation/solveSecondDegreeEquationByFactorisation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,6BAA6B,CAAC;AAarC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAiHF,eAAO,MAAM,wCAAwC,EAAE,QAAQ,CAAC,WAAW,CAiB1E,CAAC"}
1
+ {"version":3,"file":"solveSecondDegreeEquationByFactorisation.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/trinoms/equation/solveSecondDegreeEquationByFactorisation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAarC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAuHF,eAAO,MAAM,wCAAwC,EAAE,QAAQ,CAAC,WAAW,CAgB1E,CAAC"}
@@ -74,6 +74,9 @@ const getSolveSecondDegreeEquationByFactorisationQuestion = () => {
74
74
  a = randint(-9, 10, [0]);
75
75
  b = randint([2, 4].includes(type) ? 1 : -9, 10, [0]);
76
76
  const identifiers = { a, b, type };
77
+ return getQuestionFromIdentifiers(identifiers);
78
+ };
79
+ const getQuestionFromIdentifiers = (identifiers) => {
77
80
  const question = {
78
81
  answer: getAnswer(identifiers),
79
82
  instruction: getInstruction(identifiers),
@@ -118,6 +121,5 @@ export const solveSecondDegreeEquationByFactorisation = {
118
121
  getPropositions,
119
122
  isAnswerValid,
120
123
  subject: "Mathématiques",
121
- getAnswer,
122
- getInstruction,
124
+ getQuestionFromIdentifiers,
123
125
  };
@@ -1 +1 @@
1
- {"version":3,"file":"solveSecondDegreeEquationFromCano.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/trinoms/equation/solveSecondDegreeEquationFromCano.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAUrC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB,CAAC;AAmEF,eAAO,MAAM,iCAAiC,EAAE,QAAQ,CAAC,WAAW,CAcnE,CAAC"}
1
+ {"version":3,"file":"solveSecondDegreeEquationFromCano.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/trinoms/equation/solveSecondDegreeEquationFromCano.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAUrC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB,CAAC;AAyEF,eAAO,MAAM,iCAAiC,EAAE,QAAQ,CAAC,WAAW,CAanE,CAAC"}
@@ -27,6 +27,9 @@ const getAnswer = (identifiers) => {
27
27
  const getSolveSecondDegreeEquationFromCanoQuestion = () => {
28
28
  const trinom = TrinomConstructor.randomNiceRootsAndSummit();
29
29
  const identifiers = { coeffs: trinom.coefficients };
30
+ return getQuestionFromIdentifiers(identifiers);
31
+ };
32
+ const getQuestionFromIdentifiers = (identifiers) => {
30
33
  const question = {
31
34
  answer: getAnswer(identifiers),
32
35
  instruction: getInstruction(identifiers),
@@ -64,6 +67,5 @@ export const solveSecondDegreeEquationFromCano = {
64
67
  getPropositions,
65
68
  isAnswerValid,
66
69
  subject: "Mathématiques",
67
- getInstruction,
68
- getAnswer,
70
+ getQuestionFromIdentifiers,
69
71
  };
@@ -1 +1 @@
1
- {"version":3,"file":"factorizedFormFromRoots.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/trinoms/factoForm/factorizedFormFromRoots.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAerC,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAuJF,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,WAAW,CAiBzD,CAAC"}
1
+ {"version":3,"file":"factorizedFormFromRoots.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/trinoms/factoForm/factorizedFormFromRoots.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAerC,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA6JF,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,WAAW,CAczD,CAAC"}
@@ -81,6 +81,9 @@ const getFactorizedFormFromRootsQuestion = () => {
81
81
  ? [firstRoot]
82
82
  : [firstRoot, secondRoot].sort((a, b) => a - b);
83
83
  const identifiers = { a, roots };
84
+ return getQuestionFromIdentifiers(identifiers);
85
+ };
86
+ const getQuestionFromIdentifiers = (identifiers) => {
84
87
  const question = {
85
88
  answer: getAnswer(identifiers),
86
89
  instruction: getInstruction(identifiers),
@@ -136,9 +139,6 @@ export const factorizedFormFromRoots = {
136
139
  getPropositions,
137
140
  isAnswerValid,
138
141
  subject: "Mathématiques",
139
- getInstruction,
140
- getAnswer,
141
- getHint,
142
- getCorrection,
142
+ getQuestionFromIdentifiers,
143
143
  hasHintAndCorrection: true,
144
144
  };
@@ -1 +1 @@
1
- {"version":3,"file":"paraboleExpressionReading.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/trinoms/parabole/paraboleExpressionReading.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAkBT,MAAM,6BAA6B,CAAC;AAgBrC,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,EAAE,EAAE,CAAC;CAIpB,CAAC;AAuSF,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,WAAW,CAmB3D,CAAC"}
1
+ {"version":3,"file":"paraboleExpressionReading.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/trinoms/parabole/paraboleExpressionReading.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAmBT,MAAM,6BAA6B,CAAC;AAgBrC,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,EAAE,EAAE,CAAC;CAIpB,CAAC;AA4SF,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,WAAW,CAe3D,CAAC"}
@@ -252,6 +252,9 @@ const getParaboleExpressionReadingQuestion = (opts) => {
252
252
  type,
253
253
  points,
254
254
  };
255
+ return getQuestionFromIdentifiers(identifiers);
256
+ };
257
+ const getQuestionFromIdentifiers = (identifiers) => {
255
258
  const question = {
256
259
  answer: getAnswer(identifiers),
257
260
  instruction: getInstruction(identifiers),
@@ -275,11 +278,7 @@ export const paraboleExpressionReading = {
275
278
  getPropositions,
276
279
  isAnswerValid,
277
280
  subject: "Mathématiques",
278
- getHint,
279
- getCorrection,
280
- getInstruction,
281
- getAnswer,
282
- getGGBOptions,
281
+ getQuestionFromIdentifiers,
283
282
  hasGeogebra: true,
284
283
  hasHintAndCorrection: true,
285
284
  };
@@ -1 +1 @@
1
- {"version":3,"file":"trinomSymetryAxisFromFacto.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/trinoms/parabole/trinomSymetryAxisFromFacto.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAarC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAgGF,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,WAAW,CAkB5D,CAAC"}
1
+ {"version":3,"file":"trinomSymetryAxisFromFacto.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/trinoms/parabole/trinomSymetryAxisFromFacto.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAarC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAsGF,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,WAAW,CAe5D,CAAC"}
@@ -82,6 +82,9 @@ const getTrinomSymetryAxisFromFactoQuestion = (ops) => {
82
82
  x1,
83
83
  x2,
84
84
  };
85
+ return getQuestionFromIdentifiers(identifiers);
86
+ };
87
+ const getQuestionFromIdentifiers = (identifiers) => {
85
88
  const question = {
86
89
  answer: getAnswer(identifiers),
87
90
  instruction: getInstruction(identifiers),
@@ -104,9 +107,6 @@ export const trinomSymetryAxisFromFacto = {
104
107
  getPropositions,
105
108
  isAnswerValid,
106
109
  subject: "Mathématiques",
107
- getInstruction,
108
- getHint,
109
- getCorrection,
110
- getAnswer,
110
+ getQuestionFromIdentifiers,
111
111
  hasHintAndCorrection: true,
112
112
  };
@@ -1 +1 @@
1
- {"version":3,"file":"findSecondRoot.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/trinoms/roots/findSecondRoot.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAIrC,OAAO,EAGL,qBAAqB,EACtB,MAAM,4CAA4C,CAAC;AAIpD,OAAO,EAEL,eAAe,EAChB,MAAM,qCAAqC,CAAC;AAO7C,KAAK,WAAW,GAAG;IACjB,iBAAiB,EAAE,qBAAqB,CAAC;IACzC,oBAAoB,EAAE,eAAe,CAAC;CACvC,CAAC;AAiHF,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,WAAW,CAiBhD,CAAC"}
1
+ {"version":3,"file":"findSecondRoot.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/trinoms/roots/findSecondRoot.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAIrC,OAAO,EAGL,qBAAqB,EACtB,MAAM,4CAA4C,CAAC;AAIpD,OAAO,EAEL,eAAe,EAChB,MAAM,qCAAqC,CAAC;AAO7C,KAAK,WAAW,GAAG;IACjB,iBAAiB,EAAE,qBAAqB,CAAC;IACzC,oBAAoB,EAAE,eAAe,CAAC;CACvC,CAAC;AAuHF,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,WAAW,CAchD,CAAC"}
@@ -94,6 +94,9 @@ const getFindSecondRootQuestion = (ops) => {
94
94
  firstRootIdentifiers: firstRoot.toTree().toIdentifiers(),
95
95
  trinomIdentifiers: new TrinomNode(a, b, c).toIdentifiers(),
96
96
  };
97
+ return getQuestionFromIdentifiers(identifiers);
98
+ };
99
+ const getQuestionFromIdentifiers = (identifiers) => {
97
100
  const question = {
98
101
  answer: getAnswer(identifiers),
99
102
  instruction: getInstruction(identifiers),
@@ -116,9 +119,6 @@ export const findSecondRoot = {
116
119
  getPropositions,
117
120
  isAnswerValid,
118
121
  subject: "Mathématiques",
119
- getInstruction,
120
- getHint,
121
- getCorrection,
122
- getAnswer,
122
+ getQuestionFromIdentifiers,
123
123
  hasHintAndCorrection: true,
124
124
  };
@@ -1 +1 @@
1
- {"version":3,"file":"niceRootsFromDevForm.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/trinoms/roots/niceRootsFromDevForm.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,6BAA6B,CAAC;AAUrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA4DF,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,WAAW,CAatD,CAAC"}
1
+ {"version":3,"file":"niceRootsFromDevForm.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/trinoms/roots/niceRootsFromDevForm.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAWT,MAAM,6BAA6B,CAAC;AAUrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAkEF,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,WAAW,CAYtD,CAAC"}
@@ -25,6 +25,9 @@ const getAnswer = (identifiers) => {
25
25
  const getRootsFromDevFormQuestion = () => {
26
26
  const trinom = TrinomConstructor.randomFactorized();
27
27
  const identifiers = { a: trinom.a, b: trinom.b, c: trinom.c };
28
+ return getQuestionFromIdentifiers(identifiers);
29
+ };
30
+ const getQuestionFromIdentifiers = (identifiers) => {
28
31
  const question = {
29
32
  answer: getAnswer(identifiers),
30
33
  instruction: getInstruction(identifiers),
@@ -68,6 +71,5 @@ export const niceRootsFromDevForm = {
68
71
  qcmTimer: 60,
69
72
  freeTimer: 60,
70
73
  subject: "Mathématiques",
71
- getInstruction,
72
- getAnswer,
74
+ getQuestionFromIdentifiers,
73
75
  };
@@ -1 +1 @@
1
- {"version":3,"file":"rootsFromDevForm.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/trinoms/roots/rootsFromDevForm.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,6BAA6B,CAAC;AAUrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAkEF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAclD,CAAC"}
1
+ {"version":3,"file":"rootsFromDevForm.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/trinoms/roots/rootsFromDevForm.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAWT,MAAM,6BAA6B,CAAC;AAUrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAwEF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAalD,CAAC"}
@@ -24,6 +24,9 @@ const getAnswer = (identifiers) => {
24
24
  const getRootsFromDevFormQuestion = () => {
25
25
  const trinom = TrinomConstructor.random();
26
26
  const identifiers = { a: trinom.a, b: trinom.b, c: trinom.c };
27
+ return getQuestionFromIdentifiers(identifiers);
28
+ };
29
+ const getQuestionFromIdentifiers = (identifiers) => {
27
30
  const question = {
28
31
  answer: getAnswer(identifiers),
29
32
  instruction: getInstruction(identifiers),
@@ -73,6 +76,5 @@ export const rootsFromDevForm = {
73
76
  isAnswerValid,
74
77
  subject: "Mathématiques",
75
78
  pdfOptions: { shouldSpreadPropositions: true },
76
- getInstruction,
77
- getAnswer,
79
+ getQuestionFromIdentifiers,
78
80
  };
@@ -1 +1 @@
1
- {"version":3,"file":"rootsFromFactorizedForm.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/trinoms/roots/rootsFromFactorizedForm.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,6BAA6B,CAAC;AAYrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA4GF,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,WAAW,CAczD,CAAC"}
1
+ {"version":3,"file":"rootsFromFactorizedForm.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/trinoms/roots/rootsFromFactorizedForm.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAYrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAkHF,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,WAAW,CAazD,CAAC"}
@@ -37,6 +37,9 @@ const getAnswer = (identifiers) => {
37
37
  const getRootsFromFactorizedFormQuestion = () => {
38
38
  const trinom = TrinomConstructor.randomFactorized();
39
39
  const identifiers = { a: trinom.a, b: trinom.b, c: trinom.c };
40
+ return getQuestionFromIdentifiers(identifiers);
41
+ };
42
+ const getQuestionFromIdentifiers = (identifiers) => {
40
43
  const question = {
41
44
  answer: getAnswer(identifiers),
42
45
  instruction: getInstruction(identifiers),
@@ -91,6 +94,5 @@ export const rootsFromFactorizedForm = {
91
94
  getPropositions,
92
95
  isAnswerValid,
93
96
  subject: "Mathématiques",
94
- getInstruction,
95
- getAnswer,
97
+ getQuestionFromIdentifiers,
96
98
  };
@@ -1 +1 @@
1
- {"version":3,"file":"rootsProduct.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/trinoms/roots/rootsProduct.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAGrC,OAAO,EAGL,qBAAqB,EACtB,MAAM,4CAA4C,CAAC;AAOpD,KAAK,WAAW,GAAG;IACjB,iBAAiB,EAAE,qBAAqB,CAAC;CAC1C,CAAC;AA0GF,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,WAAW,CAiB9C,CAAC"}
1
+ {"version":3,"file":"rootsProduct.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/trinoms/roots/rootsProduct.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAGrC,OAAO,EAGL,qBAAqB,EACtB,MAAM,4CAA4C,CAAC;AAOpD,KAAK,WAAW,GAAG;IACjB,iBAAiB,EAAE,qBAAqB,CAAC;CAC1C,CAAC;AA+GF,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,WAAW,CAc9C,CAAC"}
@@ -79,6 +79,9 @@ const getRootsProductQuestion = (ops) => {
79
79
  const identifiers = {
80
80
  trinomIdentifiers: trinom.toIdentifiers(),
81
81
  };
82
+ return getQuestionFromIdentifiers(identifiers);
83
+ };
84
+ const getQuestionFromIdentifiers = (identifiers) => {
82
85
  const question = {
83
86
  answer: getAnswer(identifiers),
84
87
  instruction: getInstruction(identifiers),
@@ -101,9 +104,6 @@ export const rootsProduct = {
101
104
  getPropositions,
102
105
  isAnswerValid,
103
106
  subject: "Mathématiques",
104
- getInstruction,
105
- getHint,
106
- getCorrection,
107
- getAnswer,
107
+ getQuestionFromIdentifiers,
108
108
  hasHintAndCorrection: true,
109
109
  };
@@ -1 +1 @@
1
- {"version":3,"file":"rootsReading.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/trinoms/roots/rootsReading.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,6BAA6B,CAAC;AAOrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAoEF,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,WAAW,CAc9C,CAAC"}
1
+ {"version":3,"file":"rootsReading.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/trinoms/roots/rootsReading.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAOrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAyEF,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,WAAW,CAY9C,CAAC"}
@@ -30,6 +30,9 @@ const getGGBOptions = (identifiers) => {
30
30
  const getRootsReadingQuestion = () => {
31
31
  const trinom = TrinomConstructor.randomNiceRoots(randint(1, 3));
32
32
  const identifiers = { a: trinom.a, b: trinom.b, c: trinom.c };
33
+ return getQuestionFromIdentifiers(identifiers);
34
+ };
35
+ const getQuestionFromIdentifiers = (identifiers) => {
33
36
  const question = {
34
37
  answer: getAnswer(identifiers),
35
38
  instruction: getInstruction(identifiers),
@@ -73,7 +76,5 @@ export const rootsReading = {
73
76
  isAnswerValid,
74
77
  hasGeogebra: true,
75
78
  subject: "Mathématiques",
76
- getInstruction,
77
- getAnswer,
78
- getGGBOptions,
79
+ getQuestionFromIdentifiers,
79
80
  };
@@ -1 +1 @@
1
- {"version":3,"file":"rootsSum.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/trinoms/roots/rootsSum.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAGrC,OAAO,EAGL,qBAAqB,EACtB,MAAM,4CAA4C,CAAC;AAOpD,KAAK,WAAW,GAAG;IACjB,iBAAiB,EAAE,qBAAqB,CAAC;CAC1C,CAAC;AAoGF,eAAO,MAAM,QAAQ,EAAE,QAAQ,CAAC,WAAW,CAiB1C,CAAC"}
1
+ {"version":3,"file":"rootsSum.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/trinoms/roots/rootsSum.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAGrC,OAAO,EAGL,qBAAqB,EACtB,MAAM,4CAA4C,CAAC;AAOpD,KAAK,WAAW,GAAG;IACjB,iBAAiB,EAAE,qBAAqB,CAAC;CAC1C,CAAC;AA0GF,eAAO,MAAM,QAAQ,EAAE,QAAQ,CAAC,WAAW,CAc1C,CAAC"}
@@ -79,6 +79,9 @@ const getRootsSumQuestion = (ops) => {
79
79
  const identifiers = {
80
80
  trinomIdentifiers: trinom.toIdentifiers(),
81
81
  };
82
+ return getQuestionFromIdentifiers(identifiers);
83
+ };
84
+ const getQuestionFromIdentifiers = (identifiers) => {
82
85
  const question = {
83
86
  answer: getAnswer(identifiers),
84
87
  instruction: getInstruction(identifiers),
@@ -101,9 +104,6 @@ export const rootsSum = {
101
104
  getPropositions,
102
105
  isAnswerValid,
103
106
  subject: "Mathématiques",
104
- getInstruction,
105
- getHint,
106
- getCorrection,
107
- getAnswer,
107
+ getQuestionFromIdentifiers,
108
108
  hasHintAndCorrection: true,
109
109
  };
@@ -1 +1 @@
1
- {"version":3,"file":"trinomSignFromFacto.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/trinoms/sign/trinomSignFromFacto.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAkBrC,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,gBAAgB,EAAE,OAAO,CAAC;CAC3B,CAAC;AAwHF,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,WAAW,CAoBrD,CAAC"}
1
+ {"version":3,"file":"trinomSignFromFacto.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/trinoms/sign/trinomSignFromFacto.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAgBT,MAAM,6BAA6B,CAAC;AAkBrC,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,gBAAgB,EAAE,OAAO,CAAC;CAC3B,CAAC;AA8HF,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,WAAW,CAqBrD,CAAC"}
@@ -90,6 +90,9 @@ const getTrinomSignFromFactoQuestion = () => {
90
90
  isAskingPositive,
91
91
  trinomCoeffs: trinom.getCoeffs(),
92
92
  };
93
+ return getQuestionFromIdentifiers(identifiers);
94
+ };
95
+ const getQuestionFromIdentifiers = (identifiers) => {
93
96
  const question = {
94
97
  answer: getAnswer(identifiers),
95
98
  instruction: getInstruction(identifiers),
@@ -120,4 +123,5 @@ export const trinomSignFromFacto = {
120
123
  pdfOptions: {
121
124
  shouldSpreadPropositions: true,
122
125
  },
126
+ getQuestionFromIdentifiers,
123
127
  };
@@ -1 +1 @@
1
- {"version":3,"file":"trinomSignFromRoots.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/trinoms/sign/trinomSignFromRoots.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAkBrC,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,gBAAgB,EAAE,OAAO,CAAC;CAC3B,CAAC;AAuHF,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,WAAW,CAoBrD,CAAC"}
1
+ {"version":3,"file":"trinomSignFromRoots.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/trinoms/sign/trinomSignFromRoots.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAgBT,MAAM,6BAA6B,CAAC;AAkBrC,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,gBAAgB,EAAE,OAAO,CAAC;CAC3B,CAAC;AA6HF,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,WAAW,CAqBrD,CAAC"}
@@ -89,6 +89,9 @@ const getTrinomSignFromRootsQuestion = () => {
89
89
  isAskingPositive,
90
90
  trinomCoeffs: trinom.getCoeffs(),
91
91
  };
92
+ return getQuestionFromIdentifiers(identifiers);
93
+ };
94
+ const getQuestionFromIdentifiers = (identifiers) => {
92
95
  const question = {
93
96
  answer: getAnswer(identifiers),
94
97
  instruction: getInstruction(identifiers),
@@ -119,4 +122,5 @@ export const trinomSignFromRoots = {
119
122
  pdfOptions: {
120
123
  shouldSpreadPropositions: true,
121
124
  },
125
+ getQuestionFromIdentifiers,
122
126
  };
@@ -1 +1 @@
1
- {"version":3,"file":"alphaBetaFromDevForm.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/trinoms/summitAndCanonical/alphaBetaFromDevForm.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,6BAA6B,CAAC;AAOrC,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB,CAAC;AAqCF,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,WAAW,CActD,CAAC"}
1
+ {"version":3,"file":"alphaBetaFromDevForm.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/trinoms/summitAndCanonical/alphaBetaFromDevForm.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,6BAA6B,CAAC;AAOrC,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB,CAAC;AA8DF,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,WAAW,CAatD,CAAC"}
@@ -4,24 +4,46 @@ import { TrinomConstructor } from "../../../../../math/polynomials/trinom.js";
4
4
  import { randint } from "../../../../../math/utils/random/randint.js";
5
5
  import { coinFlip } from "../../../../../utils/alea/coinFlip.js";
6
6
  import { shuffle } from "../../../../../utils/alea/shuffle.js";
7
- const getAlphaBetaFromDevFormQuestion = () => {
8
- const trinom = TrinomConstructor.randomCanonical();
9
- const param = coinFlip() ? "\\alpha" : "\\beta";
7
+ const getInstruction = (identifiers) => {
8
+ const { param, coeffs } = identifiers;
9
+ const trinom = TrinomConstructor.fromCoeffs(coeffs);
10
+ return `Soit $f$ la fonction polynôme du second degré définie par
11
+
12
+ $$
13
+ f(x) = ${trinom.toTree().toTex()}
14
+ $$
15
+
16
+ Que vaut $${param}$ ?`;
17
+ };
18
+ const getAnswer = (identifiers) => {
19
+ const { param, coeffs } = identifiers;
20
+ const trinom = TrinomConstructor.fromCoeffs(coeffs);
10
21
  const alphaTex = trinom.getAlphaNode().toTex();
11
22
  const betaTex = trinom.getBetaNode().toTex();
12
23
  const answer = param === "\\alpha" ? alphaTex : betaTex;
24
+ return answer;
25
+ };
26
+ const getStartStatement = (identifiers) => {
27
+ const { param } = identifiers;
28
+ return param;
29
+ };
30
+ const getQuestionFromIdentifiers = (identifiers) => {
13
31
  const question = {
14
- answer: answer,
32
+ answer: getAnswer(identifiers),
15
33
  keys: ["x", "alpha", "beta"],
16
- instruction: `Soit $f$ la fonction définie par $f(x) = ${trinom
17
- .toTree()
18
- .toTex()}$. Que vaut $${param}$ ?`,
34
+ instruction: getInstruction(identifiers),
19
35
  answerFormat: "tex",
20
- startStatement: param,
21
- identifiers: { coeffs: trinom.coefficients, param },
36
+ startStatement: getStartStatement(identifiers),
37
+ identifiers,
22
38
  };
23
39
  return question;
24
40
  };
41
+ const getAlphaBetaFromDevFormQuestion = () => {
42
+ const trinom = TrinomConstructor.randomCanonical();
43
+ const param = coinFlip() ? "\\alpha" : "\\beta";
44
+ const identifiers = { coeffs: trinom.coefficients, param };
45
+ return getQuestionFromIdentifiers(identifiers);
46
+ };
25
47
  const getPropositions = (n, { answer }) => {
26
48
  const propositions = [];
27
49
  addValidProp(propositions, answer);
@@ -37,13 +59,12 @@ export const alphaBetaFromDevForm = {
37
59
  id: "alphaBetaFromDevForm",
38
60
  connector: "=",
39
61
  label: "Déterminer $\\alpha$ ou $\\beta$ à partir de la forme développée",
40
- levels: ["1reSpé"],
41
62
  isSingleStep: false,
42
- sections: ["Second degré"],
43
63
  generator: (nb) => getDistinctQuestions(getAlphaBetaFromDevFormQuestion, nb),
44
64
  qcmTimer: 60,
45
65
  freeTimer: 60,
46
66
  getPropositions,
47
67
  isAnswerValid,
48
68
  subject: "Mathématiques",
69
+ getQuestionFromIdentifiers,
49
70
  };
@@ -1 +1 @@
1
- {"version":3,"file":"canonicalFromDevForm.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/trinoms/summitAndCanonical/canonicalFromDevForm.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,6BAA6B,CAAC;AAMrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAyCF,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,WAAW,CActD,CAAC"}
1
+ {"version":3,"file":"canonicalFromDevForm.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/trinoms/summitAndCanonical/canonicalFromDevForm.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;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA4DF,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,WAAW,CAatD,CAAC"}
@@ -2,20 +2,36 @@ import { addValidProp, tryToAddWrongProp, } from "../../../../../exercises/exerc
2
2
  import { getDistinctQuestions } from "../../../../../exercises/utils/getDistinctQuestions.js";
3
3
  import { Trinom, TrinomConstructor } from "../../../../../math/polynomials/trinom.js";
4
4
  import { shuffle } from "../../../../../utils/alea/shuffle.js";
5
- const getCanonicalFromDevFormQuestion = () => {
6
- const trinom = TrinomConstructor.randomCanonical();
5
+ const getInstruction = (identifiers) => {
6
+ const { a, b, c } = identifiers;
7
+ const trinom = new Trinom(a, b, c);
8
+ return `Déterminer la forme canonique de la fonction $f$ définie par
9
+
10
+ $$
11
+ f(x) = ${trinom.toTree().toTex()}
12
+ $$`;
13
+ };
14
+ const getAnswer = (identifiers) => {
15
+ const { a, b, c } = identifiers;
16
+ const trinom = new Trinom(a, b, c);
7
17
  const answer = trinom.getCanonicalForm().toTex();
18
+ return answer;
19
+ };
20
+ const getQuestionFromIdentifiers = (identifiers) => {
8
21
  const question = {
9
- answer,
22
+ answer: getAnswer(identifiers),
10
23
  keys: ["x", "equal", "alpha", "beta"],
11
- instruction: `Déterminer la forme canonique de la fonction $f$ définie par $f(x) = ${trinom
12
- .toTree()
13
- .toTex()}$`,
24
+ instruction: getInstruction(identifiers),
14
25
  answerFormat: "tex",
15
- identifiers: { a: trinom.a, b: trinom.b, c: trinom.c },
26
+ identifiers,
16
27
  };
17
28
  return question;
18
29
  };
30
+ const getCanonicalFromDevFormQuestion = () => {
31
+ const trinom = TrinomConstructor.randomCanonical();
32
+ const identifiers = { a: trinom.a, b: trinom.b, c: trinom.c };
33
+ return getQuestionFromIdentifiers(identifiers);
34
+ };
19
35
  const getPropositions = (n, { answer, a }) => {
20
36
  const propositions = [];
21
37
  addValidProp(propositions, answer);
@@ -36,13 +52,12 @@ export const canonicalFromDevForm = {
36
52
  id: "canonicalFromDevForm",
37
53
  connector: "\\iff",
38
54
  label: "Déterminer la forme canonique à partir de la forme développée",
39
- levels: ["1reSpé"],
40
55
  isSingleStep: false,
41
- sections: ["Second degré"],
42
56
  generator: (nb) => getDistinctQuestions(getCanonicalFromDevFormQuestion, nb),
43
57
  qcmTimer: 60,
44
58
  freeTimer: 60,
45
59
  getPropositions,
46
60
  isAnswerValid,
47
61
  subject: "Mathématiques",
62
+ getQuestionFromIdentifiers,
48
63
  };
@@ -1 +1 @@
1
- {"version":3,"file":"extremumFromCanonicalForm.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/trinoms/summitAndCanonical/extremumFromCanonicalForm.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,6BAA6B,CAAC;AAMrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAiDF,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,WAAW,CAe3D,CAAC"}
1
+ {"version":3,"file":"extremumFromCanonicalForm.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/trinoms/summitAndCanonical/extremumFromCanonicalForm.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;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAqEF,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,WAAW,CAc3D,CAAC"}
@@ -4,20 +4,36 @@ import { Trinom, TrinomConstructor } from "../../../../../math/polynomials/trino
4
4
  import { randint } from "../../../../../math/utils/random/randint.js";
5
5
  import { PointNode } from "../../../../../tree/nodes/geometry/pointNode.js";
6
6
  import { shuffle } from "../../../../../utils/alea/shuffle.js";
7
- const getExtremumFromCanonicalFormQuestion = () => {
8
- const trinom = TrinomConstructor.randomCanonical();
7
+ const getInstruction = (identifiers) => {
8
+ const trinom = new Trinom(identifiers.a, identifiers.b, identifiers.c);
9
+ return `Soit $f$ la fonction définie par
10
+
11
+ $$
12
+ f(x) = ${trinom.getCanonicalForm().toTex()}
13
+ $$
14
+
15
+ Quelles sont les coordonnées du sommet $S$ de la parabole représentative de $f$ ?`;
16
+ };
17
+ const getAnswer = (identifiers) => {
18
+ const trinom = new Trinom(identifiers.a, identifiers.b, identifiers.c);
9
19
  const answer = trinom.getSommet().toTexWithCoords();
20
+ return answer;
21
+ };
22
+ const getQuestionFromIdentifiers = (identifiers) => {
10
23
  const question = {
11
- answer: answer,
12
- instruction: `Soit $f$ la fonction définie par $${trinom
13
- .getCanonicalForm()
14
- .toTex()}$. Quelles sont les coordonnées du sommet $S$ de la parabole représentative de $f$ ?`,
24
+ answer: getAnswer(identifiers),
25
+ instruction: getInstruction(identifiers),
15
26
  keys: ["S", "semicolon"],
16
27
  answerFormat: "tex",
17
- identifiers: { a: trinom.a, b: trinom.b, c: trinom.c },
28
+ identifiers,
18
29
  };
19
30
  return question;
20
31
  };
32
+ const getExtremumFromCanonicalFormQuestion = () => {
33
+ const trinom = TrinomConstructor.randomCanonical();
34
+ const identifiers = { a: trinom.a, b: trinom.b, c: trinom.c };
35
+ return getQuestionFromIdentifiers(identifiers);
36
+ };
21
37
  const getPropositions = (n, { answer, a, b, c }) => {
22
38
  const propositions = [];
23
39
  addValidProp(propositions, answer);
@@ -43,13 +59,12 @@ export const extremumFromCanonicalForm = {
43
59
  id: "extremumFromCanonicalForm",
44
60
  connector: "=",
45
61
  label: "Déterminer les coordonnées du sommet d'une parabole à partir de la forme canonique",
46
- levels: ["1reSpé"],
47
62
  isSingleStep: true,
48
- sections: ["Second degré"],
49
63
  generator: (nb) => getDistinctQuestions(getExtremumFromCanonicalFormQuestion, nb),
50
64
  qcmTimer: 60,
51
65
  freeTimer: 60,
52
66
  getPropositions,
53
67
  isAnswerValid,
54
68
  subject: "Mathématiques",
69
+ getQuestionFromIdentifiers,
55
70
  };
@@ -3,6 +3,7 @@ type Identifiers = {
3
3
  a: number;
4
4
  b: number;
5
5
  c: number;
6
+ isDevForm: boolean;
6
7
  };
7
8
  export declare const extremumTypeFromAlgebricForm: Exercise<Identifiers>;
8
9
  export {};