math-exercises 3.0.64 → 3.0.66

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 +33 -11
  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":"expEquation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/exponential/expEquation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,6BAA6B,CAAC;AAkBrC,cAAc;AACd,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAiGF,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAC,WAAW,CAgB7C,CAAC"}
1
+ {"version":3,"file":"expEquation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/exponential/expEquation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,6BAA6B,CAAC;AAkBrC,cAAc;AACd,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAoGF,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAC,WAAW,CAa7C,CAAC"}
@@ -74,14 +74,15 @@ const isAnswerValid = (ans, { answer, a, k }) => {
74
74
  const eqParsed = equationSolutionParser(ans);
75
75
  if (eqParsed) {
76
76
  const set = new EquationSolutionNode(new DiscreteSetNode([eqParsed]));
77
- return set.simplify().toTex() === answer;
77
+ return set.simplify({ decimalToFractions: true }).toTex() === answer;
78
78
  }
79
79
  else {
80
80
  const setParsed = discreteSetParser(ans);
81
81
  if (!setParsed) {
82
82
  return false;
83
83
  }
84
- return "S=" + setParsed.simplify().toTex() === answer;
84
+ return ("S=" + setParsed.simplify({ decimalToFractions: true }).toTex() ===
85
+ answer);
85
86
  }
86
87
  }
