math-exercises 3.0.124 → 3.0.126

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 (351) hide show
  1. package/lib/exercises/math/calcul/arithmetics/primeNumbers.d.ts +1 -1
  2. package/lib/exercises/math/calcul/arithmetics/primeNumbers.d.ts.map +1 -1
  3. package/lib/exercises/math/calcul/arithmetics/primeNumbers.js +20 -14
  4. package/lib/exercises/math/calcul/fractions/fractionsMix.js +1 -1
  5. package/lib/exercises/math/calcul/fractions/fractionsSumsPrimeDenominators.d.ts.map +1 -1
  6. package/lib/exercises/math/calcul/fractions/fractionsSumsPrimeDenominators.js +61 -1
  7. package/lib/exercises/math/calcul/mentalCaluls/index.d.ts +1 -0
  8. package/lib/exercises/math/calcul/mentalCaluls/index.d.ts.map +1 -1
  9. package/lib/exercises/math/calcul/mentalCaluls/index.js +1 -0
  10. package/lib/exercises/math/calcul/mentalCaluls/mentalProgramSolve.d.ts +15 -0
  11. package/lib/exercises/math/calcul/mentalCaluls/mentalProgramSolve.d.ts.map +1 -0
  12. package/lib/exercises/math/calcul/mentalCaluls/mentalProgramSolve.js +217 -0
  13. package/lib/exercises/math/calcul/ordering/compareA10N.d.ts +16 -0
  14. package/lib/exercises/math/calcul/ordering/compareA10N.d.ts.map +1 -0
  15. package/lib/exercises/math/calcul/ordering/compareA10N.js +327 -0
  16. package/lib/exercises/math/calcul/ordering/compareABUsingQuotient.d.ts +8 -0
  17. package/lib/exercises/math/calcul/ordering/compareABUsingQuotient.d.ts.map +1 -0
  18. package/lib/exercises/math/calcul/ordering/compareABUsingQuotient.js +221 -0
  19. package/lib/exercises/math/calcul/ordering/compareFracABWithFracAPlusCBPlusC.d.ts +9 -0
  20. package/lib/exercises/math/calcul/ordering/compareFracABWithFracAPlusCBPlusC.d.ts.map +1 -0
  21. package/lib/exercises/math/calcul/ordering/compareFracABWithFracAPlusCBPlusC.js +135 -0
  22. package/lib/exercises/math/calcul/ordering/compareFracAndDec.d.ts +29 -0
  23. package/lib/exercises/math/calcul/ordering/compareFracAndDec.d.ts.map +1 -0
  24. package/lib/exercises/math/calcul/ordering/compareFracAndDec.js +367 -0
  25. package/lib/exercises/math/calcul/ordering/comparePowersOfFracs.d.ts +12 -0
  26. package/lib/exercises/math/calcul/ordering/comparePowersOfFracs.d.ts.map +1 -0
  27. package/lib/exercises/math/calcul/ordering/comparePowersOfFracs.js +164 -0
  28. package/lib/exercises/math/calcul/ordering/compareWithSquareRoots.d.ts +9 -0
  29. package/lib/exercises/math/calcul/ordering/compareWithSquareRoots.d.ts.map +1 -0
  30. package/lib/exercises/math/calcul/ordering/compareWithSquareRoots.js +140 -0
  31. package/lib/exercises/math/calcul/ordering/index.d.ts +6 -0
  32. package/lib/exercises/math/calcul/ordering/index.d.ts.map +1 -1
  33. package/lib/exercises/math/calcul/ordering/index.js +6 -0
  34. package/lib/exercises/math/calcul/rounding/estimateAroundPow10NTimesAroundPow10N.d.ts +9 -0
  35. package/lib/exercises/math/calcul/rounding/estimateAroundPow10NTimesAroundPow10N.d.ts.map +1 -0
  36. package/lib/exercises/math/calcul/rounding/estimateAroundPow10NTimesAroundPow10N.js +84 -0
  37. package/lib/exercises/math/calcul/rounding/estimatePow10NPlusPow10MinusN.d.ts +8 -0
  38. package/lib/exercises/math/calcul/rounding/estimatePow10NPlusPow10MinusN.d.ts.map +1 -0
  39. package/lib/exercises/math/calcul/rounding/estimatePow10NPlusPow10MinusN.js +90 -0
  40. package/lib/exercises/math/calcul/rounding/index.d.ts +2 -0
  41. package/lib/exercises/math/calcul/rounding/index.d.ts.map +1 -1
  42. package/lib/exercises/math/calcul/rounding/index.js +2 -0
  43. package/lib/exercises/math/calculLitteral/equation/equationFromProblem.d.ts +13 -0
  44. package/lib/exercises/math/calculLitteral/equation/equationFromProblem.d.ts.map +1 -0
  45. package/lib/exercises/math/calculLitteral/equation/equationFromProblem.js +414 -0
  46. package/lib/exercises/math/calculLitteral/equation/index.d.ts +1 -0
  47. package/lib/exercises/math/calculLitteral/equation/index.d.ts.map +1 -1
  48. package/lib/exercises/math/calculLitteral/equation/index.js +1 -0
  49. package/lib/exercises/math/calculLitteral/factorisation/factorizeAX2PlusBX.d.ts +10 -0
  50. package/lib/exercises/math/calculLitteral/factorisation/factorizeAX2PlusBX.d.ts.map +1 -0
  51. package/lib/exercises/math/calculLitteral/factorisation/factorizeAX2PlusBX.js +70 -0
  52. package/lib/exercises/math/calculLitteral/factorisation/index.d.ts +1 -0
  53. package/lib/exercises/math/calculLitteral/factorisation/index.d.ts.map +1 -1
  54. package/lib/exercises/math/calculLitteral/factorisation/index.js +1 -0
  55. package/lib/exercises/math/calculLitteral/index.d.ts +2 -0
  56. package/lib/exercises/math/calculLitteral/index.d.ts.map +1 -1
  57. package/lib/exercises/math/calculLitteral/index.js +2 -0
  58. package/lib/exercises/math/calculLitteral/isolate/index.d.ts +2 -1
  59. package/lib/exercises/math/calculLitteral/isolate/index.d.ts.map +1 -1
  60. package/lib/exercises/math/calculLitteral/isolate/index.js +2 -1
  61. package/lib/exercises/math/calculLitteral/isolate/isolateUInInvXPlusInvYEqualsInvU.d.ts +8 -0
  62. package/lib/exercises/math/calculLitteral/isolate/isolateUInInvXPlusInvYEqualsInvU.d.ts.map +1 -0
  63. package/lib/exercises/math/calculLitteral/isolate/isolateUInInvXPlusInvYEqualsInvU.js +107 -0
  64. package/lib/exercises/math/calculLitteral/isolate/isolateXInInvXPlusInvYEqualsInvU.d.ts +7 -0
  65. package/lib/exercises/math/calculLitteral/isolate/isolateXInInvXPlusInvYEqualsInvU.d.ts.map +1 -0
  66. package/lib/exercises/math/calculLitteral/isolate/isolateXInInvXPlusInvYEqualsInvU.js +80 -0
  67. package/lib/exercises/math/calculLitteral/ordering/compareAMinusB.d.ts +10 -0
  68. package/lib/exercises/math/calculLitteral/ordering/compareAMinusB.d.ts.map +1 -0
  69. package/lib/exercises/math/calculLitteral/ordering/compareAMinusB.js +182 -0
  70. package/lib/exercises/math/calculLitteral/ordering/compareFromPiMinusFrac.d.ts +9 -0
  71. package/lib/exercises/math/calculLitteral/ordering/compareFromPiMinusFrac.d.ts.map +1 -0
  72. package/lib/exercises/math/calculLitteral/ordering/compareFromPiMinusFrac.js +144 -0
  73. package/lib/exercises/math/calculLitteral/ordering/index.d.ts +3 -0
  74. package/lib/exercises/math/calculLitteral/ordering/index.d.ts.map +1 -0
  75. package/lib/exercises/math/calculLitteral/ordering/index.js +2 -0
  76. package/lib/exercises/math/calculLitteral/simplifying/compareATimes0.d.ts +11 -0
  77. package/lib/exercises/math/calculLitteral/simplifying/compareATimes0.d.ts.map +1 -0
  78. package/lib/exercises/math/calculLitteral/simplifying/compareATimes0.js +120 -0
  79. package/lib/exercises/math/calculLitteral/simplifying/compareFracXA.d.ts +8 -0
  80. package/lib/exercises/math/calculLitteral/simplifying/compareFracXA.d.ts.map +1 -0
  81. package/lib/exercises/math/calculLitteral/simplifying/compareFracXA.js +67 -0
  82. package/lib/exercises/math/calculLitteral/simplifying/compareMinusA.d.ts +11 -0
  83. package/lib/exercises/math/calculLitteral/simplifying/compareMinusA.d.ts.map +1 -0
  84. package/lib/exercises/math/calculLitteral/simplifying/compareMinusA.js +114 -0
  85. package/lib/exercises/math/calculLitteral/simplifying/index.d.ts +5 -0
  86. package/lib/exercises/math/calculLitteral/simplifying/index.d.ts.map +1 -1
  87. package/lib/exercises/math/calculLitteral/simplifying/index.js +5 -0
  88. package/lib/exercises/math/calculLitteral/simplifying/pickSameAsAPercentOfB.d.ts +13 -0
  89. package/lib/exercises/math/calculLitteral/simplifying/pickSameAsAPercentOfB.d.ts.map +1 -0
  90. package/lib/exercises/math/calculLitteral/simplifying/pickSameAsAPercentOfB.js +125 -0
  91. package/lib/exercises/math/calculLitteral/simplifying/pickSameAsInverseOfFracAB.d.ts +14 -0
  92. package/lib/exercises/math/calculLitteral/simplifying/pickSameAsInverseOfFracAB.d.ts.map +1 -0
  93. package/lib/exercises/math/calculLitteral/simplifying/pickSameAsInverseOfFracAB.js +148 -0
  94. package/lib/exercises/math/calculLitteral/writing/writeLitExpFromFrenchExp.d.ts +5 -27
  95. package/lib/exercises/math/calculLitteral/writing/writeLitExpFromFrenchExp.d.ts.map +1 -1
  96. package/lib/exercises/math/calculLitteral/writing/writeLitExpFromFrenchExp.js +178 -241
  97. package/lib/exercises/math/conversion/index.d.ts +4 -0
  98. package/lib/exercises/math/conversion/index.d.ts.map +1 -1
  99. package/lib/exercises/math/conversion/index.js +4 -0
  100. package/lib/exercises/math/conversion/kmPerMinToKmPerHourConversion.d.ts +8 -0
  101. package/lib/exercises/math/conversion/kmPerMinToKmPerHourConversion.d.ts.map +1 -0
  102. package/lib/exercises/math/conversion/kmPerMinToKmPerHourConversion.js +98 -0
  103. package/lib/exercises/math/conversion/minutesToHours.d.ts +10 -0
  104. package/lib/exercises/math/conversion/minutesToHours.d.ts.map +1 -0
  105. package/lib/exercises/math/conversion/minutesToHours.js +150 -0
  106. package/lib/exercises/math/conversion/prefixToNumber.d.ts +15 -0
  107. package/lib/exercises/math/conversion/prefixToNumber.d.ts.map +1 -0
  108. package/lib/exercises/math/conversion/prefixToNumber.js +233 -0
  109. package/lib/exercises/math/conversion/secondsToHours.d.ts +10 -0
  110. package/lib/exercises/math/conversion/secondsToHours.d.ts.map +1 -0
  111. package/lib/exercises/math/conversion/secondsToHours.js +150 -0
  112. package/lib/exercises/math/conversion/volumeConversion.d.ts.map +1 -1
  113. package/lib/exercises/math/conversion/volumeConversion.js +7 -1
  114. package/lib/exercises/math/dataRepresentations/barChartInterpreting.d.ts +50 -0
  115. package/lib/exercises/math/dataRepresentations/barChartInterpreting.d.ts.map +1 -0
  116. package/lib/exercises/math/dataRepresentations/barChartInterpreting.js +517 -0
  117. package/lib/exercises/math/dataRepresentations/boxPlotInterpreting.d.ts +7 -0
  118. package/lib/exercises/math/dataRepresentations/boxPlotInterpreting.d.ts.map +1 -0
  119. package/lib/exercises/math/dataRepresentations/boxPlotInterpreting.js +223 -0
  120. package/lib/exercises/math/dataRepresentations/cartesianGraphExtremaReading.d.ts +10 -0
  121. package/lib/exercises/math/dataRepresentations/cartesianGraphExtremaReading.d.ts.map +1 -0
  122. package/lib/exercises/math/dataRepresentations/cartesianGraphExtremaReading.js +139 -0
  123. package/lib/exercises/math/dataRepresentations/dataToGraphGraphToData.d.ts +8 -0
  124. package/lib/exercises/math/dataRepresentations/dataToGraphGraphToData.d.ts.map +1 -0
  125. package/lib/exercises/math/dataRepresentations/dataToGraphGraphToData.js +133 -0
  126. package/lib/exercises/math/dataRepresentations/graphReading.d.ts +8 -0
  127. package/lib/exercises/math/dataRepresentations/graphReading.d.ts.map +1 -0
  128. package/lib/exercises/math/dataRepresentations/graphReading.js +136 -0
  129. package/lib/exercises/math/dataRepresentations/halfPieChartCommenting.d.ts +18 -0
  130. package/lib/exercises/math/dataRepresentations/halfPieChartCommenting.d.ts.map +1 -0
  131. package/lib/exercises/math/dataRepresentations/halfPieChartCommenting.js +228 -0
  132. package/lib/exercises/math/dataRepresentations/halfPieChartReading.d.ts +8 -0
  133. package/lib/exercises/math/dataRepresentations/halfPieChartReading.d.ts.map +1 -0
  134. package/lib/exercises/math/dataRepresentations/halfPieChartReading.js +213 -0
  135. package/lib/exercises/math/dataRepresentations/histogramReading.d.ts +9 -0
  136. package/lib/exercises/math/dataRepresentations/histogramReading.d.ts.map +1 -0
  137. package/lib/exercises/math/dataRepresentations/histogramReading.js +163 -0
  138. package/lib/exercises/math/dataRepresentations/index.d.ts +10 -0
  139. package/lib/exercises/math/dataRepresentations/index.d.ts.map +1 -1
  140. package/lib/exercises/math/dataRepresentations/index.js +10 -0
  141. package/lib/exercises/math/dataRepresentations/plausibleGraph.d.ts +9 -0
  142. package/lib/exercises/math/dataRepresentations/plausibleGraph.d.ts.map +1 -0
  143. package/lib/exercises/math/dataRepresentations/plausibleGraph.js +145 -0
  144. package/lib/exercises/math/dataRepresentations/scatterPlotCommenting.d.ts +9 -0
  145. package/lib/exercises/math/dataRepresentations/scatterPlotCommenting.d.ts.map +1 -0
  146. package/lib/exercises/math/dataRepresentations/scatterPlotCommenting.js +308 -0
  147. package/lib/exercises/math/derivation/derivative/exp/expDerivativeFour.d.ts.map +1 -1
  148. package/lib/exercises/math/derivation/derivative/exp/expDerivativeFour.js +10 -5
  149. package/lib/exercises/math/functions/affines/coordsOfPointOnAffineFindX.d.ts +8 -0
  150. package/lib/exercises/math/functions/affines/coordsOfPointOnAffineFindX.d.ts.map +1 -0
  151. package/lib/exercises/math/functions/affines/coordsOfPointOnAffineFindX.js +103 -0
  152. package/lib/exercises/math/functions/affines/coordsOfPointOnAffineFindY.d.ts +8 -0
  153. package/lib/exercises/math/functions/affines/coordsOfPointOnAffineFindY.d.ts.map +1 -0
  154. package/lib/exercises/math/functions/affines/coordsOfPointOnAffineFindY.js +100 -0
  155. package/lib/exercises/math/functions/affines/drawAffineFromLitExp.js +5 -5
  156. package/lib/exercises/math/functions/affines/drawAffineFromPointAndLeadingCoeff.d.ts +16 -0
  157. package/lib/exercises/math/functions/affines/drawAffineFromPointAndLeadingCoeff.d.ts.map +1 -0
  158. package/lib/exercises/math/functions/affines/drawAffineFromPointAndLeadingCoeff.js +215 -0
  159. package/lib/exercises/math/functions/affines/drawAffineFromProgCalc.d.ts +13 -0
  160. package/lib/exercises/math/functions/affines/drawAffineFromProgCalc.d.ts.map +1 -0
  161. package/lib/exercises/math/functions/affines/drawAffineFromProgCalc.js +206 -0
  162. package/lib/exercises/math/functions/affines/index.d.ts +7 -0
  163. package/lib/exercises/math/functions/affines/index.d.ts.map +1 -1
  164. package/lib/exercises/math/functions/affines/index.js +7 -0
  165. package/lib/exercises/math/functions/affines/recognizeExprAffine.d.ts +20 -0
  166. package/lib/exercises/math/functions/affines/recognizeExprAffine.d.ts.map +1 -0
  167. package/lib/exercises/math/functions/affines/recognizeExprAffine.js +284 -0
  168. package/lib/exercises/math/functions/affines/representationOfAffine.d.ts +13 -0
  169. package/lib/exercises/math/functions/affines/representationOfAffine.d.ts.map +1 -0
  170. package/lib/exercises/math/functions/affines/representationOfAffine.js +184 -0
  171. package/lib/exercises/math/functions/basics/coordsOfPointOnCurveFindY.d.ts +14 -0
  172. package/lib/exercises/math/functions/basics/coordsOfPointOnCurveFindY.d.ts.map +1 -0
  173. package/lib/exercises/math/functions/basics/coordsOfPointOnCurveFindY.js +216 -0
  174. package/lib/exercises/math/functions/basics/findZeroesProductQuotient.d.ts.map +1 -1
  175. package/lib/exercises/math/functions/basics/findZeroesProductQuotient.js +29 -2
  176. package/lib/exercises/math/functions/basics/index.d.ts +1 -0
  177. package/lib/exercises/math/functions/basics/index.d.ts.map +1 -1
  178. package/lib/exercises/math/functions/basics/index.js +1 -0
  179. package/lib/exercises/math/functions/basics/inverseImageFunctionGeogebra.d.ts.map +1 -1
  180. package/lib/exercises/math/functions/basics/inverseImageFunctionGeogebra.js +72 -61
  181. package/lib/exercises/math/functions/composition/functionComposition.d.ts +8 -0
  182. package/lib/exercises/math/functions/composition/functionComposition.d.ts.map +1 -0
  183. package/lib/exercises/math/functions/composition/functionComposition.js +238 -0
  184. package/lib/exercises/math/functions/composition/index.d.ts +2 -0
  185. package/lib/exercises/math/functions/composition/index.d.ts.map +1 -0
  186. package/lib/exercises/math/functions/composition/index.js +1 -0
  187. package/lib/exercises/math/functions/index.d.ts +1 -0
  188. package/lib/exercises/math/functions/index.d.ts.map +1 -1
  189. package/lib/exercises/math/functions/index.js +1 -0
  190. package/lib/exercises/math/functions/trinoms/roots/rootsFromDevForm.d.ts.map +1 -1
  191. package/lib/exercises/math/functions/trinoms/roots/rootsFromDevForm.js +41 -16
  192. package/lib/exercises/math/functions/trinoms/roots/rootsReading.d.ts.map +1 -1
  193. package/lib/exercises/math/functions/trinoms/roots/rootsReading.js +3 -2
  194. package/lib/exercises/math/functions/trinoms/sign/trinomSignFromFacto.d.ts +1 -0
  195. package/lib/exercises/math/functions/trinoms/sign/trinomSignFromFacto.d.ts.map +1 -1
  196. package/lib/exercises/math/functions/trinoms/sign/trinomSignFromFacto.js +21 -13
  197. package/lib/exercises/math/geometry/angles/anglesUsingIsParallel.d.ts +23 -0
  198. package/lib/exercises/math/geometry/angles/anglesUsingIsParallel.d.ts.map +1 -0
  199. package/lib/exercises/math/geometry/angles/anglesUsingIsParallel.js +448 -0
  200. package/lib/exercises/math/geometry/angles/index.js +2 -0
  201. package/lib/exercises/math/geometry/angles/isParallelUsingAngles.d.ts +23 -0
  202. package/lib/exercises/math/geometry/angles/isParallelUsingAngles.d.ts.map +1 -0
  203. package/lib/exercises/math/geometry/angles/isParallelUsingAngles.js +402 -0
  204. package/lib/exercises/math/geometry/cartesian/placeAbscissOnSemiLine.d.ts +9 -6
  205. package/lib/exercises/math/geometry/cartesian/placeAbscissOnSemiLine.d.ts.map +1 -1
  206. package/lib/exercises/math/geometry/cartesian/placeAbscissOnSemiLine.js +140 -60
  207. package/lib/exercises/math/geometry/convexity/convexityQuadrinomialsGeo.js +1 -1
  208. package/lib/exercises/math/geometry/perimeters/circleCircumference.d.ts.map +1 -1
  209. package/lib/exercises/math/geometry/perimeters/circleCircumference.js +15 -7
  210. package/lib/exercises/math/geometry/shapes/basicShapesNaming.d.ts.map +1 -1
  211. package/lib/exercises/math/geometry/shapes/basicShapesNaming.js +5 -3
  212. package/lib/exercises/math/geometry/vectors/colinearity/colinearityFromPicture.d.ts.map +1 -1
  213. package/lib/exercises/math/geometry/vectors/colinearity/colinearityFromPicture.js +121 -104
  214. package/lib/exercises/math/geometry/vectors/vectorRepresentative.d.ts.map +1 -1
  215. package/lib/exercises/math/geometry/vectors/vectorRepresentative.js +3 -2
  216. package/lib/exercises/math/percent/evolutions/evolutionToCM.js +2 -2
  217. package/lib/exercises/math/percent/findProportion.d.ts +6 -1
  218. package/lib/exercises/math/percent/findProportion.d.ts.map +1 -1
  219. package/lib/exercises/math/percent/findProportion.js +162 -45
  220. package/lib/exercises/math/powers/calculateNegativePower.d.ts +5 -1
  221. package/lib/exercises/math/powers/calculateNegativePower.d.ts.map +1 -1
  222. package/lib/exercises/math/powers/calculateNegativePower.js +93 -29
  223. package/lib/exercises/math/probaStat/basicProbas/index.d.ts +1 -0
  224. package/lib/exercises/math/probaStat/basicProbas/index.d.ts.map +1 -1
  225. package/lib/exercises/math/probaStat/basicProbas/index.js +1 -0
  226. package/lib/exercises/math/probaStat/basicProbas/possibleValuesForProba.d.ts +0 -1
  227. package/lib/exercises/math/probaStat/basicProbas/possibleValuesForProba.d.ts.map +1 -1
  228. package/lib/exercises/math/probaStat/basicProbas/possibleValuesForProba.js +42 -80
  229. package/lib/exercises/math/probaStat/conditionalProbaWriteFromFrench.d.ts +9 -0
  230. package/lib/exercises/math/probaStat/conditionalProbaWriteFromFrench.d.ts.map +1 -0
  231. package/lib/exercises/math/probaStat/conditionalProbaWriteFromFrench.js +217 -0
  232. package/lib/exercises/math/probaStat/index.d.ts +2 -0
  233. package/lib/exercises/math/probaStat/index.d.ts.map +1 -1
  234. package/lib/exercises/math/probaStat/index.js +2 -0
  235. package/lib/exercises/math/probaStat/probaAsSumOfProbas.d.ts +30 -0
  236. package/lib/exercises/math/probaStat/probaAsSumOfProbas.d.ts.map +1 -0
  237. package/lib/exercises/math/probaStat/probaAsSumOfProbas.js +548 -0
  238. package/lib/exercises/math/probaStat/probaFromTableNoContext.d.ts.map +1 -1
  239. package/lib/exercises/math/probaStat/probaFromTableNoContext.js +10 -2
  240. package/lib/exercises/math/probaStat/probaFromTableWithContext.d.ts.map +1 -1
  241. package/lib/exercises/math/probaStat/probaFromTableWithContext.js +2 -1
  242. package/lib/exercises/math/probaStat/stats1var/index.d.ts +2 -0
  243. package/lib/exercises/math/probaStat/stats1var/index.d.ts.map +1 -1
  244. package/lib/exercises/math/probaStat/stats1var/index.js +2 -0
  245. package/lib/exercises/math/probaStat/stats1var/interpretIndicatorsForLists.d.ts +9 -0
  246. package/lib/exercises/math/probaStat/stats1var/interpretIndicatorsForLists.d.ts.map +1 -0
  247. package/lib/exercises/math/probaStat/stats1var/interpretIndicatorsForLists.js +90 -0
  248. package/lib/exercises/math/probaStat/stats1var/plausibilityOfAverage.d.ts +10 -0
  249. package/lib/exercises/math/probaStat/stats1var/plausibilityOfAverage.d.ts.map +1 -0
  250. package/lib/exercises/math/probaStat/stats1var/plausibilityOfAverage.js +151 -0
  251. package/lib/exercises/math/probaStat/stats1var/quartilesList.d.ts +4 -1
  252. package/lib/exercises/math/probaStat/stats1var/quartilesList.d.ts.map +1 -1
  253. package/lib/exercises/math/probaStat/stats1var/quartilesList.js +46 -27
  254. package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormula.d.ts.map +1 -1
  255. package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormula.js +14 -2
  256. package/lib/exercises/math/sequences/geometric/geometricReasonUsage.d.ts +1 -0
  257. package/lib/exercises/math/sequences/geometric/geometricReasonUsage.d.ts.map +1 -1
  258. package/lib/exercises/math/sequences/geometric/geometricReasonUsage.js +43 -19
  259. package/lib/exercises/math/sequences/sequenceEvaluation.d.ts.map +1 -1
  260. package/lib/exercises/math/sequences/sequenceEvaluation.js +18 -1
  261. package/lib/exercises/pc/chemicalReactions/chemicalEquations.d.ts.map +1 -1
  262. package/lib/exercises/pc/chemicalReactions/chemicalEquations.js +17 -2
  263. package/lib/exercises/pc/electricity/calculateUEqualsRI.d.ts +7 -0
  264. package/lib/exercises/pc/electricity/calculateUEqualsRI.d.ts.map +1 -0
  265. package/lib/exercises/pc/electricity/calculateUEqualsRI.js +73 -0
  266. package/lib/exercises/pc/electricity/index.d.ts +1 -0
  267. package/lib/exercises/pc/electricity/index.d.ts.map +1 -1
  268. package/lib/exercises/pc/electricity/index.js +1 -0
  269. package/lib/exercises/pc/index.d.ts +1 -0
  270. package/lib/exercises/pc/index.d.ts.map +1 -1
  271. package/lib/exercises/pc/index.js +1 -0
  272. package/lib/exercises/pc/mole/molarMass.d.ts.map +1 -1
  273. package/lib/exercises/pc/mole/molarMass.js +7 -1
  274. package/lib/exercises/pc/moleculeFormula.d.ts.map +1 -1
  275. package/lib/exercises/pc/moleculeFormula.js +4 -3
  276. package/lib/exercises/pc/motion/averageSpeed.d.ts +9 -4
  277. package/lib/exercises/pc/motion/averageSpeed.d.ts.map +1 -1
  278. package/lib/exercises/pc/motion/averageSpeed.js +132 -61
  279. package/lib/exercises/pc/motion/averageSpeedCalculation.d.ts.map +1 -1
  280. package/lib/exercises/pc/motion/averageSpeedCalculation.js +10 -4
  281. package/lib/exercises/pc/optics/index.d.ts +2 -0
  282. package/lib/exercises/pc/optics/index.d.ts.map +1 -0
  283. package/lib/exercises/pc/optics/index.js +1 -0
  284. package/lib/exercises/pc/optics/lensFormula.d.ts +21 -0
  285. package/lib/exercises/pc/optics/lensFormula.d.ts.map +1 -0
  286. package/lib/exercises/pc/optics/lensFormula.js +415 -0
  287. package/lib/exercises/pc/recognizeRefractionOrReflectionAngles.d.ts +2 -2
  288. package/lib/exercises/pc/recognizeRefractionOrReflectionAngles.js +15 -15
  289. package/lib/exercises/pc/weight/calculateWeight.d.ts +8 -1
  290. package/lib/exercises/pc/weight/calculateWeight.d.ts.map +1 -1
  291. package/lib/exercises/pc/weight/calculateWeight.js +113 -38
  292. package/lib/exercises/utils/geogebra/toolBarConstructor.d.ts +1 -0
  293. package/lib/exercises/utils/geogebra/toolBarConstructor.d.ts.map +1 -1
  294. package/lib/exercises/utils/geogebra/toolBarConstructor.js +3 -1
  295. package/lib/geogebra/parsers/geogebraParser.d.ts +4 -0
  296. package/lib/geogebra/parsers/geogebraParser.d.ts.map +1 -1
  297. package/lib/geogebra/parsers/geogebraParser.js +17 -0
  298. package/lib/index.d.ts +392 -23
  299. package/lib/index.d.ts.map +1 -1
  300. package/lib/latexTester.d.ts.map +1 -1
  301. package/lib/latexTester.js +1 -0
  302. package/lib/math/geometry/CloudPoints.d.ts +10 -0
  303. package/lib/math/geometry/CloudPoints.d.ts.map +1 -1
  304. package/lib/math/geometry/CloudPoints.js +119 -0
  305. package/lib/math/geometry/line.d.ts +1 -0
  306. package/lib/math/geometry/line.d.ts.map +1 -1
  307. package/lib/math/geometry/line.js +10 -2
  308. package/lib/math/geometry/vector.d.ts +1 -0
  309. package/lib/math/geometry/vector.d.ts.map +1 -1
  310. package/lib/math/geometry/vector.js +12 -0
  311. package/lib/math/progCalc/progCalc.d.ts +46 -0
  312. package/lib/math/progCalc/progCalc.d.ts.map +1 -0
  313. package/lib/math/progCalc/progCalc.js +239 -0
  314. package/lib/math/utils/latex/realize.d.ts +12 -0
  315. package/lib/math/utils/latex/realize.d.ts.map +1 -0
  316. package/lib/math/utils/latex/realize.js +43 -0
  317. package/lib/pc/constants/molecularChemistry/molecule.d.ts +2 -0
  318. package/lib/pc/constants/molecularChemistry/molecule.d.ts.map +1 -1
  319. package/lib/pc/constants/molecularChemistry/molecule.js +52 -0
  320. package/lib/pc/units/timeUnits.d.ts +5 -3
  321. package/lib/pc/units/timeUnits.d.ts.map +1 -1
  322. package/lib/pc/units/timeUnits.js +25 -19
  323. package/lib/tests/questionTest.d.ts.map +1 -1
  324. package/lib/tests/questionTest.js +1 -1
  325. package/lib/tests/singleExo.test.js +3 -3
  326. package/lib/tree/nodes/algebraicNode.d.ts.map +1 -1
  327. package/lib/tree/nodes/operators/addNode.d.ts +4 -2
  328. package/lib/tree/nodes/operators/addNode.d.ts.map +1 -1
  329. package/lib/tree/nodes/operators/addNode.js +8 -17
  330. package/lib/tree/nodes/operators/fractionNode.d.ts +1 -1
  331. package/lib/tree/nodes/operators/fractionNode.d.ts.map +1 -1
  332. package/lib/tree/nodes/operators/fractionNode.js +5 -1
  333. package/lib/tree/nodes/operators/multiplyNode.d.ts +4 -2
  334. package/lib/tree/nodes/operators/multiplyNode.d.ts.map +1 -1
  335. package/lib/tree/nodes/operators/multiplyNode.js +8 -17
  336. package/lib/tree/nodes/operators/operatorNode.d.ts +3 -3
  337. package/lib/tree/nodes/operators/operatorNode.d.ts.map +1 -1
  338. package/lib/tree/nodes/variables/variableNode.d.ts +1 -1
  339. package/lib/tree/nodes/variables/variableNode.d.ts.map +1 -1
  340. package/lib/tree/utilities/nodeShuffler.d.ts +12 -0
  341. package/lib/tree/utilities/nodeShuffler.d.ts.map +1 -0
  342. package/lib/tree/utilities/nodeShuffler.js +123 -0
  343. package/lib/utils/arrays/getAllPicks.d.ts +2 -0
  344. package/lib/utils/arrays/getAllPicks.d.ts.map +1 -0
  345. package/lib/utils/arrays/getAllPicks.js +17 -0
  346. package/lib/utils/errors/handleVEAError.d.ts +1 -1
  347. package/lib/utils/errors/handleVEAError.d.ts.map +1 -1
  348. package/lib/utils/strings/decapitalize.d.ts +2 -0
  349. package/lib/utils/strings/decapitalize.d.ts.map +1 -0
  350. package/lib/utils/strings/decapitalize.js +3 -0
  351. package/package.json +1 -1
