math-exercises 3.0.63 → 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 (340) 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/derivation/variations/thirdDegreeFunctionVariation.d.ts.map +1 -1
  98. package/lib/exercises/math/derivation/variations/thirdDegreeFunctionVariation.js +1 -5
  99. package/lib/exercises/math/equaDiff/exponentialDifferentialEquationWithIC.d.ts.map +1 -1
  100. package/lib/exercises/math/equaDiff/exponentialDifferentialEquationWithIC.js +6 -0
  101. package/lib/exercises/math/functions/affines/signFunction.d.ts.map +1 -1
  102. package/lib/exercises/math/functions/affines/signFunction.js +7 -7
  103. package/lib/exercises/math/functions/exponential/expEquation.d.ts.map +1 -1
  104. package/lib/exercises/math/functions/exponential/expEquation.js +4 -6
  105. package/lib/exercises/math/functions/exponentials/exponentialsVariations.js +1 -1
  106. package/lib/exercises/math/geometry/areas/circleArea.d.ts.map +1 -1
  107. package/lib/exercises/math/geometry/areas/circleArea.js +6 -3
  108. package/lib/exercises/math/geometry/areas/circleRadiusFromArea.d.ts.map +1 -1
  109. package/lib/exercises/math/geometry/areas/circleRadiusFromArea.js +6 -5
  110. package/lib/exercises/math/geometry/areas/rectangleArea.d.ts.map +1 -1
  111. package/lib/exercises/math/geometry/areas/rectangleArea.js +5 -4
  112. package/lib/exercises/math/geometry/areas/rectangleSideFromArea.d.ts.map +1 -1
  113. package/lib/exercises/math/geometry/areas/rectangleSideFromArea.js +3 -2
  114. package/lib/exercises/math/geometry/areas/rightTriangleArea.js +1 -1
  115. package/lib/exercises/math/geometry/areas/squareArea.d.ts.map +1 -1
  116. package/lib/exercises/math/geometry/areas/squareArea.js +4 -3
  117. package/lib/exercises/math/geometry/areas/triangleArea.d.ts.map +1 -1
  118. package/lib/exercises/math/geometry/areas/triangleArea.js +8 -5
  119. package/lib/exercises/math/geometry/areas/triangleAreaV2.d.ts.map +1 -1
  120. package/lib/exercises/math/geometry/areas/triangleAreaV2.js +3 -2
  121. package/lib/exercises/math/geometry/cartesian/drawAlineInGGB.js +1 -1
  122. package/lib/exercises/math/geometry/cartesian/readAbscissOnLine.d.ts.map +1 -1
  123. package/lib/exercises/math/geometry/cartesian/readAbscissOnLine.js +8 -6
  124. package/lib/exercises/math/geometry/cartesian/readAbscissOnSemiLine.js +1 -1
  125. package/lib/exercises/math/geometry/euclidianConstructions/buildTriangleWithSizes.js +1 -1
  126. package/lib/exercises/math/geometry/perimeters/circleCircumference.d.ts.map +1 -1
  127. package/lib/exercises/math/geometry/perimeters/circleCircumference.js +10 -8
  128. package/lib/exercises/math/geometry/perimeters/circleRadiusFromPerimeter.d.ts.map +1 -1
  129. package/lib/exercises/math/geometry/perimeters/circleRadiusFromPerimeter.js +15 -13
  130. package/lib/exercises/math/geometry/perimeters/rectanglePerimeter.d.ts.map +1 -1
  131. package/lib/exercises/math/geometry/perimeters/rectanglePerimeter.js +4 -3
  132. package/lib/exercises/math/geometry/perimeters/rectangleSideFromPerimeter.d.ts.map +1 -1
  133. package/lib/exercises/math/geometry/perimeters/rectangleSideFromPerimeter.js +1 -0
  134. package/lib/exercises/math/geometry/perimeters/squarePerimeter.d.ts.map +1 -1
  135. package/lib/exercises/math/geometry/perimeters/squarePerimeter.js +3 -2
  136. package/lib/exercises/math/geometry/perimeters/squareSideFromPerimeter.d.ts.map +1 -1
  137. package/lib/exercises/math/geometry/perimeters/squareSideFromPerimeter.js +1 -0
  138. package/lib/exercises/math/geometry/perimeters/trianglePerimeter.js +1 -1
  139. package/lib/exercises/math/geometry/pythagore/isTriangleRight.d.ts.map +1 -1
  140. package/lib/exercises/math/geometry/pythagore/isTriangleRight.js +6 -3
  141. package/lib/exercises/math/geometry/pythagore/pythagoreCalcul.d.ts.map +1 -1
  142. package/lib/exercises/math/geometry/pythagore/pythagoreCalcul.js +4 -3
  143. package/lib/exercises/math/geometry/triangles/triangleNature.js +1 -1
  144. package/lib/exercises/math/geometry/triangles/triangleThirdAngleValue.d.ts.map +1 -1
  145. package/lib/exercises/math/geometry/triangles/triangleThirdAngleValue.js +11 -4
  146. package/lib/exercises/math/geometry/vectors/lineFromDirectorVector.js +1 -1
  147. package/lib/exercises/math/geometry/volumes/coneVolume.d.ts.map +1 -1
  148. package/lib/exercises/math/geometry/volumes/coneVolume.js +7 -8
  149. package/lib/exercises/math/geometry/volumes/parallelepipedVolume.d.ts.map +1 -1
  150. package/lib/exercises/math/geometry/volumes/parallelepipedVolume.js +21 -22
  151. package/lib/exercises/math/geometry/volumes/sphereVolume.d.ts.map +1 -1
  152. package/lib/exercises/math/geometry/volumes/sphereVolume.js +2 -1
  153. package/lib/exercises/math/geometry/volumes/volumeOfPyramidWithSquareOrRectBase.d.ts.map +1 -1
  154. package/lib/exercises/math/geometry/volumes/volumeOfPyramidWithSquareOrRectBase.js +6 -3
  155. package/lib/exercises/math/geometry/volumes/volumeOfPyramidWithTriangleBase.d.ts.map +1 -1
  156. package/lib/exercises/math/geometry/volumes/volumeOfPyramidWithTriangleBase.js +3 -2
  157. package/lib/exercises/math/geometry/volumes/volumeOfPyramidWithTriangleRectBase.d.ts.map +1 -1
  158. package/lib/exercises/math/geometry/volumes/volumeOfPyramidWithTriangleRectBase.js +3 -2
  159. package/lib/exercises/math/percent/averageEvolutionRate.js +1 -1
  160. package/lib/exercises/math/percent/evolutions/applyPercent.d.ts +9 -0
  161. package/lib/exercises/math/percent/evolutions/applyPercent.d.ts.map +1 -0
  162. package/lib/exercises/math/percent/evolutions/applyPercent.js +114 -0
  163. package/lib/exercises/math/percent/evolutions/averageEvolutionRate.d.ts +8 -0
  164. package/lib/exercises/math/percent/evolutions/averageEvolutionRate.d.ts.map +1 -0
  165. package/lib/exercises/math/percent/evolutions/averageEvolutionRate.js +104 -0
  166. package/lib/exercises/math/percent/evolutions/cmToEvolution.d.ts +7 -0
  167. package/lib/exercises/math/percent/evolutions/cmToEvolution.d.ts.map +1 -0
  168. package/lib/exercises/math/percent/evolutions/cmToEvolution.js +88 -0
  169. package/lib/exercises/math/percent/evolutions/compoundInterest.d.ts +12 -0
  170. package/lib/exercises/math/percent/evolutions/compoundInterest.d.ts.map +1 -0
  171. package/lib/exercises/math/percent/evolutions/compoundInterest.js +128 -0
  172. package/lib/exercises/math/percent/evolutions/evolutionRateFromValues.d.ts +8 -0
  173. package/lib/exercises/math/percent/evolutions/evolutionRateFromValues.d.ts.map +1 -0
  174. package/lib/exercises/math/percent/evolutions/evolutionRateFromValues.js +100 -0
  175. package/lib/exercises/math/percent/evolutions/evolutionToCM.d.ts +7 -0
  176. package/lib/exercises/math/percent/evolutions/evolutionToCM.d.ts.map +1 -0
  177. package/lib/exercises/math/percent/evolutions/evolutionToCM.js +83 -0
  178. package/lib/exercises/math/percent/evolutions/findEndValueAfterEvolution.d.ts +8 -0
  179. package/lib/exercises/math/percent/evolutions/findEndValueAfterEvolution.d.ts.map +1 -0
  180. package/lib/exercises/math/percent/evolutions/findEndValueAfterEvolution.js +102 -0
  181. package/lib/exercises/math/percent/evolutions/findRightCalculForPriceEvolution.d.ts +10 -0
  182. package/lib/exercises/math/percent/evolutions/findRightCalculForPriceEvolution.d.ts.map +1 -0
  183. package/lib/exercises/math/percent/evolutions/findRightCalculForPriceEvolution.js +113 -0
  184. package/lib/exercises/math/percent/evolutions/findStartValueAfterEvolution.d.ts +8 -0
  185. package/lib/exercises/math/percent/evolutions/findStartValueAfterEvolution.d.ts.map +1 -0
  186. package/lib/exercises/math/percent/evolutions/findStartValueAfterEvolution.js +100 -0
  187. package/lib/exercises/math/percent/evolutions/globalPercent.d.ts +7 -0
  188. package/lib/exercises/math/percent/evolutions/globalPercent.d.ts.map +1 -0
  189. package/lib/exercises/math/percent/evolutions/globalPercent.js +104 -0
  190. package/lib/exercises/math/percent/evolutions/index.d.ts +12 -0
  191. package/lib/exercises/math/percent/evolutions/index.d.ts.map +1 -0
  192. package/lib/exercises/math/percent/evolutions/index.js +11 -0
  193. package/lib/exercises/math/percent/evolutions/reciprocalPercentage.d.ts +8 -0
  194. package/lib/exercises/math/percent/evolutions/reciprocalPercentage.d.ts.map +1 -0
  195. package/lib/exercises/math/percent/evolutions/reciprocalPercentage.js +108 -0
  196. package/lib/exercises/math/percent/findEndValueAfterEvolution.js +1 -1
  197. package/lib/exercises/math/percent/findProportion.d.ts.map +1 -1
  198. package/lib/exercises/math/percent/findProportion.js +12 -10
  199. package/lib/exercises/math/percent/findStartValueAfterEvolution.js +1 -1
  200. package/lib/exercises/math/percent/findTVA.d.ts.map +1 -1
  201. package/lib/exercises/math/percent/findTVA.js +4 -4
  202. package/lib/exercises/math/percent/htToTTC.d.ts.map +1 -1
  203. package/lib/exercises/math/percent/htToTTC.js +11 -7
  204. package/lib/exercises/math/percent/index.d.ts +1 -10
  205. package/lib/exercises/math/percent/index.d.ts.map +1 -1
  206. package/lib/exercises/math/percent/index.js +1 -10
  207. package/lib/exercises/math/percent/percentToDecimal.d.ts.map +1 -1
  208. package/lib/exercises/math/percent/percentToDecimal.js +4 -0
  209. package/lib/exercises/math/percent/percentWritings.d.ts.map +1 -1
  210. package/lib/exercises/math/percent/percentWritings.js +4 -4
  211. package/lib/exercises/math/percent/populationEffectifFromSubPopulation.d.ts.map +1 -1
  212. package/lib/exercises/math/percent/populationEffectifFromSubPopulation.js +7 -5
  213. package/lib/exercises/math/percent/reciprocalPercentage.js +1 -1
  214. package/lib/exercises/math/percent/subPopulationEffectifFromPercent.d.ts.map +1 -1
  215. package/lib/exercises/math/percent/subPopulationEffectifFromPercent.js +6 -4
  216. package/lib/exercises/math/percent/ttcToHT.d.ts.map +1 -1
  217. package/lib/exercises/math/percent/ttcToHT.js +4 -4
  218. package/lib/exercises/math/percent/valuePercent.d.ts.map +1 -1
  219. package/lib/exercises/math/percent/valuePercent.js +4 -4
  220. package/lib/exercises/math/powers/calculateNegativePower.d.ts.map +1 -1
  221. package/lib/exercises/math/powers/calculateNegativePower.js +6 -10
  222. package/lib/exercises/math/powers/calculatePower.d.ts.map +1 -1
  223. package/lib/exercises/math/powers/calculatePower.js +1 -0
  224. package/lib/exercises/math/powers/decimalToScientific.d.ts.map +1 -1
  225. package/lib/exercises/math/powers/decimalToScientific.js +36 -9
  226. package/lib/exercises/math/powers/powersMixOperations.d.ts.map +1 -1
  227. package/lib/exercises/math/powers/powersMixOperations.js +0 -4
  228. package/lib/exercises/math/powers/powersOfTenMixOperations.d.ts.map +1 -1
  229. package/lib/exercises/math/powers/powersOfTenMixOperations.js +0 -4
  230. package/lib/exercises/math/powers/powersOfTenToDecimal.js +2 -2
  231. package/lib/exercises/math/powers/powersProduct.d.ts.map +1 -1
  232. package/lib/exercises/math/powers/powersProduct.js +0 -5
  233. package/lib/exercises/math/powers/scientificToDecimal.js +2 -2
  234. package/lib/exercises/math/probaStat/ballsBasicProbas.d.ts.map +1 -1
  235. package/lib/exercises/math/probaStat/ballsBasicProbas.js +4 -4
  236. package/lib/exercises/math/probaStat/basicStats/calculateFrequency.d.ts.map +1 -1
  237. package/lib/exercises/math/probaStat/basicStats/calculateFrequency.js +4 -4
  238. package/lib/exercises/math/probaStat/basicStats/calculateFrequencyInList.d.ts +8 -0
  239. package/lib/exercises/math/probaStat/basicStats/calculateFrequencyInList.d.ts.map +1 -0
  240. package/lib/exercises/math/probaStat/basicStats/calculateFrequencyInList.js +117 -0
  241. package/lib/exercises/math/probaStat/basicStats/index.d.ts +1 -0
  242. package/lib/exercises/math/probaStat/basicStats/index.d.ts.map +1 -1
  243. package/lib/exercises/math/probaStat/basicStats/index.js +1 -0
  244. package/lib/exercises/math/probaStat/binomial/calculateProbaOfBinomialDistribution.d.ts.map +1 -1
  245. package/lib/exercises/math/probaStat/binomial/calculateProbaOfBinomialDistribution.js +66 -41
  246. package/lib/exercises/math/probaStat/cardBasicProbas.d.ts.map +1 -1
  247. package/lib/exercises/math/probaStat/cardBasicProbas.js +4 -2
  248. package/lib/exercises/math/probaStat/conditionalProbability.d.ts.map +1 -1
  249. package/lib/exercises/math/probaStat/conditionalProbability.js +168 -88
  250. package/lib/exercises/math/probaStat/diceBasicProbas.d.ts.map +1 -1
  251. package/lib/exercises/math/probaStat/diceBasicProbas.js +3 -0
  252. package/lib/exercises/math/probaStat/independancy.d.ts.map +1 -1
  253. package/lib/exercises/math/probaStat/independancy.js +18 -8
  254. package/lib/exercises/math/probaStat/issuesCountingForCards.d.ts.map +1 -1
  255. package/lib/exercises/math/probaStat/issuesCountingForCards.js +41 -15
  256. package/lib/exercises/math/probaStat/probaFromTableNoContext.d.ts.map +1 -1
  257. package/lib/exercises/math/probaStat/probaFromTableNoContext.js +4 -4
  258. package/lib/exercises/math/probaStat/probaFromTableWithContext.d.ts.map +1 -1
  259. package/lib/exercises/math/probaStat/probaFromTableWithContext.js +5 -2
  260. package/lib/exercises/math/probaStat/probabilityTree.d.ts.map +1 -1
  261. package/lib/exercises/math/probaStat/probabilityTree.js +8 -4
  262. package/lib/exercises/math/probaStat/stats1var/medianList.d.ts.map +1 -1
  263. package/lib/exercises/math/probaStat/stats1var/medianList.js +1 -4
  264. package/lib/exercises/math/probaStat/stats1var/standardDeviationList.js +1 -1
  265. package/lib/exercises/math/probaStat/stats1var/standardDeviationTable.js +1 -1
  266. package/lib/exercises/math/probaStat/stats2var/averagePoint.d.ts.map +1 -1
  267. package/lib/exercises/math/probaStat/stats2var/averagePoint.js +25 -22
  268. package/lib/exercises/math/probaStat/stats2var/fineAdjustementExercise.d.ts.map +1 -1
  269. package/lib/exercises/math/probaStat/stats2var/fineAdjustementExercise.js +52 -43
  270. package/lib/exercises/math/sampling/confidenceInterval.d.ts.map +1 -1
  271. package/lib/exercises/math/sampling/confidenceInterval.js +4 -4
  272. package/lib/exercises/math/sampling/fluctuationInterval.d.ts.map +1 -1
  273. package/lib/exercises/math/sampling/fluctuationInterval.js +4 -4
  274. package/lib/exercises/math/sampling/isSamplingRepresentative.d.ts.map +1 -1
  275. package/lib/exercises/math/sampling/isSamplingRepresentative.js +5 -5
  276. package/lib/exercises/math/sequences/geometric/geometricFirstTermsGeneralSum.d.ts.map +1 -1
  277. package/lib/exercises/math/sequences/geometric/geometricFirstTermsGeneralSum.js +0 -2
  278. package/lib/exercises/math/sequences/geometric/geometricVariations.js +1 -1
  279. package/lib/exercises/math/sets/intervals/inequalityToInterval.d.ts.map +1 -1
  280. package/lib/exercises/math/sets/intervals/inequalityToInterval.js +4 -4
  281. package/lib/exercises/math/sets/intervals/intervalToInequality.d.ts.map +1 -1
  282. package/lib/exercises/math/sets/intervals/intervalToInequality.js +4 -4
  283. package/lib/exercises/math/sets/intervals/intervalsIntersection.d.ts.map +1 -1
  284. package/lib/exercises/math/sets/intervals/intervalsIntersection.js +8 -1
  285. package/lib/exercises/math/sets/intervals/intervalsUnion.d.ts.map +1 -1
  286. package/lib/exercises/math/sets/intervals/intervalsUnion.js +3 -0
  287. package/lib/exercises/math/spaceGeometry/basis/spaceCoordinatesInPrism.d.ts.map +1 -1
  288. package/lib/exercises/math/spaceGeometry/basis/spaceCoordinatesInPrism.js +0 -5
  289. package/lib/exercises/math/spaceGeometry/index.js +1 -0
  290. package/lib/exercises/math/spaceGeometry/planes/index.d.ts +2 -0
  291. package/lib/exercises/math/spaceGeometry/planes/index.d.ts.map +1 -0
  292. package/lib/exercises/math/spaceGeometry/planes/index.js +2 -0
  293. package/lib/exercises/math/spaceGeometry/planes/isPointOnCartesianPlane.d.ts +2 -0
  294. package/lib/exercises/math/spaceGeometry/planes/isPointOnCartesianPlane.d.ts.map +1 -0
  295. package/lib/exercises/math/spaceGeometry/planes/isPointOnCartesianPlane.js +102 -0
  296. package/lib/exercises/math/spaceGeometry/vectors/spaceVectorCoordinatesFromPoints.d.ts.map +1 -1
  297. package/lib/exercises/math/spaceGeometry/vectors/spaceVectorCoordinatesFromPoints.js +4 -4
  298. package/lib/exercises/math/spaceGeometry/vectors/spaceVectorLinearCombinationCoords.d.ts.map +1 -1
  299. package/lib/exercises/math/spaceGeometry/vectors/spaceVectorLinearCombinationCoords.js +4 -2
  300. package/lib/exercises/math/spaceGeometry/vectors/spaceVectorNormCalculation.d.ts.map +1 -1
  301. package/lib/exercises/math/spaceGeometry/vectors/spaceVectorNormCalculation.js +4 -6
  302. package/lib/exercises/math/trigonometry/arcLength.d.ts.map +1 -1
  303. package/lib/exercises/math/trigonometry/arcLength.js +5 -2
  304. package/lib/exercises/math/trigonometry/basicEquationCos.d.ts.map +1 -1
  305. package/lib/exercises/math/trigonometry/basicEquationCos.js +4 -3
  306. package/lib/exercises/math/trigonometry/basicEquationSin.d.ts.map +1 -1
  307. package/lib/exercises/math/trigonometry/basicEquationSin.js +4 -3
  308. package/lib/exercises/math/trigonometry/basicTrigoSystemEquation.d.ts.map +1 -1
  309. package/lib/exercises/math/trigonometry/basicTrigoSystemEquation.js +4 -3
  310. package/lib/exercises/math/trigonometry/calculateCosSinAndTan.d.ts.map +1 -1
  311. package/lib/exercises/math/trigonometry/calculateCosSinAndTan.js +1 -0
  312. package/lib/exercises/math/trigonometry/degreeToRadians.d.ts.map +1 -1
  313. package/lib/exercises/math/trigonometry/degreeToRadians.js +7 -6
  314. package/lib/exercises/math/trigonometry/equationCosOnRandomInterval.d.ts.map +1 -1
  315. package/lib/exercises/math/trigonometry/equationCosOnRandomInterval.js +4 -3
  316. package/lib/exercises/math/trigonometry/equationSinOnRandomInterval.d.ts.map +1 -1
  317. package/lib/exercises/math/trigonometry/equationSinOnRandomInterval.js +4 -3
  318. package/lib/exercises/math/trigonometry/mainAngleMeasure.d.ts.map +1 -1
  319. package/lib/exercises/math/trigonometry/mainAngleMeasure.js +4 -5
  320. package/lib/exercises/math/trigonometry/mainRemarkableValues.d.ts.map +1 -1
  321. package/lib/exercises/math/trigonometry/mainRemarkableValues.js +4 -3
  322. package/lib/exercises/math/trigonometry/trigonometry.js +2 -2
  323. package/lib/exercises/math/trigonometry/trigonometryAngleCalcul.d.ts.map +1 -1
  324. package/lib/exercises/math/trigonometry/trigonometryAngleCalcul.js +5 -3
  325. package/lib/exercises/math/trigonometry/trigonometrySideCalcul.d.ts.map +1 -1
  326. package/lib/exercises/math/trigonometry/trigonometrySideCalcul.js +6 -6
  327. package/lib/exercises/pc/chemicalElements/atomicStructureOfNucleus.js +1 -1
  328. package/lib/index.d.ts +47 -25
  329. package/lib/index.d.ts.map +1 -1
  330. package/lib/math/spaceGeometry/plane.d.ts +9 -0
  331. package/lib/math/spaceGeometry/plane.d.ts.map +1 -0
  332. package/lib/math/spaceGeometry/plane.js +22 -0
  333. package/lib/tree/nodes/algebraicNode.d.ts +1 -0
  334. package/lib/tree/nodes/algebraicNode.d.ts.map +1 -1
  335. package/lib/tree/nodes/equations/equationSolutionNode.d.ts +2 -2
  336. package/lib/tree/nodes/equations/equationSolutionNode.d.ts.map +1 -1
  337. package/lib/tree/nodes/equations/equationSolutionNode.js +2 -2
  338. package/lib/tree/nodes/operators/fractionNode.d.ts.map +1 -1
  339. package/lib/tree/nodes/operators/fractionNode.js +4 -0
  340. package/package.json +1 -1
