math-exercises 3.0.64 → 3.0.65

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 (338) hide show
  1. package/lib/exercises/math/calcul/arithmetics/commonDivisorsList.d.ts.map +1 -1
  2. package/lib/exercises/math/calcul/arithmetics/commonDivisorsList.js +4 -6
  3. package/lib/exercises/math/calcul/arithmetics/divisibiltyCriteria.d.ts.map +1 -1
  4. package/lib/exercises/math/calcul/arithmetics/divisibiltyCriteria.js +4 -5
  5. package/lib/exercises/math/calcul/arithmetics/divisorsList.d.ts.map +1 -1
  6. package/lib/exercises/math/calcul/arithmetics/divisorsList.js +18 -7
  7. package/lib/exercises/math/calcul/arithmetics/euclideanDivision.d.ts.map +1 -1
  8. package/lib/exercises/math/calcul/arithmetics/euclideanDivision.js +18 -7
  9. package/lib/exercises/math/calcul/arithmetics/paritySumsAndProducts.d.ts.map +1 -1
  10. package/lib/exercises/math/calcul/arithmetics/paritySumsAndProducts.js +56 -47
  11. package/lib/exercises/math/calcul/arithmetics/pgcdCalcul.d.ts.map +1 -1
  12. package/lib/exercises/math/calcul/arithmetics/pgcdCalcul.js +4 -4
  13. package/lib/exercises/math/calcul/arithmetics/ppcmCalcul.d.ts.map +1 -1
  14. package/lib/exercises/math/calcul/arithmetics/ppcmCalcul.js +0 -4
  15. package/lib/exercises/math/calcul/arithmetics/primeNumbers.d.ts.map +1 -1
  16. package/lib/exercises/math/calcul/arithmetics/primeNumbers.js +4 -3
  17. package/lib/exercises/math/calcul/decimals/multiplyDecimalByNegativeTens.js +2 -2
  18. package/lib/exercises/math/calcul/decimals/multiplyDecimalByTens.d.ts.map +1 -1
  19. package/lib/exercises/math/calcul/decimals/multiplyDecimalByTens.js +6 -8
  20. package/lib/exercises/math/calcul/fractions/fractionAndIntegerDivision.d.ts.map +1 -1
  21. package/lib/exercises/math/calcul/fractions/fractionAndIntegerDivision.js +2 -5
  22. package/lib/exercises/math/calcul/fractions/fractionsSumsSameDenominators.js +1 -1
  23. package/lib/exercises/math/calcul/fractions/simplifyFraction.js +2 -2
  24. package/lib/exercises/math/calcul/operations/index.d.ts +1 -0
  25. package/lib/exercises/math/calcul/operations/index.d.ts.map +1 -1
  26. package/lib/exercises/math/calcul/operations/index.js +1 -0
  27. package/lib/exercises/math/calcul/operations/numberInverse.d.ts +8 -0
  28. package/lib/exercises/math/calcul/operations/numberInverse.d.ts.map +1 -0
  29. package/lib/exercises/math/calcul/operations/numberInverse.js +113 -0
  30. package/lib/exercises/math/calcul/proportionality/rectangleSideAfterReduction.d.ts.map +1 -1
  31. package/lib/exercises/math/calcul/proportionality/rectangleSideAfterReduction.js +4 -2
  32. package/lib/exercises/math/calcul/proportionality/scaleCalculation.d.ts.map +1 -1
  33. package/lib/exercises/math/calcul/proportionality/scaleCalculation.js +65 -35
  34. package/lib/exercises/math/calculLitteral/distributivity/doubleDistributivityWithCoeff.js +2 -2
  35. package/lib/exercises/math/calculLitteral/distributivity/simpleDistriXCoeff.js +1 -1
  36. package/lib/exercises/math/calculLitteral/equation/choseOperationToSolveEquation.js +17 -17
  37. package/lib/exercises/math/calculLitteral/equation/equa1.js +1 -1
  38. package/lib/exercises/math/calculLitteral/equation/equa2.js +1 -1
  39. package/lib/exercises/math/calculLitteral/equation/equa3.d.ts.map +1 -1
  40. package/lib/exercises/math/calculLitteral/equation/equa3.js +2 -4
  41. package/lib/exercises/math/calculLitteral/equation/equa4.js +1 -1
  42. package/lib/exercises/math/calculLitteral/equation/equationFromSentenceExercise.d.ts.map +1 -1
  43. package/lib/exercises/math/calculLitteral/equation/equationFromSentenceExercise.js +78 -63
  44. package/lib/exercises/math/calculLitteral/equation/firstDegreeEquation.js +3 -3
  45. package/lib/exercises/math/calculLitteral/equation/firstDegreeEquationIntType1.js +1 -1
  46. package/lib/exercises/math/calculLitteral/equation/firstDegreeEquationIntType2.d.ts.map +1 -1
  47. package/lib/exercises/math/calculLitteral/equation/firstDegreeEquationIntType2.js +2 -4
  48. package/lib/exercises/math/calculLitteral/equation/firstDegreeEquationIntType3.js +1 -1
  49. package/lib/exercises/math/calculLitteral/equation/multiplicationEquation.js +1 -1
  50. package/lib/exercises/math/calculLitteral/factorisation/factoType2.js +1 -1
  51. package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType0.d.ts.map +1 -1
  52. package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType0.js +4 -5
  53. package/lib/exercises/math/calculLitteral/simplifying/evaluateExpression.d.ts.map +1 -1
  54. package/lib/exercises/math/calculLitteral/simplifying/evaluateExpression.js +1 -0
  55. package/lib/exercises/math/calculLitteral/simplifying/valuateExpression.js +1 -1
  56. package/lib/exercises/math/conversion/aeraConversion.d.ts.map +1 -1
  57. package/lib/exercises/math/conversion/aeraConversion.js +4 -4
  58. package/lib/exercises/math/conversion/hoursToDecimal.d.ts.map +1 -1
  59. package/lib/exercises/math/conversion/hoursToDecimal.js +6 -5
  60. package/lib/exercises/math/conversion/hoursToSecond.d.ts.map +1 -1
  61. package/lib/exercises/math/conversion/hoursToSecond.js +8 -7
  62. package/lib/exercises/math/conversion/lengthConversion.js +1 -1
  63. package/lib/exercises/math/conversion/massConversion.js +2 -2
  64. package/lib/exercises/math/conversion/volumeCapacityConversion.d.ts.map +1 -1
  65. package/lib/exercises/math/conversion/volumeCapacityConversion.js +42 -23
  66. package/lib/exercises/math/conversion/volumeConversion.js +2 -2
  67. package/lib/exercises/math/dataRepresentations/barChartReading.d.ts.map +1 -1
  68. package/lib/exercises/math/dataRepresentations/barChartReading.js +5 -5
  69. package/lib/exercises/math/dataRepresentations/tableReading.d.ts.map +1 -1
  70. package/lib/exercises/math/dataRepresentations/tableReading.js +4 -4
  71. package/lib/exercises/math/derivation/derivative/ln/lnDerivativeOne.d.ts.map +1 -1
  72. package/lib/exercises/math/derivation/derivative/ln/lnDerivativeOne.js +27 -14
  73. package/lib/exercises/math/derivation/derivative/ln/lnDerivativeThree.d.ts.map +1 -1
  74. package/lib/exercises/math/derivation/derivative/ln/lnDerivativeThree.js +4 -5
  75. package/lib/exercises/math/derivation/derivative/polynomial/firstDegreeDerivative.js +1 -1
  76. package/lib/exercises/math/derivation/derivative/polynomial/secondDegreeDerivative.js +1 -1
  77. package/lib/exercises/math/derivation/derivative/polynomial/thirdDegreeDerivative.js +1 -1
  78. package/lib/exercises/math/derivation/derivative/sqrt/sqrtProductDerivative.d.ts.map +1 -1
  79. package/lib/exercises/math/derivation/derivative/sqrt/sqrtProductDerivative.js +8 -5
  80. package/lib/exercises/math/derivation/tangent/derivativeNumberOrImageReading.d.ts +10 -0
  81. package/lib/exercises/math/derivation/tangent/derivativeNumberOrImageReading.d.ts.map +1 -0
  82. package/lib/exercises/math/derivation/tangent/derivativeNumberOrImageReading.js +144 -0
  83. package/lib/exercises/math/derivation/tangent/derivativeNumberReading.d.ts.map +1 -1
  84. package/lib/exercises/math/derivation/tangent/derivativeNumberReading.js +17 -12
  85. package/lib/exercises/math/derivation/tangent/derivativeTangentEquationReading.js +2 -2
  86. package/lib/exercises/math/derivation/tangent/horizontalTangentFromAlgebraic.d.ts +7 -0
  87. package/lib/exercises/math/derivation/tangent/horizontalTangentFromAlgebraic.d.ts.map +1 -0
  88. package/lib/exercises/math/derivation/tangent/horizontalTangentFromAlgebraic.js +108 -0
  89. package/lib/exercises/math/derivation/tangent/index.d.ts +3 -0
  90. package/lib/exercises/math/derivation/tangent/index.d.ts.map +1 -1
  91. package/lib/exercises/math/derivation/tangent/index.js +3 -0
  92. package/lib/exercises/math/derivation/tangent/tangentEquationWithData.d.ts +9 -0
  93. package/lib/exercises/math/derivation/tangent/tangentEquationWithData.d.ts.map +1 -0
  94. package/lib/exercises/math/derivation/tangent/tangentEquationWithData.js +121 -0
  95. package/lib/exercises/math/derivation/tangent/tangentEquations.d.ts.map +1 -1
  96. package/lib/exercises/math/derivation/tangent/tangentEquations.js +5 -5
  97. package/lib/exercises/math/equaDiff/exponentialDifferentialEquationWithIC.d.ts.map +1 -1
  98. package/lib/exercises/math/equaDiff/exponentialDifferentialEquationWithIC.js +6 -0
  99. package/lib/exercises/math/functions/affines/signFunction.d.ts.map +1 -1
  100. package/lib/exercises/math/functions/affines/signFunction.js +7 -7
  101. package/lib/exercises/math/functions/exponential/expEquation.d.ts.map +1 -1
  102. package/lib/exercises/math/functions/exponential/expEquation.js +4 -6
  103. package/lib/exercises/math/functions/exponentials/exponentialsVariations.js +1 -1
  104. package/lib/exercises/math/geometry/areas/circleArea.d.ts.map +1 -1
  105. package/lib/exercises/math/geometry/areas/circleArea.js +6 -3
  106. package/lib/exercises/math/geometry/areas/circleRadiusFromArea.d.ts.map +1 -1
  107. package/lib/exercises/math/geometry/areas/circleRadiusFromArea.js +6 -5
  108. package/lib/exercises/math/geometry/areas/rectangleArea.d.ts.map +1 -1
  109. package/lib/exercises/math/geometry/areas/rectangleArea.js +5 -4
  110. package/lib/exercises/math/geometry/areas/rectangleSideFromArea.d.ts.map +1 -1
  111. package/lib/exercises/math/geometry/areas/rectangleSideFromArea.js +3 -2
  112. package/lib/exercises/math/geometry/areas/rightTriangleArea.js +1 -1
  113. package/lib/exercises/math/geometry/areas/squareArea.d.ts.map +1 -1
  114. package/lib/exercises/math/geometry/areas/squareArea.js +4 -3
  115. package/lib/exercises/math/geometry/areas/triangleArea.d.ts.map +1 -1
  116. package/lib/exercises/math/geometry/areas/triangleArea.js +8 -5
  117. package/lib/exercises/math/geometry/areas/triangleAreaV2.d.ts.map +1 -1
  118. package/lib/exercises/math/geometry/areas/triangleAreaV2.js +3 -2
  119. package/lib/exercises/math/geometry/cartesian/drawAlineInGGB.js +1 -1
  120. package/lib/exercises/math/geometry/cartesian/readAbscissOnLine.d.ts.map +1 -1
  121. package/lib/exercises/math/geometry/cartesian/readAbscissOnLine.js +8 -6
  122. package/lib/exercises/math/geometry/cartesian/readAbscissOnSemiLine.js +1 -1
  123. package/lib/exercises/math/geometry/euclidianConstructions/buildTriangleWithSizes.js +1 -1
  124. package/lib/exercises/math/geometry/perimeters/circleCircumference.d.ts.map +1 -1
  125. package/lib/exercises/math/geometry/perimeters/circleCircumference.js +10 -8
  126. package/lib/exercises/math/geometry/perimeters/circleRadiusFromPerimeter.d.ts.map +1 -1
  127. package/lib/exercises/math/geometry/perimeters/circleRadiusFromPerimeter.js +15 -13
  128. package/lib/exercises/math/geometry/perimeters/rectanglePerimeter.d.ts.map +1 -1
  129. package/lib/exercises/math/geometry/perimeters/rectanglePerimeter.js +4 -3
  130. package/lib/exercises/math/geometry/perimeters/rectangleSideFromPerimeter.d.ts.map +1 -1
  131. package/lib/exercises/math/geometry/perimeters/rectangleSideFromPerimeter.js +1 -0
  132. package/lib/exercises/math/geometry/perimeters/squarePerimeter.d.ts.map +1 -1
  133. package/lib/exercises/math/geometry/perimeters/squarePerimeter.js +3 -2
  134. package/lib/exercises/math/geometry/perimeters/squareSideFromPerimeter.d.ts.map +1 -1
  135. package/lib/exercises/math/geometry/perimeters/squareSideFromPerimeter.js +1 -0
  136. package/lib/exercises/math/geometry/perimeters/trianglePerimeter.js +1 -1
  137. package/lib/exercises/math/geometry/pythagore/isTriangleRight.d.ts.map +1 -1
  138. package/lib/exercises/math/geometry/pythagore/isTriangleRight.js +6 -3
  139. package/lib/exercises/math/geometry/pythagore/pythagoreCalcul.d.ts.map +1 -1
  140. package/lib/exercises/math/geometry/pythagore/pythagoreCalcul.js +4 -3
  141. package/lib/exercises/math/geometry/triangles/triangleNature.js +1 -1
  142. package/lib/exercises/math/geometry/triangles/triangleThirdAngleValue.d.ts.map +1 -1
  143. package/lib/exercises/math/geometry/triangles/triangleThirdAngleValue.js +11 -4
  144. package/lib/exercises/math/geometry/vectors/lineFromDirectorVector.js +1 -1
  145. package/lib/exercises/math/geometry/volumes/coneVolume.d.ts.map +1 -1
  146. package/lib/exercises/math/geometry/volumes/coneVolume.js +7 -8
  147. package/lib/exercises/math/geometry/volumes/parallelepipedVolume.d.ts.map +1 -1
  148. package/lib/exercises/math/geometry/volumes/parallelepipedVolume.js +21 -22
  149. package/lib/exercises/math/geometry/volumes/sphereVolume.d.ts.map +1 -1
  150. package/lib/exercises/math/geometry/volumes/sphereVolume.js +2 -1
  151. package/lib/exercises/math/geometry/volumes/volumeOfPyramidWithSquareOrRectBase.d.ts.map +1 -1
  152. package/lib/exercises/math/geometry/volumes/volumeOfPyramidWithSquareOrRectBase.js +6 -3
  153. package/lib/exercises/math/geometry/volumes/volumeOfPyramidWithTriangleBase.d.ts.map +1 -1
  154. package/lib/exercises/math/geometry/volumes/volumeOfPyramidWithTriangleBase.js +3 -2
  155. package/lib/exercises/math/geometry/volumes/volumeOfPyramidWithTriangleRectBase.d.ts.map +1 -1
  156. package/lib/exercises/math/geometry/volumes/volumeOfPyramidWithTriangleRectBase.js +3 -2
  157. package/lib/exercises/math/percent/averageEvolutionRate.js +1 -1
  158. package/lib/exercises/math/percent/evolutions/applyPercent.d.ts +9 -0
  159. package/lib/exercises/math/percent/evolutions/applyPercent.d.ts.map +1 -0
  160. package/lib/exercises/math/percent/evolutions/applyPercent.js +114 -0
  161. package/lib/exercises/math/percent/evolutions/averageEvolutionRate.d.ts +8 -0
  162. package/lib/exercises/math/percent/evolutions/averageEvolutionRate.d.ts.map +1 -0
  163. package/lib/exercises/math/percent/evolutions/averageEvolutionRate.js +104 -0
  164. package/lib/exercises/math/percent/evolutions/cmToEvolution.d.ts +7 -0
  165. package/lib/exercises/math/percent/evolutions/cmToEvolution.d.ts.map +1 -0
  166. package/lib/exercises/math/percent/evolutions/cmToEvolution.js +88 -0
  167. package/lib/exercises/math/percent/evolutions/compoundInterest.d.ts +12 -0
  168. package/lib/exercises/math/percent/evolutions/compoundInterest.d.ts.map +1 -0
  169. package/lib/exercises/math/percent/evolutions/compoundInterest.js +128 -0
  170. package/lib/exercises/math/percent/evolutions/evolutionRateFromValues.d.ts +8 -0
  171. package/lib/exercises/math/percent/evolutions/evolutionRateFromValues.d.ts.map +1 -0
  172. package/lib/exercises/math/percent/evolutions/evolutionRateFromValues.js +100 -0
  173. package/lib/exercises/math/percent/evolutions/evolutionToCM.d.ts +7 -0
  174. package/lib/exercises/math/percent/evolutions/evolutionToCM.d.ts.map +1 -0
  175. package/lib/exercises/math/percent/evolutions/evolutionToCM.js +83 -0
  176. package/lib/exercises/math/percent/evolutions/findEndValueAfterEvolution.d.ts +8 -0
  177. package/lib/exercises/math/percent/evolutions/findEndValueAfterEvolution.d.ts.map +1 -0
  178. package/lib/exercises/math/percent/evolutions/findEndValueAfterEvolution.js +102 -0
  179. package/lib/exercises/math/percent/evolutions/findRightCalculForPriceEvolution.d.ts +10 -0
  180. package/lib/exercises/math/percent/evolutions/findRightCalculForPriceEvolution.d.ts.map +1 -0
  181. package/lib/exercises/math/percent/evolutions/findRightCalculForPriceEvolution.js +113 -0
  182. package/lib/exercises/math/percent/evolutions/findStartValueAfterEvolution.d.ts +8 -0
  183. package/lib/exercises/math/percent/evolutions/findStartValueAfterEvolution.d.ts.map +1 -0
  184. package/lib/exercises/math/percent/evolutions/findStartValueAfterEvolution.js +100 -0
  185. package/lib/exercises/math/percent/evolutions/globalPercent.d.ts +7 -0
  186. package/lib/exercises/math/percent/evolutions/globalPercent.d.ts.map +1 -0
  187. package/lib/exercises/math/percent/evolutions/globalPercent.js +104 -0
  188. package/lib/exercises/math/percent/evolutions/index.d.ts +12 -0
  189. package/lib/exercises/math/percent/evolutions/index.d.ts.map +1 -0
  190. package/lib/exercises/math/percent/evolutions/index.js +11 -0
  191. package/lib/exercises/math/percent/evolutions/reciprocalPercentage.d.ts +8 -0
  192. package/lib/exercises/math/percent/evolutions/reciprocalPercentage.d.ts.map +1 -0
  193. package/lib/exercises/math/percent/evolutions/reciprocalPercentage.js +108 -0
  194. package/lib/exercises/math/percent/findEndValueAfterEvolution.js +1 -1
  195. package/lib/exercises/math/percent/findProportion.d.ts.map +1 -1
  196. package/lib/exercises/math/percent/findProportion.js +12 -10
  197. package/lib/exercises/math/percent/findStartValueAfterEvolution.js +1 -1
  198. package/lib/exercises/math/percent/findTVA.d.ts.map +1 -1
  199. package/lib/exercises/math/percent/findTVA.js +4 -4
  200. package/lib/exercises/math/percent/htToTTC.d.ts.map +1 -1
  201. package/lib/exercises/math/percent/htToTTC.js +11 -7
  202. package/lib/exercises/math/percent/index.d.ts +1 -10
  203. package/lib/exercises/math/percent/index.d.ts.map +1 -1
  204. package/lib/exercises/math/percent/index.js +1 -10
  205. package/lib/exercises/math/percent/percentToDecimal.d.ts.map +1 -1
  206. package/lib/exercises/math/percent/percentToDecimal.js +4 -0
  207. package/lib/exercises/math/percent/percentWritings.d.ts.map +1 -1
  208. package/lib/exercises/math/percent/percentWritings.js +4 -4
  209. package/lib/exercises/math/percent/populationEffectifFromSubPopulation.d.ts.map +1 -1
  210. package/lib/exercises/math/percent/populationEffectifFromSubPopulation.js +7 -5
  211. package/lib/exercises/math/percent/reciprocalPercentage.js +1 -1
  212. package/lib/exercises/math/percent/subPopulationEffectifFromPercent.d.ts.map +1 -1
  213. package/lib/exercises/math/percent/subPopulationEffectifFromPercent.js +6 -4
  214. package/lib/exercises/math/percent/ttcToHT.d.ts.map +1 -1
  215. package/lib/exercises/math/percent/ttcToHT.js +4 -4
  216. package/lib/exercises/math/percent/valuePercent.d.ts.map +1 -1
  217. package/lib/exercises/math/percent/valuePercent.js +4 -4
  218. package/lib/exercises/math/powers/calculateNegativePower.d.ts.map +1 -1
  219. package/lib/exercises/math/powers/calculateNegativePower.js +6 -10
  220. package/lib/exercises/math/powers/calculatePower.d.ts.map +1 -1
  221. package/lib/exercises/math/powers/calculatePower.js +1 -0
  222. package/lib/exercises/math/powers/decimalToScientific.d.ts.map +1 -1
  223. package/lib/exercises/math/powers/decimalToScientific.js +36 -9
  224. package/lib/exercises/math/powers/powersMixOperations.d.ts.map +1 -1
  225. package/lib/exercises/math/powers/powersMixOperations.js +0 -4
  226. package/lib/exercises/math/powers/powersOfTenMixOperations.d.ts.map +1 -1
  227. package/lib/exercises/math/powers/powersOfTenMixOperations.js +0 -4
  228. package/lib/exercises/math/powers/powersOfTenToDecimal.js +2 -2
  229. package/lib/exercises/math/powers/powersProduct.d.ts.map +1 -1
  230. package/lib/exercises/math/powers/powersProduct.js +0 -5
  231. package/lib/exercises/math/powers/scientificToDecimal.js +2 -2
  232. package/lib/exercises/math/probaStat/ballsBasicProbas.d.ts.map +1 -1
  233. package/lib/exercises/math/probaStat/ballsBasicProbas.js +4 -4
  234. package/lib/exercises/math/probaStat/basicStats/calculateFrequency.d.ts.map +1 -1
  235. package/lib/exercises/math/probaStat/basicStats/calculateFrequency.js +4 -4
  236. package/lib/exercises/math/probaStat/basicStats/calculateFrequencyInList.d.ts +8 -0
  237. package/lib/exercises/math/probaStat/basicStats/calculateFrequencyInList.d.ts.map +1 -0
  238. package/lib/exercises/math/probaStat/basicStats/calculateFrequencyInList.js +117 -0
  239. package/lib/exercises/math/probaStat/basicStats/index.d.ts +1 -0
  240. package/lib/exercises/math/probaStat/basicStats/index.d.ts.map +1 -1
  241. package/lib/exercises/math/probaStat/basicStats/index.js +1 -0
  242. package/lib/exercises/math/probaStat/binomial/calculateProbaOfBinomialDistribution.d.ts.map +1 -1
  243. package/lib/exercises/math/probaStat/binomial/calculateProbaOfBinomialDistribution.js +66 -41
  244. package/lib/exercises/math/probaStat/cardBasicProbas.d.ts.map +1 -1
  245. package/lib/exercises/math/probaStat/cardBasicProbas.js +4 -2
  246. package/lib/exercises/math/probaStat/conditionalProbability.d.ts.map +1 -1
  247. package/lib/exercises/math/probaStat/conditionalProbability.js +168 -88
  248. package/lib/exercises/math/probaStat/diceBasicProbas.d.ts.map +1 -1
  249. package/lib/exercises/math/probaStat/diceBasicProbas.js +3 -0
  250. package/lib/exercises/math/probaStat/independancy.d.ts.map +1 -1
  251. package/lib/exercises/math/probaStat/independancy.js +18 -8
  252. package/lib/exercises/math/probaStat/issuesCountingForCards.d.ts.map +1 -1
  253. package/lib/exercises/math/probaStat/issuesCountingForCards.js +41 -15
  254. package/lib/exercises/math/probaStat/probaFromTableNoContext.d.ts.map +1 -1
  255. package/lib/exercises/math/probaStat/probaFromTableNoContext.js +4 -4
  256. package/lib/exercises/math/probaStat/probaFromTableWithContext.d.ts.map +1 -1
  257. package/lib/exercises/math/probaStat/probaFromTableWithContext.js +5 -2
  258. package/lib/exercises/math/probaStat/probabilityTree.d.ts.map +1 -1
  259. package/lib/exercises/math/probaStat/probabilityTree.js +8 -4
  260. package/lib/exercises/math/probaStat/stats1var/medianList.d.ts.map +1 -1
  261. package/lib/exercises/math/probaStat/stats1var/medianList.js +1 -4
  262. package/lib/exercises/math/probaStat/stats1var/standardDeviationList.js +1 -1
  263. package/lib/exercises/math/probaStat/stats1var/standardDeviationTable.js +1 -1
  264. package/lib/exercises/math/probaStat/stats2var/averagePoint.d.ts.map +1 -1
  265. package/lib/exercises/math/probaStat/stats2var/averagePoint.js +25 -22
  266. package/lib/exercises/math/probaStat/stats2var/fineAdjustementExercise.d.ts.map +1 -1
  267. package/lib/exercises/math/probaStat/stats2var/fineAdjustementExercise.js +52 -43
  268. package/lib/exercises/math/sampling/confidenceInterval.d.ts.map +1 -1
  269. package/lib/exercises/math/sampling/confidenceInterval.js +4 -4
  270. package/lib/exercises/math/sampling/fluctuationInterval.d.ts.map +1 -1
  271. package/lib/exercises/math/sampling/fluctuationInterval.js +4 -4
  272. package/lib/exercises/math/sampling/isSamplingRepresentative.d.ts.map +1 -1
  273. package/lib/exercises/math/sampling/isSamplingRepresentative.js +5 -5
  274. package/lib/exercises/math/sequences/geometric/geometricFirstTermsGeneralSum.d.ts.map +1 -1
  275. package/lib/exercises/math/sequences/geometric/geometricFirstTermsGeneralSum.js +0 -2
  276. package/lib/exercises/math/sequences/geometric/geometricVariations.js +1 -1
  277. package/lib/exercises/math/sets/intervals/inequalityToInterval.d.ts.map +1 -1
  278. package/lib/exercises/math/sets/intervals/inequalityToInterval.js +4 -4
  279. package/lib/exercises/math/sets/intervals/intervalToInequality.d.ts.map +1 -1
  280. package/lib/exercises/math/sets/intervals/intervalToInequality.js +4 -4
  281. package/lib/exercises/math/sets/intervals/intervalsIntersection.d.ts.map +1 -1
  282. package/lib/exercises/math/sets/intervals/intervalsIntersection.js +8 -1
  283. package/lib/exercises/math/sets/intervals/intervalsUnion.d.ts.map +1 -1
  284. package/lib/exercises/math/sets/intervals/intervalsUnion.js +3 -0
  285. package/lib/exercises/math/spaceGeometry/basis/spaceCoordinatesInPrism.d.ts.map +1 -1
  286. package/lib/exercises/math/spaceGeometry/basis/spaceCoordinatesInPrism.js +0 -5
  287. package/lib/exercises/math/spaceGeometry/index.js +1 -0
  288. package/lib/exercises/math/spaceGeometry/planes/index.d.ts +2 -0
  289. package/lib/exercises/math/spaceGeometry/planes/index.d.ts.map +1 -0
  290. package/lib/exercises/math/spaceGeometry/planes/index.js +2 -0
  291. package/lib/exercises/math/spaceGeometry/planes/isPointOnCartesianPlane.d.ts +2 -0
  292. package/lib/exercises/math/spaceGeometry/planes/isPointOnCartesianPlane.d.ts.map +1 -0
  293. package/lib/exercises/math/spaceGeometry/planes/isPointOnCartesianPlane.js +102 -0
  294. package/lib/exercises/math/spaceGeometry/vectors/spaceVectorCoordinatesFromPoints.d.ts.map +1 -1
  295. package/lib/exercises/math/spaceGeometry/vectors/spaceVectorCoordinatesFromPoints.js +4 -4
  296. package/lib/exercises/math/spaceGeometry/vectors/spaceVectorLinearCombinationCoords.d.ts.map +1 -1
  297. package/lib/exercises/math/spaceGeometry/vectors/spaceVectorLinearCombinationCoords.js +4 -2
  298. package/lib/exercises/math/spaceGeometry/vectors/spaceVectorNormCalculation.d.ts.map +1 -1
  299. package/lib/exercises/math/spaceGeometry/vectors/spaceVectorNormCalculation.js +4 -6
  300. package/lib/exercises/math/trigonometry/arcLength.d.ts.map +1 -1
  301. package/lib/exercises/math/trigonometry/arcLength.js +5 -2
  302. package/lib/exercises/math/trigonometry/basicEquationCos.d.ts.map +1 -1
  303. package/lib/exercises/math/trigonometry/basicEquationCos.js +4 -3
  304. package/lib/exercises/math/trigonometry/basicEquationSin.d.ts.map +1 -1
  305. package/lib/exercises/math/trigonometry/basicEquationSin.js +4 -3
  306. package/lib/exercises/math/trigonometry/basicTrigoSystemEquation.d.ts.map +1 -1
  307. package/lib/exercises/math/trigonometry/basicTrigoSystemEquation.js +4 -3
  308. package/lib/exercises/math/trigonometry/calculateCosSinAndTan.d.ts.map +1 -1
  309. package/lib/exercises/math/trigonometry/calculateCosSinAndTan.js +1 -0
  310. package/lib/exercises/math/trigonometry/degreeToRadians.d.ts.map +1 -1
  311. package/lib/exercises/math/trigonometry/degreeToRadians.js +7 -6
  312. package/lib/exercises/math/trigonometry/equationCosOnRandomInterval.d.ts.map +1 -1
  313. package/lib/exercises/math/trigonometry/equationCosOnRandomInterval.js +4 -3
  314. package/lib/exercises/math/trigonometry/equationSinOnRandomInterval.d.ts.map +1 -1
  315. package/lib/exercises/math/trigonometry/equationSinOnRandomInterval.js +4 -3
  316. package/lib/exercises/math/trigonometry/mainAngleMeasure.d.ts.map +1 -1
  317. package/lib/exercises/math/trigonometry/mainAngleMeasure.js +4 -5
  318. package/lib/exercises/math/trigonometry/mainRemarkableValues.d.ts.map +1 -1
  319. package/lib/exercises/math/trigonometry/mainRemarkableValues.js +4 -3
  320. package/lib/exercises/math/trigonometry/trigonometry.js +2 -2
  321. package/lib/exercises/math/trigonometry/trigonometryAngleCalcul.d.ts.map +1 -1
  322. package/lib/exercises/math/trigonometry/trigonometryAngleCalcul.js +5 -3
  323. package/lib/exercises/math/trigonometry/trigonometrySideCalcul.d.ts.map +1 -1
  324. package/lib/exercises/math/trigonometry/trigonometrySideCalcul.js +6 -6
  325. package/lib/exercises/pc/chemicalElements/atomicStructureOfNucleus.js +1 -1
  326. package/lib/index.d.ts +47 -25
  327. package/lib/index.d.ts.map +1 -1
  328. package/lib/math/spaceGeometry/plane.d.ts +9 -0
  329. package/lib/math/spaceGeometry/plane.d.ts.map +1 -0
  330. package/lib/math/spaceGeometry/plane.js +22 -0
  331. package/lib/tree/nodes/algebraicNode.d.ts +1 -0
  332. package/lib/tree/nodes/algebraicNode.d.ts.map +1 -1
  333. package/lib/tree/nodes/equations/equationSolutionNode.d.ts +2 -2
  334. package/lib/tree/nodes/equations/equationSolutionNode.d.ts.map +1 -1
  335. package/lib/tree/nodes/equations/equationSolutionNode.js +2 -2
  336. package/lib/tree/nodes/operators/fractionNode.d.ts.map +1 -1
  337. package/lib/tree/nodes/operators/fractionNode.js +4 -0
  338. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"commonDivisorsList.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/arithmetics/commonDivisorsList.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AASrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAwGF,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,WAAW,CAkBpD,CAAC"}
