math-exercises 2.2.6 → 2.2.8

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 (260) hide show
  1. package/lib/exercises/math/calcul/addAndSub.js +1 -1
  2. package/lib/exercises/math/calcul/addAndSubWithoutRelatives.js +1 -1
  3. package/lib/exercises/math/calcul/arithmetics/divisorsList.d.ts.map +1 -1
  4. package/lib/exercises/math/calcul/arithmetics/divisorsList.js +10 -7
  5. package/lib/exercises/math/calcul/arithmetics/primeNumbers.d.ts.map +1 -1
  6. package/lib/exercises/math/calcul/arithmetics/primeNumbers.js +0 -1
  7. package/lib/exercises/math/calcul/digitDecimalRank.d.ts.map +1 -1
  8. package/lib/exercises/math/calcul/digitDecimalRank.js +2 -3
  9. package/lib/exercises/math/calcul/digitDecimalRankNumber.d.ts.map +1 -1
  10. package/lib/exercises/math/calcul/digitDecimalRankNumber.js +2 -3
  11. package/lib/exercises/math/calcul/digitRank.d.ts.map +1 -1
  12. package/lib/exercises/math/calcul/digitRank.js +2 -3
  13. package/lib/exercises/math/calcul/digitRankNumber.d.ts.map +1 -1
  14. package/lib/exercises/math/calcul/digitRankNumber.js +2 -3
  15. package/lib/exercises/math/calcul/fractions/fractionAndIntegerDivision.d.ts.map +1 -1
  16. package/lib/exercises/math/calcul/fractions/fractionAndIntegerDivision.js +0 -1
  17. package/lib/exercises/math/calcul/fractions/fractionAndIntegerProduct.d.ts.map +1 -1
  18. package/lib/exercises/math/calcul/fractions/fractionAndIntegerProduct.js +0 -1
  19. package/lib/exercises/math/calcul/fractions/fractionToPercentToDecimal.d.ts.map +1 -1
  20. package/lib/exercises/math/calcul/fractions/fractionToPercentToDecimal.js +0 -1
  21. package/lib/exercises/math/calcul/fractions/fractionsSumsMultiplesDenominators.d.ts +10 -0
  22. package/lib/exercises/math/calcul/fractions/fractionsSumsMultiplesDenominators.d.ts.map +1 -0
  23. package/lib/exercises/math/calcul/fractions/fractionsSumsMultiplesDenominators.js +61 -0
  24. package/lib/exercises/math/calcul/fractions/fractionsSumsPrimeDenominators.d.ts +10 -0
  25. package/lib/exercises/math/calcul/fractions/fractionsSumsPrimeDenominators.d.ts.map +1 -0
  26. package/lib/exercises/math/calcul/fractions/fractionsSumsPrimeDenominators.js +56 -0
  27. package/lib/exercises/math/calcul/fractions/fractionsSumsSameDenominators.d.ts +9 -0
  28. package/lib/exercises/math/calcul/fractions/fractionsSumsSameDenominators.d.ts.map +1 -0
  29. package/lib/exercises/math/calcul/fractions/fractionsSumsSameDenominators.js +57 -0
  30. package/lib/exercises/math/calcul/fractions/index.d.ts +3 -0
  31. package/lib/exercises/math/calcul/fractions/index.d.ts.map +1 -1
  32. package/lib/exercises/math/calcul/fractions/index.js +3 -0
  33. package/lib/exercises/math/calcul/fractions/simplifyFraction.d.ts.map +1 -1
  34. package/lib/exercises/math/calcul/fractions/simplifyFraction.js +0 -1
  35. package/lib/exercises/math/calcul/mentalCaluls/index.d.ts +2 -0
  36. package/lib/exercises/math/calcul/mentalCaluls/index.d.ts.map +1 -1
  37. package/lib/exercises/math/calcul/mentalCaluls/index.js +2 -0
  38. package/lib/exercises/math/calcul/mentalCaluls/mentalAddAndSub.js +1 -1
  39. package/lib/exercises/math/calcul/mentalCaluls/mentalAddAndSubNoRelative.d.ts +7 -0
  40. package/lib/exercises/math/calcul/mentalCaluls/mentalAddAndSubNoRelative.d.ts.map +1 -0
  41. package/lib/exercises/math/calcul/mentalCaluls/mentalAddAndSubNoRelative.js +71 -0
  42. package/lib/exercises/math/calcul/mentalCaluls/mentalMultiplications.d.ts.map +1 -1
  43. package/lib/exercises/math/calcul/mentalCaluls/mentalMultiplications.js +25 -17
  44. package/lib/exercises/math/calcul/mentalCaluls/mentalMultiplicationsNoRelative.d.ts +7 -0
  45. package/lib/exercises/math/calcul/mentalCaluls/mentalMultiplicationsNoRelative.d.ts.map +1 -0
  46. package/lib/exercises/math/calcul/mentalCaluls/mentalMultiplicationsNoRelative.js +93 -0
  47. package/lib/exercises/math/calcul/operations/expressionNature.d.ts +1 -0
  48. package/lib/exercises/math/calcul/operations/expressionNature.d.ts.map +1 -0
  49. package/lib/exercises/math/calcul/operations/expressionNature.js +81 -0
  50. package/lib/exercises/math/calculLitteral/equation/equationSimpleSquare.d.ts.map +1 -1
  51. package/lib/exercises/math/calculLitteral/equation/equationSimpleSquare.js +0 -1
  52. package/lib/exercises/math/calculLitteral/equation/equationType2Exercise.d.ts.map +1 -1
  53. package/lib/exercises/math/calculLitteral/equation/equationType2Exercise.js +0 -1
  54. package/lib/exercises/math/calculLitteral/factorisation/factoType1Exercise.d.ts.map +1 -1
  55. package/lib/exercises/math/calculLitteral/factorisation/factoType1Exercise.js +0 -1
  56. package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType3.d.ts.map +1 -1
  57. package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType3.js +0 -1
  58. package/lib/exercises/math/calculLitteral/simplifying/reduceExpression.d.ts.map +1 -1
  59. package/lib/exercises/math/calculLitteral/simplifying/reduceExpression.js +0 -1
  60. package/lib/exercises/math/complex/addComplex.d.ts.map +1 -1
  61. package/lib/exercises/math/complex/addComplex.js +0 -1
  62. package/lib/exercises/math/complex/conjugateComplex.ts.d.ts.map +1 -1
  63. package/lib/exercises/math/complex/conjugateComplex.ts.js +0 -1
  64. package/lib/exercises/math/complex/conjugateDivideComplex.d.ts.map +1 -1
  65. package/lib/exercises/math/complex/conjugateDivideComplex.js +0 -1
  66. package/lib/exercises/math/complex/inverseComplex.d.ts.map +1 -1
  67. package/lib/exercises/math/complex/inverseComplex.js +0 -1
  68. package/lib/exercises/math/complex/moduloFromAlgebraicComplex.d.ts.map +1 -1
  69. package/lib/exercises/math/complex/moduloFromAlgebraicComplex.js +0 -1
  70. package/lib/exercises/math/complex/mutiplyComplex.d.ts.map +1 -1
  71. package/lib/exercises/math/complex/mutiplyComplex.js +0 -1
  72. package/lib/exercises/math/conversion/aeraConversion.d.ts.map +1 -1
  73. package/lib/exercises/math/conversion/aeraConversion.js +0 -2
  74. package/lib/exercises/math/conversion/capacityConversion.d.ts.map +1 -1
  75. package/lib/exercises/math/conversion/capacityConversion.js +0 -1
  76. package/lib/exercises/math/conversion/lengthConversion.d.ts.map +1 -1
  77. package/lib/exercises/math/conversion/lengthConversion.js +0 -2
  78. package/lib/exercises/math/conversion/massConversion.d.ts.map +1 -1
  79. package/lib/exercises/math/conversion/massConversion.js +0 -2
  80. package/lib/exercises/math/conversion/volumeCapacityConversion.d.ts.map +1 -1
  81. package/lib/exercises/math/conversion/volumeCapacityConversion.js +0 -2
  82. package/lib/exercises/math/conversion/volumeConversion.d.ts.map +1 -1
  83. package/lib/exercises/math/conversion/volumeConversion.js +0 -2
  84. package/lib/exercises/math/derivation/derivative/expDerivativeOne.d.ts.map +1 -1
  85. package/lib/exercises/math/derivation/derivative/expDerivativeOne.js +0 -1
  86. package/lib/exercises/math/derivation/derivative/inverseFunctionDerivative.d.ts.map +1 -1
  87. package/lib/exercises/math/derivation/derivative/inverseFunctionDerivative.js +0 -1
  88. package/lib/exercises/math/derivation/derivative/lnDerivativeOne.d.ts.map +1 -1
  89. package/lib/exercises/math/derivation/derivative/lnDerivativeOne.js +0 -1
  90. package/lib/exercises/math/derivation/derivative/lnDerivativeThree.d.ts.map +1 -1
  91. package/lib/exercises/math/derivation/derivative/lnDerivativeThree.js +0 -1
  92. package/lib/exercises/math/derivation/derivative/powerCompositionDerivation.d.ts.map +1 -1
  93. package/lib/exercises/math/derivation/derivative/powerCompositionDerivation.js +0 -2
  94. package/lib/exercises/math/derivation/derivative/powerFunctionDerivative.d.ts.map +1 -1
  95. package/lib/exercises/math/derivation/derivative/powerFunctionDerivative.js +0 -1
  96. package/lib/exercises/math/derivation/derivative/quotientDerivative.d.ts.map +1 -1
  97. package/lib/exercises/math/derivation/derivative/quotientDerivative.js +0 -1
  98. package/lib/exercises/math/derivation/derivative/rootFunctionDerivative.d.ts.map +1 -1
  99. package/lib/exercises/math/derivation/derivative/rootFunctionDerivative.js +0 -1
  100. package/lib/exercises/math/derivation/derivative/secondDegreeDerivative.d.ts.map +1 -1
  101. package/lib/exercises/math/derivation/derivative/secondDegreeDerivative.js +0 -1
  102. package/lib/exercises/math/derivation/derivative/thirdDegreeDerivative.d.ts.map +1 -1
  103. package/lib/exercises/math/derivation/derivative/thirdDegreeDerivative.js +0 -1
  104. package/lib/exercises/math/derivation/derivativeNumberReading.d.ts.map +1 -1
  105. package/lib/exercises/math/derivation/derivativeNumberReading.js +0 -1
  106. package/lib/exercises/math/equaDiff/equaDiffGeneralForme.js +0 -1
  107. package/lib/exercises/math/equaDiff/equaDiffGeneralFormeWithIC.js +0 -1
  108. package/lib/exercises/math/functions/affines/affineExpressionFromTwoImages.d.ts.map +1 -1
  109. package/lib/exercises/math/functions/affines/affineExpressionFromTwoImages.js +0 -1
  110. package/lib/exercises/math/functions/basics/graphicInequation.d.ts.map +1 -1
  111. package/lib/exercises/math/functions/basics/graphicInequation.js +12 -3
  112. package/lib/exercises/math/functions/cube/cubicEquation.js +0 -1
  113. package/lib/exercises/math/functions/exponential/expEquation.js +0 -1
  114. package/lib/exercises/math/functions/logarithm/log10PowerSimplifying.d.ts.map +1 -1
  115. package/lib/exercises/math/functions/logarithm/log10PowerSimplifying.js +3 -4
  116. package/lib/exercises/math/functions/trinoms/rootsFromFactorizedForm.js +0 -1
  117. package/lib/exercises/math/functions/trinoms/secondDegreeInequation.d.ts.map +1 -1
  118. package/lib/exercises/math/functions/trinoms/secondDegreeInequation.js +0 -1
  119. package/lib/exercises/math/functions/trinoms/solveSecondDegreeEquationByFactorisation.js +1 -1
  120. package/lib/exercises/math/functions/trinoms/solveSecondDegreeEquationFromCano.js +1 -1
  121. package/lib/exercises/math/functions/trinoms/summitAbscissFromRoots.d.ts.map +1 -1
  122. package/lib/exercises/math/functions/trinoms/summitAbscissFromRoots.js +0 -2
  123. package/lib/exercises/math/geometry/areas/triangleAreaV2.d.ts.map +1 -1
  124. package/lib/exercises/math/geometry/areas/triangleAreaV2.js +0 -1
  125. package/lib/exercises/math/geometry/cartesian/distanceBetweenTwoPoints.d.ts.map +1 -1
  126. package/lib/exercises/math/geometry/cartesian/distanceBetweenTwoPoints.js +0 -1
  127. package/lib/exercises/math/geometry/cartesian/midpoint.js +0 -1
  128. package/lib/exercises/math/geometry/cartesian/placeAPoint.d.ts +4 -1
  129. package/lib/exercises/math/geometry/cartesian/placeAPoint.d.ts.map +1 -1
  130. package/lib/exercises/math/geometry/cartesian/placeAPoint.js +1 -1
  131. package/lib/exercises/math/geometry/pythagore/pythagoreCalcul.js +0 -1
  132. package/lib/exercises/math/geometry/thales/thales.js +0 -1
  133. package/lib/exercises/math/geometry/thales/thalesCalcul.d.ts.map +1 -1
  134. package/lib/exercises/math/geometry/thales/thalesCalcul.js +0 -1
  135. package/lib/exercises/math/geometry/vectors/alignementViaColinearity.d.ts.map +1 -1
  136. package/lib/exercises/math/geometry/vectors/alignementViaColinearity.js +0 -2
  137. package/lib/exercises/math/geometry/vectors/parallelogramViaEqualVectors.d.ts.map +1 -1
  138. package/lib/exercises/math/geometry/vectors/parallelogramViaEqualVectors.js +0 -2
  139. package/lib/exercises/math/percent/averageEvolutionRate.d.ts.map +1 -1
  140. package/lib/exercises/math/percent/averageEvolutionRate.js +16 -0
  141. package/lib/exercises/math/percent/cmToEvolution.d.ts +7 -0
  142. package/lib/exercises/math/percent/cmToEvolution.d.ts.map +1 -0
  143. package/lib/exercises/math/percent/cmToEvolution.js +70 -0
  144. package/lib/exercises/math/percent/evolutionToCM.d.ts +0 -1
  145. package/lib/exercises/math/percent/evolutionToCM.d.ts.map +1 -1
  146. package/lib/exercises/math/percent/evolutionToCM.js +20 -24
  147. package/lib/exercises/math/percent/findProportion.d.ts.map +1 -1
  148. package/lib/exercises/math/percent/findProportion.js +16 -1
  149. package/lib/exercises/math/percent/globalPercent.d.ts.map +1 -1
  150. package/lib/exercises/math/percent/globalPercent.js +14 -0
  151. package/lib/exercises/math/percent/index.d.ts +1 -0
  152. package/lib/exercises/math/percent/index.d.ts.map +1 -1
  153. package/lib/exercises/math/percent/index.js +1 -0
  154. package/lib/exercises/math/percent/isTableProportional.d.ts.map +1 -1
  155. package/lib/exercises/math/percent/isTableProportional.js +35 -33
  156. package/lib/exercises/math/percent/percentToDecimal.d.ts.map +1 -1
  157. package/lib/exercises/math/percent/percentToDecimal.js +14 -1
  158. package/lib/exercises/math/percent/reciprocalPercentage.d.ts.map +1 -1
  159. package/lib/exercises/math/percent/reciprocalPercentage.js +18 -0
  160. package/lib/exercises/math/percent/valuePercent.d.ts.map +1 -1
  161. package/lib/exercises/math/percent/valuePercent.js +7 -0
  162. package/lib/exercises/math/powers/calculateNegativePower.js +0 -1
  163. package/lib/exercises/math/powers/decimalToScientific.d.ts.map +1 -1
  164. package/lib/exercises/math/powers/decimalToScientific.js +0 -1
  165. package/lib/exercises/math/powers/powersPower.d.ts.map +1 -1
  166. package/lib/exercises/math/powers/powersPower.js +0 -1
  167. package/lib/exercises/math/powers/powersProduct.d.ts.map +1 -1
  168. package/lib/exercises/math/powers/powersProduct.js +22 -0
  169. package/lib/exercises/math/powers/scientificToDecimal.d.ts.map +1 -1
  170. package/lib/exercises/math/powers/scientificToDecimal.js +0 -2
  171. package/lib/exercises/math/primitive/expUPrimitive.js +0 -1
  172. package/lib/exercises/math/primitive/exponentialPrimitive.js +0 -1
  173. package/lib/exercises/math/primitive/logarithmePrimitive.js +0 -1
  174. package/lib/exercises/math/primitive/polynomialPrimitive.js +0 -1
  175. package/lib/exercises/math/primitive/sinCosPrimitive.js +0 -1
  176. package/lib/exercises/math/primitive/sinUCosUPrimitive.js +0 -1
  177. package/lib/exercises/math/probaStat/cardBasicProbas.js +0 -1
  178. package/lib/exercises/math/probaStat/diceBasicProbas.js +0 -1
  179. package/lib/exercises/math/probaStat/expectedValueOfBinomialProba.d.ts.map +1 -1
  180. package/lib/exercises/math/probaStat/expectedValueOfBinomialProba.js +14 -2
  181. package/lib/exercises/math/probaStat/probabilityTree.js +0 -1
  182. package/lib/exercises/math/probaStat/stats1var/marginalAndConditionalFrequency.d.ts.map +1 -1
  183. package/lib/exercises/math/probaStat/stats1var/marginalAndConditionalFrequency.js +13 -4
  184. package/lib/exercises/math/probaStat/varianceOfBinomialProba.d.ts.map +1 -1
  185. package/lib/exercises/math/probaStat/varianceOfBinomialProba.js +21 -1
  186. package/lib/exercises/math/sequences/arithmetic/arithmeticExplicitFormulaUsage.d.ts.map +1 -1
  187. package/lib/exercises/math/sequences/arithmetic/arithmeticExplicitFormulaUsage.js +15 -0
  188. package/lib/exercises/math/sequences/arithmetic/arithmeticFindExplicitFormula.d.ts.map +1 -1
  189. package/lib/exercises/math/sequences/arithmetic/arithmeticFindExplicitFormula.js +17 -1
  190. package/lib/exercises/math/sequences/arithmetic/arithmeticFindExplictFormulaFirstTermRandom.js +0 -1
  191. package/lib/exercises/math/sequences/arithmetic/arithmeticFindTerm.d.ts +10 -0
  192. package/lib/exercises/math/sequences/arithmetic/arithmeticFindTerm.d.ts.map +1 -0
  193. package/lib/exercises/math/sequences/arithmetic/arithmeticFindTerm.js +48 -0
  194. package/lib/exercises/math/sequences/arithmetic/index.d.ts +1 -0
  195. package/lib/exercises/math/sequences/arithmetic/index.d.ts.map +1 -1
  196. package/lib/exercises/math/sequences/arithmetic/index.js +1 -0
  197. package/lib/exercises/math/sequences/geometric/geometricExplicitFormulaUsage.d.ts.map +1 -1
  198. package/lib/exercises/math/sequences/geometric/geometricExplicitFormulaUsage.js +14 -1
  199. package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormula.d.ts.map +1 -1
  200. package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormula.js +15 -1
  201. package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormulaFirstTermRandom.d.ts.map +1 -1
  202. package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormulaFirstTermRandom.js +0 -1
  203. package/lib/exercises/math/sequences/geometric/geometricFindTerm.d.ts +10 -0
  204. package/lib/exercises/math/sequences/geometric/geometricFindTerm.d.ts.map +1 -0
  205. package/lib/exercises/math/sequences/geometric/geometricFindTerm.js +48 -0
  206. package/lib/exercises/math/sequences/geometric/geometricRecognizeReasonFromFirstTerms.d.ts +8 -0
  207. package/lib/exercises/math/sequences/geometric/geometricRecognizeReasonFromFirstTerms.d.ts.map +1 -0
  208. package/lib/exercises/math/sequences/geometric/geometricRecognizeReasonFromFirstTerms.js +46 -0
  209. package/lib/exercises/math/sequences/geometric/index.d.ts +2 -0
  210. package/lib/exercises/math/sequences/geometric/index.d.ts.map +1 -1
  211. package/lib/exercises/math/sequences/geometric/index.js +2 -0
  212. package/lib/exercises/math/sets/intervals/inequalityToInterval.d.ts +2 -3
  213. package/lib/exercises/math/sets/intervals/inequalityToInterval.d.ts.map +1 -1
  214. package/lib/exercises/math/sets/intervals/inequalityToInterval.js +23 -91
  215. package/lib/exercises/math/sets/intervals/intervalToInequality.d.ts +10 -0
  216. package/lib/exercises/math/sets/intervals/intervalToInequality.d.ts.map +1 -0
  217. package/lib/exercises/math/sets/intervals/intervalToInequality.js +112 -0
  218. package/lib/exercises/math/spaceGeometry/vectors/spaceVectorCoordinatesFromPoints.d.ts.map +1 -1
  219. package/lib/exercises/math/spaceGeometry/vectors/spaceVectorCoordinatesFromPoints.js +15 -0
  220. package/lib/exercises/math/spaceGeometry/vectors/spaceVectorNormCalculation.d.ts.map +1 -1
  221. package/lib/exercises/math/spaceGeometry/vectors/spaceVectorNormCalculation.js +26 -1
  222. package/lib/exercises/math/squareRoots/squareRootsSum.d.ts.map +1 -1
  223. package/lib/exercises/math/squareRoots/squareRootsSum.js +0 -1
  224. package/lib/exercises/math/suites/sequenceEvaluation.js +1 -1
  225. package/lib/exercises/math/suites/sequencePlot.d.ts.map +1 -1
  226. package/lib/exercises/math/suites/sequencePlot.js +10 -3
  227. package/lib/exercises/pc/chemicalElements/findAtomEntitiesNumberFromMass.d.ts.map +1 -1
  228. package/lib/exercises/pc/chemicalElements/findAtomEntitiesNumberFromMass.js +0 -1
  229. package/lib/exercises/pc/energy/energyTransfer.d.ts.map +1 -1
  230. package/lib/exercises/pc/energy/energyTransfer.js +0 -1
  231. package/lib/exercises/pc/forces/gravitationalAttractionObjectHeight.d.ts.map +1 -1
  232. package/lib/exercises/pc/forces/gravitationalAttractionObjectHeight.js +0 -1
  233. package/lib/exercises/pc/mecanicalWaves/elongationReading.d.ts.map +1 -1
  234. package/lib/exercises/pc/mecanicalWaves/elongationReading.js +0 -1
  235. package/lib/index.d.ts +72 -5
  236. package/lib/index.d.ts.map +1 -1
  237. package/lib/index.js +3 -0
  238. package/lib/math/geometry/line.d.ts.map +1 -1
  239. package/lib/math/geometry/line.js +0 -2
  240. package/lib/math/geometry/spaceVector.d.ts +1 -0
  241. package/lib/math/geometry/spaceVector.d.ts.map +1 -1
  242. package/lib/math/geometry/spaceVector.js +3 -0
  243. package/lib/math/polynomials/trinom.js +2 -2
  244. package/lib/pc/constants/molecularChemistry/reaction.js +3 -1
  245. package/lib/playground.d.ts.map +1 -1
  246. package/lib/playground.js +2 -14
  247. package/lib/server.d.ts +1 -0
  248. package/lib/server.d.ts.map +1 -1
  249. package/lib/server.js +4 -1
  250. package/lib/tree/nodes/sets/closure.d.ts +2 -0
  251. package/lib/tree/nodes/sets/closure.d.ts.map +1 -1
  252. package/lib/tree/nodes/sets/closure.js +24 -0
  253. package/lib/tree/nodes/sets/intervalNode.d.ts +3 -0
  254. package/lib/tree/nodes/sets/intervalNode.d.ts.map +1 -1
  255. package/lib/tree/nodes/sets/intervalNode.js +13 -0
  256. package/lib/tree/parsers/latexParser.js +6 -6
  257. package/lib/utils/numberPrototype/toSeparatedThousands.d.ts +2 -0
  258. package/lib/utils/numberPrototype/toSeparatedThousands.d.ts.map +1 -0
  259. package/lib/utils/numberPrototype/toSeparatedThousands.js +12 -0
  260. package/package.json +1 -1
