math-exercises 2.2.4 → 2.2.6

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 (235) hide show
  1. package/lib/exercises/exercise.d.ts +1 -1
  2. package/lib/exercises/exercise.d.ts.map +1 -1
  3. package/lib/exercises/math/calcul/digitDecimalRank.js +4 -4
  4. package/lib/exercises/math/calcul/digitDecimalRankNumber.d.ts +8 -0
  5. package/lib/exercises/math/calcul/digitDecimalRankNumber.d.ts.map +1 -0
  6. package/lib/exercises/math/calcul/digitDecimalRankNumber.js +60 -0
  7. package/lib/exercises/math/calcul/digitRank.js +4 -4
  8. package/lib/exercises/math/calcul/digitRankNumber.d.ts +8 -0
  9. package/lib/exercises/math/calcul/digitRankNumber.d.ts.map +1 -0
  10. package/lib/exercises/math/calcul/digitRankNumber.js +56 -0
  11. package/lib/exercises/math/calcul/fractions/fractionAndIntegerDivision.d.ts.map +1 -1
  12. package/lib/exercises/math/calcul/fractions/fractionAndIntegerDivision.js +34 -0
  13. package/lib/exercises/math/calcul/fractions/fractionAndIntegerProduct.d.ts.map +1 -1
  14. package/lib/exercises/math/calcul/fractions/fractionAndIntegerProduct.js +17 -0
  15. package/lib/exercises/math/calcul/fractions/fractionsDivision.d.ts.map +1 -1
  16. package/lib/exercises/math/calcul/fractions/fractionsDivision.js +23 -0
  17. package/lib/exercises/math/calcul/fractions/fractionsProduct.d.ts.map +1 -1
  18. package/lib/exercises/math/calcul/fractions/fractionsProduct.js +15 -0
  19. package/lib/exercises/math/calcul/index.d.ts +2 -0
  20. package/lib/exercises/math/calcul/index.d.ts.map +1 -1
  21. package/lib/exercises/math/calcul/index.js +2 -0
  22. package/lib/exercises/math/calcul/proportionality/scaleUsage.js +1 -1
  23. package/lib/exercises/math/calcul/rounding/rounding.d.ts.map +1 -1
  24. package/lib/exercises/math/calcul/rounding/rounding.js +18 -0
  25. package/lib/exercises/math/calculLitteral/distributivity/allIdentities.d.ts.map +1 -1
  26. package/lib/exercises/math/calculLitteral/distributivity/allIdentities.js +1 -0
  27. package/lib/exercises/math/calculLitteral/distributivity/canonicalFormDevelopment.d.ts.map +1 -1
  28. package/lib/exercises/math/calculLitteral/distributivity/canonicalFormDevelopment.js +1 -0
  29. package/lib/exercises/math/calculLitteral/distributivity/doubleDistributivity.d.ts.map +1 -1
  30. package/lib/exercises/math/calculLitteral/distributivity/doubleDistributivity.js +31 -1
  31. package/lib/exercises/math/calculLitteral/distributivity/doubleDistributivityWithCoeff.d.ts.map +1 -1
  32. package/lib/exercises/math/calculLitteral/distributivity/doubleDistributivityWithCoeff.js +11 -2
  33. package/lib/exercises/math/calculLitteral/distributivity/firstIdentity.d.ts.map +1 -1
  34. package/lib/exercises/math/calculLitteral/distributivity/firstIdentity.js +21 -2
  35. package/lib/exercises/math/calculLitteral/distributivity/secondIdentity.d.ts.map +1 -1
  36. package/lib/exercises/math/calculLitteral/distributivity/secondIdentity.js +23 -2
  37. package/lib/exercises/math/calculLitteral/distributivity/simpleDistributivity.d.ts.map +1 -1
  38. package/lib/exercises/math/calculLitteral/distributivity/simpleDistributivity.js +17 -2
  39. package/lib/exercises/math/calculLitteral/distributivity/thirdIdentity.d.ts.map +1 -1
  40. package/lib/exercises/math/calculLitteral/distributivity/thirdIdentity.js +21 -2
  41. package/lib/exercises/math/calculLitteral/equation/equationSimpleSquare.d.ts.map +1 -1
  42. package/lib/exercises/math/calculLitteral/equation/equationSimpleSquare.js +26 -1
  43. package/lib/exercises/math/calculLitteral/equation/equationType1Exercise.d.ts.map +1 -1
  44. package/lib/exercises/math/calculLitteral/equation/equationType1Exercise.js +18 -2
  45. package/lib/exercises/math/calculLitteral/equation/equationType2Exercise.d.ts.map +1 -1
  46. package/lib/exercises/math/calculLitteral/equation/equationType2Exercise.js +19 -2
  47. package/lib/exercises/math/calculLitteral/equation/equationType3Exercise.d.ts.map +1 -1
  48. package/lib/exercises/math/calculLitteral/equation/equationType3Exercise.js +15 -2
  49. package/lib/exercises/math/calculLitteral/equation/equationType4Exercise.d.ts.map +1 -1
  50. package/lib/exercises/math/calculLitteral/equation/equationType4Exercise.js +20 -5
  51. package/lib/exercises/math/calculLitteral/equation/firstDegreeEquation.d.ts.map +1 -1
  52. package/lib/exercises/math/calculLitteral/equation/firstDegreeEquation.js +24 -1
  53. package/lib/exercises/math/calculLitteral/equation/firstDegreeEquationIntType1.d.ts.map +1 -1
  54. package/lib/exercises/math/calculLitteral/equation/firstDegreeEquationIntType1.js +20 -1
  55. package/lib/exercises/math/calculLitteral/equation/firstDegreeEquationIntType2.d.ts.map +1 -1
  56. package/lib/exercises/math/calculLitteral/equation/firstDegreeEquationIntType2.js +19 -3
  57. package/lib/exercises/math/calculLitteral/equation/fractionEquation.d.ts.map +1 -1
  58. package/lib/exercises/math/calculLitteral/equation/fractionEquation.js +24 -8
  59. package/lib/exercises/math/calculLitteral/equation/multiplicationEquation.d.ts.map +1 -1
  60. package/lib/exercises/math/calculLitteral/equation/multiplicationEquation.js +21 -2
  61. package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq1.d.ts.map +1 -1
  62. package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq1.js +24 -4
  63. package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq2.d.ts.map +1 -1
  64. package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq2.js +25 -5
  65. package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq3.d.ts.map +1 -1
  66. package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq3.js +19 -0
  67. package/lib/exercises/math/calculLitteral/factorisation/factoType1Exercise.d.ts.map +1 -1
  68. package/lib/exercises/math/calculLitteral/factorisation/factoType1Exercise.js +1 -0
  69. package/lib/exercises/math/calculLitteral/factorisation/factorizeCanonicalForm.d.ts +8 -0
  70. package/lib/exercises/math/calculLitteral/factorisation/factorizeCanonicalForm.d.ts.map +1 -0
  71. package/lib/exercises/math/calculLitteral/factorisation/factorizeCanonicalForm.js +77 -0
  72. package/lib/exercises/math/calculLitteral/factorisation/factorizeCanonicalFormWithSqrt.d.ts +8 -0
  73. package/lib/exercises/math/calculLitteral/factorisation/factorizeCanonicalFormWithSqrt.d.ts.map +1 -0
  74. package/lib/exercises/math/calculLitteral/factorisation/factorizeCanonicalFormWithSqrt.js +80 -0
  75. package/lib/exercises/math/calculLitteral/factorisation/index.d.ts +2 -0
  76. package/lib/exercises/math/calculLitteral/factorisation/index.d.ts.map +1 -1
  77. package/lib/exercises/math/calculLitteral/factorisation/index.js +2 -0
  78. package/lib/exercises/math/equaDiff/equaDiffGeneralForme.d.ts.map +1 -1
  79. package/lib/exercises/math/equaDiff/equaDiffGeneralForme.js +1 -0
  80. package/lib/exercises/math/functions/basics/inverseImageFunctionTable.d.ts +2 -0
  81. package/lib/exercises/math/functions/basics/inverseImageFunctionTable.d.ts.map +1 -1
  82. package/lib/exercises/math/functions/basics/inverseImageFunctionTable.js +46 -66
  83. package/lib/exercises/math/functions/logarithm/log10PowerSimplifying.d.ts.map +1 -1
  84. package/lib/exercises/math/functions/logarithm/log10PowerSimplifying.js +12 -2
  85. package/lib/exercises/math/functions/trinoms/index.d.ts +2 -0
  86. package/lib/exercises/math/functions/trinoms/index.d.ts.map +1 -1
  87. package/lib/exercises/math/functions/trinoms/index.js +2 -0
  88. package/lib/exercises/math/functions/trinoms/solveEquationByFactorisation.d.ts +5 -0
  89. package/lib/exercises/math/functions/trinoms/solveEquationByFactorisation.d.ts.map +1 -0
  90. package/lib/exercises/math/functions/trinoms/solveEquationByFactorisation.js +44 -0
  91. package/lib/exercises/math/functions/trinoms/solveSecondDegreeEquationByFactorisation.d.ts +9 -0
  92. package/lib/exercises/math/functions/trinoms/solveSecondDegreeEquationByFactorisation.d.ts.map +1 -0
  93. package/lib/exercises/math/functions/trinoms/solveSecondDegreeEquationByFactorisation.js +134 -0
  94. package/lib/exercises/math/functions/trinoms/solveSecondDegreeEquationFromCano.d.ts +7 -0
  95. package/lib/exercises/math/functions/trinoms/solveSecondDegreeEquationFromCano.d.ts.map +1 -0
  96. package/lib/exercises/math/functions/trinoms/solveSecondDegreeEquationFromCano.js +59 -0
  97. package/lib/exercises/math/geometry/vectors/scalarProductViaCoords.d.ts.map +1 -1
  98. package/lib/exercises/math/geometry/vectors/scalarProductViaCoords.js +1 -0
  99. package/lib/exercises/math/index.d.ts +1 -0
  100. package/lib/exercises/math/index.d.ts.map +1 -1
  101. package/lib/exercises/math/index.js +1 -0
  102. package/lib/exercises/math/percent/applyPercent.d.ts.map +1 -1
  103. package/lib/exercises/math/percent/applyPercent.js +20 -2
  104. package/lib/exercises/math/probaStat/probaFromTableNoContext.d.ts.map +1 -1
  105. package/lib/exercises/math/probaStat/probaFromTableNoContext.js +5 -4
  106. package/lib/exercises/math/sequences/arithmetic/arithmeticFindRandomTermFromTwoTerms.d.ts +11 -0
  107. package/lib/exercises/math/sequences/arithmetic/arithmeticFindRandomTermFromTwoTerms.d.ts.map +1 -0
  108. package/lib/exercises/math/sequences/arithmetic/arithmeticFindRandomTermFromTwoTerms.js +49 -0
  109. package/lib/exercises/math/sequences/arithmetic/index.d.ts +1 -0
  110. package/lib/exercises/math/sequences/arithmetic/index.d.ts.map +1 -1
  111. package/lib/exercises/math/sequences/arithmetic/index.js +1 -0
  112. package/lib/exercises/math/spaceGeometry/index.d.ts +2 -0
  113. package/lib/exercises/math/spaceGeometry/index.d.ts.map +1 -0
  114. package/lib/exercises/math/spaceGeometry/index.js +17 -0
  115. package/lib/exercises/math/spaceGeometry/vectors/index.d.ts +4 -0
  116. package/lib/exercises/math/spaceGeometry/vectors/index.d.ts.map +1 -0
  117. package/lib/exercises/math/spaceGeometry/vectors/index.js +19 -0
  118. package/lib/exercises/math/spaceGeometry/vectors/spaceVectorCoordinatesFromPoints.d.ts +5 -0
  119. package/lib/exercises/math/spaceGeometry/vectors/spaceVectorCoordinatesFromPoints.d.ts.map +1 -0
  120. package/lib/exercises/math/spaceGeometry/vectors/spaceVectorCoordinatesFromPoints.js +52 -0
  121. package/lib/exercises/math/spaceGeometry/vectors/spaceVectorLinearCombinationCoords.d.ts +5 -0
  122. package/lib/exercises/math/spaceGeometry/vectors/spaceVectorLinearCombinationCoords.d.ts.map +1 -0
  123. package/lib/exercises/math/spaceGeometry/vectors/spaceVectorLinearCombinationCoords.js +62 -0
  124. package/lib/exercises/math/spaceGeometry/vectors/spaceVectorNormCalculation.d.ts +9 -0
  125. package/lib/exercises/math/spaceGeometry/vectors/spaceVectorNormCalculation.d.ts.map +1 -0
  126. package/lib/exercises/math/spaceGeometry/vectors/spaceVectorNormCalculation.js +54 -0
  127. package/lib/exercises/math/squareRoots/squareRootIdentities.js +3 -3
  128. package/lib/exercises/math/suites/sequencePlot.d.ts.map +1 -1
  129. package/lib/exercises/math/suites/sequencePlot.js +1 -2
  130. package/lib/exercises/math/trigonometry/trigonometrySideCalcul.d.ts.map +1 -1
  131. package/lib/exercises/math/trigonometry/trigonometrySideCalcul.js +1 -0
  132. package/lib/exercises/pc/calibrationCurveOfSolution.d.ts.map +1 -1
  133. package/lib/exercises/pc/calibrationCurveOfSolution.js +1 -0
  134. package/lib/exercises/pc/chemicalElements/findAtomicStructureElement.d.ts.map +1 -1
  135. package/lib/exercises/pc/chemicalElements/findAtomicStructureElement.js +1 -0
  136. package/lib/exercises/pc/chemicalElements/massOrVolumeProportion.d.ts.map +1 -1
  137. package/lib/exercises/pc/chemicalElements/massOrVolumeProportion.js +1 -0
  138. package/lib/exercises/pc/chemicalReactions/calculateSynthesisEfficiency.d.ts.map +1 -1
  139. package/lib/exercises/pc/chemicalReactions/calculateSynthesisEfficiency.js +1 -0
  140. package/lib/exercises/pc/chemicalReactions/titrationEquivalenceRelation.d.ts.map +1 -1
  141. package/lib/exercises/pc/chemicalReactions/titrationEquivalenceRelation.js +1 -0
  142. package/lib/exercises/pc/dosage/beerLambertRandomValue.d.ts.map +1 -1
  143. package/lib/exercises/pc/dosage/beerLambertRandomValue.js +1 -0
  144. package/lib/exercises/pc/dosage/concentrationCalculation.d.ts.map +1 -1
  145. package/lib/exercises/pc/dosage/concentrationCalculation.js +1 -0
  146. package/lib/exercises/pc/dosage/concentrationFromMassCalculation.d.ts.map +1 -1
  147. package/lib/exercises/pc/dosage/concentrationFromMassCalculation.js +1 -0
  148. package/lib/exercises/pc/electricity/calculateIntensity.js +1 -1
  149. package/lib/exercises/pc/electricity/calculateVoltage.d.ts.map +1 -1
  150. package/lib/exercises/pc/electricity/calculateVoltage.js +1 -0
  151. package/lib/exercises/pc/electricity/electricPowerOrEnergyCalculation.d.ts.map +1 -1
  152. package/lib/exercises/pc/electricity/electricPowerOrEnergyCalculation.js +1 -0
  153. package/lib/exercises/pc/electricity/ohmLaw.d.ts.map +1 -1
  154. package/lib/exercises/pc/electricity/ohmLaw.js +1 -0
  155. package/lib/exercises/pc/electricity/ohmicConductorOrGenerator.d.ts.map +1 -1
  156. package/lib/exercises/pc/electricity/ohmicConductorOrGenerator.js +1 -0
  157. package/lib/exercises/pc/energy/calorificValue.d.ts.map +1 -1
  158. package/lib/exercises/pc/energy/calorificValue.js +1 -0
  159. package/lib/exercises/pc/energy/combustionTransferEnergy.d.ts.map +1 -1
  160. package/lib/exercises/pc/energy/combustionTransferEnergy.js +1 -0
  161. package/lib/exercises/pc/energy/combustionTransferEnergy2.d.ts.map +1 -1
  162. package/lib/exercises/pc/energy/combustionTransferEnergy2.js +1 -0
  163. package/lib/exercises/pc/energy/efficencyOfConverter.d.ts.map +1 -1
  164. package/lib/exercises/pc/energy/efficencyOfConverter.js +1 -0
  165. package/lib/exercises/pc/energy/efficiencyCalculation.d.ts.map +1 -1
  166. package/lib/exercises/pc/energy/efficiencyCalculation.js +1 -0
  167. package/lib/exercises/pc/energy/kineticEnergyOrMassOrSpeed.d.ts.map +1 -1
  168. package/lib/exercises/pc/energy/kineticEnergyOrMassOrSpeed.js +1 -0
  169. package/lib/exercises/pc/energy/thermalEnergyTransferCalculation.d.ts.map +1 -1
  170. package/lib/exercises/pc/energy/thermalEnergyTransferCalculation.js +1 -0
  171. package/lib/exercises/pc/forces/calculateNormalOrFrictionForce.d.ts.map +1 -1
  172. package/lib/exercises/pc/forces/calculateNormalOrFrictionForce.js +1 -0
  173. package/lib/exercises/pc/forces/electroStaticForce.d.ts.map +1 -1
  174. package/lib/exercises/pc/forces/electroStaticForce.js +1 -0
  175. package/lib/exercises/pc/forces/gravitationalAttractionObjectHeight.d.ts.map +1 -1
  176. package/lib/exercises/pc/forces/gravitationalAttractionObjectHeight.js +1 -0
  177. package/lib/exercises/pc/forces/gravitationalForcePlanets.d.ts.map +1 -1
  178. package/lib/exercises/pc/forces/gravitationalForcePlanets.js +1 -0
  179. package/lib/exercises/pc/forces/massWeight.d.ts.map +1 -1
  180. package/lib/exercises/pc/forces/massWeight.js +1 -0
  181. package/lib/exercises/pc/motion/averageSpeed.d.ts.map +1 -1
  182. package/lib/exercises/pc/motion/averageSpeed.js +1 -0
  183. package/lib/exercises/pc/motion/averageSpeedCalculation.d.ts.map +1 -1
  184. package/lib/exercises/pc/motion/averageSpeedCalculation.js +1 -0
  185. package/lib/exercises/pc/motion/motionReference.d.ts.map +1 -1
  186. package/lib/exercises/pc/motion/motionReference.js +1 -0
  187. package/lib/exercises/pc/pH.d.ts.map +1 -1
  188. package/lib/exercises/pc/pH.js +1 -0
  189. package/lib/exercises/pc/power/calculatePowerOfLight.d.ts.map +1 -1
  190. package/lib/exercises/pc/power/calculatePowerOfLight.js +1 -0
  191. package/lib/exercises/pc/spectral/spectralEnergy.d.ts.map +1 -1
  192. package/lib/exercises/pc/spectral/spectralEnergy.js +1 -0
  193. package/lib/exercises/pc/waves/lightDistanceConversion.d.ts.map +1 -1
  194. package/lib/exercises/pc/waves/lightDistanceConversion.js +1 -0
  195. package/lib/exercises/pc/waves/periodicWaveCelerity.d.ts.map +1 -1
  196. package/lib/exercises/pc/waves/periodicWaveCelerity.js +1 -0
  197. package/lib/exercises/pc/weight/calculateWeight.d.ts.map +1 -1
  198. package/lib/exercises/pc/weight/calculateWeight.js +1 -0
  199. package/lib/exercises/pc/weight/weightOnTheMoon.d.ts.map +1 -1
  200. package/lib/exercises/pc/weight/weightOnTheMoon.js +1 -0
  201. package/lib/index.d.ts +33 -64
  202. package/lib/index.d.ts.map +1 -1
  203. package/lib/index.js +4 -0
  204. package/lib/math/geometry/spacePoint.d.ts +27 -0
  205. package/lib/math/geometry/spacePoint.d.ts.map +1 -0
  206. package/lib/math/geometry/spacePoint.js +80 -0
  207. package/lib/math/geometry/spaceVector.d.ts +28 -0
  208. package/lib/math/geometry/spaceVector.d.ts.map +1 -0
  209. package/lib/math/geometry/spaceVector.js +83 -0
  210. package/lib/math/numbers/decimals/decimal.d.ts +1 -0
  211. package/lib/math/numbers/decimals/decimal.d.ts.map +1 -1
  212. package/lib/math/numbers/decimals/decimal.js +8 -0
  213. package/lib/math/numbers/rationals/rational.d.ts +1 -0
  214. package/lib/math/numbers/rationals/rational.d.ts.map +1 -1
  215. package/lib/math/numbers/rationals/rational.js +4 -0
  216. package/lib/math/utils/random/randTupleInt.d.ts +1 -0
  217. package/lib/math/utils/random/randTupleInt.d.ts.map +1 -1
  218. package/lib/math/utils/random/randTupleInt.js +5 -1
  219. package/lib/playground.d.ts +2 -0
  220. package/lib/playground.d.ts.map +1 -0
  221. package/lib/playground.js +20 -0
  222. package/lib/server.d.ts +3 -0
  223. package/lib/server.d.ts.map +1 -1
  224. package/lib/server.js +7 -0
  225. package/lib/tree/nodes/equations/equationSolutionNode.d.ts.map +1 -1
  226. package/lib/tree/nodes/equations/equationSolutionNode.js +8 -0
  227. package/lib/tree/nodes/node.d.ts +1 -0
  228. package/lib/tree/nodes/node.d.ts.map +1 -1
  229. package/lib/tree/nodes/operators/multiplyNode.d.ts.map +1 -1
  230. package/lib/tree/nodes/operators/multiplyNode.js +8 -2
  231. package/lib/tree/nodes/operators/powerNode.js +1 -1
  232. package/lib/utils/alignTex.d.ts +2 -0
  233. package/lib/utils/alignTex.d.ts.map +1 -0
  234. package/lib/utils/alignTex.js +18 -0
  235. package/package.json +1 -1