87
88
  catch (err) {
@@ -92,8 +93,6 @@ export const expEquation = {
92
93
  id: "expEquation",
93
94
  connector: "=",
94
95
  label: "Résoudre des équations de type $a \\times \\exp(x) = k$",
95
- levels: ["1reSpé", "TermSpé", "MathComp"],
96
- sections: ["Exponentielle"],
97
96
  isSingleStep: false,
98
97
  generator: (nb) => getDistinctQuestions(getExpEquation, nb),
99
98
  qcmTimer: 60,
@@ -102,6 +101,5 @@ export const expEquation = {
102
101
  isAnswerValid,
103
102
  subject: "Mathématiques",
104
103
  getKeys,
105
- getInstruction,
106
- getAnswer,
104
+ getQuestionFromIdentifiers,
107
105
  };
@@ -46,7 +46,7 @@ const getHint = (identifiers) => {
46
46
  - strictement croissante si $a>1$;
47
47
  - strictement décroissante si $0<a<1$.
48
48
 
49
- Puis, multiplier $f$ par un nombre positif ne change pas son sens de variations, tandis que multiplier par un nombre negatif inverse le sens de variations.
49
+ Puis multiplier $f$ par un nombre positif ne change pas son sens de variations, tandis que multiplier par un nombre negatif inverse le sens de variations.
50
50
  `;
51
51
  };
52
52
  const getCorrection = (identifiers) => {
@@ -1 +1 @@
1
- {"version":3,"file":"circleArea.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/areas/circleArea.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAOrC,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,OAAO,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAsGF,eAAO,MAAM,UAAU,EAAE,QAAQ,CAAC,WAAW,CAe5C,CAAC"}
1
+ {"version":3,"file":"circleArea.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/areas/circleArea.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAOrC,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,OAAO,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAwGF,eAAO,MAAM,UAAU,EAAE,QAAQ,CAAC,WAAW,CAgB5C,CAAC"}
@@ -6,7 +6,9 @@ import { coinFlip } from "../../../../utils/alea/coinFlip.js";
6
6
  import { shuffle } from "../../../../utils/alea/shuffle.js";
7
7
  const getInstruction = (identifiers) => {
8
8
  const { coin, radius, diametre } = identifiers;
9
- return `Calculer l'aire d'un disque de ${coin ? "rayon " + `$${radius}$` : "diamètre " + `$${diametre}$`} cm (arrondir au centième).`;
9
+ return `Calculer l'aire d'un disque de ${coin
10
+ ? "rayon " + `$${radius}\\ \\textrm{cm}$`
11
+ : "diamètre " + `$${diametre}\\ \\textrm{cm}$`} (arrondir au centième de $\\textrm{cm}^2$).`;
10
12
  };
11
13
  const getAnswer = (identifiers) => {
12
14
  const { coin, radius, diametre } = identifiers;
@@ -43,10 +45,10 @@ ${isRadius
43
45
  $$
44
46
  A = \\pi \\times ${radius}^2 \\approx ${getAnswer(identifiers)}
45
47
  $$`
46
- : `Puisque le diamètre est de $${diametre}$ cm, le rayon vaut :
48
+ : `Puisque le diamètre est de $${diametre}\\ \\textrm{cm}$, le rayon vaut :
47
49
 
48
50
  $$
49
- r = \\frac{${diametre}}{2} = ${(diametre / 2).frenchify()} \\ \\text{cm}
51
+ r = \\frac{${diametre}}{2} = ${(diametre / 2).frenchify()} \\ \\textrm{cm}
50
52
  $$
51
53
 
52
54
  L'aire du disque vaut donc :
@@ -101,4 +103,5 @@ export const circleArea = {
101
103
  getAnswer,
102
104
  getQuestionFromIdentifiers,
103
105
  hasHintAndCorrection: true,
106
+ shouldHaveCalculator: true,
104
107
  };
@@ -1 +1 @@
1
- {"version":3,"file":"circleRadiusFromArea.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/areas/circleRadiusFromArea.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAcrC,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAyFF,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,WAAW,CAgBtD,CAAC"}
1
+ {"version":3,"file":"circleRadiusFromArea.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/areas/circleRadiusFromArea.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAcrC,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAyFF,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,WAAW,CAiBtD,CAAC"}
@@ -22,10 +22,10 @@ const getAnswer = (identifiers) => {
22
22
  return round(Math.sqrt(identifiers.area / Math.PI), 2).frenchify();
23
23
  };
24
24
  const getInstruction = (identifiers) => {
25
- return `Calculer le rayon d'un cercle d'aire $${identifiers.area.frenchify()}$. Arrondir au centième.`;
25
+ return `Calculer le rayon d'un disque d'aire $${identifiers.area.frenchify()}$. Arrondir au centième.`;
26
26
  };
27
27
  const getHint = (identifiers) => {
28
- return `L'aire d'un cercle est égale à :
28
+ return `L'aire d'un disque est égale à :
29
29
 
30
30
  $$
31
31
  \\pi\\times r^2
@@ -35,7 +35,7 @@ où $r$ est le rayon.`;
35
35
  };
36
36
  const getCorrection = (identifiers) => {
37
37
  const r2 = identifiers.area / Math.PI;
38
- return `L'aire d'un cercle est égale à :
38
+ return `L'aire d'un disque est égale à :
39
39
 
40
40
  $$
41
41
  \\pi\\times r^2
@@ -59,7 +59,7 @@ ${alignTex([
59
59
  Enfin, on obtient $r$ en prenant la racine carrée du résultat précédent :
60
60
 
61
61
  ${alignTex([
62
- ["r", "=", new SqrtNode(round(r2, 2).toTree()).toTex()],
62
+ ["r", "\\approx", new SqrtNode(round(r2, 2).toTree()).toTex()],
63
63
  ["", "\\approx", getAnswer(identifiers)],
64
64
  ])}
65
65
  `;
@@ -90,7 +90,7 @@ const getCircleRadiusFromAreaQuestion = () => {
90
90
  export const circleRadiusFromArea = {
91
91
  id: "circleRadiusFromArea",
92
92
  connector: "=",
93
- label: "Calculer le rayon d'un cercle en connaissant son aire",
93
+ label: "Calculer le rayon d'un disque en connaissant son aire",
94
94
  isSingleStep: true,
95
95
  generator: (nb) => getDistinctQuestions(getCircleRadiusFromAreaQuestion, nb),
96
96
  qcmTimer: 60,
@@ -102,4 +102,5 @@ export const circleRadiusFromArea = {
102
102
  getCorrection,
103
103
  getAnswer,
104
104
  hasHintAndCorrection: true,
105
+ shouldHaveCalculator: true,
105
106
  };
@@ -1 +1 @@
1
- {"version":3,"file":"rectangleArea.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/areas/rectangleArea.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAIrC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAqEF,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,WAAW,CAmB/C,CAAC"}
1
+ {"version":3,"file":"rectangleArea.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/areas/rectangleArea.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAIrC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AA4EF,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,WAAW,CAmB/C,CAAC"}
@@ -5,7 +5,7 @@ import { shuffle } from "../../../../utils/alea/shuffle.js";
5
5
  const getKeys = (identifiers) => ["cm", "cm2"];
6
6
  const getInstruction = (identifiers) => {
7
7
  const { length, width } = identifiers;
8
- return `Calculer l'aire d'un rectangle de $${length}$ cm de longueur et de $${width}$ cm de largeur.`;
8
+ return `Calculer l'aire d'un rectangle de $${length}\\ \\textrm{cm}$ de longueur et de $${width}\\ \\textrm{cm}$ de largeur.`;
9
9
  };
10
10
  const getAnswer = (identifiers) => {
11
11
  const { length, width } = identifiers;
@@ -23,13 +23,13 @@ const getCorrection = (identifiers) => {
23
23
  Ici, on a donc :
24
24
 
25
25
  $$
26
- \\mathcal{A} = ${length} \\times ${width} = ${length * width} \\text{cm}^2
26
+ \\mathcal{A} = ${length} \\times ${width} = ${length * width} \\ \\textrm{cm}^2
27
27
  $$
28
28
 
29
29
  `;
30
30
  };
31
31
  const getRectangleArea = () => {
32
- const length = randint(3, 13);
32
+ const length = randint(3, 11);
33
33
  const width = randint(1, length);
34
34
  const identifiers = { length, width };
35
35
  const question = {
@@ -43,9 +43,10 @@ const getRectangleArea = () => {
43
43
  };
44
44
  return question;
45
45
  };
46
- const getPropositions = (n, { answer }) => {
46
+ const getPropositions = (n, { answer, length, width }) => {
47
47
  const propositions = [];
48
48
  addValidProp(propositions, answer);
49
+ tryToAddWrongProp(propositions, (2 * length + 2 * width).frenchify() + "\\text{cm}^2");
49
50
  while (propositions.length < n) {
50
51
  tryToAddWrongProp(propositions, (randint(3, 13) * randint(3, 13) + "\\text{cm}^2").replace(".", ","));
51
52
  }
@@ -1 +1 @@
1
- {"version":3,"file":"rectangleSideFromArea.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/areas/rectangleSideFromArea.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAUrC,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAoFF,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,WAAW,CAiBvD,CAAC"}
1
+ {"version":3,"file":"rectangleSideFromArea.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/areas/rectangleSideFromArea.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAUrC,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAoFF,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,WAAW,CAkBvD,CAAC"}
@@ -23,10 +23,10 @@ const getInstruction = (identifiers) => {
23
23
  return `Calculer la longueur d'un rectangle d'aire $${identifiers.area.frenchify()}$ et de largeur $${identifiers.width.frenchify()}$.`;
24
24
  };
25
25
  const getHint = (identifiers) => {
26
- return `L'aire d'un rectangle est le produit de la largeur et de la longueur.`;
26
+ return `L'aire d'un rectangle est le produit de la largeur par la longueur.`;
27
27
  };
28
28
  const getCorrection = (identifiers) => {
29
- return `L'aire d'un rectangle est le produit de la largeur et de la longueur.
29
+ return `L'aire d'un rectangle est le produit de la largeur par la longueur.
30
30
 
31
31
  Ici, on a donc :
32
32
 
@@ -89,4 +89,5 @@ export const rectangleSideFromArea = {
89
89
  getCorrection,
90
90
  getAnswer,
91
91
  hasHintAndCorrection: true,
92
+ shouldHaveCalculator: true,
92
93
  };
@@ -19,7 +19,7 @@ const getRightTriangleArea = () => {
19
19
  hideGrid: true,
20
20
  });
21
21
  const question = {
22
- instruction: `Le triangle $${triangle.name}$ ci-dessous est rectangle en $${triangle.points[0].name}$, et tel que $${triangle.sides[1].toLengthTex()}$ cm et $${triangle.sides[2].toLengthTex()}$ cm.
22
+ instruction: `Le triangle $${triangle.name}$ ci-dessous est rectangle en $${triangle.points[0].name}$, et tel que $${triangle.sides[1].toLengthTex()}\\ \\textrm{cm}$ et $${triangle.sides[2].toLengthTex()}\\ \\textrm{cm}$.
23
23
 
24
24
  Calculer l'aire de $${triangle.name}$.`,
25
25
  answer: answerTex,
@@ -1 +1 @@
1
- {"version":3,"file":"squareArea.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/areas/squareArea.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAMrC,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAqEF,eAAO,MAAM,UAAU,EAAE,QAAQ,CAAC,WAAW,CAc5C,CAAC"}
1
+ {"version":3,"file":"squareArea.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/areas/squareArea.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAMrC,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAsEF,eAAO,MAAM,UAAU,EAAE,QAAQ,CAAC,WAAW,CAc5C,CAAC"}
@@ -4,7 +4,7 @@ import { randint } from "../../../../math/utils/random/randint.js";
4
4
  import { shuffle } from "../../../../utils/alea/shuffle.js";
5
5
  const getInstruction = (identifiers) => {
6
6
  const { side } = identifiers;
7
- return `Calculer l'aire d'un carré de $${side}$ cm de côté.`;
7
+ return `Calculer l'aire d'un carré de $${side}\\ \\textrm{cm}$ de côté.`;
8
8
  };
9
9
  const getAnswer = (identifiers) => {
10
10
  const { side } = identifiers;
@@ -23,7 +23,7 @@ $$
23
23
  A = c\\times c
24
24
  $$
25
25
 
26
- Ici, on a $c = ${side}$ cm.
26
+ Ici, on a $c = ${side}\\ \\textrm{cm}$.
27
27
 
28
28
  L'aire du carré vaut donc :
29
29
 
@@ -48,9 +48,10 @@ const getSquareArea = () => {
48
48
  const identifiers = { side };
49
49
  return getQuestionFromIdentifiers(identifiers);
50
50
  };
51
- const getPropositions = (n, { answer }) => {
51
+ const getPropositions = (n, { answer, side }) => {
52
52
  const propositions = [];
53
53
  addValidProp(propositions, answer);
54
+ tryToAddWrongProp(propositions, (4 * side).frenchify() + "\\text{cm}^2");
54
55
  while (propositions.length < n) {
55
56
  tryToAddWrongProp(propositions, randint(1, 13) ** 2 + "\\text{cm}^2");
56
57
  }
@@ -1 +1 @@
1
- {"version":3,"file":"triangleArea.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/areas/triangleArea.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAGrC,OAAO,EAGL,mBAAmB,EACpB,MAAM,2CAA2C,CAAC;AAOnD,OAAO,EAGL,kBAAkB,EACnB,MAAM,gCAAgC,CAAC;AAOxC,KAAK,WAAW,GAAG;IACjB,mBAAmB,EAAE,mBAAmB,CAAC;IACzC,iBAAiB,EAAE,kBAAkB,CAAC;IACtC,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAiJF,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,WAAW,CAiB9C,CAAC"}
1
+ {"version":3,"file":"triangleArea.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/areas/triangleArea.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAGrC,OAAO,EAGL,mBAAmB,EACpB,MAAM,2CAA2C,CAAC;AAOnD,OAAO,EAGL,kBAAkB,EACnB,MAAM,gCAAgC,CAAC;AAOxC,KAAK,WAAW,GAAG;IACjB,mBAAmB,EAAE,mBAAmB,CAAC;IACzC,iBAAiB,EAAE,kBAAkB,CAAC;IACtC,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAoJF,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,WAAW,CAkB9C,CAAC"}
@@ -18,9 +18,9 @@ const getInstruction = (identifiers) => {
18
18
  const { triangleIdentifiers, heightIdentifiers, height, base } = identifiers;
19
19
  const triangle = TriangleConstructor.fromIdentifiers(triangleIdentifiers);
20
20
  const heightSegment = SegmentConstructor.fromIdentifiers(heightIdentifiers);
21
- return `Calculer l'aire du triangle $${triangle.name}$ sachant que $${triangle.sides[1].toLengthTex()}$ cm et $${heightSegment.toLengthTex()}$ cm.
21
+ return `Calculer l'aire du triangle $${triangle.name}$ sachant que $${triangle.sides[1].toLengthTex()} \\ \\textrm{cm}$ et $${heightSegment.toLengthTex()} \\ \\textrm{cm}$.
22
22
 
23
- Arrondir à $0,1$ cm près.`;
23
+ Arrondir à $0,1 \\ \\textrm{cm}^2$ près.`;
24
24
  };
25
25
  const getAnswer = (identifiers) => {
26
26
  const { height, base } = identifiers;
@@ -46,17 +46,19 @@ const getHint = (identifiers) => {
46
46
  return `Repère une hauteur du triangle et sa base associée. L'aire du triangle s'obtient alors par la formule :
47
47
 
48
48
  $$
49
- A = \\frac{\\text{base}\\times \\text{hauteur}}{2}
49
+ \\mathcal{A} = \\frac{\\text{base}\\times \\text{hauteur}}{2}
50
50
  $$`;
51
51
  };
52
52
  const getCorrection = (identifiers) => {
53
53
  const { triangleIdentifiers, heightIdentifiers, height, base } = identifiers;
54
54
  const triangle = TriangleConstructor.fromIdentifiers(triangleIdentifiers);
55
55
  const heightSegment = SegmentConstructor.fromIdentifiers(heightIdentifiers);
56
+ const value = round((base * height) / 2, 5);
57
+ const isApprox = value !== round(value, 1);
56
58
  return `L'aire d'un triangle s'obtient par la formule :
57
59
 
58
60
  $$
59
- A = \\frac{\\text{base}\\times \\text{hauteur}}{2}
61
+ \\mathcal{A} = \\frac{\\text{base}\\times \\text{hauteur}}{2}
60
62
  $$
61
63
 
62
64
  Dans le triangle $${triangle.name}$, $${heightSegment.toTex()}$ est une hauteur et sa base associée est le côté $${triangle.sides[1].toTex()}$.
@@ -64,7 +66,7 @@ Dans le triangle $${triangle.name}$, $${heightSegment.toTex()}$ est une hauteur
64
66
  On a donc :
65
67
 
66
68
  $$
67
- A = ${frac(multiply(base, height), 2).toTex()} = ${getAnswer(identifiers)}
69
+ \\mathcal{A} = ${frac(multiply(base, height), 2).toTex()} ${isApprox ? "\\approx" : "="} ${getAnswer(identifiers)}
68
70
  $$`;
69
71
  };
70
72
  const getTriangleArea = () => {
@@ -145,4 +147,5 @@ export const triangleArea = {
145
147
  getGGBOptions,
146
148
  getQuestionFromIdentifiers,
147
149
  hasHintAndCorrection: true,
150
+ shouldHaveCalculator: true,
148
151
  };
@@ -1 +1 @@
1
- {"version":3,"file":"triangleAreaV2.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/areas/triangleAreaV2.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAOrC,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAkHF,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,WAAW,CAchD,CAAC"}
1
+ {"version":3,"file":"triangleAreaV2.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/areas/triangleAreaV2.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAOrC,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAkHF,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,WAAW,CAehD,CAAC"}
@@ -24,7 +24,7 @@ const sides = [
24
24
  ];
25
25
  const getInstruction = (identifiers) => {
26
26
  const { randomSide } = identifiers;
27
- return `Calculer l'aire d'un triangle rectangle dont les côtés mesurent $${sides[randomSide][0]}$ cm, $${sides[randomSide][1]}$ cm et $${sides[randomSide][2]}$ cm.`;
27
+ return `Calculer l'aire d'un triangle rectangle dont les côtés mesurent $${sides[randomSide][0]}\\ \\textrm{cm}$, $${sides[randomSide][1]}\\ \\textrm{cm}$ et $${sides[randomSide][2]}\\ \\textrm{cm}$.`;
28
28
  };
29
29
  const getHint = (identifiers) => {
30
30
  return `L'aire d'un triangle s'obtient par la formule :
@@ -37,7 +37,7 @@ Dans un triangle rectangle, un des angles est un angle droit. On peut en déduir
37
37
  };
38
38
  const getCorrection = (identifiers) => {
39
39
  const { randomSide } = identifiers;
40
- return `Dans ce triangle rectangle, l'hypoténuse est le côté le plus grand : c'est donc celui qui mesure $${sides[randomSide][2]}$ cm.
40
+ return `Dans ce triangle rectangle, l'hypoténuse est le côté le plus grand : c'est donc celui qui mesure $${sides[randomSide][2]}\\ \\textrm{cm}$.
41
41
 
42
42
  Les deux autres côtés sont perpendiculaires. Ils forment donc une base et une hauteur.
43
43
 
@@ -111,4 +111,5 @@ export const triangleAreaV2 = {
111
111
  subject: "Mathématiques",
112
112
  getQuestionFromIdentifiers,
113
113
  hasHintAndCorrection: true,
114
+ shouldHaveCalculator: true,
114
115
  };
@@ -9,7 +9,7 @@ import { deleteObjectNamesFromAnswer } from "../../../../geogebra/deleteObjectNa
9
9
  import { GeogebraConstructor } from "../../../../geogebra/geogebraConstructor.js";
10
10
  import { approxEqual } from "../../../../geogebra/parsers/approxEqual.js";
11
11
  const getHint = (identifiers) => {
12
- return `Détermine un premier point par lequel passe la droite en utilisant l'ordonnée à l'origine de la droite. Puis, à l'aide du coefficient directeur, détermine un second point à partir du premier point.`;
12
+ return `Détermine un premier point par lequel passe la droite en utilisant l'ordonnée à l'origine de la droite. Puis à l'aide du coefficient directeur, détermine un second point à partir du premier point.`;
13
13
  };
14
14
  const getCorrection = (identifiers) => {
15
15
  const { correctA, correctB } = identifiers;
@@ -1 +1 @@
1
- {"version":3,"file":"readAbscissOnLine.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/cartesian/readAbscissOnLine.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAmBT,MAAM,6BAA6B,CAAC;AAIrC,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAe1D,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,UAAU,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AA4LF,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,WAAW,CAkBnD,CAAC"}
1
+ {"version":3,"file":"readAbscissOnLine.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/cartesian/readAbscissOnLine.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAmBT,MAAM,6BAA6B,CAAC;AAIrC,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAgB1D,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,UAAU,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AA6LF,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,WAAW,CAkBnD,CAAC"}
@@ -11,6 +11,7 @@ import { multiply, MultiplyNode, } from "../../../../tree/nodes/operators/multip
11
11
  import { parseAlgebraic } from "../../../../tree/parsers/latexParser.js";
12
12
  import { random } from "../../../../utils/alea/random.js";
13
13
  import { handleVEAError } from "../../../../utils/errors/handleVEAError.js";
14
+ import { pluralize } from "../../../../utils/strings/pluralize.js";
14
15
  const getPropositions = (n, { answer, absciss, abscissTex, abscissType, axisUnit, oneUnitTex }) => {
15
16
  const propositions = [];
16
17
  addValidProp(propositions, answer);
@@ -23,19 +24,20 @@ const getPropositions = (n, { answer, absciss, abscissTex, abscissType, axisUnit
23
24
  };
24
25
  const getHint = (identifiers) => {
25
26
  const { absciss, axisUnit, oneUnitTex, abscissType, abscissTex, coeff } = identifiers;
26
- return `Il faut compter le nombre de graduations entre les points $O$ et $A$. Puis, on utilise le fait qu'une graduation vaut $${oneUnitTex}$.
27
+ return `Il faut compter le nombre de graduations entre les points $O$ et $A$. Puis on utilise le fait qu'une graduation vaut $${oneUnitTex}$.
27
28
 
28
- D'autre part, si $A$ est placé à gauche de $O$, alors son abscisse sera négative.`;
29
+ D'autre part, si $A$ est placé à gauche de $O$, alors son abscisse est négative.`;
29
30
  };
30
31
  const getCorrection = (identifiers) => {
31
32
  const { absciss, axisUnit, oneUnitTex, abscissType, abscissTex, coeff } = identifiers;
33
+ const absCoeff = Math.abs(coeff);
32
34
  const oneUnitNode = parseAlgebraic(oneUnitTex);
33
- return `Il y a $${Math.abs(coeff)}$ graduations entre $O$ et $A$. Puisqu'une graduation vaut $${oneUnitTex}$, cela représente un écart de :
35
+ return `Il y a $${absCoeff}$ ${pluralize("graduation", absCoeff)} entre $O$ et $A$. Puisqu'une graduation vaut $${oneUnitTex}$, cela représente un écart de :
34
36
 
35
37
  $$
36
- ${multiply(Math.abs(coeff), oneUnitNode).toTex({
38
+ ${multiply(absCoeff, oneUnitNode).toTex({
37
39
  forceNoSimplification: true,
38
- })} = ${multiply(Math.abs(coeff), oneUnitNode).simplify().toTex()}
40
+ })} = ${multiply(absCoeff, oneUnitNode).simplify().toTex()}
39
41
  $$
40
42
 
41
43
  ${coeff < 0
@@ -50,7 +52,7 @@ const getInstruction = (identifiers) => {
50
52
  };
51
53
  const getGGBOptions = ({ absciss, abscissType, axisUnit, oneUnitTex, coeff, }) => {
52
54
  const O = new Point("O", (0).toTree(), (0).toTree());
53
- const I = new Point("I", (1).toTree(), (0).toTree());
55
+ const I = new Point("B", (1).toTree(), (0).toTree());
54
56
  const A = new Point("A", coeff.toTree(), (0).toTree());
55
57
  const commands = [
56
58
  ...O.toGGBCommand(),
@@ -23,7 +23,7 @@ const getPropositions = (n, { answer, absciss, abscissTex, abscissType, axisUnit
23
23
  };
24
24
  const getHint = (identifiers) => {
25
25
  const { absciss, axisUnit, oneUnitTex, abscissType, abscissTex, coeff } = identifiers;
26
- return `Il faut compter le nombre de graduations entre les points $O$ et $A$. Puis, on utilise le fait qu'une graduation vaut $${oneUnitTex}$.`;
26
+ return `Il faut compter le nombre de graduations entre les points $O$ et $A$. Puis on utilise le fait qu'une graduation vaut $${oneUnitTex}$.`;
27
27
  };
28
28
  const getCorrection = (identifiers) => {
29
29
  const { absciss, axisUnit, oneUnitTex, abscissType, abscissTex, coeff } = identifiers;
@@ -9,7 +9,7 @@ import { randfloat } from "../../../../math/utils/random/randfloat.js";
9
9
  import { round } from "../../../../math/utils/round.js";
10
10
  import { arrayEqual } from "../../../../utils/arrays/arrayEqual.js";
11
11
  const getInstruction = (identifiers) => {
12
- return `Construire un triangle dont les côtés mesurent $${identifiers.lengths[0].frenchify()}$ cm, $${identifiers.lengths[1].frenchify()}$ cm et $${identifiers.lengths[2].frenchify()}$ cm.`;
12
+ return `Construire un triangle dont les côtés mesurent $${identifiers.lengths[0].frenchify()}\\ \\textrm{cm}$, $${identifiers.lengths[1].frenchify()}\\ \\textrm{cm}$ et $${identifiers.lengths[2].frenchify()}\\ \\textrm{cm}$.`;
13
13
  };
14
14
  // const getHint: GetHint<Identifiers> = (identifiers) => {};
15
15
  // const getCorrection: GetCorrection<Identifiers> = (identifiers) => {};
@@ -1 +1 @@
1
- {"version":3,"file":"circleCircumference.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/perimeters/circleCircumference.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAMrC,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,OAAO,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAiGF,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,WAAW,CAcrD,CAAC"}
1
+ {"version":3,"file":"circleCircumference.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/perimeters/circleCircumference.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAMrC,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,OAAO,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAoGF,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,WAAW,CAcrD,CAAC"}
@@ -6,19 +6,21 @@ import { coinFlip } from "../../../../utils/alea/coinFlip.js";
6
6
  import { shuffle } from "../../../../utils/alea/shuffle.js";
7
7
  const getInstruction = (identifiers) => {
8
8
  const { coin, radius, diametre } = identifiers;
9
- return `Calculer le périmètre d'un cercle de ${coin ? "rayon " + `$${radius}$` : "diamètre " + `$${diametre}$`} cm (arrondir au centième).`;
9
+ return `Calculer le périmètre d'un cercle de ${coin
10
+ ? "rayon " + `$${radius}\\ \\textrm{cm}$`
11
+ : "diamètre " + `$${diametre} \\ \\textrm{cm}$`} (arrondir au centième de $\\textrm{cm}$).`;
10
12
  };
11
13
  const getAnswer = (identifiers) => {
12
14
  const { coin, radius, diametre } = identifiers;
13
15
  const answerNb = coin
14
16
  ? round(2 * Math.PI * radius, 2)
15
17
  : round(Math.PI * diametre, 2);
16
- const answer = (answerNb + "").replace(".", ",");
18
+ const answer = answerNb.frenchify();
17
19
  const answerTex = answer + "\\text{cm}";
18
20
  return answerTex;
19
21
  };
20
22
  const getHint = (identifiers) => {
21
- return `Le périmètre d'un cercle de rayon $r$ est donnée par :
23
+ return `Le périmètre d'un cercle de rayon $r$ est donné par :
22
24
 
23
25
  $$
24
26
  C = 2\\pi r
@@ -27,23 +29,23 @@ $$`;
27
29
  const getCorrection = (identifiers) => {
28
30
  const { coin, radius, diametre } = identifiers;
29
31
  const isRadius = coin;
30
- return `Le périmètre d'un cercle de ${isRadius ? "rayon $r$" : "diamètre $d$"} est donnée par :
32
+ return `Le périmètre d'un cercle de ${isRadius ? "rayon $r$" : "diamètre $d$"} est donné par :
31
33
 
32
34
  $$
33
35
  C = ${isRadius ? "2\\pi r" : "\\pi\\times d"}
34
36
  $$
35
37
 
36
38
  ${isRadius
37
- ? `Ici, on a $r = ${radius}$ cm.
39
+ ? `Ici, on a $r = ${radius}\\ \\textrm{cm}$.
38
40
 
39
- Le périmètre est donc égale à :
41
+ Le périmètre est donc égal à :
40
42
 
41
43
  $$
42
44
  C = 2\\pi \\times ${radius} \\approx ${getAnswer(identifiers)}
43
45
  $$`
44
- : `Ici, on a $d = ${diametre}$ cm.
46
+ : `Ici, on a $d = ${diametre} \\ \\textrm{cm}$.
45
47
 
46
- Le périmètre est donc égale à :
48
+ Le périmètre est donc égal à :
47
49
 
48
50
  $$
49
51
  C = \\pi \\times ${diametre} \\approx ${getAnswer(identifiers)}
@@ -1 +1 @@
1
- {"version":3,"file":"circleRadiusFromPerimeter.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/perimeters/circleRadiusFromPerimeter.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAcrC,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AA2FF,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,WAAW,CAgB3D,CAAC"}
1
+ {"version":3,"file":"circleRadiusFromPerimeter.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/perimeters/circleRadiusFromPerimeter.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAcrC,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AA6FF,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,WAAW,CAgB3D,CAAC"}
@@ -25,7 +25,7 @@ const getInstruction = (identifiers) => {
25
25
  return `Calculer le rayon d'un cercle de périmètre $${identifiers.perimeter.frenchify()}$. Arrondir au centième.`;
26
26
  };
27
27
  const getHint = (identifiers) => {
28
- return `Le périmètre d'un cercle est égale à :
28
+ return `Le périmètre d'un cercle est égal à :
29
29
 
30
30
  $$
31
31
  2\\times \\pi\\times r
@@ -36,19 +36,21 @@ const getHint = (identifiers) => {
36
36
  const getCorrection = (identifiers) => {
37
37
  return `Le périmètre d'un cercle est égal à :
38
38
 
39
- $$
40
- 2\\times \\pi\\times r
41
- $$
42
-
43
- où $r$ est le rayon.
44
-
45
- Ici, on a donc :
46
-
47
- $${identifiers.perimeter.frenchify()} = 2\\times \\pi\\times r$
48
-
49
- On isole $r$ dans cette équation :
39
+ $$
40
+ 2\\times \\pi\\times r
41
+ $$
42
+
43
+ où $r$ est le rayon.
44
+
45
+ Ici, on a donc :
46
+
47
+ $$
48
+ ${identifiers.perimeter.frenchify()} = 2\\times \\pi\\times r
49
+ $$
50
+
51
+ On isole $r$ dans cette équation :
50
52
 
51
- ${alignTex([
53
+ ${alignTex([
52
54
  [
53
55
  "r",
54
56
  "=",
@@ -1 +1 @@
1
- {"version":3,"file":"rectanglePerimeter.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/perimeters/rectanglePerimeter.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAKrC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAwEF,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,WAAW,CAapD,CAAC"}
1
+ {"version":3,"file":"rectanglePerimeter.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/perimeters/rectanglePerimeter.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAMrC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AA4EF,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,WAAW,CAapD,CAAC"}
@@ -4,7 +4,7 @@ import { randint } from "../../../../math/utils/random/randint.js";
4
4
  import { shuffle } from "../../../../utils/alea/shuffle.js";
5
5
  const getInstruction = (identifiers) => {
6
6
  const { width, length } = identifiers;
7
- return `Calculer le périmètre d'un rectangle de $${length}$ cm de longueur et de $${width}$ cm de largeur.`;
7
+ return `Calculer le périmètre d'un rectangle de $${length}\\ \\textrm{cm}$ de longueur et de $${width}\\ \\textrm{cm}$ de largeur.`;
8
8
  };
9
9
  const getAnswer = (identifiers) => {
10
10
  const { width, length } = identifiers;
@@ -20,7 +20,7 @@ const getCorrection = (identifiers) => {
20
20
  return `Puisque les côtés opposés d'un rectangle sont égaux, le périmètre d'un rectangle est :
21
21
 
22
22
  $$
23
- P = 2\\times \\text{Longueur} + 2\\times \\text{largeur}
23
+ P = 2\\times \\text{longueur} + 2\\times \\text{largeur}
24
24
  $$
25
25
 
26
26
  Ici, le périmètre du rectangle est donc :
@@ -47,9 +47,10 @@ const getRectanglePerimeter = () => {
47
47
  const identifiers = { length, width };
48
48
  return getQuestionFromIdentifiers(identifiers);
49
49
  };
50
- const getPropositions = (n, { answer }) => {
50
+ const getPropositions = (n, { answer, length, width }) => {
51
51
  const propositions = [];
52
52
  addValidProp(propositions, answer);
53
+ tryToAddWrongProp(propositions, (length * width).frenchify() + "\\text{cm}");
53
54
  while (propositions.length < n) {
54
55
  tryToAddWrongProp(propositions, (randint(3, 13) + randint(1, 13)) * 2 + "\\text{cm}");
55
56
  }
@@ -1 +1 @@
1
- {"version":3,"file":"rectangleSideFromPerimeter.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/perimeters/rectangleSideFromPerimeter.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAOrC,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AA4GF,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,WAAW,CAiB5D,CAAC"}
1
+ {"version":3,"file":"rectangleSideFromPerimeter.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/perimeters/rectangleSideFromPerimeter.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAOrC,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AA4GF,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,WAAW,CAkB5D,CAAC"}
@@ -108,4 +108,5 @@ export const rectangleSideFromPerimeter = {
108
108
  getCorrection,
109
109
  getAnswer,
110
110
  hasHintAndCorrection: true,
111
+ shouldHaveCalculator: true,
111
112
  };
@@ -1 +1 @@
1
- {"version":3,"file":"squarePerimeter.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/perimeters/squarePerimeter.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAKrC,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAwEF,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,CAcjD,CAAC"}
1
+ {"version":3,"file":"squarePerimeter.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/perimeters/squarePerimeter.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAKrC,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAyEF,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,CAcjD,CAAC"}
@@ -4,7 +4,7 @@ import { randint } from "../../../../math/utils/random/randint.js";
4
4
  import { shuffle } from "../../../../utils/alea/shuffle.js";
5
5
  const getInstruction = (identifiers) => {
6
6
  const { side } = identifiers;
7
- return `Calculer le périmètre d'un carré de $${side}$ cm de côté.`;
7
+ return `Calculer le périmètre d'un carré de $${side}\\ \\textrm{cm}$ de côté.`;
8
8
  };
9
9
  const getAnswer = (identifiers) => {
10
10
  const { side } = identifiers;
@@ -23,7 +23,7 @@ $$
23
23
  P = 4\\times \\text{longueur d'un côté}
24
24
  $$
25
25
 
26
- Ici, la longueur d'un côté du carré est $${side}\\ \\text{cm}$.
26
+ Ici, la longueur d'un côté du carré est $${side}\\ \\textrm{cm}$.
27
27
 
28
28
  Le périmètre est donc égal à :
29
29
 
@@ -51,6 +51,7 @@ const getQuestionFromIdentifiers = (identifiers) => {
51
51
  const getPropositions = (n, { answer, side }) => {
52
52
  const propositions = [];
53
53
  addValidProp(propositions, answer);
54
+ tryToAddWrongProp(propositions, (side ** 2).frenchify() + "\\text{cm}");
54
55
  while (propositions.length < n) {
55
56
  tryToAddWrongProp(propositions, side * 4 + randint(-side * 4 + 1, 14, [0]) + "\\text{cm}");
56
57
  }
@@ -1 +1 @@
1
- {"version":3,"file":"squareSideFromPerimeter.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/perimeters/squareSideFromPerimeter.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAQrC,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAmEF,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,WAAW,CAgBzD,CAAC"}
1
+ {"version":3,"file":"squareSideFromPerimeter.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/perimeters/squareSideFromPerimeter.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAQrC,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAmEF,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,WAAW,CAiBzD,CAAC"}
@@ -68,4 +68,5 @@ export const squareSideFromPerimeter = {
68
68
  getCorrection,
69
69
  getAnswer,
70
70
  hasHintAndCorrection: true,
71
+ shouldHaveCalculator: true,
71
72
  };