@@ -51,7 +51,7 @@ const isAnswerValid = (studentAns, { answer }) => {
51
51
  exports.addAndSubExercise = {
52
52
  id: "addAndSub",
53
53
  connector: "=",
54
- label: "Additions et soustractions",
54
+ label: "Additions et soustractions de nombres entiers",
55
55
  levels: ["6ème", "5ème"],
56
56
  sections: ["Calculs"],
57
57
  isSingleStep: true,
@@ -61,7 +61,7 @@ const isAnswerValid = (studentAns, { answer }) => {
61
61
  exports.addAndSubWithoutRelatives = {
62
62
  id: "addAndSubWithoutRelatives",
63
63
  connector: "=",
64
- label: "Additions et soustractions sans les nombres relatifs",
64
+ label: "Additions et soustractions de nombres entiers (sans relatifs)",
65
65
  levels: ["6ème", "5ème"],
66
66
  sections: ["Calculs"],
67
67
  isSingleStep: true,
@@ -1 +1 @@
1
- {"version":3,"file":"divisorsList.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/arithmetics/divisorsList.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAOlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA6CF,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,WAAW,CAY9C,CAAC"}
1
+ {"version":3,"file":"divisorsList.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/arithmetics/divisorsList.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAOlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAgDF,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,WAAW,CAY9C,CAAC"}
@@ -10,11 +10,11 @@ const doWhile_1 = require("../../../../utils/doWhile");
10
10
  const getDivisorsListQuestion = () => {
11
11
  const a = (0, randint_1.randint)(30, 90);
12
12
  const divisors = (0, dividersOf_1.dividersOf)(a);
13
- const answer = divisors.join(",");
13
+ const answer = divisors.join(";");
14
14
  const question = {
15
15
  answer,
16
- instruction: `Donner la liste des diviseurs de $${a}$ (séparer les valeurs par des virgules).`,
17
- keys: [],
16
+ instruction: `Donner la liste des diviseurs de $${a}$ (séparer les valeurs par des point-virgules).`,
17
+ keys: ["semicolon"],
18
18
  answerFormat: "tex",
19
19
  identifiers: { a },
20
20
  };
@@ -23,7 +23,7 @@ const getDivisorsListQuestion = () => {
23
23
  const getPropositions = (n, { answer }) => {
24
24
  const propositions = [];
25
25
  (0, exercise_1.addValidProp)(propositions, answer);
26
- const values = answer.split(",").map((v) => Number(v));
26
+ const values = answer.split(";").map((v) => Number(v));
27
27
  while (propositions.length < n) {
28
28
  const newValue = (0, doWhile_1.doWhile)(() => (0, randint_1.randint)(2, values[values.length - 1]), (x) => values.includes(x));
29
29
  const copy = values.slice();
@@ -31,16 +31,19 @@ const getPropositions = (n, { answer }) => {
31
31
  willRemove
32
32
  ? copy.splice((0, randint_1.randint)(0, values.length), 1)
33
33
  : copy.splice(0, 0, newValue);
34
- (0, exercise_1.tryToAddWrongProp)(propositions, willRemove ? copy.join(",") : copy.sort((a, b) => a - b).join(","));
34
+ (0, exercise_1.tryToAddWrongProp)(propositions, willRemove ? copy.join(";") : copy.sort((a, b) => a - b).join(";"));
35
35
  }
36
36
  return (0, exercise_1.shuffleProps)(propositions, n);
37
37
  };
38
38
  const isAnswerValid = (ans, { answer }) => {
39
- let values = ans.split(",").map((v) => Number(v));
39
+ let values = ans
40
+ .replaceAll(",", ";")
41
+ .split(";")
42
+ .map((v) => Number(v));
40
43
  if (values.some((v) => isNaN(v)))
41
44
  return false;
42
45
  values.sort((a, b) => a - b);
43
- return values.join(",") === answer;
46
+ return values.join(";") === answer;
44
47
  };
45
48
  exports.divisorsList = {
46
49
  id: "divisorsList",
@@ -1 +1 @@
1
- {"version":3,"file":"primeNumbers.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/arithmetics/primeNumbers.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,QAAQ,EAST,MAAM,mBAAmB,CAAC;AAsD3B,KAAK,WAAW,GAAG;IACjB,aAAa,EAAE,MAAM,EAAE,CAAC;CACzB,CAAC;AAuDF,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,WAAW,CAa9C,CAAC"}
1
+ {"version":3,"file":"primeNumbers.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/arithmetics/primeNumbers.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,QAAQ,EAST,MAAM,mBAAmB,CAAC;AAsD3B,KAAK,WAAW,GAAG;IACjB,aAAa,EAAE,MAAM,EAAE,CAAC;CACzB,CAAC;AAsDF,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,WAAW,CAa9C,CAAC"}
@@ -87,7 +87,6 @@ const isAnswerValid = (ans, { chosenNumbers }) => {
87
87
  });
88
88
  const answer = nodes.length === 1 ? nodes[0] : (0, operatorComposition_1.operatorComposition)(multiplyNode_1.MultiplyNode, nodes);
89
89
  const texs = answer.toAllValidTexs();
90
- console.log(texs);
91
90
  return texs.includes(ans);
92
91
  };
93
92
  exports.primeNumbers = {
@@ -1 +1 @@
1
- {"version":3,"file":"digitDecimalRank.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/calcul/digitDecimalRank.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AA0CF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAelD,CAAC"}
1
+ {"version":3,"file":"digitDecimalRank.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/calcul/digitDecimalRank.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AA0CF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAelD,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 toSeparatedThousands_1 = require("../../../utils/numberPrototype/toSeparatedThousands");
8
9
  const ordinals = ["premier", "deuxième", "troisième", "quatrième"];
9
10
  const getDigitDecimalRankQuestion = () => {
10
11
  const decimalPartSize = (0, randint_1.randint)(2, 5);
@@ -15,9 +16,7 @@ const getDigitDecimalRankQuestion = () => {
15
16
  const answer = decimalPartString[rankAsked];
16
17
  const question = {
17
18
  answer,
18
- instruction: `Quel est le chiffre des ${rankAskedLabel} dans le nombre $${nb
19
- .toTree()
20
- .toTex()}$ ?`,
19
+ instruction: `Quel est le chiffre des ${rankAskedLabel} dans le nombre $${(0, toSeparatedThousands_1.toSeperatedThousands)(nb.toTree().toTex())}$ ?`,
21
20
  keys: [],
22
21
  answerFormat: "tex",
23
22
  identifiers: { nb: nb.tex, rankAsked },
@@ -1 +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"}
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;AAalC,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"}
@@ -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 toSeparatedThousands_1 = require("../../../utils/numberPrototype/toSeparatedThousands");
8
9
  const ordinals = ["premier", "deuxième", "troisième", "quatrième"];
9
10
  const getDigitRankNumberQuestion = () => {
10
11
  const decimalPartSize = (0, randint_1.randint)(2, 5);
@@ -15,9 +16,7 @@ const getDigitRankNumberQuestion = () => {
15
16
  const answer = str.split(".")[0] + str.split(".")[1].substring(0, rankAsked + 1);
16
17
  const question = {
17
18
  answer,
18
- instruction: `Quel est le nombre de ${rankAskedLabel} dans le nombre $${nb
19
- .toTree()
20
- .toTex()}$ ?`,
19
+ instruction: `Quel est le nombre de ${rankAskedLabel} dans le nombre $${(0, toSeparatedThousands_1.toSeperatedThousands)(nb.toTree().toTex())}$ ?`,
21
20
  keys: [],
22
21
  // hint: `Attention ! On demande le 'nombre' et non pas le 'chiffre' !`,
23
22
  // correction: `Le chiffre des ${rankAskedLabel} est le ${ordinals[rankAsked]} chiffre en partant de la droite. Donc le chiffre des ${rankAskedLabel} est $${answer}$.`,
@@ -1 +1 @@
1
- {"version":3,"file":"digitRank.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/calcul/digitRank.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;AA0CF,eAAO,MAAM,SAAS,EAAE,QAAQ,CAAC,WAAW,CAc3C,CAAC"}
1
+ {"version":3,"file":"digitRank.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/calcul/digitRank.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AA0CF,eAAO,MAAM,SAAS,EAAE,QAAQ,CAAC,WAAW,CAc3C,CAAC"}
@@ -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 toSeparatedThousands_1 = require("../../../utils/numberPrototype/toSeparatedThousands");
8
9
  const ordinals = ["premier", "deuxième", "troisième", "quatrième"];
9
10
  const getDigitRankQuestion = () => {
10
11
  const size = (0, randint_1.randint)(3, 6);
@@ -15,9 +16,7 @@ const getDigitRankQuestion = () => {
15
16
  const answer = nbString[nbString.length - rankAsked - 1];
16
17
  const question = {
17
18
  answer,
18
- instruction: `Quel est le chiffre des ${rankAskedLabel} dans le nombre $${nb
19
- .toTree()
20
- .toTex()}$ ?`,
19
+ instruction: `Quel est le chiffre des ${rankAskedLabel} dans le nombre $${(0, toSeparatedThousands_1.toSeperatedThousands)(nb.toTree().toTex())}$ ?`,
21
20
  keys: [],
22
21
  hint: `Le chiffre des ${rankAskedLabel} est le ${ordinals[rankAsked]} chiffre en partant de la droite.`,
23
22
  correction: `Le chiffre des ${rankAskedLabel} est le ${ordinals[rankAsked]} chiffre en partant de la droite. Donc le chiffre des ${rankAskedLabel} est $${answer}$.`,
@@ -1 +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"}
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;AASlC,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AA+CF,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,CAcjD,CAAC"}
@@ -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 toSeparatedThousands_1 = require("../../../utils/numberPrototype/toSeparatedThousands");
8
9
  const ordinals = ["premier", "deuxième", "troisième", "quatrième"];
9
10
  const getDigitRankNumberQuestion = () => {
10
11
  const size = (0, randint_1.randint)(3, 6);
@@ -15,10 +16,8 @@ const getDigitRankNumberQuestion = () => {
15
16
  const answer = nbString.substring(0, nbString.length - rankAsked);
16
17
  const question = {
17
18
  answer,
18
- instruction: `Quel est le nombre ${rankAsked === 0 ? "d'" : "de "}${rankAskedLabel} dans le nombre $${nb.toTree().toTex()}$ ?`,
19
+ instruction: `Quel est le nombre ${rankAsked === 0 ? "d'" : "de "}${rankAskedLabel} dans le nombre $${(0, toSeparatedThousands_1.toSeperatedThousands)(nb.toTree().toTex())}$ ?`,
19
20
  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
21
  answerFormat: "tex",
23
22
  identifiers: { nb, rankAsked },
24
23
  };
@@ -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;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"}
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;AAwCF,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,WAAW,CAe5D,CAAC"}
@@ -92,7 +92,6 @@ const isAnswerValid = (ans, { integer, integerFirst, rational }) => {
92
92
  ? integerObj.divide(rationalObj).toTree({ allowFractionToDecimal: true })
93
93
  : rationalObj.divide(integerObj).toTree({ allowFractionToDecimal: true });
94
94
  const texs = answerTree.toAllValidTexs();
95
- console.log(texs);
96
95
  return texs.includes(ans);
97
96
  };
98
97
  exports.fractionAndIntegerDivision = {
@@ -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;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"}
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;AAqCF,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,WAAW,CAe3D,CAAC"}
@@ -66,7 +66,6 @@ const isAnswerValid = (ans, { integer, rational }) => {
66
66
  .multiply(integerObj)
67
67
  .toTree({ allowFractionToDecimal: true });
68
68
  const texs = answerTree.toAllValidTexs();
69
- console.log(texs);
70
69
  return texs.includes(ans);
71
70
  };
72
71
  exports.fractionAndIntegerProduct = {
@@ -1 +1 @@
1
- {"version":3,"file":"fractionToPercentToDecimal.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/fractions/fractionToPercentToDecimal.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AA+FlC,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAuFF,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,WAAW,CAc5D,CAAC"}
1
+ {"version":3,"file":"fractionToPercentToDecimal.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/fractions/fractionToPercentToDecimal.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AA+FlC,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAsFF,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,WAAW,CAc5D,CAAC"}
@@ -139,7 +139,6 @@ const isAnswerValid = (ans, { rand, numerator, denominator }) => {
139
139
  throw Error("wrong type in fractiontopercenttodecimal");
140
140
  }
141
141
  const texs = answer.toAllValidTexs();
142
- console.log(texs);
143
142
  return texs.includes(ans);
144
143
  };
145
144
  exports.fractionToPercentToDecimal = {
@@ -0,0 +1,10 @@
1
+ import { Exercise } from "../../../../exercises/exercise";
2
+ type Identifiers = {
3
+ num1: number;
4
+ num2: number;
5
+ denom1: number;
6
+ denom2: number;
7
+ };
8
+ export declare const fractionsSumsMultiplesDenominators: Exercise<Identifiers>;
9
+ export {};
10
+ //# sourceMappingURL=fractionsSumsMultiplesDenominators.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fractionsSumsMultiplesDenominators.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/fractions/fractionsSumsMultiplesDenominators.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AA2DF,eAAO,MAAM,kCAAkC,EAAE,QAAQ,CAAC,WAAW,CAcpE,CAAC"}
@@ -0,0 +1,61 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.fractionsSumsMultiplesDenominators = void 0;
4
+ const exercise_1 = require("../../../../exercises/exercise");
5
+ const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQuestions");
6
+ const rational_1 = require("../../../../math/numbers/rationals/rational");
7
+ const randint_1 = require("../../../../math/utils/random/randint");
8
+ const addNode_1 = require("../../../../tree/nodes/operators/addNode");
9
+ const coinFlip_1 = require("../../../../utils/coinFlip");
10
+ const getFractionsSumsMultiplesDenominatorsQuestion = () => {
11
+ let denom1 = (0, randint_1.randint)(2, 10);
12
+ let denom2 = denom1 * (0, randint_1.randint)(2, 10);
13
+ if ((0, coinFlip_1.coinFlip)())
14
+ [denom1, denom2] = [denom2, denom1];
15
+ const num1 = (0, randint_1.randint)(1, 10, [denom1]);
16
+ const num2 = (0, randint_1.randint)(1, 10, [denom2]);
17
+ const ratio1 = new rational_1.Rational(num1, denom1);
18
+ const ratio2 = new rational_1.Rational(num2, denom2);
19
+ const statement = new addNode_1.AddNode(ratio1.toTree(), ratio2.toTree()).toTex();
20
+ const answer = ratio1.add(ratio2).toTree().toTex();
21
+ const question = {
22
+ answer,
23
+ instruction: `Calculer et donner le résultat sous forme de fraction irréductible : $${statement}$`,
24
+ keys: [],
25
+ answerFormat: "tex",
26
+ identifiers: { num1, num2, denom1, denom2 },
27
+ };
28
+ return question;
29
+ };
30
+ const getPropositions = (n, { answer, num1, num2, denom1, denom2 }) => {
31
+ const propositions = [];
32
+ (0, exercise_1.addValidProp)(propositions, answer);
33
+ (0, exercise_1.tryToAddWrongProp)(propositions, new rational_1.Rational(num1 + num2, denom1 + denom2).simplify().toTree().toTex());
34
+ while (propositions.length < n) {
35
+ (0, exercise_1.tryToAddWrongProp)(propositions, rational_1.RationalConstructor.randomIrreductible().toTree().toTex());
36
+ }
37
+ return (0, exercise_1.shuffleProps)(propositions, n);
38
+ };
39
+ const isAnswerValid = (ans, { answer, denom1, denom2, num1, num2 }) => {
40
+ const rationalA = new rational_1.Rational(num1, denom1);
41
+ const rationalB = new rational_1.Rational(num2, denom2);
42
+ const answerTree = rationalA
43
+ .add(rationalB)
44
+ .toTree({ allowFractionToDecimal: true });
45
+ const texs = answerTree.toAllValidTexs();
46
+ return texs.includes(ans);
47
+ };
48
+ exports.fractionsSumsMultiplesDenominators = {
49
+ id: "fractionsSumsMultiplesDenominators",
50
+ connector: "=",
51
+ label: "Sommes de fractions (avec dénominateurs multiples l'un de l'autre)",
52
+ levels: [],
53
+ isSingleStep: true,
54
+ sections: [],
55
+ generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getFractionsSumsMultiplesDenominatorsQuestion, nb),
56
+ qcmTimer: 60,
57
+ freeTimer: 60,
58
+ getPropositions,
59
+ isAnswerValid,
60
+ subject: "Mathématiques",
61
+ };
@@ -0,0 +1,10 @@
1
+ import { Exercise } from "../../../../exercises/exercise";
2
+ type Identifiers = {
3
+ num1: number;
4
+ num2: number;
5
+ denom1: number;
6
+ denom2: number;
7
+ };
8
+ export declare const fractionsSumsPrimeDenominators: Exercise<Identifiers>;
9
+ export {};
10
+ //# sourceMappingURL=fractionsSumsPrimeDenominators.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fractionsSumsPrimeDenominators.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/fractions/fractionsSumsPrimeDenominators.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAkDF,eAAO,MAAM,8BAA8B,EAAE,QAAQ,CAAC,WAAW,CAchE,CAAC"}
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.fractionsSumsPrimeDenominators = void 0;
4
+ const exercise_1 = require("../../../../exercises/exercise");
5
+ const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQuestions");
6
+ const rational_1 = require("../../../../math/numbers/rationals/rational");
7
+ const gcd_1 = require("../../../../math/utils/arithmetic/gcd");
8
+ const randint_1 = require("../../../../math/utils/random/randint");
9
+ const addNode_1 = require("../../../../tree/nodes/operators/addNode");
10
+ const getFractionsSumsPrimeDenominatorsQuestion = () => {
11
+ const denom1 = (0, randint_1.randint)(2, 13);
12
+ let denom2 = 0;
13
+ do {
14
+ denom2 = (0, randint_1.randint)(2, 13);
15
+ } while ((0, gcd_1.gcd)(denom1, denom2) !== 1);
16
+ const num1 = (0, randint_1.randint)(1, 10, [denom1]);
17
+ const num2 = (0, randint_1.randint)(1, 10, [denom2]);
18
+ const ratio1 = new rational_1.Rational(num1, denom1);
19
+ const ratio2 = new rational_1.Rational(num2, denom2);
20
+ const statement = new addNode_1.AddNode(ratio1.toTree(), ratio2.toTree()).toTex();
21
+ const answer = ratio1.add(ratio2).toTree().toTex();
22
+ const question = {
23
+ answer,
24
+ instruction: `Calculer et donner le résultat sous forme de fraction irréductible : $${statement}$`,
25
+ keys: [],
26
+ answerFormat: "tex",
27
+ identifiers: { num1, num2, denom1, denom2 },
28
+ };
29
+ return question;
30
+ };
31
+ const getPropositions = (n, { answer, num1, denom1, denom2, num2 }) => {
32
+ const propositions = [];
33
+ (0, exercise_1.addValidProp)(propositions, answer);
34
+ (0, exercise_1.tryToAddWrongProp)(propositions, new rational_1.Rational(num1 + num2, denom1 + denom2).simplify().toTree().toTex());
35
+ while (propositions.length < n) {
36
+ (0, exercise_1.tryToAddWrongProp)(propositions, rational_1.RationalConstructor.randomIrreductible().toTree().toTex());
37
+ }
38
+ return (0, exercise_1.shuffleProps)(propositions, n);
39
+ };
40
+ const isAnswerValid = (ans, { answer }) => {
41
+ return ans === answer;
42
+ };
43
+ exports.fractionsSumsPrimeDenominators = {
44
+ id: "fractionsSumsPrimeDenominators",
45
+ connector: "=",
46
+ label: "Sommes de fractions (dénominateurs premiers entre eux)",
47
+ levels: [],
48
+ isSingleStep: true,
49
+ sections: [],
50
+ generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getFractionsSumsPrimeDenominatorsQuestion, nb),
51
+ qcmTimer: 60,
52
+ freeTimer: 60,
53
+ getPropositions,
54
+ isAnswerValid,
55
+ subject: "Mathématiques",
56
+ };
@@ -0,0 +1,9 @@
1
+ import { Exercise } from "../../../../exercises/exercise";
2
+ type Identifiers = {
3
+ denom: number;
4
+ num1: number;
5
+ num2: number;
6
+ };
7
+ export declare const fractionsSumsSameDenominators: Exercise<Identifiers>;
8
+ export {};
9
+ //# sourceMappingURL=fractionsSumsSameDenominators.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fractionsSumsSameDenominators.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/fractions/fractionsSumsSameDenominators.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAyDF,eAAO,MAAM,6BAA6B,EAAE,QAAQ,CAAC,WAAW,CAc/D,CAAC"}
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.fractionsSumsSameDenominators = void 0;
4
+ const exercise_1 = require("../../../../exercises/exercise");
5
+ const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQuestions");
6
+ const rational_1 = require("../../../../math/numbers/rationals/rational");
7
+ const randint_1 = require("../../../../math/utils/random/randint");
8
+ const addNode_1 = require("../../../../tree/nodes/operators/addNode");
9
+ const getFractionsSumsSameDenominatorsQuestion = () => {
10
+ const denom = (0, randint_1.randint)(2, 15);
11
+ const num1 = (0, randint_1.randint)(1, denom + 10);
12
+ const num2 = (0, randint_1.randint)(1, denom + 10);
13
+ const ratio1 = new rational_1.Rational(num1, denom).toTree();
14
+ const ratio2 = new rational_1.Rational(num2, denom).toTree();
15
+ const statement = new addNode_1.AddNode(ratio1, ratio2).toTex();
16
+ const answer = new rational_1.Rational(num1 + num2, denom).simplify().toTree().toTex();
17
+ const question = {
18
+ answer,
19
+ instruction: `Calculer et donner le résultat sous forme d'une fraction irréductible : $${statement}$`,
20
+ keys: [],
21
+ answerFormat: "tex",
22
+ identifiers: { denom, num1, num2 },
23
+ };
24
+ return question;
25
+ };
26
+ const getPropositions = (n, { answer, denom, num1, num2 }) => {
27
+ const propositions = [];
28
+ (0, exercise_1.addValidProp)(propositions, answer);
29
+ (0, exercise_1.tryToAddWrongProp)(propositions, new rational_1.Rational(num1 + num2, denom * 2).simplify().toTree().toTex());
30
+ while (propositions.length < n) {
31
+ (0, exercise_1.tryToAddWrongProp)(propositions, rational_1.RationalConstructor.randomIrreductible().toTree().toTex());
32
+ }
33
+ return (0, exercise_1.shuffleProps)(propositions, n);
34
+ };
35
+ const isAnswerValid = (ans, { answer, denom, num1, num2 }) => {
36
+ const rationalA = new rational_1.Rational(num1, denom);
37
+ const rationalB = new rational_1.Rational(num2, denom);
38
+ const answerTree = rationalA
39
+ .add(rationalB)
40
+ .toTree({ allowFractionToDecimal: true });
41
+ const texs = answerTree.toAllValidTexs();
42
+ return texs.includes(ans);
43
+ };
44
+ exports.fractionsSumsSameDenominators = {
45
+ id: "fractionsSumsSameDenominators",
46
+ connector: "=",
47
+ label: "Sommes de fractions (avec même dénominateurs)",
48
+ levels: [],
49
+ isSingleStep: true,
50
+ sections: [],
51
+ generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getFractionsSumsSameDenominatorsQuestion, nb),
52
+ qcmTimer: 60,
53
+ freeTimer: 60,
54
+ getPropositions,
55
+ isAnswerValid,
56
+ subject: "Mathématiques",
57
+ };
@@ -7,4 +7,7 @@ export * from "./fractionsProduct";
7
7
  export * from "./fractionsSum";
8
8
  export * from "./simplifyFraction";
9
9
  export * from "./periodicWritingToFraction";
10
+ export * from "./fractionsSumsSameDenominators";
11
+ export * from "./fractionsSumsMultiplesDenominators";
12
+ export * from "./fractionsSumsPrimeDenominators";
10
13
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/fractions/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC;AAC7C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,yBAAyB,CAAC;AACxC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,6BAA6B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/fractions/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC;AAC7C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,yBAAyB,CAAC;AACxC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,iCAAiC,CAAC;AAChD,cAAc,sCAAsC,CAAC;AACrD,cAAc,kCAAkC,CAAC"}
@@ -23,3 +23,6 @@ __exportStar(require("./fractionsProduct"), exports);
23
23
  __exportStar(require("./fractionsSum"), exports);
24
24
  __exportStar(require("./simplifyFraction"), exports);
25
25
  __exportStar(require("./periodicWritingToFraction"), exports);
26
+ __exportStar(require("./fractionsSumsSameDenominators"), exports);
27
+ __exportStar(require("./fractionsSumsMultiplesDenominators"), exports);
28
+ __exportStar(require("./fractionsSumsPrimeDenominators"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"simplifyFraction.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/fractions/simplifyFraction.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAQlC,KAAK,WAAW,GAAG;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AA2CF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAalD,CAAC"}
1
+ {"version":3,"file":"simplifyFraction.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/fractions/simplifyFraction.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAQlC,KAAK,WAAW,GAAG;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AA0CF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAalD,CAAC"}
@@ -34,7 +34,6 @@ const isAnswerValid = (ans, { num, denum }) => {
34
34
  .simplify()
35
35
  .toTree({ allowFractionToDecimal: true });
36
36
  const texs = answerTree.toAllValidTexs();
37
- console.log(texs);
38
37
  return texs.includes(ans);
39
38
  };
40
39
  exports.simplifyFraction = {
@@ -2,4 +2,6 @@ export * from "./mentalAddAndSub";
2
2
  export * from "./mentalDivisions";
3
3
  export * from "./mentalMultiplications";
4
4
  export * from "./mentalPercentage";
5
+ export * from "./mentalAddAndSubNoRelative";
6
+ export * from "./mentalMultiplicationsNoRelative";
5
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/mentalCaluls/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/mentalCaluls/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,mCAAmC,CAAC"}
@@ -18,3 +18,5 @@ __exportStar(require("./mentalAddAndSub"), exports);
18
18
  __exportStar(require("./mentalDivisions"), exports);
19
19
  __exportStar(require("./mentalMultiplications"), exports);
20
20
  __exportStar(require("./mentalPercentage"), exports);
21
+ __exportStar(require("./mentalAddAndSubNoRelative"), exports);
22
+ __exportStar(require("./mentalMultiplicationsNoRelative"), exports);
@@ -62,7 +62,7 @@ const isAnswerValid = (studentAns, { numbers }) => {
62
62
  exports.mentalAddAndSub = {
63
63
  id: "mentalAddAndSub",
64
64
  connector: "=",
65
- label: "Effectuer mentalement des additions et des soustractions simples",
65
+ label: "Additions et soustractions avec des décimaux",
66
66
  levels: [
67
67
  "6ème",
68
68
  "5ème",
@@ -0,0 +1,7 @@
1
+ import { Exercise } from "../../../../exercises/exercise";
2
+ type Identifiers = {
3
+ numbers: number[];
4
+ };
5
+ export declare const mentalAddAndSubNoRelative: Exercise<Identifiers>;
6
+ export {};
7
+ //# sourceMappingURL=mentalAddAndSubNoRelative.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mentalAddAndSubNoRelative.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/mentalCaluls/mentalAddAndSubNoRelative.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AAQlC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB,CAAC;AAgEF,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,WAAW,CAc3D,CAAC"}
@@ -0,0 +1,71 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.mentalAddAndSubNoRelative = void 0;
4
+ const exercise_1 = require("../../../../exercises/exercise");
5
+ const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQuestions");
6
+ const randfloat_1 = require("../../../../math/utils/random/randfloat");
7
+ const randint_1 = require("../../../../math/utils/random/randint");
8
+ const round_1 = require("../../../../math/utils/round");
9
+ const numberNode_1 = require("../../../../tree/nodes/numbers/numberNode");
10
+ const addNode_1 = require("../../../../tree/nodes/operators/addNode");
11
+ const getMentalAddAndSubNoRelativeQuestion = () => {
12
+ let answer = -1;
13
+ let statementTree;
14
+ let numbers = [];
15
+ while (answer < 0) {
16
+ const nbOperations = (0, randint_1.randint)(2, 4);
17
+ numbers = [];
18
+ do {
19
+ numbers = [];
20
+ numbers.push((0, randfloat_1.randfloat)(1, 15, (0, randint_1.randint)(1, 3)));
21
+ let sum = numbers[0];
22
+ for (let i = 1; i < nbOperations + 1; i++) {
23
+ numbers.push((0, randfloat_1.randfloat)(-sum, 15, (0, randint_1.randint)(1, 3), [0]));
24
+ sum += numbers[i];
25
+ }
26
+ } while (numbers.every((a) => a > 0));
27
+ const allNumbersNodes = numbers.map((nb) => new numberNode_1.NumberNode(nb));
28
+ statementTree = new addNode_1.AddNode(allNumbersNodes[0], allNumbersNodes[1]);
29
+ for (let i = 2; i < allNumbersNodes.length; i++) {
30
+ statementTree = new addNode_1.AddNode(statementTree, allNumbersNodes[i]);
31
+ }
32
+ answer = (0, round_1.round)(numbers.reduce((a, b) => a + b), 2);
33
+ }
34
+ const answerTex = answer.frenchify();
35
+ const question = {
36
+ answer: answerTex,
37
+ instruction: `Calculer : $${statementTree.toTex()}$`,
38
+ startStatement: statementTree.toTex(),
39
+ keys: [],
40
+ answerFormat: "tex",
41
+ identifiers: { numbers },
42
+ };
43
+ return question;
44
+ };
45
+ const getPropositions = (n, { answer }) => {
46
+ const propositions = [];
47
+ (0, exercise_1.addValidProp)(propositions, answer);
48
+ const answerNb = answer.unfrenchify();
49
+ while (propositions.length < n) {
50
+ const incorrectAnswer = (0, round_1.round)(answerNb + Math.max(-answerNb, (0, randfloat_1.randfloat)(-5, 6, (0, randint_1.randint)(1, 3), [0])), 2);
51
+ (0, exercise_1.tryToAddWrongProp)(propositions, incorrectAnswer.frenchify());
52
+ }
53
+ return (0, exercise_1.shuffleProps)(propositions, n);
54
+ };
55
+ const isAnswerValid = (ans, { answer }) => {
56
+ return ans === answer;
57
+ };
58
+ exports.mentalAddAndSubNoRelative = {
59
+ id: "mentalAddAndSubNoRelative",
60
+ connector: "=",
61
+ label: "Additions et soustractions avec des décimaux (sans relatifs)",
62
+ levels: [],
63
+ isSingleStep: true,
64
+ sections: [],
65
+ generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getMentalAddAndSubNoRelativeQuestion, nb),
66
+ qcmTimer: 60,
67
+ freeTimer: 60,
68
+ getPropositions,
69
+ isAnswerValid,
70
+ subject: "Mathématiques",
71
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"mentalMultiplications.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/mentalCaluls/mentalMultiplications.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAQlC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB,CAAC;AAqEF,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,WAAW,CAuBvD,CAAC"}
1
+ {"version":3,"file":"mentalMultiplications.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/mentalCaluls/mentalMultiplications.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAQlC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB,CAAC;AA6EF,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,WAAW,CAuBvD,CAAC"}