@@ -83,8 +83,8 @@ export interface Exercise<TIdentifiers = {}> {
83
83
  isAnswerValid?: VEA<TIdentifiers>;
84
84
  isGGBAnswerValid?: GGBVEA<TIdentifiers>;
85
85
  hasGeogebra?: boolean;
86
- hasHintAndCorrection?: boolean;
87
86
  subject: "Mathématiques" | "Chimie" | "Physique";
87
+ hasHintAndCorrection?: boolean;
88
88
  }
89
89
  export type MathLevel = "6ème" | "5ème" | "4ème" | "3ème" | "2nde" | "1reTech" | "1reESM" | "1reSpé" | "TermSpé" | "TermTech" | "MathExp" | "MathComp" | "CAP" | "2ndPro" | "1rePro" | "TermPro";
90
90
  export type MathSection = "Aires" | "Arithmétique" | "Calcul littéral" | "Calculs" | "Combinatoire et dénombrement" | "Conversions" | "Dérivation" | "Droites" | "Ensembles et intervalles" | "Équations" | "Équations différentielles" | "Exponentielle" | "Fonction cube" | "Fonction inverse" | "Fonctions" | "Fonctions affines" | "Fonctions de référence" | "Fractions" | "Géométrie cartésienne" | "Géométrie euclidienne" | "Inéquations" | "Intégration" | "Limites" | "Logarithme népérien" | "Logarithme décimal" | "Matrices" | "Nombres complexes" | "Périmètres" | "Pourcentages" | "Primitives" | "Probabilités" | "Produit scalaire" | "Proportionnalité" | "Python" | "Puissances" | "Python" | "Racines carrées" | "Second degré" | "Statistiques" | "Suites" | "Systèmes" | "Théorème de Pythagore" | "Théorème de Thalès" | "Trigonométrie" | "Valeur absolue" | "Vecteurs";