@@ -0,0 +1,164 @@
1
+ import { addValidProp, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
2
+ import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
3
+ import { randint } from "../../../../math/utils/random/randint.js";
4
+ import { NodeConstructor, } from "../../../../tree/nodes/nodeConstructor.js";
5
+ import { frac } from "../../../../tree/nodes/operators/fractionNode.js";
6
+ import { power } from "../../../../tree/nodes/operators/powerNode.js";
7
+ import { substract } from "../../../../tree/nodes/operators/substractNode.js";
8
+ import { coinFlip } from "../../../../utils/alea/coinFlip.js";
9
+ import { shuffle } from "../../../../utils/alea/shuffle.js";
10
+ const getInstruction = (identifiers) => {
11
+ const { items } = identifiers;
12
+ return `Voici quatre nombres :
13
+
14
+ ${items
15
+ .map((item) => `
16
+
17
+ $$
18
+ ${item.name} = ${NodeConstructor.fromIdentifiers(item.nodeIds).toTex()}
19
+ $$
20
+
21
+ `)
22
+ .join("")}
23
+
24
+ Le plus grand de ces quatre nombres est :`;
25
+ };
26
+ const getHint = () => {
27
+ return `Ecris chaque nombre sous la forme d'une fraction.`;
28
+ };
29
+ const getCorrection = (identifiers) => {
30
+ const { items } = identifiers;
31
+ const nodes = items.map((item) => NodeConstructor.fromIdentifiers(item.nodeIds));
32
+ const sortedIndexes = [...Array(nodes.length).keys()].toSorted((i1, i2) => substract(nodes[i1], nodes[i2]).simplify().evaluate());
33
+ const compareSigns = [...Array(sortedIndexes.length).keys()]
34
+ .slice(0, -1)
35
+ .map((i) => {
36
+ const difference = substract(nodes[sortedIndexes[i]], nodes[sortedIndexes[i + 1]])
37
+ .simplify()
38
+ .evaluate();
39
+ const comparison = difference > 0 ? 1 : difference < 0 ? -1 : 0;
40
+ const compSymbol = comparison == 1 ? ">" : comparison == -1 ? "<" : "=";
41
+ return compSymbol;
42
+ });
43
+ const itemGreatest = sortedIndexes.map((sortedI) => items[sortedI])[items.length - 1];
44
+ return `On a :
45
+
46
+ ${items
47
+ .toSorted((item1, item2) => item1.name.localeCompare(item2.name))
48
+ .map((item) => {
49
+ const node = NodeConstructor.fromIdentifiers(item.nodeIds);
50
+ return `
51
+
52
+ $$
53
+ ${item.name} = ${node.toTex()} = ${node
54
+ .simplify({ calculatePowers: true, distributePowersOnFrac: true })
55
+ .toTex()}
56
+ $$
57
+
58
+ `;
59
+ })
60
+ .join("")}
61
+
62
+ Dans l'ordre croissant :
63
+
64
+ $$
65
+ ${sortedIndexes
66
+ .map((sortedI, i) => `${nodes[sortedI]
67
+ .simplify({ calculatePowers: true, distributePowersOnFrac: true })
68
+ .toTex()} ${i < sortedIndexes.length - 1 ? compareSigns[i] : ""}`)
69
+ .join("")}
70
+ $$
71
+
72
+ Le plus grand de ces $${items.length}$ nombres est $${itemGreatest.name}$.
73
+ `;
74
+ };
75
+ const getPropositions = (_, { answer, items }) => {
76
+ const propositions = [];
77
+ items
78
+ .toSorted((item1, item2) => item1.name.localeCompare(item2.name))
79
+ .forEach((item) => {
80
+ if (item.name === answer) {
81
+ addValidProp(propositions, answer);
82
+ }
83
+ else {
84
+ tryToAddWrongProp(propositions, item.name);
85
+ }
86
+ });
87
+ return propositions;
88
+ };
89
+ const getAnswer = (identifiers) => {
90
+ const { items } = identifiers;
91
+ const nodes = items.map((item) => NodeConstructor.fromIdentifiers(item.nodeIds));
92
+ const sortedIndexes = [...Array(items.length).keys()].toSorted((i1, i2) => substract(nodes[i1], nodes[i2]).simplify().evaluate());
93
+ const itemGreatest = sortedIndexes.map((i) => items[i])[items.length - 1];
94
+ return itemGreatest.name;
95
+ };
96
+ const getComparePowersOfFracsQuestion = () => {
97
+ function generateNodes() {
98
+ const a = coinFlip() ? 2 : 3;
99
+ const b = randint(a, 6);
100
+ const c = a + 1;
101
+ const nodes = [
102
+ power(frac(1, a), b),
103
+ power(frac(1, b), a),
104
+ frac(a, 100),
105
+ power(frac(1, c), c),
106
+ ];
107
+ return nodes;
108
+ }
109
+ function checkNodes(nodes) {
110
+ const sortedIndexes = [...Array(nodes.length).keys()].toSorted((i1, i2) => substract(nodes[i1], nodes[i2]).simplify().evaluate());
111
+ const compareSigns = [...Array(sortedIndexes.length).keys()]
112
+ .slice(0, -1)
113
+ .map((i) => {
114
+ const difference = substract(nodes[sortedIndexes[i]], nodes[sortedIndexes[i + 1]])
115
+ .simplify()
116
+ .evaluate();
117
+ const comparison = difference > 0 ? 1 : difference < 0 ? -1 : 0;
118
+ const compSymbol = comparison == 1 ? ">" : comparison == -1 ? "<" : "=";
119
+ return compSymbol;
120
+ });
121
+ return compareSigns[compareSigns.length - 1] !== "=";
122
+ }
123
+ let nodes;
124
+ do {
125
+ nodes = generateNodes();
126
+ } while (!checkNodes(nodes));
127
+ const names = ["A", "B", "C", "D"];
128
+ const items = shuffle(nodes).map((node, i) => {
129
+ return {
130
+ name: names[i],
131
+ nodeIds: node.toIdentifiers(),
132
+ };
133
+ });
134
+ return getQuestionFromIdentifiers({
135
+ items,
136
+ });
137
+ };
138
+ const getQuestionFromIdentifiers = (identifiers, opts) => {
139
+ const question = {
140
+ answer: getAnswer(identifiers),
141
+ instruction: getInstruction(identifiers),
142
+ keys: [],
143
+ answerFormat: "tex",
144
+ identifiers,
145
+ hint: getHint(identifiers),
146
+ correction: getCorrection(identifiers),
147
+ options: opts,
148
+ };
149
+ return question;
150
+ };
151
+ export const comparePowersOfFracs = {
152
+ id: "comparePowersOfFracs",
153
+ label: "Comparer des puissances de fractions",
154
+ isSingleStep: true,
155
+ generator: (nb, opts) => getDistinctQuestions(() => getComparePowersOfFracsQuestion(opts), nb, 30),
156
+ qcmTimer: 60,
157
+ freeTimer: 60,
158
+ getPropositions,
159
+ subject: "Mathématiques",
160
+ maxAllowedQuestions: 30,
161
+ getQuestionFromIdentifiers,
162
+ answerType: "QCU",
163
+ hasHintAndCorrection: true,
164
+ };
@@ -0,0 +1,9 @@
1
+ import { Exercise } from "../../../../exercises/exercise.js";
2
+ type Identifiers = {
3
+ a: number;
4
+ b: number;
5
+ isAdd: boolean;
6
+ };
7
+ export declare const compareWithSquareRoots: Exercise<Identifiers>;
8
+ export {};
9
+ //# sourceMappingURL=compareWithSquareRoots.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compareWithSquareRoots.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/ordering/compareWithSquareRoots.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAQrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,OAAO,CAAC;CAChB,CAAC;AAqKF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,CAgBxD,CAAC"}
@@ -0,0 +1,140 @@
1
+ import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
2
+ import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
3
+ import { randint } from "../../../../math/utils/random/randint.js";
4
+ import { parseAlgebraic } from "../../../../tree/parsers/latexParser.js";
5
+ import { coinFlip } from "../../../../utils/alea/coinFlip.js";
6
+ import { handleVEAError } from "../../../../utils/errors/handleVEAError.js";
7
+ const getInstruction = (identifiers) => {
8
+ const { a, b, isAdd } = identifiers;
9
+ return `Sachant que $\\sqrt{${a}} < \\sqrt{${a + 1}}$,
10
+
11
+ comparer $${b} ${isAdd ? "+" : "-"} \\sqrt{${a}}$ et $${b} ${isAdd ? "+" : "-"} \\sqrt{${a + 1}}$.`;
12
+ };
13
+ const getHint = (identifiers) => {
14
+ const { a, b, isAdd } = identifiers;
15
+ return `En partant de $\\sqrt{${a}} < \\sqrt{${a + 1}}$,
16
+
17
+ essaie de te ramener à $${b} ${isAdd ? "+" : "-"} \\sqrt{${a}}$ <(ou >) $${b} ${isAdd ? "+" : "-"} \\sqrt{${a + 1}}$
18
+
19
+ par des opérations que l'on effectue à droite et à gauche de l'inégalité.
20
+
21
+ Attention si tu multiplies à droite et à gauche d'une inégalité par un nombre négatif, l'inégalité se renverse.`;
22
+ };
23
+ const getCorrection = (identifiers) => {
24
+ const { a, b, isAdd } = identifiers;
25
+ return `
26
+
27
+ $$
28
+ \\sqrt{${a}} < \\sqrt{${a + 1}}
29
+ $$
30
+
31
+ ${isAdd
32
+ ? ``
33
+ : `On multiplie par $-1$ des deux côtés et on renverse l'inégalité :
34
+
35
+ $$
36
+ -\\sqrt{${a}} > -\\sqrt{${a + 1}}
37
+ $$
38
+
39
+ `}
40
+ On ajoute $${b}$ de chaque côté de l'inégalité :
41
+
42
+ $$
43
+ ${b} ${isAdd ? "+" : "-"} \\sqrt{${a}} ${isAdd ? "<" : ">"} ${b} ${isAdd ? "+" : "-"} \\sqrt{${a + 1}}
44
+ $$
45
+
46
+ `;
47
+ };
48
+ const getAnswer = (identifiers) => {
49
+ const { a, b, isAdd } = identifiers;
50
+ return `${b} ${isAdd ? "+" : "-"} \\sqrt{${a}} ${isAdd ? "<" : ">"} ${b} ${isAdd ? "+" : "-"} \\sqrt{${a + 1}}`;
51
+ };
52
+ const isAnswerValid = (ans, { answer }) => {
53
+ function getOrderedNodesFromTex(tex, compSymbol) {
54
+ return tex
55
+ .split(compSymbol)
56
+ .map((str) => parseAlgebraic(str))
57
+ .toSorted(() => (compSymbol === "<" ? -1 : +1));
58
+ }
59
+ try {
60
+ const compSymbol = ans.includes("<")
61
+ ? "<"
62
+ : ans.includes(">")
63
+ ? ">"
64
+ : undefined;
65
+ if (compSymbol) {
66
+ const [ansNode1, ansNode2] = getOrderedNodesFromTex(ans, compSymbol);
67
+ const [answerNode1, answerNode2] = getOrderedNodesFromTex(answer, "<");
68
+ return (ansNode1.simplify().equals(answerNode1.simplify()) &&
69
+ ansNode2.simplify().equals(answerNode2.simplify()));
70
+ }
71
+ else {
72
+ return false;
73
+ }
74
+ }
75
+ catch (err) {
76
+ return handleVEAError(err);
77
+ }
78
+ };
79
+ const getPropositions = (nbProps, { answer, ...identifiers }) => {
80
+ const { a, b, isAdd } = identifiers;
81
+ const propositions = [];
82
+ addValidProp(propositions, `${b} ${isAdd ? "+" : "-"} \\sqrt{${a}} ${isAdd ? "<" : ">"} ${b} ${isAdd ? "+" : "-"} \\sqrt{${a + 1}}`, "tex");
83
+ tryToAddWrongProp(propositions, `${b} ${!isAdd ? "+" : "-"} \\sqrt{${a}} ${!isAdd ? "<" : ">"} ${b} ${!isAdd ? "+" : "-"} \\sqrt{${a + 1}}`, "tex");
84
+ return shuffleProps(propositions, nbProps);
85
+ };
86
+ const getKeys = (identifiers) => {
87
+ const { a, b, isAdd } = identifiers;
88
+ return [
89
+ "inf",
90
+ "sup",
91
+ ...[
92
+ `${b} ${isAdd ? "+" : "-"} \\sqrt{${a}}`,
93
+ `${b} ${isAdd ? "+" : "-"} \\sqrt{${a + 1}}`,
94
+ ].map((tex) => {
95
+ return {
96
+ id: "custom",
97
+ label: tex,
98
+ labelType: "tex",
99
+ mathfieldInstructions: {
100
+ method: "write",
101
+ content: tex,
102
+ },
103
+ };
104
+ }),
105
+ ];
106
+ };
107
+ const getCompareWithSquareRootsQuestion = () => {
108
+ const a = randint(2, 150);
109
+ const b = randint(1, 100);
110
+ const isAdd = coinFlip();
111
+ return getQuestionFromIdentifiers({ a, b, isAdd });
112
+ };
113
+ const getQuestionFromIdentifiers = (identifiers) => {
114
+ const question = {
115
+ answer: getAnswer(identifiers),
116
+ instruction: getInstruction(identifiers),
117
+ keys: getKeys(identifiers),
118
+ answerFormat: "tex",
119
+ identifiers,
120
+ hint: getHint(identifiers),
121
+ correction: getCorrection(identifiers),
122
+ };
123
+ return question;
124
+ };
125
+ export const compareWithSquareRoots = {
126
+ id: "compareWithSquareRoots",
127
+ label: "Comparer deux nombres directement (avec des racines carrées)",
128
+ isSingleStep: true,
129
+ generator: (nb) => getDistinctQuestions(() => getCompareWithSquareRootsQuestion(), nb, 30),
130
+ qcmTimer: 60,
131
+ freeTimer: 60,
132
+ getPropositions,
133
+ isAnswerValid,
134
+ getAnswer,
135
+ subject: "Mathématiques",
136
+ maxAllowedQuestions: 30,
137
+ getQuestionFromIdentifiers,
138
+ answerType: "QCU",
139
+ hasHintAndCorrection: true,
140
+ };
@@ -2,4 +2,10 @@ export * from "./integerOrdering.js";
2
2
  export * from "./decimalOrdering.js";
3
3
  export * from "./framing.js";
4
4
  export * from "./decimalOrderingNoRelatives.js";
5
+ export * from "./compareFracAndDec.js";
6
+ export * from "./compareA10N.js";
7
+ export * from "./compareABUsingQuotient.js";
8
+ export * from "./comparePowersOfFracs.js";
9
+ export * from "./compareFracABWithFracAPlusCBPlusC.js";
10
+ export * from "./compareWithSquareRoots.js";
5
11
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/ordering/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,cAAc,CAAC;AAC7B,cAAc,iCAAiC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/ordering/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,cAAc,CAAC;AAC7B,cAAc,iCAAiC,CAAC;AAChD,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC;AACjC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wCAAwC,CAAC;AACvD,cAAc,6BAA6B,CAAC"}
@@ -2,3 +2,9 @@ export * from "./integerOrdering.js";
2
2
  export * from "./decimalOrdering.js";
3
3
  export * from "./framing.js";
4
4
  export * from "./decimalOrderingNoRelatives.js";
5
+ export * from "./compareFracAndDec.js";
6
+ export * from "./compareA10N.js";
7
+ export * from "./compareABUsingQuotient.js";
8
+ export * from "./comparePowersOfFracs.js";
9
+ export * from "./compareFracABWithFracAPlusCBPlusC.js";
10
+ export * from "./compareWithSquareRoots.js";
@@ -0,0 +1,9 @@
1
+ import { Exercise } from "../../../../exercises/exercise.js";
2
+ type Identifiers = {
3
+ n: number;
4
+ c: number;
5
+ d: number;
6
+ };
7
+ export declare const estimateAroundPow10NTimesAroundPow10N: Exercise<Identifiers>;
8
+ export {};
9
+ //# sourceMappingURL=estimateAroundPow10NTimesAroundPow10N.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"estimateAroundPow10NTimesAroundPow10N.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/rounding/estimateAroundPow10NTimesAroundPow10N.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAerC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA+EF,eAAO,MAAM,qCAAqC,EAAE,QAAQ,CAAC,WAAW,CAoBvE,CAAC"}
@@ -0,0 +1,84 @@
1
+ import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
2
+ import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
3
+ import { randint } from "../../../../math/utils/random/randint.js";
4
+ import { add } from "../../../../tree/nodes/operators/addNode.js";
5
+ import { power } from "../../../../tree/nodes/operators/powerNode.js";
6
+ import { parseAlgebraic } from "../../../../tree/parsers/latexParser.js";
7
+ import { coinFlip } from "../../../../utils/alea/coinFlip.js";
8
+ import { handleVEAError } from "../../../../utils/errors/handleVEAError.js";
9
+ import { toSeperatedThousands } from "../../../../utils/numberPrototype/toSeparatedThousands.js";
10
+ const toPrettyString = (node) => {
11
+ return toSeperatedThousands("" + node.evaluate().toFixed(0));
12
+ };
13
+ const getInstruction = (identifiers) => {
14
+ const { n, c, d } = identifiers;
15
+ const [tex1, tex2] = [c, d].map((k) => toPrettyString(add(power(10, n), k)));
16
+ return `Laquelle de ces propositions est un ordre de grandeur de $${tex1} \\times ${tex2}$ ?`;
17
+ };
18
+ const getHint = (identifiers) => {
19
+ const { n } = identifiers;
20
+ return `Les deux facteurs sont tous les deux proches de $10^{${n}}$.`;
21
+ };
22
+ const getCorrection = (identifiers) => {
23
+ const { n, c, d } = identifiers;
24
+ const [tex1, tex2] = [c, d].map((k) => toPrettyString(add(power(10, n), k)));
25
+ return `$(${tex1} \\times ${tex2})$ est proche de $(10^{${n}} \\times 10^{${n}})$ et donc de $10^{${2 * n}}$ `;
26
+ };
27
+ const getAnswer = (identifiers) => {
28
+ const { n } = identifiers;
29
+ return `10^{${2 * n}}`;
30
+ };
31
+ const isAnswerValid = (ans, { answer }) => {
32
+ try {
33
+ const ansNode = parseAlgebraic(ans);
34
+ const answerNode = parseAlgebraic(answer);
35
+ return ansNode
36
+ .simplify({ calculatePowers: true })
37
+ .equals(answerNode.simplify({ calculatePowers: true }));
38
+ }
39
+ catch (err) {
40
+ return handleVEAError(err);
41
+ }
42
+ };
43
+ const getPropositions = (nbProps, { answer, ...identifiers }) => {
44
+ const { n } = identifiers;
45
+ const propositions = [];
46
+ addValidProp(propositions, toPrettyString(power(10, 2 * n)), "tex");
47
+ tryToAddWrongProp(propositions, toPrettyString(power(10, n)), "tex");
48
+ tryToAddWrongProp(propositions, toPrettyString(power(10, n + 1)), "tex");
49
+ tryToAddWrongProp(propositions, toPrettyString(power(10, 2 * n + 2)), "tex");
50
+ return shuffleProps(propositions, nbProps);
51
+ };
52
+ const getEstimatePow10NPlusPow10MinusNQuestion = () => {
53
+ const n = randint(1, 5);
54
+ const [c, d] = [0, 1].map(() => (coinFlip() ? 1 : -1) * randint(1, 3));
55
+ return getQuestionFromIdentifiers({ n, c, d });
56
+ };
57
+ const getQuestionFromIdentifiers = (identifiers) => {
58
+ const question = {
59
+ answer: getAnswer(identifiers),
60
+ instruction: getInstruction(identifiers),
61
+ keys: [],
62
+ answerFormat: "tex",
63
+ identifiers,
64
+ hint: getHint(identifiers),
65
+ correction: getCorrection(identifiers),
66
+ };
67
+ return question;
68
+ };
69
+ export const estimateAroundPow10NTimesAroundPow10N = {
70
+ id: "estimateAroundPow10NTimesAroundPow10N",
71
+ label: "Donner un ordre de grandeur de ($10^{n}+c)(10^{n}+c')$",
72
+ isSingleStep: true,
73
+ generator: (nb) => getDistinctQuestions(() => getEstimatePow10NPlusPow10MinusNQuestion(), nb, 30),
74
+ qcmTimer: 60,
75
+ freeTimer: 60,
76
+ getPropositions,
77
+ isAnswerValid,
78
+ getAnswer,
79
+ subject: "Mathématiques",
80
+ maxAllowedQuestions: 30,
81
+ getQuestionFromIdentifiers,
82
+ answerType: "QCU",
83
+ hasHintAndCorrection: true,
84
+ };
@@ -0,0 +1,8 @@
1
+ import { Exercise } from "../../../../exercises/exercise.js";
2
+ type Identifiers = {
3
+ n: number;
4
+ varName: string;
5
+ };
6
+ export declare const estimatePow10NPlusPow10MinusN: Exercise<Identifiers>;
7
+ export {};
8
+ //# sourceMappingURL=estimatePow10NPlusPow10MinusN.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"estimatePow10NPlusPow10MinusN.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/rounding/estimatePow10NPlusPow10MinusN.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAQrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAwFF,eAAO,MAAM,6BAA6B,EAAE,QAAQ,CAAC,WAAW,CAoB/D,CAAC"}
@@ -0,0 +1,90 @@
1
+ import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
2
+ import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
3
+ import { randint } from "../../../../math/utils/random/randint.js";
4
+ import { power } from "../../../../tree/nodes/operators/powerNode.js";
5
+ import { parseAlgebraic } from "../../../../tree/parsers/latexParser.js";
6
+ import { random } from "../../../../utils/alea/random.js";
7
+ import { handleVEAError } from "../../../../utils/errors/handleVEAError.js";
8
+ const getInstruction = (identifiers) => {
9
+ const { n, varName } = identifiers;
10
+ const A = varName;
11
+ return `On considère $${A}=10^{${n}}+10^{-${n}}$.
12
+
13
+ À quoi $A$ est-il environ égal ?`;
14
+ };
15
+ const getHint = (identifiers) => {
16
+ const { n } = identifiers;
17
+ return `Combien vaut $10^{${n}}$ ? et $10^{-${n}}$ ?`;
18
+ };
19
+ const getCorrection = (identifiers) => {
20
+ const { n, varName } = identifiers;
21
+ const A = varName;
22
+ return `
23
+ $$
24
+ 10^{${n}} = ${("" + power(10, n).evaluate().toFixed(0)).replace(".", ",")}
25
+ $$
26
+
27
+ $$
28
+ 10^{${-n}} = ${("" + power(10, -n).evaluate().toFixed(n)).replace(".", ",")}
29
+ $$
30
+
31
+ Comme $10^{${n}}$ est largement supérieur à $10^{-${n}}$, un ordre de grandeur de $${A}$ est $10^{${n}}$.`;
32
+ };
33
+ const getAnswer = (identifiers) => {
34
+ const { n } = identifiers;
35
+ return `10^{${n}}`;
36
+ };
37
+ const isAnswerValid = (ans, { answer }) => {
38
+ try {
39
+ const ansNode = parseAlgebraic(ans);
40
+ const answerNode = parseAlgebraic(answer);
41
+ return ansNode.simplify().equals(answerNode.simplify());
42
+ }
43
+ catch (err) {
44
+ return handleVEAError(err);
45
+ }
46
+ };
47
+ const getPropositions = (nbProps, { answer, ...identifiers }) => {
48
+ const { n } = identifiers;
49
+ const propositions = [];
50
+ addValidProp(propositions, `10^{${n}}`, "tex");
51
+ tryToAddWrongProp(propositions, `${(0).frenchify()}`, "tex");
52
+ tryToAddWrongProp(propositions, `10^0`, "tex");
53
+ tryToAddWrongProp(propositions, `100^0`, "tex");
54
+ tryToAddWrongProp(propositions, `20^{-{${n}^2}}`, "tex");
55
+ tryToAddWrongProp(propositions, `20^{${n}}`, "tex");
56
+ return shuffleProps(propositions, nbProps);
57
+ };
58
+ const getEstimatePow10NPlusPow10MinusNQuestion = () => {
59
+ const n = randint(0, 15, [0]);
60
+ const varName = random(["A", "B", "C", "D", "E"]);
61
+ return getQuestionFromIdentifiers({ n, varName });
62
+ };
63
+ const getQuestionFromIdentifiers = (identifiers) => {
64
+ const question = {
65
+ answer: getAnswer(identifiers),
66
+ instruction: getInstruction(identifiers),
67
+ keys: [],
68
+ answerFormat: "tex",
69
+ identifiers,
70
+ hint: getHint(identifiers),
71
+ correction: getCorrection(identifiers),
72
+ };
73
+ return question;
74
+ };
75
+ export const estimatePow10NPlusPow10MinusN = {
76
+ id: "estimatePow10NPlusPow10MinusN",
77
+ label: "Estimer $10^{n}+10^{-n}$",
78
+ isSingleStep: true,
79
+ generator: (nb) => getDistinctQuestions(() => getEstimatePow10NPlusPow10MinusNQuestion(), nb, 30),
80
+ qcmTimer: 60,
81
+ freeTimer: 60,
82
+ getPropositions,
83
+ isAnswerValid,
84
+ getAnswer,
85
+ subject: "Mathématiques",
86
+ maxAllowedQuestions: 30,
87
+ getQuestionFromIdentifiers,
88
+ answerType: "QCU",
89
+ hasHintAndCorrection: true,
90
+ };
@@ -1,3 +1,5 @@
1
1
  export * from "./rounding.js";
2
2
  export * from "./getPhysicalOrderOfMagnitude.js";
3
+ export * from "./estimatePow10NPlusPow10MinusN.js";
4
+ export * from "./estimateAroundPow10NTimesAroundPow10N.js";
3
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/rounding/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,kCAAkC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/rounding/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,kCAAkC,CAAC;AACjD,cAAc,oCAAoC,CAAC;AACnD,cAAc,4CAA4C,CAAC"}
@@ -1,2 +1,4 @@
1
1
  export * from "./rounding.js";
2
2
  export * from "./getPhysicalOrderOfMagnitude.js";
3
+ export * from "./estimatePow10NPlusPow10MinusN.js";
4
+ export * from "./estimateAroundPow10NTimesAroundPow10N.js";
@@ -0,0 +1,13 @@
1
+ import { Exercise } from "../../../../exercises/exercise.js";
2
+ import { AlgebraicNode } from "../../../../tree/nodes/algebraicNode.js";
3
+ import { NodeIdentifiers } from "../../../../tree/nodes/nodeConstructor.js";
4
+ type Identifiers = {
5
+ problemSkeletonIndex: number;
6
+ groupNameToVarNameToValue: Record<string, Record<string, AlgebraicNode>>;
7
+ mysteryVarPath: string;
8
+ shuffleArrays: number[][];
9
+ equalNodeIds: NodeIdentifiers;
10
+ };
11
+ export declare const equationFromProblem: Exercise<Identifiers>;
12
+ export {};
13
+ //# sourceMappingURL=equationFromProblem.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"equationFromProblem.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/equation/equationFromProblem.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAKrC,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAKlE,OAAO,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AActE,KAAK,WAAW,GAAG;IACjB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,yBAAyB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC;IACzE,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,EAAE,EAAE,CAAC;IAC1B,YAAY,EAAE,eAAe,CAAC;CAC/B,CAAC;AA0mBF,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,WAAW,CAarD,CAAC"}