1
+ {"version":3,"file":"commonDivisorsList.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/arithmetics/commonDivisorsList.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AASrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA8GF,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,WAAW,CAapD,CAAC"}
@@ -50,6 +50,9 @@ const getCommonDivisorsListQuestion = () => {
50
50
  const a = doWhile(() => randint(30, 150), (x) => isPrime(x));
51
51
  const b = doWhile(() => randint(30, 150), (x) => x === a || gcd(a, x) === 1);
52
52
  const identifiers = { a, b };
53
+ return getQuestionFromIdentifiers(identifiers);
54
+ };
55
+ const getQuestionFromIdentifiers = (identifiers) => {
53
56
  const question = {
54
57
  answer: getAnswer(identifiers),
55
58
  instruction: getInstruction(identifiers),
@@ -90,9 +93,7 @@ const isAnswerValid = (ans, { answer }) => {
90
93
  export const commonDivisorsList = {
91
94
  id: "commonDivisorsList",
92
95
  label: "Déterminer les diviseurs communs de deux nombres",
93
- levels: ["2nde"],
94
96
  isSingleStep: true,
95
- sections: ["Arithmétique"],
96
97
  generator: (nb) => getDistinctQuestions(getCommonDivisorsListQuestion, nb),
97
98
  qcmTimer: 60,
98
99
  freeTimer: 60,
@@ -100,8 +101,5 @@ export const commonDivisorsList = {
100
101
  isAnswerValid,
101
102
  subject: "Mathématiques",
102
103
  hasHintAndCorrection: true,
103
- getHint,
104
- getInstruction,
105
- getAnswer,
106
- getCorrection,
104
+ getQuestionFromIdentifiers,
107
105
  };
@@ -1 +1 @@
1
- {"version":3,"file":"divisibiltyCriteria.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/arithmetics/divisibiltyCriteria.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAkBT,MAAM,6BAA6B,CAAC;AAKrC,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAuFF,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,WAAW,CAmBrD,CAAC"}
1
+ {"version":3,"file":"divisibiltyCriteria.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/arithmetics/divisibiltyCriteria.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAmBT,MAAM,6BAA6B,CAAC;AAKrC,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AA4FF,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,WAAW,CAerD,CAAC"}
@@ -70,6 +70,9 @@ const getDivisibiltyCriteriaQuestion = () => {
70
70
  const highPrime = random(primes.slice(5));
71
71
  const nb = divisor * highPrime;
72
72
  const identifiers = { divisor, nb };
73
+ return getQuestionFromIdentifiers(identifiers);
74
+ };
75
+ const getQuestionFromIdentifiers = (identifiers) => {
73
76
  const question = {
74
77
  answer: getAnswer(identifiers),
75
78
  instruction: getInstruction(identifiers),
@@ -92,11 +95,7 @@ export const divisibiltyCriteria = {
92
95
  ggbTimer: 60,
93
96
  getPropositions,
94
97
  subject: "Mathématiques",
95
- getHint,
96
- getCorrection,
97
- getAnswer,
98
- getInstruction,
98
+ getQuestionFromIdentifiers,
99
99
  hasHintAndCorrection: true,
100
100
  answerType: "QCU",
101
- getKeys,
102
101
  };
@@ -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,6BAA6B,CAAC;AAOrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAiDF,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,WAAW,CAc9C,CAAC"}
1
+ {"version":3,"file":"divisorsList.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/arithmetics/divisorsList.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,6BAA6B,CAAC;AAOrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAiEF,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,WAAW,CAa9C,CAAC"}
@@ -4,16 +4,28 @@ import { dividersOf } from "../../../../math/utils/arithmetic/dividersOf.js";
4
4
  import { randint } from "../../../../math/utils/random/randint.js";
5
5
  import { coinFlip } from "../../../../utils/alea/coinFlip.js";
6
6
  import { doWhile } from "../../../../utils/doWhile.js";
7
- const getDivisorsListQuestion = () => {
8
- const a = randint(30, 90);
7
+ const getAnswer = (identifiers) => {
8
+ const { a } = identifiers;
9
9
  const divisors = dividersOf(a);
10
10
  const answer = divisors.join(";");
11
+ return answer;
12
+ };
13
+ const getInstruction = (identifiers) => {
14
+ const { a } = identifiers;
15
+ return `Donner la liste des diviseurs de $${a}$ (séparer les valeurs par des point-virgules).`;
16
+ };
17
+ const getDivisorsListQuestion = () => {
18
+ const a = randint(30, 90);
19
+ const identifiers = { a };
20
+ return getQuestionFromIdentifiers(identifiers);
21
+ };
22
+ const getQuestionFromIdentifiers = (identifiers) => {
11
23
  const question = {
12
- answer,
13
- instruction: `Donner la liste des diviseurs de $${a}$ (séparer les valeurs par des point-virgules).`,
24
+ answer: getAnswer(identifiers),
25
+ instruction: getInstruction(identifiers),
14
26
  keys: ["semicolon"],
15
27
  answerFormat: "tex",
16
- identifiers: { a },
28
+ identifiers,
17
29
  };
18
30
  return question;
19
31
  };
@@ -46,9 +58,7 @@ const isAnswerValid = (ans, { answer }) => {
46
58
  export const divisorsList = {
47
59
  id: "divisorsList",
48
60
  label: "Déterminer les diviseurs d'un nombre",
49
- levels: ["2nde"],
50
61
  isSingleStep: true,
51
- sections: ["Arithmétique"],
52
62
  generator: (nb) => getDistinctQuestions(getDivisorsListQuestion, nb, 30),
53
63
  qcmTimer: 60,
54
64
  freeTimer: 60,
@@ -56,4 +66,5 @@ export const divisorsList = {
56
66
  isAnswerValid,
57
67
  subject: "Mathématiques",
58
68
  maxAllowedQuestions: 30,
69
+ getQuestionFromIdentifiers,
59
70
  };
@@ -1 +1 @@
1
- {"version":3,"file":"euclideanDivision.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/arithmetics/euclideanDivision.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,6BAA6B,CAAC;AAsCrC,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAwCF,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,WAAW,CAanD,CAAC"}
1
+ {"version":3,"file":"euclideanDivision.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/arithmetics/euclideanDivision.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,6BAA6B,CAAC;AAQrC,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAkFF,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,WAAW,CAYnD,CAAC"}
@@ -5,6 +5,16 @@ import { NumberNode } from "../../../../tree/nodes/numbers/numberNode.js";
5
5
  import { AddNode } from "../../../../tree/nodes/operators/addNode.js";
6
6
  import { EqualNode } from "../../../../tree/nodes/equations/equalNode.js";
7
7
  import { MultiplyNode } from "../../../../tree/nodes/operators/multiplyNode.js";
8
+ const getInstruction = (identifiers) => {
9
+ const { dividend, divisor } = identifiers;
10
+ return `Écrire la division euclidienne de $${dividend}$ par $${divisor}$.`;
11
+ };
12
+ const getAnswer = (identifiers) => {
13
+ const { dividend, divisor, quotient, remainder } = identifiers;
14
+ const answer = new EqualNode(new NumberNode(dividend), new AddNode(new MultiplyNode(new NumberNode(divisor), new NumberNode(quotient)), new NumberNode(remainder)));
15
+ const answerTex = answer.toTex();
16
+ return answerTex;
17
+ };
8
18
  const getEuclideanDivisionQuestions = () => {
9
19
  let dividend = randint(5, 100);
10
20
  let divisor = randint(2, 11);
@@ -14,14 +24,16 @@ const getEuclideanDivisionQuestions = () => {
14
24
  }
15
25
  const quotient = Math.floor(dividend / divisor);
16
26
  const remainder = dividend % divisor;
17
- const answer = new EqualNode(new NumberNode(dividend), new AddNode(new MultiplyNode(new NumberNode(divisor), new NumberNode(quotient)), new NumberNode(remainder)));
18
- const answerTex = answer.toTex();
27
+ const identifiers = { dividend, divisor, quotient, remainder };
28
+ return getQuestionFromIdentifiers(identifiers);
29
+ };
30
+ const getQuestionFromIdentifiers = (identifiers) => {
19
31
  const question = {
20
- instruction: `Écrire la division euclidienne de $${dividend}$ par $${divisor}$.`,
21
- answer: answerTex,
32
+ instruction: getInstruction(identifiers),
33
+ answer: getAnswer(identifiers),
22
34
  keys: ["equal"],
23
35
  answerFormat: "tex",
24
- identifiers: { dividend, divisor, quotient, remainder },
36
+ identifiers,
25
37
  };
26
38
  return question;
27
39
  };
@@ -46,8 +58,6 @@ export const euclideanDivision = {
46
58
  id: "euclideanDivision",
47
59
  connector: "=",
48
60
  label: "Écrire une division euclidienne",
49
- levels: ["6ème", "5ème", "4ème"],
50
- sections: ["Arithmétique"],
51
61
  isSingleStep: true,
52
62
  generator: (nb) => getDistinctQuestions(getEuclideanDivisionQuestions, nb),
53
63
  qcmTimer: 60,
@@ -55,4 +65,5 @@ export const euclideanDivision = {
55
65
  getPropositions,
56
66
  isAnswerValid,
57
67
  subject: "Mathématiques",
68
+ getQuestionFromIdentifiers,
58
69
  };
@@ -1 +1 @@
1
- {"version":3,"file":"paritySumsAndProducts.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/arithmetics/paritySumsAndProducts.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAKT,MAAM,6BAA6B,CAAC;AAyErC,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAgCF,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,WAAW,CAevD,CAAC"}
1
+ {"version":3,"file":"paritySumsAndProducts.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/arithmetics/paritySumsAndProducts.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,6BAA6B,CAAC;AAMrC,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AA8GF,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,WAAW,CAcvD,CAAC"}
@@ -2,68 +2,78 @@ import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQue
2
2
  import { randint } from "../../../../math/utils/random/randint.js";
3
3
  import { shuffle } from "../../../../utils/alea/shuffle.js";
4
4
  import { v4 } from "uuid";
5
- const getParitySumsAndProductsQuestion = () => {
6
- const type = randint(0, 12);
7
- let instruction = "";
8
- let answer = "Pair";
5
+ const getInstruction = (identifiers) => {
6
+ const { type } = identifiers;
9
7
  switch (type) {
10
8
  case 0:
11
- instruction = "La somme de deux nombres pairs est un nombre...";
12
- answer = "Pair";
13
- break;
9
+ return "La somme de deux nombres pairs est un nombre...";
14
10
  case 1:
15
- instruction = "La somme de deux nombres impairs est un nombre...";
16
- answer = "Pair";
17
- break;
11
+ return "La somme de deux nombres impairs est un nombre...";
18
12
  case 2:
19
- instruction =
20
- "La somme d'un nombre pair et d'un nombre impair un nombre...";
21
- answer = "Impair";
22
- break;
13
+ return "La somme d'un nombre pair et d'un nombre impair un nombre...";
23
14
  case 3:
24
- instruction = "La somme de trois nombres impairs est un nombre...";
25
- answer = "Impair";
26
- break;
15
+ return "La somme de trois nombres impairs est un nombre...";
27
16
  case 4:
28
- instruction = "La somme de trois nombres consécutifs est un nombre...";
29
- answer = "Parfois pair, parfois impair";
30
- break;
17
+ return "La somme de trois nombres consécutifs est un nombre...";
31
18
  case 5:
32
- instruction = "La somme de quatre nombres consécutifs est un nombre...";
33
- answer = "Pair";
34
- break;
19
+ return "La somme de quatre nombres consécutifs est un nombre...";
35
20
  case 6:
36
- instruction = "Le produit de deux nombres pairs est un nombre...";
37
- answer = "Pair";
38
- break;
21
+ return "Le produit de deux nombres pairs est un nombre...";
39
22
  case 7:
40
- instruction = "Le produit de deux nombres impairs est un nombre...";
41
- answer = "Impair";
42
- break;
23
+ return "Le produit de deux nombres impairs est un nombre...";
43
24
  case 8:
44
- instruction =
45
- "Le produit d'un nombre pair et d'un nombre impair est un nombre...";
46
- answer = "Pair";
47
- break;
25
+ return "Le produit d'un nombre pair et d'un nombre impair est un nombre...";
48
26
  case 9:
49
- instruction = "Le produit de trois nombres consécutifs est un nombre...";
50
- answer = "Pair";
51
- break;
27
+ return "Le produit de trois nombres consécutifs est un nombre...";
52
28
  case 10:
53
- instruction = "Le produit de trois nombres impairs est un nombre...";
54
- answer = "Impair";
55
- break;
29
+ return "Le produit de trois nombres impairs est un nombre...";
56
30
  case 11:
57
- instruction = "Le produit de trois nombres pairs est un nombre...";
58
- answer = "Pair";
59
- break;
31
+ default:
32
+ return "Le produit de trois nombres pairs est un nombre...";
60
33
  }
34
+ };
35
+ const getAnswer = (identifiers) => {
36
+ const { type } = identifiers;
37
+ switch (type) {
38
+ case 0:
39
+ return "Pair";
40
+ case 1:
41
+ return "Pair";
42
+ case 2:
43
+ return "Impair";
44
+ case 3:
45
+ return "Impair";
46
+ case 4:
47
+ return "Parfois pair, parfois impair";
48
+ case 5:
49
+ return "Pair";
50
+ case 6:
51
+ return "Pair";
52
+ case 7:
53
+ return "Impair";
54
+ case 8:
55
+ return "Pair";
56
+ case 9:
57
+ return "Pair";
58
+ case 10:
59
+ return "Impair";
60
+ case 11:
61
+ default:
62
+ return "Pair";
63
+ }
64
+ };
65
+ const getParitySumsAndProductsQuestion = () => {
66
+ const type = randint(0, 12);
67
+ const identifiers = { type };
68
+ return getQuestionFromIdentifiers(identifiers);
69
+ };
70
+ const getQuestionFromIdentifiers = (identifiers) => {
61
71
  const question = {
62
- answer: answer,
63
- instruction,
72
+ answer: getAnswer(identifiers),
73
+ instruction: getInstruction(identifiers),
64
74
  keys: [],
65
75
  answerFormat: "raw",
66
- identifiers: { type },
76
+ identifiers,
67
77
  };
68
78
  return question;
69
79
  };
@@ -100,9 +110,7 @@ export const paritySumsAndProducts = {
100
110
  id: "paritySumsAndProducts",
101
111
  connector: "=",
102
112
  label: "Parité de sommes et de produits",
103
- levels: ["2nde"],
104
113
  isSingleStep: true,
105
- sections: ["Arithmétique"],
106
114
  generator: (nb) => getDistinctQuestions(getParitySumsAndProductsQuestion, nb, 12),
107
115
  qcmTimer: 60,
108
116
  freeTimer: 60,
@@ -110,4 +118,5 @@ export const paritySumsAndProducts = {
110
118
  maxAllowedQuestions: 12,
111
119
  getPropositions,
112
120
  subject: "Mathématiques",
121
+ getQuestionFromIdentifiers,
113
122
  };
@@ -1 +1 @@
1
- {"version":3,"file":"pgcdCalcul.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/arithmetics/pgcdCalcul.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAWT,MAAM,6BAA6B,CAAC;AAOrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAgDF,eAAO,MAAM,UAAU,EAAE,QAAQ,CAAC,WAAW,CAe5C,CAAC"}
1
+ {"version":3,"file":"pgcdCalcul.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/arithmetics/pgcdCalcul.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,6BAA6B,CAAC;AAOrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAsDF,eAAO,MAAM,UAAU,EAAE,QAAQ,CAAC,WAAW,CAY5C,CAAC"}
@@ -17,6 +17,9 @@ const getPgcdCalculQuestion = () => {
17
17
  const a = doWhile(() => randint(30, 150), (x) => isPrime(x));
18
18
  const b = doWhile(() => randint(30, 150), (x) => x === a || gcd(a, x) === 1);
19
19
  const identifiers = { a, b };
20
+ return getQuestionFromIdentifiers(identifiers);
21
+ };
22
+ const getQuestionFromIdentifiers = (identifiers) => {
20
23
  const question = {
21
24
  answer: getAnswer(identifiers),
22
25
  instruction: getInstruction(identifiers),
@@ -42,15 +45,12 @@ export const pgcdCalcul = {
42
45
  id: "pgcdCalcul",
43
46
  connector: "=",
44
47
  label: "Calculer un PGCD",
45
- levels: ["2nde", "1reSpé", "MathExp"],
46
48
  isSingleStep: true,
47
- sections: ["Arithmétique"],
48
49
  generator: (nb) => getDistinctQuestions(getPgcdCalculQuestion, nb),
49
50
  qcmTimer: 60,
50
51
  freeTimer: 60,
51
52
  getPropositions,
52
53
  isAnswerValid,
53
54
  subject: "Mathématiques",
54
- getAnswer,
55
- getInstruction,
55
+ getQuestionFromIdentifiers,
56
56
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ppcmCalcul.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/arithmetics/ppcmCalcul.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AASrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA4EF,eAAO,MAAM,UAAU,EAAE,QAAQ,CAAC,WAAW,CAiB5C,CAAC"}
1
+ {"version":3,"file":"ppcmCalcul.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/arithmetics/ppcmCalcul.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AASrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA4EF,eAAO,MAAM,UAAU,EAAE,QAAQ,CAAC,WAAW,CAa5C,CAAC"}
@@ -79,9 +79,5 @@ export const ppcmCalcul = {
79
79
  getPropositions,
80
80
  isAnswerValid,
81
81
  subject: "Mathématiques",
82
- getInstruction,
83
- getHint,
84
- getCorrection,
85
- getAnswer,
86
82
  getQuestionFromIdentifiers,
87
83
  };
@@ -1 +1 @@
1
- {"version":3,"file":"primeNumbers.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/arithmetics/primeNumbers.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,QAAQ,EAgBT,MAAM,sBAAsB,CAAC;AAuB9B,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AA+JF,KAAK,OAAO,GAAG;IACb,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAWF,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAkBvD,CAAC"}
1
+ {"version":3,"file":"primeNumbers.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/arithmetics/primeNumbers.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,QAAQ,EAiBT,MAAM,sBAAsB,CAAC;AAuB9B,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAsKF,KAAK,OAAO,GAAG;IACb,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAWF,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAgBvD,CAAC"}
@@ -68,6 +68,9 @@ const getPrimeNumbers = (opts) => {
68
68
  }
69
69
  // chosenNumbers = chosenNumbers.sort((a, b) => a - b);
70
70
  const identifiers = { nb: chosenNumbers.reduce((acc, curr) => acc * curr) };
71
+ return getQuestionFromIdentifiers(identifiers, opts);
72
+ };
73
+ const getQuestionFromIdentifiers = (identifiers, opts) => {
71
74
  const question = {
72
75
  instruction: getInstruction(identifiers, opts),
73
76
  startStatement: getStartStatement(identifiers, opts),
@@ -172,9 +175,7 @@ export const primeNumbers = {
172
175
  isAnswerValid,
173
176
  subject: "Mathématiques",
174
177
  maxAllowedQuestions: 30,
175
- getInstruction,
176
- getAnswer,
177
- getStartStatement,
178
178
  options,
179
179
  rebuildIdentifiers,
180
+ getQuestionFromIdentifiers,
180
181
  };
@@ -24,13 +24,13 @@ const getAnswer = (identifiers) => {
24
24
  const getHint = (identifiers) => {
25
25
  const { dec, pow } = identifiers;
26
26
  const factor = Math.pow(10, pow);
27
- return `Multiplier par $${factor.frenchify()}$ revient à déplacer la virgule de $${-pow}$ ${pluralize("position", -pow)} vers la gauche.`;
27
+ return `Multiplier par $${factor.frenchify()}$ revient à déplacer la virgule de $${-pow}$ ${pluralize("rang", -pow)} vers la gauche.`;
28
28
  };
29
29
  const getCorrection = (identifiers) => {
30
30
  const { dec, pow } = identifiers;
31
31
  const factor = Math.pow(10, pow);
32
32
  const statement = new MultiplyNode(dec.toTree(), factor.toTree());
33
- return `On déplace la virgule de $${-pow}$ ${pluralize("position", -pow)} vers la gauche :
33
+ return `On déplace la virgule de $${-pow}$ ${pluralize("rang", -pow)} vers la gauche :
34
34
 
35
35
  $$
36
36
  ${statement.toTex()} = ${getAnswer(identifiers)}
@@ -1 +1 @@
1
- {"version":3,"file":"multiplyDecimalByTens.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/decimals/multiplyDecimalByTens.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAcrC,KAAK,WAAW,GAAG;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,OAAO,CAAC;CACnB,CAAC;AAuGF,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,WAAW,CAoBvD,CAAC"}
1
+ {"version":3,"file":"multiplyDecimalByTens.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/decimals/multiplyDecimalByTens.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAcrC,KAAK,WAAW,GAAG;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,OAAO,CAAC;CACnB,CAAC;AA2GF,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,WAAW,CAevD,CAAC"}
@@ -20,7 +20,7 @@ $$`;
20
20
  const getHint = (identifiers) => {
21
21
  const { dec, pow, isDivide } = identifiers;
22
22
  const factor = Math.pow(10, pow);
23
- return `${isDivide ? "Diviser" : "Multiplier"} par $${factor.frenchify()}$ revient à déplacer la virgule de $${pow}$ ${pluralize("position", pow)} vers la ${isDivide ? "gauche" : "droite"}.`;
23
+ return `${isDivide ? "Diviser" : "Multiplier"} par $${factor.frenchify()}$ revient à déplacer la virgule de $${pow}$ ${pluralize("rang", pow)} vers la ${isDivide ? "gauche" : "droite"}.`;
24
24
  };
25
25
  const getAnswer = (identifiers) => {
26
26
  const { dec, pow, isDivide } = identifiers;
@@ -35,7 +35,7 @@ const getCorrection = (identifiers) => {
35
35
  const factor = Math.pow(10, pow);
36
36
  const statement = new (isDivide ? DivideNode : MultiplyNode)(dec.toTree(), factor.toTree());
37
37
  const answer = getAnswer(identifiers);
38
- return `On déplace la virgule de $${pow}$ ${pluralize("position", pow)} vers la ${isDivide ? "gauche" : "droite"} :
38
+ return `On déplace la virgule de $${pow}$ ${pluralize("rang", pow)} vers la ${isDivide ? "gauche" : "droite"} :
39
39
 
40
40
  $$
41
41
  ${statement.toTex()} = ${answer}
@@ -47,6 +47,9 @@ const getMultiplyDecimalByTensQuestion = () => {
47
47
  const pow = randint(1, 4);
48
48
  const isDivide = coinFlip();
49
49
  const identifiers = { dec: dec.value, pow, isDivide };
50
+ return getQuestionFromIdentifiers(identifiers);
51
+ };
52
+ const getQuestionFromIdentifiers = (identifiers) => {
50
53
  const question = {
51
54
  answer: getAnswer(identifiers),
52
55
  instruction: getInstruction(identifiers),
@@ -82,9 +85,7 @@ export const multiplyDecimalByTens = {
82
85
  id: "multiplyDecimalByTens",
83
86
  connector: "=",
84
87
  label: "Multiplier/diviser un décimal par $10$, $100$, ou $1000$",
85
- levels: [],
86
88
  isSingleStep: true,
87
- sections: [],
88
89
  generator: (nb) => getDistinctQuestions(getMultiplyDecimalByTensQuestion, nb),
89
90
  qcmTimer: 60,
90
91
  freeTimer: 60,
@@ -92,9 +93,6 @@ export const multiplyDecimalByTens = {
92
93
  isAnswerValid,
93
94
  subject: "Mathématiques",
94
95
  hasHintAndCorrection: true,
95
- getInstruction,
96
- getCorrection,
97
- getHint,
98
- getAnswer,
96
+ getQuestionFromIdentifiers,
99
97
  shouldHaveCalculator: false,
100
98
  };
@@ -1 +1 @@
1
- {"version":3,"file":"fractionAndIntegerDivision.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/fractions/fractionAndIntegerDivision.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAarC,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,OAAO,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB,CAAC;AAyKF,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,EAeT,MAAM,6BAA6B,CAAC;AAarC,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,OAAO,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB,CAAC;AAsKF,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,WAAW,CAc5D,CAAC"}
@@ -30,7 +30,7 @@ ${statementTree.toTex()}
30
30
  $$`;
31
31
  };
32
32
  const getHint = (identifiers) => {
33
- return "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.";
33
+ return "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
34
  };
35
35
  const getCorrection = (identifiers) => {
36
36
  const { integerFirst, integer, rational } = identifiers;
@@ -72,10 +72,7 @@ $$
72
72
  ${beforeSimplification.toTree().toTex()} = ${answerTex}
73
73
  $$
74
74
  `
75
- : "Cette fraction est déjà simplifiée."}
76
-
77
- Ainsi, le résultat attendu est $${answerTex}$.
78
- `;
75
+ : "Cette fraction est déjà simplifiée."}`;
79
76
  };
80
77
  const getStartStatement = (identifiers) => {
81
78
  const { integerFirst, integer, rational } = identifiers;
@@ -43,7 +43,7 @@ ${alignTex([
43
43
 
44
44
  ${answerRatio.isSimplified && answerRatio.denum !== 1
45
45
  ? "Cette fraction est bien simplifiée."
46
- : `Puis, on simplifie la fraction :
46
+ : `Puis on simplifie la fraction :
47
47
 
48
48
  ${alignTex([
49
49
  [
@@ -31,7 +31,7 @@ const getAnswer = (identifiers) => {
31
31
  const getHint = (identifiers) => {
32
32
  return `Détermine le plus grand diviseur commun à $${identifiers.num}$ et $${identifiers.denum}$.
33
33
 
34
- On peut alors simpfier la fraction par ce nombre.`;
34
+ On peut alors simplifier la fraction par ce nombre.`;
35
35
  };
36
36
  const getCorrection = (identifiers) => {
37
37
  const { num, denum } = identifiers;
@@ -42,7 +42,7 @@ const getCorrection = (identifiers) => {
42
42
 
43
43
  En effet, on a $${num} = ${numDiv} \\times ${pgcd}$ et $${denum} = ${denumDiv} \\times ${pgcd}$.
44
44
 
45
- On peut donc simplfier la fraction par $${pgcd}$ :
45
+ On peut donc simplifier la fraction par $${pgcd}$ :
46
46
 
47
47
  ${alignTex([
48
48
  [
@@ -3,4 +3,5 @@ export * from "./operationsPrioritiesWithoutRelative.js";
3
3
  export * from "./expressionNature.js";
4
4
  export * from "./operationsPrioritiesParenthesis.js";
5
5
  export * from "./operationsPrioritiesParenthesisNoRelatives.js";
6
+ export * from "./numberInverse.js";
6
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/operations/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0CAA0C,CAAC;AACzD,cAAc,uBAAuB,CAAC;AACtC,cAAc,sCAAsC,CAAC;AACrD,cAAc,iDAAiD,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/operations/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0CAA0C,CAAC;AACzD,cAAc,uBAAuB,CAAC;AACtC,cAAc,sCAAsC,CAAC;AACrD,cAAc,iDAAiD,CAAC;AAChE,cAAc,oBAAoB,CAAC"}
@@ -3,3 +3,4 @@ export * from "./operationsPrioritiesWithoutRelative.js";
3
3
  export * from "./expressionNature.js";
4
4
  export * from "./operationsPrioritiesParenthesis.js";
5
5
  export * from "./operationsPrioritiesParenthesisNoRelatives.js";
6
+ export * from "./numberInverse.js";
@@ -0,0 +1,8 @@
1
+ import { Exercise } from "../../../../exercises/exercise.js";
2
+ import { NodeIdentifiers } from "../../../../tree/nodes/nodeConstructor.js";
3
+ type Identifiers = {
4
+ nb: NodeIdentifiers;
5
+ };
6
+ export declare const numberInverse: Exercise<Identifiers>;
7
+ export {};
8
+ //# sourceMappingURL=numberInverse.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"numberInverse.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/operations/numberInverse.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAMrC,OAAO,EACL,eAAe,EAEhB,MAAM,qCAAqC,CAAC;AAW7C,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,eAAe,CAAC;CACrB,CAAC;AAqGF,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,WAAW,CAc/C,CAAC"}