@@ -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
  };
@@ -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 { sides } = identifiers;
7
- return `Calculer le périmètre d'un triangle dont les côtés mesurent : $${sides[0]}$ cm, $${sides[1]}$ cm et $${sides[2]}$ cm.`;
7
+ return `Calculer le périmètre d'un triangle dont les côtés mesurent : $${sides[0]}\\ \\textrm{cm}$, $${sides[1]}\\ \\textrm{cm}$ et $${sides[2]}\\ \\textrm{cm}$.`;
8
8
  };
9
9
  const getAnswer = (identifiers) => {
10
10
  const { sides } = identifiers;
@@ -1 +1 @@
1
- {"version":3,"file":"isTriangleRight.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/pythagore/isTriangleRight.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAcrC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB,CAAC;AAyGF,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,CAiBjD,CAAC"}
1
+ {"version":3,"file":"isTriangleRight.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/pythagore/isTriangleRight.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAcrC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB,CAAC;AA2GF,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,CAkBjD,CAAC"}
@@ -23,10 +23,12 @@ const getAnswer = (identifiers) => {
23
23
  const getInstruction = (identifiers) => {
24
24
  const triangleName = identifiers.vertices.join("");
25
25
  const sides = identifiers.vertices.map((vertex, index) => vertex + identifiers.vertices[(index + 1) % 3]);
26
- return `Soit $${triangleName}$ un triangle avec $${sides[0]} = ${identifiers.a.frenchify()}$, $${sides[1]} = ${identifiers.b.frenchify()}$ et $${sides[2]} = ${identifiers.c.frenchify()}$. Le triangle $${triangleName}$ est-il rectangle ?`;
26
+ return `Soit $${triangleName}$ un triangle avec $${sides[0]} = ${identifiers.a.frenchify()}$, $${sides[1]} = ${identifiers.b.frenchify()}$ et $${sides[2]} = ${identifiers.c.frenchify()}$.
27
+
28
+ Le triangle $${triangleName}$ est-il rectangle ?`;
27
29
  };
28
30
  const getHint = (identifiers) => {
29
- return `Si la somme des carrés des côtés est égale au carré de l'hypoténuse, alors le triangle est rectangle, d'après la réciproque du théorème de Pythagore. Si ce n'est pas le cas, alors le triangle n'est pas rectangle, d'après le théorème de Pythagore. L'hypoténuse est toujours le côté le plus grand dans un triangle.`;
31
+ return `Si la somme des carrés des côtés est égale au carré de l'hypoténuse, alors le triangle est rectangle, d'après la réciproque du théorème de Pythagore. Si ce n'est pas le cas, alors le triangle n'est pas rectangle, d'après la contraposée du théorème de Pythagore. L'hypoténuse est toujours le côté le plus grand dans un triangle.`;
30
32
  };
31
33
  const getCorrection = (identifiers) => {
32
34
  const hypo = Math.max(identifiers.a, identifiers.b, identifiers.c);
@@ -52,7 +54,7 @@ $$
52
54
 
53
55
  ${identifiers.isRight
54
56
  ? "La somme des carrés des côtés est donc égale au carré de l'hypoténuse. D'après la réciproque du théorème de Pythagore, le triangle est donc rectangle."
55
- : "La somme des carrés des côtés n'est donc pas égale au carré de l'hypoténuse. D'après le théorème de Pythagore, le triangle n'est donc pas rectangle."}`;
57
+ : "La somme des carrés des côtés n'est donc pas égale au carré de l'hypoténuse. D'après la contraposée du théorème de Pythagore, le triangle n'est donc pas rectangle."}`;
56
58
  };
57
59
  const getKeys = (identifiers) => {
58
60
  return [];
@@ -102,4 +104,5 @@ export const isTriangleRight = {
102
104
  getAnswer,
103
105
  hasHintAndCorrection: true,
104
106
  answerType: "QCU",
107
+ shouldHaveCalculator: true,
105
108
  };
@@ -1 +1 @@
1
- {"version":3,"file":"pythagoreCalcul.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/pythagore/pythagoreCalcul.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAGrC,OAAO,EAEL,mBAAmB,EACpB,MAAM,2CAA2C,CAAC;AAcnD,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,mBAAmB,EAAE,mBAAmB,CAAC;CAC1C,CAAC;AA8LF,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,CAcjD,CAAC"}
1
+ {"version":3,"file":"pythagoreCalcul.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/pythagore/pythagoreCalcul.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAGrC,OAAO,EAEL,mBAAmB,EACpB,MAAM,2CAA2C,CAAC;AAcnD,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,mBAAmB,EAAE,mBAAmB,CAAC;CAC1C,CAAC;AAgMF,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,CAejD,CAAC"}
@@ -17,7 +17,7 @@ const getInstruction = (identifiers) => {
17
17
  const triangle = RightTriangleConstructor.fromIdentifiers(triangleIdentifiers);
18
18
  return `Dans le triangle $${triangle.name}$ rectangle en $${triangle.points[0].name}$, on sait que $${triangle.sides[(sideAsked + 1) % 3].toLengthTex()}$ et que $${triangle.sides[(sideAsked + 2) % 3].toLengthTex()}$.
19
19
 
20
- Calculer la longueur exacte $${triangle.sides[sideAsked].toInsideName()}$.`;
20
+ Calculer la longueur $${triangle.sides[sideAsked].toInsideName()}$ (donner la valeur exacte).`;
21
21
  };
22
22
  const getAnswer = (identifiers) => {
23
23
  const { sideAsked, triangleIdentifiers } = identifiers;
@@ -36,7 +36,7 @@ $$
36
36
  ${triangle.getPythagorianTex()}
37
37
  $$
38
38
 
39
- Remplace les valeurs données dans l'énoncé dans cette égalité. Puis, isole le côté recherché. Enfin, utilise la racine carrée.`;
39
+ Remplace les valeurs données dans l'énoncé dans cette égalité. Puis isole le côté recherché. Enfin, utilise la racine carrée.`;
40
40
  };
41
41
  const getCorrection = (identifiers) => {
42
42
  const { sideAsked, triangleIdentifiers } = identifiers;
@@ -83,7 +83,7 @@ $$
83
83
 
84
84
 
85
85
 
86
- On applique enfin la racine carrée pour obtenir la valeur recherchée :
86
+ On calcule enfin la racine carrée pour obtenir la valeur recherchée :
87
87
 
88
88
  $$
89
89
  ${sidesNames[sideAsked]} = ${sqrt(rightSimp).toTex()} = ${getAnswer(identifiers)}
@@ -160,4 +160,5 @@ export const pythagoreCalcul = {
160
160
  subject: "Mathématiques",
161
161
  getQuestionFromIdentifiers,
162
162
  hasHintAndCorrection: true,
163
+ shouldHaveCalculator: true,
163
164
  };
@@ -45,7 +45,7 @@ const getHint = (identifiers) => {
45
45
 
46
46
  - un triangle qui a un angle droit est un triangle rectangle ;
47
47
  - un triangle qui a deux côtés égaux (ou deux angles égaux) est un triangle isocèle ;
48
- - un triangle qiu a trois côtés égaux (ou trois angles égaux) est un triangle équilatéral.`;
48
+ - un triangle qui a trois côtés égaux (ou trois angles égaux) est un triangle équilatéral.`;
49
49
  };
50
50
  const getCorrection = (identifiers) => {
51
51
  const { triangleIdentifiers, type, useAngles } = identifiers;
@@ -1 +1 @@
1
- {"version":3,"file":"triangleThirdAngleValue.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/triangles/triangleThirdAngleValue.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAmBT,MAAM,6BAA6B,CAAC;AAGrC,OAAO,EAGL,mBAAmB,EAEpB,MAAM,2CAA2C,CAAC;AASnD,KAAK,WAAW,GAAG;IACjB,mBAAmB,EAAE,mBAAmB,CAAC;IACzC,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AA8IF,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,WAAW,CAoBzD,CAAC"}
1
+ {"version":3,"file":"triangleThirdAngleValue.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/triangles/triangleThirdAngleValue.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAmBT,MAAM,6BAA6B,CAAC;AAGrC,OAAO,EAGL,mBAAmB,EAEpB,MAAM,2CAA2C,CAAC;AASnD,KAAK,WAAW,GAAG;IACjB,mBAAmB,EAAE,mBAAmB,CAAC;IACzC,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AA0JF,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,WAAW,CAoBzD,CAAC"}
@@ -9,10 +9,17 @@ import { add } from "../../../../tree/nodes/operators/addNode.js";
9
9
  import { substract } from "../../../../tree/nodes/operators/substractNode.js";
10
10
  import { degreeParser } from "../../../../tree/parsers/degreeParser.js";
11
11
  import { handleVEAError } from "../../../../utils/errors/handleVEAError.js";
12
- const getPropositions = (n, { answer }) => {
12
+ const getPropositions = (n, { answer, angleAsked, triangleIdentifiers }) => {
13
13
  const propositions = [];
14
14
  addValidProp(propositions, answer);
15
+ const triangle = TriangleConstructor.fromIdentifiers(triangleIdentifiers);
16
+ const angles = [
17
+ triangle.angles[(angleAsked + 1) % 3].getValueNode(true),
18
+ triangle.angles[(angleAsked + 2) % 3].getValueNode(true),
19
+ ];
20
+ const addAnglesEv = add(angles[0], angles[1]).evaluate();
15
21
  tryToAddWrongProp(propositions, "180^{\\circ}");
22
+ tryToAddWrongProp(propositions, addAnglesEv.frenchify() + "^{\\circ}");
16
23
  while (propositions.length < n) {
17
24
  tryToAddWrongProp(propositions, randint(20, 160) + "^{\\circ}");
18
25
  }
@@ -45,7 +52,7 @@ const getInstruction = (identifiers) => {
45
52
  Que vaut l'angle $${triangle.angles[angleAsked].toTex()}$?`;
46
53
  };
47
54
  const getHint = (identifiers) => {
48
- return `Dans un triangle, la somme des angles est égale à $${new DegreeNode(180).toTex()}$`;
55
+ return `Dans un triangle, la somme des angles est égale à $${new DegreeNode(180).toTex()}$.`;
49
56
  };
50
57
  const getCorrection = (identifiers) => {
51
58
  const { triangleIdentifiers, angleAsked } = identifiers;
@@ -61,13 +68,13 @@ const getCorrection = (identifiers) => {
61
68
  En additionnant les deux angles donnés dans l'énoncé, on obtient :
62
69
 
63
70
  $$
64
- ${addAngles.toTex()}=${simp.toTex()}
71
+ ${angles[0].toTex()}^{\\circ} + ${angles[1].toTex()}^{\\circ} =${simp.toTex()}^{\\circ}
65
72
  $$
66
73
 
67
74
  L'angle recherché a donc une mesure de :
68
75
 
69
76
  $$
70
- 180 - ${simp.toTex()}=${getAnswer(identifiers)}
77
+ 180^{\\circ} - ${simp.toTex()}^{\\circ}=${getAnswer(identifiers)}
71
78
  $$`;
72
79
  };
73
80
  const getGGBOptions = (identifiers) => {
@@ -36,7 +36,7 @@ const getAnswer = (identifiers) => {
36
36
  const getHint = (identifiers) => {
37
37
  return `Cherche d'abord le coefficient directeur $a$ : pour cela, détermine un vecteur colinéaire à $\\overrightarrow{u}$ d'abscisse $1$. L'ordonnée de ce vecteur est alors le coefficient directeur de $d$.
38
38
 
39
- Puis, détermine l'ordonnée à l'origine $b$ en utilisant le fait que le point $A$ appartient à $d$.`;
39
+ Puis détermine l'ordonnée à l'origine $b$ en utilisant le fait que le point $A$ appartient à $d$.`;
40
40
  };
41
41
  const getCorrection = (identifiers) => {
42
42
  const { aX, aY, uX, uY } = identifiers;
@@ -1 +1 @@
1
- {"version":3,"file":"coneVolume.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/volumes/coneVolume.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAQrC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAyKF,eAAO,MAAM,UAAU,EAAE,QAAQ,CAAC,WAAW,CAe5C,CAAC"}
1
+ {"version":3,"file":"coneVolume.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/volumes/coneVolume.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAQrC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAyKF,eAAO,MAAM,UAAU,EAAE,QAAQ,CAAC,WAAW,CAc5C,CAAC"}
@@ -25,7 +25,7 @@ const getHint = (identifiers) => {
25
25
  return `Le volume d'un cône se calcule avec la formule :
26
26
 
27
27
  $$
28
- V = \\frac{1}{3} \\times \\text{aire de la base} \\times \\text{hauteur}
28
+ \\mathcal{V} = \\frac{1}{3} \\times \\text{aire de la base} \\times \\text{hauteur}
29
29
  $$
30
30
 
31
31
  La base est un disque de rayon $${radius}$. Il faut donc commencer par calculer son aire.
@@ -38,24 +38,24 @@ const getCorrection = (identifiers) => {
38
38
  return `Le volume d'un cône se calcule avec la formule :
39
39
 
40
40
  $$
41
- V = \\frac{1}{3} \\times \\text{aire de la base} \\times \\text{hauteur}
41
+ \\mathcal{V} = \\frac{1}{3} \\times \\text{aire de la base} \\times \\text{hauteur}
42
42
  $$
43
43
 
44
44
  Ici, la base est un disque de rayon $${radius}$. Son aire est donc :
45
45
 
46
46
  $$
47
- A = \\pi\\times ${radius}^2 \\approx ${area}
47
+ \\mathcal{A} = \\pi\\times ${radius}^2 \\approx ${area}
48
48
  $$
49
49
 
50
50
  Le volume du cône est donc :
51
51
 
52
52
  ${alignTex([
53
53
  [
54
- "V",
55
- "=",
54
+ "\\mathcal{V}",
55
+ "\\approx",
56
56
  `\\frac{1}{3} \\times ${area} \\times ${height} = ${getAnswer(identifiers)}`,
57
57
  ],
58
- ["", "=", getAnswer(identifiers)],
58
+ ["", "\\approx", getAnswer(identifiers)],
59
59
  ])}
60
60
  `;
61
61
  };
@@ -143,9 +143,7 @@ const isAnswerValid = (ans, { answer, radius, height }) => {
143
143
  export const coneVolume = {
144
144
  id: "coneVolume",
145
145
  label: "Calculer le volume d'un cône",
146
- levels: ["2nde"],
147
146
  isSingleStep: true,
148
- sections: ["Géométrie euclidienne"],
149
147
  generator: (nb) => getDistinctQuestions(getConeVolumeQuestion, nb),
150
148
  qcmTimer: 60,
151
149
  freeTimer: 60,
@@ -155,4 +153,5 @@ export const coneVolume = {
155
153
  subject: "Mathématiques",
156
154
  getQuestionFromIdentifiers,
157
155
  hasHintAndCorrection: true,
156
+ shouldHaveCalculator: true,
158
157
  };
@@ -1 +1 @@
1
- {"version":3,"file":"parallelepipedVolume.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/volumes/parallelepipedVolume.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAQrC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAmLF,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,WAAW,CActD,CAAC"}
1
+ {"version":3,"file":"parallelepipedVolume.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/volumes/parallelepipedVolume.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAQrC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAkLF,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,WAAW,CAetD,CAAC"}
@@ -3,7 +3,6 @@ import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQue
3
3
  import { randint } from "../../../../math/utils/random/randint.js";
4
4
  import { GeogebraConstructor } from "../../../../geogebra/geogebraConstructor.js";
5
5
  import { round } from "../../../../math/utils/round.js";
6
- import { orange } from "../../../../geogebra/colors.js";
7
6
  import { multiply } from "../../../../tree/nodes/operators/multiplyNode.js";
8
7
  const getParallelepipedVolumeQuestion = () => {
9
8
  const length = randint(50, 110) / 10;
@@ -31,34 +30,34 @@ const getGGBOptions = (identifiers) => {
31
30
  const angleRad = (angle * Math.PI) / 180;
32
31
  const yOffset = height * Math.cos(angleRad);
33
32
  const zOffset = height * Math.sin(angleRad);
34
- const xMin = -length / 2 - 5;
35
- const xMax = length / 2 + 5;
36
- const yMin = -width / 2 - 5;
37
- const yMax = width / 2 + yOffset + 5;
38
- const zMax = height + zOffset + 5;
39
- const zMin = -5;
33
+ const xMin = -length / 2 - 1;
34
+ const xMax = length / 2 + 1;
35
+ const yMin = -width / 2 - 1;
36
+ const yMax = width / 2 + yOffset + 1;
37
+ const zMax = height + zOffset + 1;
38
+ const zMin = -1;
40
39
  const points = [`A`, `B`, `C`, `D`, `E`, `F`, `G`, `H`];
41
40
  const commands = [
42
41
  `A = (${-length / 2}, ${-width / 2}, 0)`,
42
+ `SetColor(A, "black")`,
43
43
  `B = (${-length / 2}, ${width / 2}, 0)`,
44
+ `SetColor(B, "black")`,
44
45
  `C = (${length / 2}, ${width / 2}, 0)`,
46
+ `SetColor(C, "black")`,
45
47
  `D = (${length / 2}, ${-width / 2}, 0)`,
48
+ `SetColor(D, "black")`,
46
49
  `E = (${-length / 2}, ${-width / 2 + yOffset}, ${zOffset})`,
50
+ `SetColor(E, "black")`,
47
51
  `F = (${-length / 2}, ${width / 2 + yOffset}, ${zOffset})`,
52
+ `SetColor(F, "black")`,
48
53
  `G = (${length / 2}, ${width / 2 + yOffset}, ${zOffset})`,
54
+ `SetColor(G, "black")`,
49
55
  `H = (${length / 2}, ${-width / 2 + yOffset}, ${zOffset})`,
50
- `P1 = Polygon(A, B, F, E)`, // Side 1
51
- `SetColor(P1, "${orange}")`, // Color for side 1
52
- `P2 = Polygon(B, C, G, F)`, // Side 2
53
- `SetColor(P2, "${orange}")`, // Color for side 2
54
- `P3 = Polygon(C, D, H, G)`, // Side 3
55
- `SetColor(P3, "${orange}")`, // Color for side 3
56
- `P4 = Polygon(D, A, E, H)`, // Side 4
57
- `SetColor(P4, "${orange}")`, // Color for side 4
58
- `P5 = Polygon(A, B, C, D)`, // Base
59
- `SetColor(P5, "${orange}")`, // Color for base
60
- `P6 = Polygon(E, F, G, H)`, // Top
61
- `SetColor(P6, "${orange}")`, // Color for top
56
+ `SetColor(H, "black")`,
57
+ `P = Prism(A,B,C,D,E)`,
58
+ `SetVisibleInView(K, -1, false)`,
59
+ `SetVisibleInView(J, -1, false)`,
60
+ `SetVisibleInView(I, -1, false)`,
62
61
  `ShowLabel(A, true)`,
63
62
  `ShowLabel(B, true)`,
64
63
  `ShowLabel(C, true)`,
@@ -75,7 +74,6 @@ const getGGBOptions = (identifiers) => {
75
74
  `SetFixed(F, true)`,
76
75
  `SetFixed(G, true)`,
77
76
  `SetFixed(H, true)`,
78
- `ZoomIn(${xMin}, ${yMin}, ${xMax}, ${yMax}, ${zMin}, ${zMax})`,
79
77
  ];
80
78
  const ggb = new GeogebraConstructor({
81
79
  commands,
@@ -89,7 +87,7 @@ const getGGBOptions = (identifiers) => {
89
87
  });
90
88
  };
91
89
  const getHint = (identifiers) => {
92
- return `Le volume d'un parallélipède s'obtient par la formule :
90
+ return `Le volume d'un parallélépipède s'obtient par la formule :
93
91
 
94
92
  $$
95
93
  V = \\text{longueur} \\times \\text{largeur} \\times \\text{hauteur}
@@ -98,7 +96,7 @@ $$
98
96
  };
99
97
  const getCorrection = (identifiers) => {
100
98
  const { angle, height, length, width } = identifiers;
101
- return `Le volume d'un parallélipède s'obtient par la formule :
99
+ return `Le volume d'un parallélépipède s'obtient par la formule :
102
100
 
103
101
  $$
104
102
  V = \\text{longueur} \\times \\text{largeur} \\times \\text{hauteur}
@@ -168,4 +166,5 @@ export const parallelepipedVolume = {
168
166
  subject: "Mathématiques",
169
167
  getQuestionFromIdentifiers,
170
168
  hasHintAndCorrection: true,
169
+ shouldHaveCalculator: true,
171
170
  };
@@ -1 +1 @@
1
- {"version":3,"file":"sphereVolume.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/volumes/sphereVolume.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAMrC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAkIF,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,WAAW,CAgB9C,CAAC"}
1
+ {"version":3,"file":"sphereVolume.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/volumes/sphereVolume.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAMrC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAoIF,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,WAAW,CAiB9C,CAAC"}
@@ -34,7 +34,7 @@ $$
34
34
  Ici, on a $r = ${radius.frenchify()}$. Le volume est donc :
35
35
 
36
36
  $$
37
- V = \\frac{4}{3}\\pi \\times ${radius.frenchify()}^3 = ${getAnswer(identifiers)}
37
+ V = \\frac{4}{3}\\pi \\times ${radius.frenchify()}^3 \\approx ${getAnswer(identifiers)}
38
38
  $$`;
39
39
  };
40
40
  const getGGBOptions = (identifiers) => {
@@ -124,4 +124,5 @@ export const sphereVolume = {
124
124
  getGGBOptions,
125
125
  getQuestionFromIdentifiers,
126
126
  hasHintAndCorrection: true,
127
+ shouldHaveCalculator: true,
127
128
  };
@@ -1 +1 @@
1
- {"version":3,"file":"volumeOfPyramidWithSquareOrRectBase.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/volumes/volumeOfPyramidWithSquareOrRectBase.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAoBrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,aAAa,EAAE,OAAO,CAAC;CACxB,CAAC;AAEF,KAAK,OAAO,GAAG;IACb,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB,CAAC;AAkNF,eAAO,MAAM,mCAAmC,EAAE,QAAQ,CAAC,WAAW,CAcrE,CAAC"}
1
+ {"version":3,"file":"volumeOfPyramidWithSquareOrRectBase.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/volumes/volumeOfPyramidWithSquareOrRectBase.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAoBrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,aAAa,EAAE,OAAO,CAAC;CACxB,CAAC;AAEF,KAAK,OAAO,GAAG;IACb,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB,CAAC;AAoNF,eAAO,MAAM,mCAAmC,EAAE,QAAQ,CAAC,WAAW,CAerE,CAAC"}
@@ -66,12 +66,14 @@ const getGGBOptions = (identifiers) => {
66
66
  });
67
67
  const maxCoord = Math.max(baseOfPyramid.sideSizes[0], baseOfPyramid.sideSizes[1]);
68
68
  return ggb.getOptions({
69
- coords: [-2, maxCoord + 1, -2, maxCoord + 1, -2, h + 1],
69
+ coords: [-1, sideOne, -1, sideTwo, -1, h],
70
70
  });
71
71
  };
72
72
  const getInstruction = (identifiers) => {
73
73
  const { baseOfPyramid, h } = identifiers;
74
- const instruction = `$ABCDH$ est une pyramide à base ${getPolygonNameInFr(baseOfPyramid.type)} de hauteur $${h}$. Calculer son volume en sachant que : ${baseOfPyramid.type === "Square"
74
+ const instruction = `$ABCDH$ est une pyramide à base ${getPolygonNameInFr(baseOfPyramid.type)} dont la hauteur issue de $H$ vaut $${h}$.
75
+
76
+ Calculer son volume en sachant que ${baseOfPyramid.type === "Square"
75
77
  ? `$AB=${baseOfPyramid.sideSizes[0]}$`
76
78
  : `$AB=${baseOfPyramid.sideSizes[0]}$ et $BC=${baseOfPyramid.sideSizes[1]}$`}.`;
77
79
  return instruction;
@@ -105,7 +107,7 @@ $$
105
107
  V = \\frac{1}{3} \\times \\text{aire de la base} \\times \\text{hauteur}
106
108
  $$
107
109
 
108
- Ici, la base est un ${baseShape}. Son aire est donc égale à :
110
+ Ici, la base est un ${baseShape}. Son aire est égale à :
109
111
 
110
112
  $$
111
113
  ${isSquare
@@ -189,4 +191,5 @@ export const volumeOfPyramidWithSquareOrRectBase = {
189
191
  subject: "Mathématiques",
190
192
  getQuestionFromIdentifiers,
191
193
  hasHintAndCorrection: true,
194
+ shouldHaveCalculator: true,
192
195
  };
@@ -1 +1 @@
1
- {"version":3,"file":"volumeOfPyramidWithTriangleBase.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/volumes/volumeOfPyramidWithTriangleBase.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAgBrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,kBAAkB,EAAE,aAAa,CAAC;CACnC,CAAC;AAEF,KAAK,aAAa,GAAG;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAwMF,eAAO,MAAM,+BAA+B,EAAE,QAAQ,CAAC,WAAW,CAcjE,CAAC"}
1
+ {"version":3,"file":"volumeOfPyramidWithTriangleBase.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/volumes/volumeOfPyramidWithTriangleBase.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAgBrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,kBAAkB,EAAE,aAAa,CAAC;CACnC,CAAC;AAEF,KAAK,aAAa,GAAG;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAwMF,eAAO,MAAM,+BAA+B,EAAE,QAAQ,CAAC,WAAW,CAejE,CAAC"}
@@ -31,7 +31,7 @@ const getVolumeOfPyramidWithTriangleBaseQuestion = () => {
31
31
  };
32
32
  const getInstruction = (identifiers) => {
33
33
  const { baseOfPyramidSides, h } = identifiers;
34
- return `$ABCH$ est une pyramide à base triangulaire de hauteur $${h}$. Le point $D$ est le pied de la hauteur issue de $C$ dans le triangle $ABC$.
34
+ return `$ABCH$ est une pyramide à base triangulaire dont la hauteur issue de $H$ vaut $${h}$. Le point $D$ est le pied de la hauteur issue de $C$ dans le triangle $ABC$.
35
35
 
36
36
  Calculer le volume de la pyramide en sachant que $AB=${baseOfPyramidSides.ABSide}$ et $CD=${baseOfPyramidSides.ACSide}$.`;
37
37
  };
@@ -112,7 +112,7 @@ const getGGBOptions = (identifiers) => {
112
112
  });
113
113
  const maxCoord = Math.max(baseOfPyramidSides.ABSide, baseOfPyramidSides.ACSide);
114
114
  return ggb.getOptions({
115
- coords: [originX, maxCoord + 1, -2, maxCoord + 1, -2, h + 1],
115
+ coords: [originX, ABSide + originX, -1, ACSide, -1, h],
116
116
  });
117
117
  };
118
118
  const getQuestionFromIdentifiers = (identifiers) => {
@@ -174,4 +174,5 @@ export const volumeOfPyramidWithTriangleBase = {
174
174
  subject: "Mathématiques",
175
175
  getQuestionFromIdentifiers,
176
176
  hasHintAndCorrection: true,
177
+ shouldHaveCalculator: true,
177
178
  };
@@ -1 +1 @@
1
- {"version":3,"file":"volumeOfPyramidWithTriangleRectBase.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/volumes/volumeOfPyramidWithTriangleRectBase.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAiBrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,kBAAkB,EAAE,aAAa,CAAC;CACnC,CAAC;AAEF,KAAK,aAAa,GAAG;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAyMxE,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,CAejD,CAAC"}
1
+ {"version":3,"file":"volumeOfPyramidWithTriangleRectBase.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/volumes/volumeOfPyramidWithTriangleRectBase.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAiBrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,kBAAkB,EAAE,aAAa,CAAC;CACnC,CAAC;AAEF,KAAK,aAAa,GAAG;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAyMxE,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,CAgBjD,CAAC"}
@@ -34,7 +34,7 @@ const getVolumeOfPyramidWithTriangleRectBase = () => {
34
34
  };
35
35
  const getInstruction = (identifiers) => {
36
36
  const { h, baseOfPyramidSides } = identifiers;
37
- return `$ABCH$ est une pyramide à base triangulaire de hauteur $${h}$.
37
+ return `$ABCH$ est une pyramide à base triangulaire dont la hauteur issue de $H$ vaut $${h}$.
38
38
 
39
39
  Calculer le volume de la pyramide en sachant que : $AB=${baseOfPyramidSides.ABSide}$, $AC=${baseOfPyramidSides.ACSide}$, $BC=${baseOfPyramidSides.BCSide}$ et $(AC)\\perp(AB)$.`;
40
40
  };
@@ -74,7 +74,7 @@ const getGGBOptions = (identifiers) => {
74
74
  });
75
75
  const maxCoord = Math.max(ABSide, ACSide);
76
76
  return ggb.getOptions({
77
- coords: [-2, maxCoord + 1, -2, maxCoord + 1, -2, h + 1],
77
+ coords: [-1, ABSide, -1, ACSide, -1, h + 1],
78
78
  });
79
79
  };
80
80
  const getHint = (identifiers) => {
@@ -175,4 +175,5 @@ export const volumeOfPyramid = {
175
175
  subject: "Mathématiques",
176
176
  hasHintAndCorrection: true,
177
177
  getQuestionFromIdentifiers,
178
+ shouldHaveCalculator: true,
178
179
  };
@@ -17,7 +17,7 @@ const getAnswer = (identifiers) => {
17
17
  };
18
18
  const getHint = (identifiers) => {
19
19
  const { rate, nbMois } = identifiers;
20
- return `Commence par déterminer le coefficient multiplicateur assoicié à une hausse de $${rate}\\%$. Puis, élève ce coefficient à la puissance $\\frac{1}{${nbMois}}$. Enfin, transforme le coefficient multiplicateur obtenu en taux d'évolution.`;
20
+ return `Commence par déterminer le coefficient multiplicateur assoicié à une hausse de $${rate}\\%$. Puis élève ce coefficient à la puissance $\\frac{1}{${nbMois}}$. Enfin, transforme le coefficient multiplicateur obtenu en taux d'évolution.`;
21
21
  };
22
22
  const getCorrection = (identifiers) => {
23
23
  const { rate, nbMois } = identifiers;
@@ -0,0 +1,9 @@
1
+ import { Exercise } from "../../../exercise.js";
2
+ type Identifiers = {
3
+ randNbr: number;
4
+ randPercent: number;
5
+ isUp: boolean;
6
+ };
7
+ export declare const applyPercent: Exercise<Identifiers>;
8
+ export {};
9
+ //# sourceMappingURL=applyPercent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"applyPercent.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/percent/evolutions/applyPercent.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,QAAQ,EAcT,MAAM,sBAAsB,CAAC;AAG9B,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,OAAO,CAAC;CACf,CAAC;AAqHF,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,WAAW,CAa9C,CAAC"}
@@ -0,0 +1,114 @@
1
+ import { numberVEA } from "../../../../exercises/vea/numberVEA.js";
2
+ import { randfloat } from "../../../../math/utils/random/randfloat.js";
3
+ import { randint } from "../../../../math/utils/random/randint.js";
4
+ import { round } from "../../../../math/utils/round.js";
5
+ import { coinFlip } from "../../../../utils/alea/coinFlip.js";
6
+ import { shuffle } from "../../../../utils/alea/shuffle.js";
7
+ import { addValidProp, propWhile, tryToAddWrongProp, } from "../../../exercise.js";
8
+ import { getDistinctQuestions } from "../../../utils/getDistinctQuestions.js";
9
+ const getInstruction = (identifiers) => {
10
+ const { randNbr, randPercent, isUp } = identifiers;
11
+ return `Appliquer une ${isUp ? "hausse" : "baisse"} de $${randPercent}\\%$ à $${randNbr}$.`;
12
+ };
13
+ const getAnswer = (identifiers) => {
14
+ const { randNbr, randPercent, isUp } = identifiers;
15
+ const cm = isUp ? 1 + randPercent / 100 : 1 - randPercent / 100;
16
+ return round(randNbr * cm, 2).frenchify();
17
+ };
18
+ const getHint = (identifiers) => {
19
+ const { randNbr, randPercent, isUp } = identifiers;
20
+ return isUp
21
+ ? `Augmenter un nombre de $x\\%$ revient à le multiplier par :
22
+
23
+ $$
24
+ 1 + \\frac{x}{100}
25
+ $$`
26
+ : `Baisser un nombre de $x\\%$ revient à le multiplier par
27
+
28
+ $$
29
+ 1 - \\frac{x}{100}
30
+ $$`;
31
+ };
32
+ const getCorrection = (identifiers) => {
33
+ const { randNbr, randPercent, isUp } = identifiers;
34
+ const cm = isUp ? 1 + randPercent / 100 : 1 - randPercent / 100;
35
+ const answer = getAnswer(identifiers);
36
+ return isUp
37
+ ? `Augmenter un nombre de $${randPercent}\\%$ revient à le multiplier par :
38
+
39
+ $$
40
+ 1 + \\frac{${randPercent}}{100} = ${round(cm, 2).frenchify()}
41
+ $$
42
+
43
+ On a donc
44
+
45
+ $$
46
+ ${randNbr}\\times ${round(cm, 2).frenchify()} = ${answer}
47
+ $$
48
+
49
+ `
50
+ : `Baisser un nombre de $${randPercent}\\%$ revient à le multiplier par :
51
+
52
+ $$
53
+ 1 - \\frac{${randPercent}}{100} = ${round(cm, 2).frenchify()}
54
+ $$
55
+
56
+ On a donc
57
+
58
+ $$
59
+ ${randNbr}\\times ${round(cm, 2).frenchify()} = ${answer}
60
+ $$
61
+
62
+ `;
63
+ };
64
+ const getApplyPercentQuestion = () => {
65
+ const randNbr = randint(1, 500);
66
+ const randPercent = randint(1, 100);
67
+ const isUp = coinFlip();
68
+ const identifiers = { isUp, randNbr, randPercent };
69
+ return getQuestionFromIdentifiers(identifiers);
70
+ };
71
+ const getQuestionFromIdentifiers = (identifiers) => {
72
+ const question = {
73
+ instruction: getInstruction(identifiers),
74
+ answer: getAnswer(identifiers),
75
+ keys: ["percent"],
76
+ answerFormat: "tex",
77
+ hint: getHint(identifiers),
78
+ correction: getCorrection(identifiers),
79
+ identifiers,
80
+ };
81
+ return question;
82
+ };
83
+ const getPropositions = (n, { answer, isUp, randNbr, randPercent }) => {
84
+ const propositions = [];
85
+ addValidProp(propositions, answer);
86
+ tryToAddWrongProp(propositions, round(randNbr * (randPercent / 100), 2).frenchify());
87
+ tryToAddWrongProp(propositions, round(randNbr + ((isUp ? 1 : -1) * randPercent) / 100, 2).frenchify());
88
+ propWhile(propositions, n, () => {
89
+ const ansNb = Number(answer.replace(",", "."));
90
+ if (ansNb === 0)
91
+ tryToAddWrongProp(propositions, randint(-10, 10) + "");
92
+ else {
93
+ tryToAddWrongProp(propositions, randfloat(1, 100, 2).frenchify());
94
+ }
95
+ });
96
+ return shuffle(propositions);
97
+ };
98
+ const isAnswerValid = (ans, { answer }) => {
99
+ return numberVEA(ans, answer);
100
+ };
101
+ export const applyPercent = {
102
+ id: "applyPercent",
103
+ connector: "=",
104
+ label: "Appliquer un pourcentage d'augmentation ou de diminution",
105
+ isSingleStep: false,
106
+ generator: (nb) => getDistinctQuestions(getApplyPercentQuestion, nb),
107
+ qcmTimer: 60,
108
+ freeTimer: 60,
109
+ getPropositions,
110
+ isAnswerValid,
111
+ subject: "Mathématiques",
112
+ hasHintAndCorrection: true,
113
+ getQuestionFromIdentifiers,
114
+ };
@@ -0,0 +1,8 @@
1
+ import { Exercise } from "../../../exercise.js";
2
+ type Identifiers = {
3
+ rate: number;
4
+ nbMois: number;
5
+ };
6
+ export declare const averageEvolutionRate: Exercise<Identifiers>;
7
+ export {};
8
+ //# sourceMappingURL=averageEvolutionRate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"averageEvolutionRate.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/percent/evolutions/averageEvolutionRate.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,QAAQ,EAaT,MAAM,sBAAsB,CAAC;AAG9B,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AA2GF,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,WAAW,CAatD,CAAC"}