@@ -1 +1 @@
1
- {"version":3,"file":"exercise.d.ts","sourceRoot":"","sources":["../../src/exercises/exercise.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAI3C,eAAO,MAAM,YAAY,UAChB,WAAW,EAAE,aACT,MAAM,WACT,KAAK,GAAG,KAAK,SAQtB,CAAC;AACF,eAAO,MAAM,YAAY,UAChB,WAAW,EAAE,aACT,MAAM,WACT,KAAK,GAAG,KAAK,SAQtB,CAAC;AACF,eAAO,MAAM,iB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,GACR,SAAS,CAAC;AAEd,MAAM,MAAM,WAAW,GACnB,OAAO,GACP,cAAc,GACd,iBAAiB,GACjB,SAAS,GACT,8BAA8B,GAC9B,aAAa,GACb,YAAY,GACZ,SAAS,GACT,0BAA0B,GAC1B,WAAW,GACX,2BAA2B,GAC3B,eAAe,GACf,eAAe,GACf,kBAAkB,GAClB,WAAW,GACX,mBAAmB,GACnB,wBAAwB,GACxB,WAAW,GACX,uBAAuB,GACvB,uBAAuB,GACvB,aAAa,GACb,aAAa,GACb,SAAS,GACT,qBAAqB,GACrB,oBAAoB,GACpB,UAAU,GACV,mBAAmB,GACnB,YAAY,GACZ,cAAc,GACd,YAAY,GACZ,cAAc,GACd,kBAAkB,GAClB,kBAAkB,GAClB,QAAQ,GACR,YAAY,GACZ,QAAQ,GACR,iBAAiB,GACjB,cAAc,GACd,cAAc,GACd,QAAQ,GACR,UAAU,GACV,uBAAuB,GACvB,oBAAoB,GACpB,eAAe,GACf,gBAAgB,GAChB,UAAU,CAAC;AAEf,MAAM,MAAM,SAAS,GACjB,mBAAmB,GACnB,sBAAsB,GACtB,QAAQ,GACR,kBAAkB,GAClB,WAAW,GACX,SAAS,GACT,cAAc,GACd,+CAA+C,GAC/C,OAAO,GACP,KAAK,GACL,wBAAwB,GACxB,SAAS,GACT,KAAK,GACL,aAAa,GACb,4BAA4B,GAC5B,oBAAoB,GACpB,WAAW,GACX,iBAAiB,GACjB,SAAS,CAAC"}
1
+ {"version":3,"file":"exercise.d.ts","sourceRoot":"","sources":["../../src/exercises/exercise.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAI3C,eAAO,MAAM,YAAY,UAChB,WAAW,EAAE,aACT,MAAM,WACT,KAAK,GAAG,KAAK,SAQtB,CAAC;AACF,eAAO,MAAM,YAAY,UAChB,WAAW,EAAE,aACT,MAAM,WACT,KAAK,GAAG,KAAK,SAQtB,CAAC;AACF,eAAO,MAAM,iBAAiB,UACrB,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AAC;AAEd,MAAM,MAAM,WAAW,GACnB,OAAO,GACP,cAAc,GACd,iBAAiB,GACjB,SAAS,GACT,8BAA8B,GAC9B,aAAa,GACb,YAAY,GACZ,SAAS,GACT,0BAA0B,GAC1B,WAAW,GACX,2BAA2B,GAC3B,eAAe,GACf,eAAe,GACf,kBAAkB,GAClB,WAAW,GACX,mBAAmB,GACnB,wBAAwB,GACxB,WAAW,GACX,uBAAuB,GACvB,uBAAuB,GACvB,aAAa,GACb,aAAa,GACb,SAAS,GACT,qBAAqB,GACrB,oBAAoB,GACpB,UAAU,GACV,mBAAmB,GACnB,YAAY,GACZ,cAAc,GACd,YAAY,GACZ,cAAc,GACd,kBAAkB,GAClB,kBAAkB,GAClB,QAAQ,GACR,YAAY,GACZ,QAAQ,GACR,iBAAiB,GACjB,cAAc,GACd,cAAc,GACd,QAAQ,GACR,UAAU,GACV,uBAAuB,GACvB,oBAAoB,GACpB,eAAe,GACf,gBAAgB,GAChB,UAAU,CAAC;AAEf,MAAM,MAAM,SAAS,GACjB,mBAAmB,GACnB,sBAAsB,GACtB,QAAQ,GACR,kBAAkB,GAClB,WAAW,GACX,SAAS,GACT,cAAc,GACd,+CAA+C,GAC/C,OAAO,GACP,KAAK,GACL,wBAAwB,GACxB,SAAS,GACT,KAAK,GACL,aAAa,GACb,4BAA4B,GAC5B,oBAAoB,GACpB,WAAW,GACX,iBAAiB,GACjB,SAAS,CAAC"}
@@ -5,6 +5,7 @@ const exercise_1 = require("../../../exercises/exercise");
5
5
  const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
6
6
  const decimal_1 = require("../../../math/numbers/decimals/decimal");
7
7
  const randint_1 = require("../../../math/utils/random/randint");
8
+ const ordinals = ["premier", "deuxième", "troisième", "quatrième"];
8
9
  const getDigitDecimalRankQuestion = () => {
9
10
  const decimalPartSize = (0, randint_1.randint)(2, 5);
10
11
  const nb = decimal_1.DecimalConstructor.random(0, 1000, decimalPartSize);
@@ -20,6 +21,8 @@ const getDigitDecimalRankQuestion = () => {
20
21
  keys: [],
21
22
  answerFormat: "tex",
22
23
  identifiers: { nb: nb.tex, rankAsked },
24
+ hint: `Le chiffre des ${rankAskedLabel} est le ${ordinals[rankAsked]} chiffre après la virgule.`,
25
+ correction: `Le chiffre des ${rankAskedLabel} est le ${ordinals[rankAsked]} chiffre après la virgule. Donc le chiffre des ${rankAskedLabel} est $${answer}$.`,
23
26
  };
24
27
  return question;
25
28
  };
@@ -38,9 +41,6 @@ const getPropositions = (n, { answer, nb }) => {
38
41
  const isAnswerValid = (ans, { answer }) => {
39
42
  return ans === answer;
40
43
  };
41
- const isGGBAnswerValid = (ans, { ggbAnswer }) => {
42
- throw Error("GGBVea not implemented");
43
- };
44
44
  exports.digitDecimalRank = {
45
45
  id: "digitDecimalRank",
46
46
  connector: "=",
@@ -53,6 +53,6 @@ exports.digitDecimalRank = {
53
53
  freeTimer: 60,
54
54
  getPropositions,
55
55
  isAnswerValid,
56
- isGGBAnswerValid,
57
56
  subject: "Mathématiques",
57
+ hasHintAndCorrection: true,
58
58
  };
@@ -0,0 +1,8 @@
1
+ import { Exercise } from "../../../exercises/exercise";
2
+ type Identifiers = {
3
+ nb: number;
4
+ rankAsked: number;
5
+ };
6
+ export declare const digitDecimalRankNumber: Exercise<Identifiers>;
7
+ export {};
8
+ //# sourceMappingURL=digitDecimalRankNumber.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"digitDecimalRankNumber.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/calcul/digitDecimalRankNumber.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AAYlC,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAkDF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,CAexD,CAAC"}
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.digitDecimalRankNumber = void 0;
4
+ const exercise_1 = require("../../../exercises/exercise");
5
+ const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
6
+ const decimal_1 = require("../../../math/numbers/decimals/decimal");
7
+ const randint_1 = require("../../../math/utils/random/randint");
8
+ const ordinals = ["premier", "deuxième", "troisième", "quatrième"];
9
+ const getDigitRankNumberQuestion = () => {
10
+ const decimalPartSize = (0, randint_1.randint)(2, 5);
11
+ const nb = decimal_1.DecimalConstructor.random(0, 1000, decimalPartSize);
12
+ const rankAsked = (0, randint_1.randint)(0, Math.min(decimalPartSize, 3));
13
+ const rankAskedLabel = decimal_1.decimalDigitRanks[rankAsked];
14
+ const str = nb.tex;
15
+ const answer = str.split(".")[0] + str.split(".")[1].substring(0, rankAsked + 1);
16
+ const question = {
17
+ answer,
18
+ instruction: `Quel est le nombre de ${rankAskedLabel} dans le nombre $${nb
19
+ .toTree()
20
+ .toTex()}$ ?`,
21
+ keys: [],
22
+ // hint: `Attention ! On demande le 'nombre' et non pas le 'chiffre' !`,
23
+ // correction: `Le chiffre des ${rankAskedLabel} est le ${ordinals[rankAsked]} chiffre en partant de la droite. Donc le chiffre des ${rankAskedLabel} est $${answer}$.`,
24
+ answerFormat: "tex",
25
+ identifiers: { nb: nb.value, rankAsked },
26
+ };
27
+ return question;
28
+ };
29
+ const getPropositions = (n, { answer, nb, rankAsked }) => {
30
+ const propositions = [];
31
+ (0, exercise_1.addValidProp)(propositions, answer);
32
+ const str = nb.toString();
33
+ const [intPart, fracPart] = str.split(".");
34
+ (0, exercise_1.tryToAddWrongProp)(propositions, fracPart[rankAsked]);
35
+ for (let i = 0; i < str.length; i++) {
36
+ (0, exercise_1.tryToAddWrongProp)(propositions, intPart + fracPart.substring(0, i + 1));
37
+ }
38
+ while (propositions.length < n) {
39
+ (0, exercise_1.tryToAddWrongProp)(propositions, (0, randint_1.randint)(0, 100) + "");
40
+ }
41
+ return (0, exercise_1.shuffleProps)(propositions, n);
42
+ };
43
+ const isAnswerValid = (ans, { answer }) => {
44
+ return ans === answer;
45
+ };
46
+ exports.digitDecimalRankNumber = {
47
+ id: "digitDecimalRankNumber",
48
+ connector: "=",
49
+ label: "Déterminer le nombre de dixièmes, de centièmes...",
50
+ levels: [],
51
+ isSingleStep: true,
52
+ sections: [],
53
+ generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getDigitRankNumberQuestion, nb),
54
+ qcmTimer: 60,
55
+ freeTimer: 60,
56
+ getPropositions,
57
+ isAnswerValid,
58
+ subject: "Mathématiques",
59
+ // hasHintAndCorrection: true,
60
+ };
@@ -5,6 +5,7 @@ const exercise_1 = require("../../../exercises/exercise");
5
5
  const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
6
6
  const integer_1 = require("../../../math/numbers/integer/integer");
7
7
  const randint_1 = require("../../../math/utils/random/randint");
8
+ const ordinals = ["premier", "deuxième", "troisième", "quatrième"];
8
9
  const getDigitRankQuestion = () => {
9
10
  const size = (0, randint_1.randint)(3, 6);
10
11
  const nb = integer_1.IntegerConstructor.random(size);
@@ -18,6 +19,8 @@ const getDigitRankQuestion = () => {
18
19
  .toTree()
19
20
  .toTex()}$ ?`,
20
21
  keys: [],
22
+ hint: `Le chiffre des ${rankAskedLabel} est le ${ordinals[rankAsked]} chiffre en partant de la droite.`,
23
+ correction: `Le chiffre des ${rankAskedLabel} est le ${ordinals[rankAsked]} chiffre en partant de la droite. Donc le chiffre des ${rankAskedLabel} est $${answer}$.`,
21
24
  answerFormat: "tex",
22
25
  identifiers: { nb, rankAsked },
23
26
  };
@@ -38,9 +41,6 @@ const getPropositions = (n, { answer, nb }) => {
38
41
  const isAnswerValid = (ans, { answer }) => {
39
42
  return ans === answer;
40
43
  };
41
- const isGGBAnswerValid = (ans, { ggbAnswer }) => {
42
- throw Error("GGBVea not implemented");
43
- };
44
44
  exports.digitRank = {
45
45
  id: "digitRank",
46
46
  connector: "=",
@@ -53,6 +53,6 @@ exports.digitRank = {
53
53
  freeTimer: 60,
54
54
  getPropositions,
55
55
  isAnswerValid,
56
- isGGBAnswerValid,
57
56
  subject: "Mathématiques",
57
+ hasHintAndCorrection: true,
58
58
  };
@@ -0,0 +1,8 @@
1
+ import { Exercise } from "../../../exercises/exercise";
2
+ type Identifiers = {
3
+ nb: number;
4
+ rankAsked: number;
5
+ };
6
+ export declare const digitRankNumber: Exercise<Identifiers>;
7
+ export {};
8
+ //# sourceMappingURL=digitRankNumber.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"digitRankNumber.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/calcul/digitRankNumber.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AAQlC,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AA8CF,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,CAcjD,CAAC"}
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.digitRankNumber = void 0;
4
+ const exercise_1 = require("../../../exercises/exercise");
5
+ const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
6
+ const integer_1 = require("../../../math/numbers/integer/integer");
7
+ const randint_1 = require("../../../math/utils/random/randint");
8
+ const ordinals = ["premier", "deuxième", "troisième", "quatrième"];
9
+ const getDigitRankNumberQuestion = () => {
10
+ const size = (0, randint_1.randint)(3, 6);
11
+ const nb = integer_1.IntegerConstructor.random(size);
12
+ const rankAsked = (0, randint_1.randint)(0, Math.min(size, 4));
13
+ const rankAskedLabel = integer_1.integerDigitRanks[rankAsked];
14
+ const nbString = nb.toString();
15
+ const answer = nbString.substring(0, nbString.length - rankAsked);
16
+ const question = {
17
+ answer,
18
+ instruction: `Quel est le nombre ${rankAsked === 0 ? "d'" : "de "}${rankAskedLabel} dans le nombre $${nb.toTree().toTex()}$ ?`,
19
+ keys: [],
20
+ // hint: `Attention ! On demande le 'nombre' et non pas le 'chiffre' !`,
21
+ // correction: `Le chiffre des ${rankAskedLabel} est le ${ordinals[rankAsked]} chiffre en partant de la droite. Donc le chiffre des ${rankAskedLabel} est $${answer}$.`,
22
+ answerFormat: "tex",
23
+ identifiers: { nb, rankAsked },
24
+ };
25
+ return question;
26
+ };
27
+ const getPropositions = (n, { answer, nb, rankAsked }) => {
28
+ const propositions = [];
29
+ (0, exercise_1.addValidProp)(propositions, answer);
30
+ const nbString = nb.toString();
31
+ (0, exercise_1.tryToAddWrongProp)(propositions, nbString[nbString.length - rankAsked - 1]);
32
+ for (let i = 0; i < nbString.length; i++) {
33
+ (0, exercise_1.tryToAddWrongProp)(propositions, nbString.substring(0, nbString.length - i));
34
+ }
35
+ while (propositions.length < n) {
36
+ (0, exercise_1.tryToAddWrongProp)(propositions, (0, randint_1.randint)(0, 100) + "");
37
+ }
38
+ return (0, exercise_1.shuffleProps)(propositions, n);
39
+ };
40
+ const isAnswerValid = (ans, { answer }) => {
41
+ return ans === answer;
42
+ };
43
+ exports.digitRankNumber = {
44
+ id: "digitRankNumber",
45
+ connector: "=",
46
+ label: "Déterminer le nombre d'unités/de dizaines/de centièmes...",
47
+ levels: [],
48
+ isSingleStep: true,
49
+ sections: [],
50
+ generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getDigitRankNumberQuestion, nb),
51
+ qcmTimer: 60,
52
+ freeTimer: 60,
53
+ getPropositions,
54
+ isAnswerValid,
55
+ subject: "Mathématiques",
56
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"fractionAndIntegerDivision.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/fractions/fractionAndIntegerDivision.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAwClC,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,OAAO,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC5B,CAAC;AAyCF,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,WAAW,CAc5D,CAAC"}
1
+ {"version":3,"file":"fractionAndIntegerDivision.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/fractions/fractionAndIntegerDivision.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AA0FlC,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,OAAO,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC5B,CAAC;AAyCF,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,WAAW,CAe5D,CAAC"}
@@ -7,6 +7,7 @@ const integer_1 = require("../../../../math/numbers/integer/integer");
7
7
  const rational_1 = require("../../../../math/numbers/rationals/rational");
8
8
  const randint_1 = require("../../../../math/utils/random/randint");
9
9
  const divideNode_1 = require("../../../../tree/nodes/operators/divideNode");
10
+ const multiplyNode_1 = require("../../../../tree/nodes/operators/multiplyNode");
10
11
  const coinFlip_1 = require("../../../../utils/coinFlip");
11
12
  const getFractionAndIntegerDivision = () => {
12
13
  const rational = rational_1.RationalConstructor.randomIrreductible();
@@ -21,11 +22,43 @@ const getFractionAndIntegerDivision = () => {
21
22
  ? integer.divide(rational).toTree()
22
23
  : rational.divide(integer).toTree();
23
24
  const answerTex = answerTree.toTex();
25
+ const beforeSimplification = integerFirst
26
+ ? new rational_1.Rational(integer.value * rational.denum, rational.num)
27
+ : new rational_1.Rational(rational.num, rational.denum * integer.value);
24
28
  const question = {
25
29
  instruction: `Calculer et donner le résultat sous la forme d'une fraction irréductible : $${statementTree.toTex()}$`,
26
30
  startStatement: statementTree.toTex(),
27
31
  answer: answerTex,
28
32
  keys: [],
33
+ hint: "Pour diviser une fraction par un nombre entier, on peut écrire le nombre entier sous forme de fraction. Puis, on multiplie la première fraction par l'inverse de la seconde. Enfin, on simplife la fraction obtenue si possible.",
34
+ correction: `
35
+ On écrit $${integer.value}$ sous forme de fraction :
36
+
37
+ $${integer.value} = \\frac{${integer.value}}{1}$
38
+
39
+ On multiplie la première fraction par l'inverse de la seconde :
40
+
41
+ ${integerFirst
42
+ ? `$\\frac{${integer.value}}{1}\\div ${rational
43
+ .toTree()
44
+ .toTex()} = \\frac{${integer.value}}{1} \\times ${rational
45
+ .reverse(false)
46
+ .toTree()
47
+ .toTex()} = \\frac{${new multiplyNode_1.MultiplyNode(integer.toTree(), rational.denum.toTree()).toTex({ forceNoSimplification: true })}}{${new multiplyNode_1.MultiplyNode((1).toTree(), rational.num.toTree()).toTex({ forceNoSimplification: true })}}
48
+ = ${beforeSimplification.toTree().toTex()}$`
49
+ : `$${rational.toTree().toTex()}\\div \\frac{${integer.value}}{1} = ${rational.toTree().toTex()}\\times \\frac{1}{${integer.value}} = \\frac{${rational.num}\\times 1}{${new multiplyNode_1.MultiplyNode(rational.denum.toTree(), integer.toTree()).toTex({ forceNoSimplification: true })}} = ${beforeSimplification
50
+ .toTree()
51
+ .toTex()}$`}
52
+
53
+ ${!beforeSimplification.isIrreductible()
54
+ ? `On peut alors simplifier cette fraction :
55
+
56
+ $${beforeSimplification.toTree().toTex()} = ${answerTex}$
57
+ `
58
+ : "Cette fraction est déjà irréductible."}
59
+
60
+ Ainsi, le résultat attendu est $${answerTex}$.
61
+ `,
29
62
  answerFormat: "tex",
30
63
  identifiers: {
31
64
  integerFirst,
@@ -75,4 +108,5 @@ exports.fractionAndIntegerDivision = {
75
108
  getPropositions,
76
109
  isAnswerValid,
77
110
  subject: "Mathématiques",
111
+ hasHintAndCorrection: true,
78
112
  };
@@ -1 +1 @@
1
- {"version":3,"file":"fractionAndIntegerProduct.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/fractions/fractionAndIntegerProduct.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAiClC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC5B,CAAC;AAsCF,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,WAAW,CAc3D,CAAC"}
1
+ {"version":3,"file":"fractionAndIntegerProduct.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/fractions/fractionAndIntegerProduct.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AA2DlC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC5B,CAAC;AAsCF,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,WAAW,CAe3D,CAAC"}
@@ -15,12 +15,28 @@ const getFractionAndIntegerProduct = () => {
15
15
  statementTree.shuffle();
16
16
  const answerTree = rational.multiply(integer).toTree();
17
17
  const answer = answerTree.toTex();
18
+ const beforeSimplification = new rational_1.Rational(rational.num * integer.value, rational.denum);
18
19
  const question = {
19
20
  instruction: `Calculer et donner le résultat sous la forme d'une fraction irréductible : $${statementTree.toTex()}$`,
20
21
  startStatement: statementTree.toTex(),
21
22
  answer,
22
23
  keys: [],
23
24
  answerFormat: "tex",
25
+ hint: "Pour multiplier une fraction par un nombre entier, on multiplie le numérateur de la fraction par le nombre entier, sans toucher au dénominateur. On simplifie ensuite la fraction obtenue si possible.",
26
+ correction: `
27
+ On multiplie le numérateur de la fraction par le nombre entier :
28
+
29
+ $${statementTree.toTex()} = \\frac{${new multiplyNode_1.MultiplyNode(rational.num.toTree(), integer.toTree()).toTex({ forceNoSimplification: true })}}{${rational.denum}} = ${beforeSimplification.toTree().toTex()}$
30
+
31
+ ${!beforeSimplification.isIrreductible()
32
+ ? `On peut alors simplifier cette fraction :
33
+
34
+ $${beforeSimplification.toTree().toTex()} = ${answer}$
35
+ `
36
+ : "Cette fraction est déjà irréductible."}
37
+
38
+ Ainsi, le résultat attendu est $${answer}$.
39
+ `,
24
40
  identifiers: {
25
41
  integer: integer.value,
26
42
  rational: [rational.num, rational.denum],
@@ -65,5 +81,6 @@ exports.fractionAndIntegerProduct = {
65
81
  freeTimer: 60,
66
82
  getPropositions,
67
83
  isAnswerValid,
84
+ hasHintAndCorrection: true,
68
85
  subject: "Mathématiques",
69
86
  };
@@ -1 +1 @@
1
- {"version":3,"file":"fractionsDivision.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/fractions/fractionsDivision.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AA6BlC,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9B,aAAa,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACjC,CAAC;AAwCF,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,WAAW,CAanD,CAAC"}
1
+ {"version":3,"file":"fractionsDivision.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/fractions/fractionsDivision.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AA0DlC,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9B,aAAa,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACjC,CAAC;AAwCF,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,WAAW,CAcnD,CAAC"}
@@ -12,12 +12,34 @@ const getFractionsDivision = () => {
12
12
  const statementTree = new divideNode_1.DivideNode(rational.toTree(), rational2.toTree());
13
13
  const answerTree = rational.divide(rational2).toTree();
14
14
  const answer = answerTree.toTex();
15
+ const beforeSimplification = new rational_1.Rational(rational.num * rational2.denum, rational.denum * rational2.num);
16
+ const isSimplifiable = !beforeSimplification.isIrreductible();
15
17
  const question = {
16
18
  instruction: `Calculer et donner le résultat sous la forme d'une fraction irréductible : $${statementTree.toTex()}$`,
17
19
  startStatement: statementTree.toTex(),
18
20
  answer,
19
21
  keys: [],
20
22
  answerFormat: "tex",
23
+ hint: "Pour diviser par une fraction, il faut multiplier la première fraction par l'inverse de la deuxième. Simplifie ensuite la fraction obtenue si nécessaire.",
24
+ correction: `On multiplie la première fraction par l'inverse de la deuxième :
25
+
26
+ $$${statementTree.toTex()} = ${rational.toTree().toTex()}\\times ${rational2
27
+ .reverse(false)
28
+ .toTree()
29
+ .toTex()}$$
30
+
31
+ Multiplions les fractions :
32
+
33
+ $$\\frac{${rational.num}\\times${rational2.denum}}{${rational.denum}\\times${rational2.num}} = ${beforeSimplification.toTree().toTex()}$$
34
+
35
+ ${isSimplifiable
36
+ ? `On peut alors simplifier cette fraction :
37
+
38
+ $${beforeSimplification.toTree().toTex()} = ${answer}$`
39
+ : "Cette fraction est déjà sous forme irréductible."}
40
+
41
+ Ainsi, le résultat attendu est $${answer}$.
42
+ `,
21
43
  identifiers: {
22
44
  rationalNum: [rational.num, rational.denum],
23
45
  rationalDenum: [rational2.num, rational2.denum],
@@ -60,4 +82,5 @@ exports.fractionsDivision = {
60
82
  getPropositions,
61
83
  isAnswerValid,
62
84
  subject: "Mathématiques",
85
+ hasHintAndCorrection: true,
63
86
  };
@@ -1 +1 @@
1
- {"version":3,"file":"fractionsProduct.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/fractions/fractionsProduct.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9B,aAAa,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACjC,CAAC;AAqDF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAalD,CAAC"}
1
+ {"version":3,"file":"fractionsProduct.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/fractions/fractionsProduct.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9B,aAAa,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACjC,CAAC;AA0EF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAclD,CAAC"}
@@ -12,6 +12,7 @@ const getFractionsProduct = () => {
12
12
  const statementTree = new multiplyNode_1.MultiplyNode(rational.toTree(), rational2.toTree());
13
13
  const answerTree = rational.multiply(rational2).toTree();
14
14
  const answer = answerTree.toTex();
15
+ const beforeSimplification = new rational_1.Rational(rational.num * rational2.num, rational.denum * rational2.denum);
15
16
  const question = {
16
17
  instruction: `Calculer et donner le résultat sous la forme d'une fraction irréductible : $${statementTree.toTex()}$`,
17
18
  startStatement: statementTree.toTex(),
@@ -22,6 +23,19 @@ const getFractionsProduct = () => {
22
23
  rationalNum: [rational.num, rational.denum],
23
24
  rationalDenum: [rational2.num, rational2.denum],
24
25
  },
26
+ hint: "Pour multiplier deux fractions, on multiplie les numérateurs entre eux et les dénominateurs entre eux, puis on simplifie la fraction obtenue si nécessaire.",
27
+ correction: `On multiplie les numérateurs entre eux et les dénominateurs entre eux :
28
+
29
+ $$\\frac{${rational.num}\\times${rational2.num}}{${rational.denum}\\times${rational2.denum}} = ${beforeSimplification.toTree().toTex()}$$
30
+
31
+ ${!beforeSimplification.isIrreductible()
32
+ ? `On peut alors simplifier cette fraction :
33
+
34
+ $${beforeSimplification.toTree().toTex()} = ${answer}$`
35
+ : "Cette fraction est déjà sous forme irréductible."}
36
+
37
+ Ainsi, le résultat attendu est $${answer}$.
38
+ `,
25
39
  };
26
40
  return question;
27
41
  };
@@ -58,4 +72,5 @@ exports.fractionsProduct = {
58
72
  getPropositions,
59
73
  isAnswerValid,
60
74
  subject: "Mathématiques",
75
+ hasHintAndCorrection: true,
61
76
  };
@@ -8,4 +8,6 @@ export * from "./proportionality";
8
8
  export * from "./rounding";
9
9
  export * from "./digitRank";
10
10
  export * from "./digitDecimalRank";
11
+ export * from "./digitRankNumber";
12
+ export * from "./digitDecimalRankNumber";
11
13
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/calcul/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/calcul/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC"}
@@ -24,3 +24,5 @@ __exportStar(require("./proportionality"), exports);
24
24
  __exportStar(require("./rounding"), exports);
25
25
  __exportStar(require("./digitRank"), exports);
26
26
  __exportStar(require("./digitDecimalRank"), exports);
27
+ __exportStar(require("./digitRankNumber"), exports);
28
+ __exportStar(require("./digitDecimalRankNumber"), exports);
@@ -81,7 +81,7 @@ const isAnswerValid = (ans, { answer }) => {
81
81
  exports.scaleUsage = {
82
82
  id: "scaleUsage",
83
83
  connector: "=",
84
- label: "Calculer une échelle",
84
+ label: "Utiliser une échelle",
85
85
  levels: [],
86
86
  isSingleStep: true,
87
87
  sections: [],
@@ -1 +1 @@
1
- {"version":3,"file":"rounding.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/rounding/rounding.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AA8ClC,KAAK,WAAW,GAAG;IACjB,cAAc,EAAE,MAAM,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAgDF,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAC,WAAW,CAc7C,CAAC;AACF;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,WAAW,CAchD,CAAC;AACF;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,CAcjD,CAAC;AACF;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,CAcjD,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,WAAW,CAiB9C,CAAC"}
1
+ {"version":3,"file":"rounding.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/rounding/rounding.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAuElC,KAAK,WAAW,GAAG;IACjB,cAAc,EAAE,MAAM,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAgDF,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAC,WAAW,CAe7C,CAAC;AACF;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,WAAW,CAehD,CAAC;AACF;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,CAejD,CAAC;AACF;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,CAejD,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,WAAW,CAkB9C,CAAC"}
@@ -10,6 +10,8 @@ const shuffle_1 = require("../../../../utils/shuffle");
10
10
  /**
11
11
  * arrondi à l'unité
12
12
  */
13
+ const ranks = ["unité", "dixième", "centième", "millième", "dix millième"];
14
+ const ranksWithAu = ["à l'unité", "au dixième", "au centième", "au millième"];
13
15
  const instructions = [
14
16
  "Arrondir à l'unité :",
15
17
  "Arrondir au dixième :",
@@ -22,6 +24,7 @@ const getRoundQuestions = (opts) => {
22
24
  const dec = decimal_1.DecimalConstructor.random(0, 1000, precision);
23
25
  const decTex = dec.toTree().toTex();
24
26
  const answer = dec.round(precisionAsked).toTree().toTex();
27
+ const figureToLookAt = dec.getDigitAtRank(-(precisionAsked + 1));
25
28
  const question = {
26
29
  instruction: `${instructions[precisionAsked]} $${decTex}$`,
27
30
  startStatement: decTex,
@@ -33,6 +36,16 @@ const getRoundQuestions = (opts) => {
33
36
  decimal: dec.value,
34
37
  precision,
35
38
  },
39
+ hint: `Pour arrondir ${ranksWithAu[precisionAsked]}, on regarde le chiffre des ${ranks[precisionAsked + 1]}s. S'il est inférieur à $5$, on arrondit ${ranksWithAu[precisionAsked]} inférieur. S'il est supérieur à $5$, on arrondit ${ranksWithAu[precisionAsked]} supérieur.`,
40
+ correction: `Le chiffre des ${ranks[precisionAsked + 1]}s est $${figureToLookAt}$.
41
+
42
+ ${figureToLookAt < 5
43
+ ? `Puisque ${figureToLookAt} est inférieur à 5, on arrondit ${ranksWithAu[precisionAsked]} inférieur.
44
+
45
+ Ainsi, en arrondissant ${ranksWithAu[precisionAsked]}, on a $${decTex} \\approx ${answer}$`
46
+ : `Puisque ${figureToLookAt} est supérieur à 5, on arrondit ${ranksWithAu[precisionAsked]} supérieur.
47
+
48
+ Ainsi, en arrondissant ${ranksWithAu[precisionAsked]}, on a $${decTex} \\approx ${answer}$`}`,
36
49
  };
37
50
  return question;
38
51
  };
@@ -78,6 +91,7 @@ exports.roundToUnit = {
78
91
  getPropositions,
79
92
  isAnswerValid,
80
93
  subject: "Mathématiques",
94
+ hasHintAndCorrection: true,
81
95
  };
82
96
  /**
83
97
  * arrondi à l'unité
@@ -95,6 +109,7 @@ exports.roundToDixieme = {
95
109
  getPropositions,
96
110
  isAnswerValid,
97
111
  subject: "Mathématiques",
112
+ hasHintAndCorrection: true,
98
113
  };
99
114
  /**
100
115
  * arrondi à l'unité
@@ -112,6 +127,7 @@ exports.roundToCentieme = {
112
127
  getPropositions,
113
128
  isAnswerValid,
114
129
  subject: "Mathématiques",
130
+ hasHintAndCorrection: true,
115
131
  };
116
132
  /**
117
133
  * arrondi à l'unité
@@ -129,6 +145,7 @@ exports.roundToMillieme = {
129
145
  getPropositions,
130
146
  isAnswerValid,
131
147
  subject: "Mathématiques",
148
+ hasHintAndCorrection: true,
132
149
  };
133
150
  exports.allRoundings = {
134
151
  id: "allRoundings",
@@ -143,4 +160,5 @@ exports.allRoundings = {
143
160
  getPropositions,
144
161
  isAnswerValid,
145
162
  subject: "Mathématiques",
163
+ hasHintAndCorrection: true,
146
164
  };
@@ -1 +1 @@
1
- {"version":3,"file":"allIdentities.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/distributivity/allIdentities.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAKT,MAAM,0BAA0B,CAAC;AAkBlC,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;CAC1B,CAAC;AA6DF,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,WAAW,CAa/C,CAAC"}
1
+ {"version":3,"file":"allIdentities.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/distributivity/allIdentities.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAKT,MAAM,0BAA0B,CAAC;AAkBlC,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;CAC1B,CAAC;AA6DF,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,WAAW,CAc/C,CAAC"}
@@ -70,4 +70,5 @@ exports.allIdentities = {
70
70
  getPropositions,
71
71
  isAnswerValid,
72
72
  subject: "Mathématiques",
73
+ hasHintAndCorrection: true,
73
74
  };
@@ -1 +1 @@
1
- {"version":3,"file":"canonicalFormDevelopment.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/distributivity/canonicalFormDevelopment.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB,CAAC;AAsDF,eAAO,MAAM,wBAAwB,EAAE,QAAQ,CAAC,WAAW,CAc1D,CAAC"}
1
+ {"version":3,"file":"canonicalFormDevelopment.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/distributivity/canonicalFormDevelopment.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB,CAAC;AAsDF,eAAO,MAAM,wBAAwB,EAAE,QAAQ,CAAC,WAAW,CAe1D,CAAC"}
@@ -56,4 +56,5 @@ exports.canonicalFormDevelopment = {
56
56
  getPropositions,
57
57
  isAnswerValid,
58
58
  subject: "Mathématiques",
59
+ hasHintAndCorrection: true,
59
60
  };
@@ -1 +1 @@
1
- {"version":3,"file":"doubleDistributivity.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/distributivity/doubleDistributivity.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,aAAa,EAAE,MAAM,EAAE,CAAC;CACzB,CAAC;AA6EF,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,WAAW,CActD,CAAC"}
1
+ {"version":3,"file":"doubleDistributivity.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/distributivity/doubleDistributivity.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAYlC,KAAK,WAAW,GAAG;IACjB,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,aAAa,EAAE,MAAM,EAAE,CAAC;CACzB,CAAC;AA0GF,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,WAAW,CAetD,CAAC"}