math-exercises 3.0.125 → 3.0.127

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 (291) hide show
  1. package/lib/exercises/math/calcul/fractions/fractionsSumsPrimeDenominators.d.ts.map +1 -1
  2. package/lib/exercises/math/calcul/fractions/fractionsSumsPrimeDenominators.js +61 -1
  3. package/lib/exercises/math/calcul/mentalCaluls/index.d.ts +1 -0
  4. package/lib/exercises/math/calcul/mentalCaluls/index.d.ts.map +1 -1
  5. package/lib/exercises/math/calcul/mentalCaluls/index.js +1 -0
  6. package/lib/exercises/math/calcul/mentalCaluls/mentalProgramSolve.d.ts +15 -0
  7. package/lib/exercises/math/calcul/mentalCaluls/mentalProgramSolve.d.ts.map +1 -0
  8. package/lib/exercises/math/calcul/mentalCaluls/mentalProgramSolve.js +231 -0
  9. package/lib/exercises/math/calcul/ordering/compareA10N.d.ts +16 -0
  10. package/lib/exercises/math/calcul/ordering/compareA10N.d.ts.map +1 -0
  11. package/lib/exercises/math/calcul/ordering/compareA10N.js +327 -0
  12. package/lib/exercises/math/calcul/ordering/compareABUsingQuotient.d.ts +8 -0
  13. package/lib/exercises/math/calcul/ordering/compareABUsingQuotient.d.ts.map +1 -0
  14. package/lib/exercises/math/calcul/ordering/compareABUsingQuotient.js +123 -0
  15. package/lib/exercises/math/calcul/ordering/compareFracABWithFracAPlusCBPlusC.d.ts +9 -0
  16. package/lib/exercises/math/calcul/ordering/compareFracABWithFracAPlusCBPlusC.d.ts.map +1 -0
  17. package/lib/exercises/math/calcul/ordering/compareFracABWithFracAPlusCBPlusC.js +149 -0
  18. package/lib/exercises/math/calcul/ordering/compareFracAndDec.d.ts +29 -0
  19. package/lib/exercises/math/calcul/ordering/compareFracAndDec.d.ts.map +1 -0
  20. package/lib/exercises/math/calcul/ordering/compareFracAndDec.js +368 -0
  21. package/lib/exercises/math/calcul/ordering/comparePowersOfFracs.d.ts +12 -0
  22. package/lib/exercises/math/calcul/ordering/comparePowersOfFracs.d.ts.map +1 -0
  23. package/lib/exercises/math/calcul/ordering/comparePowersOfFracs.js +164 -0
  24. package/lib/exercises/math/calcul/ordering/compareWithSquareRoots.d.ts +9 -0
  25. package/lib/exercises/math/calcul/ordering/compareWithSquareRoots.d.ts.map +1 -0
  26. package/lib/exercises/math/calcul/ordering/compareWithSquareRoots.js +140 -0
  27. package/lib/exercises/math/calcul/ordering/index.d.ts +6 -0
  28. package/lib/exercises/math/calcul/ordering/index.d.ts.map +1 -1
  29. package/lib/exercises/math/calcul/ordering/index.js +6 -0
  30. package/lib/exercises/math/calcul/rounding/estimateAroundPow10NTimesAroundPow10N.d.ts +9 -0
  31. package/lib/exercises/math/calcul/rounding/estimateAroundPow10NTimesAroundPow10N.d.ts.map +1 -0
  32. package/lib/exercises/math/calcul/rounding/estimateAroundPow10NTimesAroundPow10N.js +84 -0
  33. package/lib/exercises/math/calcul/rounding/estimatePow10NPlusPow10MinusN.d.ts +8 -0
  34. package/lib/exercises/math/calcul/rounding/estimatePow10NPlusPow10MinusN.d.ts.map +1 -0
  35. package/lib/exercises/math/calcul/rounding/estimatePow10NPlusPow10MinusN.js +90 -0
  36. package/lib/exercises/math/calcul/rounding/index.d.ts +2 -0
  37. package/lib/exercises/math/calcul/rounding/index.d.ts.map +1 -1
  38. package/lib/exercises/math/calcul/rounding/index.js +2 -0
  39. package/lib/exercises/math/calculLitteral/equation/equationFromProblem.d.ts +13 -0
  40. package/lib/exercises/math/calculLitteral/equation/equationFromProblem.d.ts.map +1 -0
  41. package/lib/exercises/math/calculLitteral/equation/equationFromProblem.js +454 -0
  42. package/lib/exercises/math/calculLitteral/equation/index.d.ts +1 -0
  43. package/lib/exercises/math/calculLitteral/equation/index.d.ts.map +1 -1
  44. package/lib/exercises/math/calculLitteral/equation/index.js +1 -0
  45. package/lib/exercises/math/calculLitteral/factorisation/factorizeAX2PlusBX.d.ts +10 -0
  46. package/lib/exercises/math/calculLitteral/factorisation/factorizeAX2PlusBX.d.ts.map +1 -0
  47. package/lib/exercises/math/calculLitteral/factorisation/factorizeAX2PlusBX.js +70 -0
  48. package/lib/exercises/math/calculLitteral/factorisation/index.d.ts +1 -0
  49. package/lib/exercises/math/calculLitteral/factorisation/index.d.ts.map +1 -1
  50. package/lib/exercises/math/calculLitteral/factorisation/index.js +1 -0
  51. package/lib/exercises/math/calculLitteral/index.d.ts +2 -0
  52. package/lib/exercises/math/calculLitteral/index.d.ts.map +1 -1
  53. package/lib/exercises/math/calculLitteral/index.js +2 -0
  54. package/lib/exercises/math/calculLitteral/isolate/index.d.ts +2 -1
  55. package/lib/exercises/math/calculLitteral/isolate/index.d.ts.map +1 -1
  56. package/lib/exercises/math/calculLitteral/isolate/index.js +2 -1
  57. package/lib/exercises/math/calculLitteral/isolate/isolateUInInvXPlusInvYEqualsInvU.d.ts +8 -0
  58. package/lib/exercises/math/calculLitteral/isolate/isolateUInInvXPlusInvYEqualsInvU.d.ts.map +1 -0
  59. package/lib/exercises/math/calculLitteral/isolate/isolateUInInvXPlusInvYEqualsInvU.js +86 -0
  60. package/lib/exercises/math/calculLitteral/isolate/isolateXInInvXPlusInvYEqualsInvU.d.ts +7 -0
  61. package/lib/exercises/math/calculLitteral/isolate/isolateXInInvXPlusInvYEqualsInvU.d.ts.map +1 -0
  62. package/lib/exercises/math/calculLitteral/isolate/isolateXInInvXPlusInvYEqualsInvU.js +80 -0
  63. package/lib/exercises/math/calculLitteral/ordering/compareAMinusB.d.ts +10 -0
  64. package/lib/exercises/math/calculLitteral/ordering/compareAMinusB.d.ts.map +1 -0
  65. package/lib/exercises/math/calculLitteral/ordering/compareAMinusB.js +180 -0
  66. package/lib/exercises/math/calculLitteral/ordering/compareFromPiMinusFrac.d.ts +9 -0
  67. package/lib/exercises/math/calculLitteral/ordering/compareFromPiMinusFrac.d.ts.map +1 -0
  68. package/lib/exercises/math/calculLitteral/ordering/compareFromPiMinusFrac.js +144 -0
  69. package/lib/exercises/math/calculLitteral/ordering/index.d.ts +3 -0
  70. package/lib/exercises/math/calculLitteral/ordering/index.d.ts.map +1 -0
  71. package/lib/exercises/math/calculLitteral/ordering/index.js +2 -0
  72. package/lib/exercises/math/calculLitteral/simplifying/compareATimes0.d.ts +11 -0
  73. package/lib/exercises/math/calculLitteral/simplifying/compareATimes0.d.ts.map +1 -0
  74. package/lib/exercises/math/calculLitteral/simplifying/compareATimes0.js +120 -0
  75. package/lib/exercises/math/calculLitteral/simplifying/compareFracXA.d.ts +8 -0
  76. package/lib/exercises/math/calculLitteral/simplifying/compareFracXA.d.ts.map +1 -0
  77. package/lib/exercises/math/calculLitteral/simplifying/compareFracXA.js +67 -0
  78. package/lib/exercises/math/calculLitteral/simplifying/compareMinusA.d.ts +11 -0
  79. package/lib/exercises/math/calculLitteral/simplifying/compareMinusA.d.ts.map +1 -0
  80. package/lib/exercises/math/calculLitteral/simplifying/compareMinusA.js +114 -0
  81. package/lib/exercises/math/calculLitteral/simplifying/index.d.ts +5 -0
  82. package/lib/exercises/math/calculLitteral/simplifying/index.d.ts.map +1 -1
  83. package/lib/exercises/math/calculLitteral/simplifying/index.js +5 -0
  84. package/lib/exercises/math/calculLitteral/simplifying/pickSameAsAPercentOfB.d.ts +13 -0
  85. package/lib/exercises/math/calculLitteral/simplifying/pickSameAsAPercentOfB.d.ts.map +1 -0
  86. package/lib/exercises/math/calculLitteral/simplifying/pickSameAsAPercentOfB.js +125 -0
  87. package/lib/exercises/math/calculLitteral/simplifying/pickSameAsInverseOfFracAB.d.ts +14 -0
  88. package/lib/exercises/math/calculLitteral/simplifying/pickSameAsInverseOfFracAB.d.ts.map +1 -0
  89. package/lib/exercises/math/calculLitteral/simplifying/pickSameAsInverseOfFracAB.js +148 -0
  90. package/lib/exercises/math/calculLitteral/writing/writeLitExpFromFrenchExp.d.ts +5 -27
  91. package/lib/exercises/math/calculLitteral/writing/writeLitExpFromFrenchExp.d.ts.map +1 -1
  92. package/lib/exercises/math/calculLitteral/writing/writeLitExpFromFrenchExp.js +231 -248
  93. package/lib/exercises/math/conversion/index.d.ts +4 -0
  94. package/lib/exercises/math/conversion/index.d.ts.map +1 -1
  95. package/lib/exercises/math/conversion/index.js +4 -0
  96. package/lib/exercises/math/conversion/kmPerMinToKmPerHourConversion.d.ts +11 -0
  97. package/lib/exercises/math/conversion/kmPerMinToKmPerHourConversion.d.ts.map +1 -0
  98. package/lib/exercises/math/conversion/kmPerMinToKmPerHourConversion.js +116 -0
  99. package/lib/exercises/math/conversion/minutesToHours.d.ts +10 -0
  100. package/lib/exercises/math/conversion/minutesToHours.d.ts.map +1 -0
  101. package/lib/exercises/math/conversion/minutesToHours.js +150 -0
  102. package/lib/exercises/math/conversion/prefixToNumber.d.ts +15 -0
  103. package/lib/exercises/math/conversion/prefixToNumber.d.ts.map +1 -0
  104. package/lib/exercises/math/conversion/prefixToNumber.js +243 -0
  105. package/lib/exercises/math/conversion/secondsToHours.d.ts +10 -0
  106. package/lib/exercises/math/conversion/secondsToHours.d.ts.map +1 -0
  107. package/lib/exercises/math/conversion/secondsToHours.js +150 -0
  108. package/lib/exercises/math/dataRepresentations/barChartInterpreting.d.ts +53 -0
  109. package/lib/exercises/math/dataRepresentations/barChartInterpreting.d.ts.map +1 -0
  110. package/lib/exercises/math/dataRepresentations/barChartInterpreting.js +533 -0
  111. package/lib/exercises/math/dataRepresentations/boxPlotInterpreting.d.ts +7 -0
  112. package/lib/exercises/math/dataRepresentations/boxPlotInterpreting.d.ts.map +1 -0
  113. package/lib/exercises/math/dataRepresentations/boxPlotInterpreting.js +223 -0
  114. package/lib/exercises/math/dataRepresentations/cartesianGraphExtremaReading.d.ts +10 -0
  115. package/lib/exercises/math/dataRepresentations/cartesianGraphExtremaReading.d.ts.map +1 -0
  116. package/lib/exercises/math/dataRepresentations/cartesianGraphExtremaReading.js +140 -0
  117. package/lib/exercises/math/dataRepresentations/dataToGraphGraphToData.d.ts +8 -0
  118. package/lib/exercises/math/dataRepresentations/dataToGraphGraphToData.d.ts.map +1 -0
  119. package/lib/exercises/math/dataRepresentations/dataToGraphGraphToData.js +133 -0
  120. package/lib/exercises/math/dataRepresentations/graphReading.d.ts +8 -0
  121. package/lib/exercises/math/dataRepresentations/graphReading.d.ts.map +1 -0
  122. package/lib/exercises/math/dataRepresentations/graphReading.js +136 -0
  123. package/lib/exercises/math/dataRepresentations/halfPieChartCommenting.d.ts +18 -0
  124. package/lib/exercises/math/dataRepresentations/halfPieChartCommenting.d.ts.map +1 -0
  125. package/lib/exercises/math/dataRepresentations/halfPieChartCommenting.js +228 -0
  126. package/lib/exercises/math/dataRepresentations/halfPieChartReading.d.ts +8 -0
  127. package/lib/exercises/math/dataRepresentations/halfPieChartReading.d.ts.map +1 -0
  128. package/lib/exercises/math/dataRepresentations/halfPieChartReading.js +213 -0
  129. package/lib/exercises/math/dataRepresentations/histogramReading.d.ts +9 -0
  130. package/lib/exercises/math/dataRepresentations/histogramReading.d.ts.map +1 -0
  131. package/lib/exercises/math/dataRepresentations/histogramReading.js +163 -0
  132. package/lib/exercises/math/dataRepresentations/index.d.ts +10 -0
  133. package/lib/exercises/math/dataRepresentations/index.d.ts.map +1 -1
  134. package/lib/exercises/math/dataRepresentations/index.js +10 -0
  135. package/lib/exercises/math/dataRepresentations/plausibleGraph.d.ts +9 -0
  136. package/lib/exercises/math/dataRepresentations/plausibleGraph.d.ts.map +1 -0
  137. package/lib/exercises/math/dataRepresentations/plausibleGraph.js +194 -0
  138. package/lib/exercises/math/dataRepresentations/scatterPlotCommenting.d.ts +9 -0
  139. package/lib/exercises/math/dataRepresentations/scatterPlotCommenting.d.ts.map +1 -0
  140. package/lib/exercises/math/dataRepresentations/scatterPlotCommenting.js +308 -0
  141. package/lib/exercises/math/derivation/derivative/exp/expDerivativeFour.d.ts.map +1 -1
  142. package/lib/exercises/math/derivation/derivative/exp/expDerivativeFour.js +5 -6
  143. package/lib/exercises/math/functions/affines/coordsOfPointOnAffineFindX.d.ts +8 -0
  144. package/lib/exercises/math/functions/affines/coordsOfPointOnAffineFindX.d.ts.map +1 -0
  145. package/lib/exercises/math/functions/affines/coordsOfPointOnAffineFindX.js +117 -0
  146. package/lib/exercises/math/functions/affines/coordsOfPointOnAffineFindY.d.ts +8 -0
  147. package/lib/exercises/math/functions/affines/coordsOfPointOnAffineFindY.d.ts.map +1 -0
  148. package/lib/exercises/math/functions/affines/coordsOfPointOnAffineFindY.js +118 -0
  149. package/lib/exercises/math/functions/affines/drawAffineFromPointAndLeadingCoeff.d.ts +16 -0
  150. package/lib/exercises/math/functions/affines/drawAffineFromPointAndLeadingCoeff.d.ts.map +1 -0
  151. package/lib/exercises/math/functions/affines/drawAffineFromPointAndLeadingCoeff.js +215 -0
  152. package/lib/exercises/math/functions/affines/drawAffineFromProgCalc.d.ts +13 -0
  153. package/lib/exercises/math/functions/affines/drawAffineFromProgCalc.d.ts.map +1 -0
  154. package/lib/exercises/math/functions/affines/drawAffineFromProgCalc.js +223 -0
  155. package/lib/exercises/math/functions/affines/index.d.ts +7 -0
  156. package/lib/exercises/math/functions/affines/index.d.ts.map +1 -1
  157. package/lib/exercises/math/functions/affines/index.js +7 -0
  158. package/lib/exercises/math/functions/affines/recognizeExprAffine.d.ts +20 -0
  159. package/lib/exercises/math/functions/affines/recognizeExprAffine.d.ts.map +1 -0
  160. package/lib/exercises/math/functions/affines/recognizeExprAffine.js +284 -0
  161. package/lib/exercises/math/functions/affines/representationOfAffine.d.ts +16 -0
  162. package/lib/exercises/math/functions/affines/representationOfAffine.d.ts.map +1 -0
  163. package/lib/exercises/math/functions/affines/representationOfAffine.js +275 -0
  164. package/lib/exercises/math/functions/basics/coordsOfPointOnCurveFindY.d.ts +14 -0
  165. package/lib/exercises/math/functions/basics/coordsOfPointOnCurveFindY.d.ts.map +1 -0
  166. package/lib/exercises/math/functions/basics/coordsOfPointOnCurveFindY.js +235 -0
  167. package/lib/exercises/math/functions/basics/index.d.ts +1 -0
  168. package/lib/exercises/math/functions/basics/index.d.ts.map +1 -1
  169. package/lib/exercises/math/functions/basics/index.js +1 -0
  170. package/lib/exercises/math/functions/composition/functionComposition.d.ts +8 -0
  171. package/lib/exercises/math/functions/composition/functionComposition.d.ts.map +1 -0
  172. package/lib/exercises/math/functions/composition/functionComposition.js +238 -0
  173. package/lib/exercises/math/functions/composition/index.d.ts +2 -0
  174. package/lib/exercises/math/functions/composition/index.d.ts.map +1 -0
  175. package/lib/exercises/math/functions/composition/index.js +1 -0
  176. package/lib/exercises/math/functions/index.d.ts +1 -0
  177. package/lib/exercises/math/functions/index.d.ts.map +1 -1
  178. package/lib/exercises/math/functions/index.js +1 -0
  179. package/lib/exercises/math/geometry/angles/anglesUsingIsParallel.d.ts +23 -0
  180. package/lib/exercises/math/geometry/angles/anglesUsingIsParallel.d.ts.map +1 -0
  181. package/lib/exercises/math/geometry/angles/anglesUsingIsParallel.js +448 -0
  182. package/lib/exercises/math/geometry/angles/index.js +2 -0
  183. package/lib/exercises/math/geometry/angles/isParallelUsingAngles.d.ts +23 -0
  184. package/lib/exercises/math/geometry/angles/isParallelUsingAngles.d.ts.map +1 -0
  185. package/lib/exercises/math/geometry/angles/isParallelUsingAngles.js +402 -0
  186. package/lib/exercises/math/geometry/cartesian/placeAbscissOnSemiLine.d.ts +9 -6
  187. package/lib/exercises/math/geometry/cartesian/placeAbscissOnSemiLine.d.ts.map +1 -1
  188. package/lib/exercises/math/geometry/cartesian/placeAbscissOnSemiLine.js +140 -60
  189. package/lib/exercises/math/geometry/convexity/convexityQuadrinomialsGeo.js +1 -1
  190. package/lib/exercises/math/geometry/vectors/colinearity/colinearityFromPicture.d.ts.map +1 -1
  191. package/lib/exercises/math/geometry/vectors/colinearity/colinearityFromPicture.js +121 -104
  192. package/lib/exercises/math/geometry/vectors/vectorRepresentative.d.ts.map +1 -1
  193. package/lib/exercises/math/geometry/vectors/vectorRepresentative.js +3 -2
  194. package/lib/exercises/math/probaStat/basicProbas/index.d.ts +1 -0
  195. package/lib/exercises/math/probaStat/basicProbas/index.d.ts.map +1 -1
  196. package/lib/exercises/math/probaStat/basicProbas/index.js +1 -0
  197. package/lib/exercises/math/probaStat/basicProbas/possibleValuesForProba.d.ts +0 -1
  198. package/lib/exercises/math/probaStat/basicProbas/possibleValuesForProba.d.ts.map +1 -1
  199. package/lib/exercises/math/probaStat/basicProbas/possibleValuesForProba.js +65 -88
  200. package/lib/exercises/math/probaStat/conditionalProbaWriteFromFrench.d.ts +9 -0
  201. package/lib/exercises/math/probaStat/conditionalProbaWriteFromFrench.d.ts.map +1 -0
  202. package/lib/exercises/math/probaStat/conditionalProbaWriteFromFrench.js +221 -0
  203. package/lib/exercises/math/probaStat/index.d.ts +2 -0
  204. package/lib/exercises/math/probaStat/index.d.ts.map +1 -1
  205. package/lib/exercises/math/probaStat/index.js +2 -0
  206. package/lib/exercises/math/probaStat/probaAsSumOfProbas.d.ts +29 -0
  207. package/lib/exercises/math/probaStat/probaAsSumOfProbas.d.ts.map +1 -0
  208. package/lib/exercises/math/probaStat/probaAsSumOfProbas.js +547 -0
  209. package/lib/exercises/math/probaStat/stats1var/index.d.ts +2 -0
  210. package/lib/exercises/math/probaStat/stats1var/index.d.ts.map +1 -1
  211. package/lib/exercises/math/probaStat/stats1var/index.js +2 -0
  212. package/lib/exercises/math/probaStat/stats1var/interpretIndicatorsForLists.d.ts +9 -0
  213. package/lib/exercises/math/probaStat/stats1var/interpretIndicatorsForLists.d.ts.map +1 -0
  214. package/lib/exercises/math/probaStat/stats1var/interpretIndicatorsForLists.js +89 -0
  215. package/lib/exercises/math/probaStat/stats1var/plausibilityOfAverage.d.ts +10 -0
  216. package/lib/exercises/math/probaStat/stats1var/plausibilityOfAverage.d.ts.map +1 -0
  217. package/lib/exercises/math/probaStat/stats1var/plausibilityOfAverage.js +152 -0
  218. package/lib/exercises/pc/electricity/calculateUEqualsRI.d.ts +7 -0
  219. package/lib/exercises/pc/electricity/calculateUEqualsRI.d.ts.map +1 -0
  220. package/lib/exercises/pc/electricity/calculateUEqualsRI.js +73 -0
  221. package/lib/exercises/pc/electricity/index.d.ts +1 -0
  222. package/lib/exercises/pc/electricity/index.d.ts.map +1 -1
  223. package/lib/exercises/pc/electricity/index.js +1 -0
  224. package/lib/exercises/pc/index.d.ts +1 -0
  225. package/lib/exercises/pc/index.d.ts.map +1 -1
  226. package/lib/exercises/pc/index.js +1 -0
  227. package/lib/exercises/pc/moleculeFormula.d.ts.map +1 -1
  228. package/lib/exercises/pc/moleculeFormula.js +4 -3
  229. package/lib/exercises/pc/optics/index.d.ts +2 -0
  230. package/lib/exercises/pc/optics/index.d.ts.map +1 -0
  231. package/lib/exercises/pc/optics/index.js +1 -0
  232. package/lib/exercises/pc/optics/lensFormula.d.ts +21 -0
  233. package/lib/exercises/pc/optics/lensFormula.d.ts.map +1 -0
  234. package/lib/exercises/pc/optics/lensFormula.js +415 -0
  235. package/lib/exercises/pc/weight/calculateWeight.d.ts +8 -1
  236. package/lib/exercises/pc/weight/calculateWeight.d.ts.map +1 -1
  237. package/lib/exercises/pc/weight/calculateWeight.js +113 -38
  238. package/lib/geogebra/parsers/geogebraParser.d.ts +4 -0
  239. package/lib/geogebra/parsers/geogebraParser.d.ts.map +1 -1
  240. package/lib/geogebra/parsers/geogebraParser.js +17 -0
  241. package/lib/index.d.ts +351 -12
  242. package/lib/index.d.ts.map +1 -1
  243. package/lib/latexTester.d.ts.map +1 -1
  244. package/lib/latexTester.js +1 -0
  245. package/lib/math/geometry/CloudPoints.d.ts +10 -0
  246. package/lib/math/geometry/CloudPoints.d.ts.map +1 -1
  247. package/lib/math/geometry/CloudPoints.js +119 -0
  248. package/lib/math/geometry/line.d.ts +1 -0
  249. package/lib/math/geometry/line.d.ts.map +1 -1
  250. package/lib/math/geometry/line.js +10 -2
  251. package/lib/math/geometry/vector.d.ts +1 -0
  252. package/lib/math/geometry/vector.d.ts.map +1 -1
  253. package/lib/math/geometry/vector.js +12 -0
  254. package/lib/math/progCalc/progCalc.d.ts +46 -0
  255. package/lib/math/progCalc/progCalc.d.ts.map +1 -0
  256. package/lib/math/progCalc/progCalc.js +239 -0
  257. package/lib/math/utils/latex/realize.d.ts +12 -0
  258. package/lib/math/utils/latex/realize.d.ts.map +1 -0
  259. package/lib/math/utils/latex/realize.js +43 -0
  260. package/lib/pc/constants/molecularChemistry/molecule.d.ts +2 -0
  261. package/lib/pc/constants/molecularChemistry/molecule.d.ts.map +1 -1
  262. package/lib/pc/constants/molecularChemistry/molecule.js +52 -0
  263. package/lib/tests/questionTest.d.ts.map +1 -1
  264. package/lib/tests/questionTest.js +1 -1
  265. package/lib/tests/singleExo.test.js +3 -3
  266. package/lib/tree/nodes/algebraicNode.d.ts.map +1 -1
  267. package/lib/tree/nodes/operators/addNode.d.ts +4 -2
  268. package/lib/tree/nodes/operators/addNode.d.ts.map +1 -1
  269. package/lib/tree/nodes/operators/addNode.js +8 -17
  270. package/lib/tree/nodes/operators/fractionNode.d.ts +1 -1
  271. package/lib/tree/nodes/operators/fractionNode.d.ts.map +1 -1
  272. package/lib/tree/nodes/operators/fractionNode.js +5 -1
  273. package/lib/tree/nodes/operators/multiplyNode.d.ts +4 -2
  274. package/lib/tree/nodes/operators/multiplyNode.d.ts.map +1 -1
  275. package/lib/tree/nodes/operators/multiplyNode.js +8 -17
  276. package/lib/tree/nodes/operators/operatorNode.d.ts +3 -3
  277. package/lib/tree/nodes/operators/operatorNode.d.ts.map +1 -1
  278. package/lib/tree/nodes/variables/variableNode.d.ts +1 -1
  279. package/lib/tree/nodes/variables/variableNode.d.ts.map +1 -1
  280. package/lib/tree/utilities/nodeShuffler.d.ts +12 -0
  281. package/lib/tree/utilities/nodeShuffler.d.ts.map +1 -0
  282. package/lib/tree/utilities/nodeShuffler.js +123 -0
  283. package/lib/utils/arrays/getAllPicks.d.ts +2 -0
  284. package/lib/utils/arrays/getAllPicks.d.ts.map +1 -0
  285. package/lib/utils/arrays/getAllPicks.js +17 -0
  286. package/lib/utils/errors/handleVEAError.d.ts +1 -1
  287. package/lib/utils/errors/handleVEAError.d.ts.map +1 -1
  288. package/lib/utils/strings/decapitalize.d.ts +2 -0
  289. package/lib/utils/strings/decapitalize.d.ts.map +1 -0
  290. package/lib/utils/strings/decapitalize.js +3 -0
  291. package/package.json +1 -1
@@ -0,0 +1,533 @@
1
+ import { addValidProp, shuffleProps, tryToAddWrongProp, GeneratorOptionTarget, GeneratorOptionType, } from "../../../exercises/exercise.js";
2
+ import { random, randomMany } from "../../../utils/alea/random.js";
3
+ import { randfloat } from "../../../math/utils/random/randfloat.js";
4
+ import { blueMain, greenMain, orange, red } from "../../../geogebra/colors.js";
5
+ import { coinFlip } from "../../../utils/alea/coinFlip.js";
6
+ import { probaLawFlip } from "../../../utils/alea/probaLawFlip.js";
7
+ import { getDistinctQuestions } from "../../../exercises/utils/getDistinctQuestions.js";
8
+ import { randint } from "../../../math/utils/random/randint.js";
9
+ import { GeogebraConstructor } from "../../../geogebra/geogebraConstructor.js";
10
+ import { capitalize } from "../../../utils/strings/capitalize.js";
11
+ import { shuffle } from "../../../utils/alea/shuffle.js";
12
+ class BarChartConstructor {
13
+ static stylesPools = {
14
+ color: [
15
+ {
16
+ type: "color",
17
+ color: blueMain,
18
+ frStr: "bleu",
19
+ },
20
+ {
21
+ type: "color",
22
+ color: orange,
23
+ frStr: "orange",
24
+ },
25
+ {
26
+ type: "color",
27
+ color: red,
28
+ frStr: "rouge",
29
+ },
30
+ {
31
+ type: "color",
32
+ color: greenMain,
33
+ frStr: "vert",
34
+ },
35
+ ],
36
+ fill: [
37
+ {
38
+ type: "fill",
39
+ fill: 1,
40
+ frStr: "hachures simples",
41
+ },
42
+ {
43
+ type: "fill",
44
+ fill: 2,
45
+ frStr: "hachures croisées",
46
+ },
47
+ {
48
+ type: "fill",
49
+ fill: 5,
50
+ frStr: "nid d'abeille",
51
+ },
52
+ {
53
+ type: "fill",
54
+ fill: 4,
55
+ frStr: "petits points",
56
+ },
57
+ {
58
+ type: "fill",
59
+ fill: 3,
60
+ frStr: "échiquier",
61
+ },
62
+ ],
63
+ };
64
+ static randomFromSkeleton(skeleton, nbBars, nbCateg, styleType) {
65
+ const categoryIndexes = randomMany([...Array(skeleton.categoryProps.length).keys()], nbCateg);
66
+ const dictIsUsingCategory = Object.fromEntries(categoryIndexes.map((i) => [i, true]));
67
+ const bars = this.createRandomBars(nbBars, dictIsUsingCategory, skeleton.barProps, skeleton.referenceData, skeleton.evoRanges).toSorted((bar1, bar2) => bar1.props.label.localeCompare(bar2.props.label));
68
+ const categories = this.createRandomCategories(dictIsUsingCategory, skeleton.categoryProps, styleType);
69
+ return {
70
+ description: skeleton.description,
71
+ axisLabels: skeleton.axisLabels,
72
+ bars,
73
+ categories,
74
+ };
75
+ }
76
+ static createRandomBars(nbBars, dictIsUsingCategory, barPropsPool, referenceDataIn, evoRangesIn) {
77
+ const barProps = randomMany(barPropsPool, nbBars);
78
+ function createRandomDataByPerturbatingData(data, evoRanges) {
79
+ return data.map((nb, i) => {
80
+ const evoRange = evoRanges[i];
81
+ return nb * randfloat(evoRange.min, evoRange.max);
82
+ });
83
+ }
84
+ const evoRanges = evoRangesIn.filter((_, categIndex) => dictIsUsingCategory[categIndex]);
85
+ let referenceData = referenceDataIn.filter((_, categIndex) => dictIsUsingCategory[categIndex]);
86
+ const datas = [];
87
+ for (let i = 0; i < nbBars; i++) {
88
+ const data = createRandomDataByPerturbatingData(referenceData, evoRanges);
89
+ datas.push(data);
90
+ referenceData = data;
91
+ }
92
+ return [...Array(nbBars).keys()].map((i) => {
93
+ return {
94
+ props: barProps[i],
95
+ data: datas[i],
96
+ };
97
+ });
98
+ }
99
+ static createRandomCategories(dictIsUsingCategory, categoryPropsPool, styleType) {
100
+ const nbCategUsed = Object.keys(dictIsUsingCategory).length;
101
+ const styles = shuffle(this.stylesPools[styleType].slice(0, nbCategUsed));
102
+ return categoryPropsPool
103
+ .filter((_, i) => dictIsUsingCategory[i])
104
+ .map((props, i) => {
105
+ const style = styles[i];
106
+ return {
107
+ props,
108
+ style,
109
+ };
110
+ });
111
+ }
112
+ }
113
+ const frenchOrdinals = [``, "deuxième", "troisième", "quatrième"];
114
+ const arrayOfBarChartSkeleton = [
115
+ {
116
+ description: `Le diagramme en barres ci-dessous donne la production d'électricité, en TWh (téraWatt-heure) selon son origine.`,
117
+ questionXForCategFunc(categName, isLess, ordinal) {
118
+ return `Quelle était l'année où la production d'électricité d'origine ${categName.toLocaleLowerCase()} était
119
+ la ${ordinal > 0 ? `${frenchOrdinals[ordinal]} la` : ``} ${isLess ? `moins` : `plus`} importante de toutes ces années ?`;
120
+ },
121
+ answerXForCategFunc(categName, isLess, ordinal) {
122
+ return `l'année où la production d'électricité d'origine ${categName.toLocaleLowerCase()} était
123
+ la ${ordinal > 0 ? `${frenchOrdinals[ordinal]} la` : ``} ${isLess ? `moins` : `plus`} importante de toutes ces années`;
124
+ },
125
+ questionCategForXFunc(barLabel, isLess, ordinal) {
126
+ return `Quelle était la ${ordinal > 0 ? `${frenchOrdinals[ordinal]}` : ``} ${isLess ? `moins` : `plus`} importante origine de production d'électricité pour l'année $${barLabel}$ ?`;
127
+ },
128
+ answerCategForXFunc(barLabel, isLess, ordinal) {
129
+ return `la ${ordinal > 0 ? `${frenchOrdinals[ordinal]} la` : ``} ${isLess ? `moins` : `plus`} importante origine de production d'électricité pour l'année $${barLabel}$`;
130
+ },
131
+ axisLabels: ["Année", "Production d'électricité (en TWh)"],
132
+ categoryProps: (() => {
133
+ const categoryNames = [
134
+ "Nucléaire",
135
+ "Thermique",
136
+ "Hydraulique",
137
+ "Solaire",
138
+ "Éolienne",
139
+ ];
140
+ return categoryNames.map((name) => {
141
+ return {
142
+ name,
143
+ frStr: `la production d'électricité d'origine ${name.toLocaleLowerCase()}`,
144
+ };
145
+ });
146
+ })(),
147
+ barProps: (() => {
148
+ const labels = [...Array(30).keys()].map((i) => `${1995 + i}`);
149
+ return labels.map((label) => {
150
+ return {
151
+ label,
152
+ frStr: `l'année $${label}$`,
153
+ };
154
+ });
155
+ })(),
156
+ referenceData: [500, 450, 400, 350, 300],
157
+ evoRanges: [
158
+ { min: 0.95, max: 1.05 },
159
+ { min: 0.9, max: 1.1 },
160
+ { min: 0.8, max: 1.2 },
161
+ { min: 0.7, max: 1.3 },
162
+ { min: 0.7, max: 1.3 },
163
+ ],
164
+ },
165
+ ];
166
+ const getInstruction = (identifiers) => {
167
+ const { barChart, questionStr } = identifiers;
168
+ return `${barChart.description}
169
+
170
+ ${questionStr}
171
+
172
+ Légende :
173
+
174
+ ${barChart.categories
175
+ .map((category) => {
176
+ return `${category.props.name} (${category.style.frStr})
177
+
178
+ `;
179
+ })
180
+ .join("")}
181
+ `;
182
+ };
183
+ const getAnswerCategory = (barChart, itemAsked) => {
184
+ const bar = barChart.bars[itemAsked.index];
185
+ const categIndex = bar.data
186
+ .map((data, i) => {
187
+ return { data: data, categIndex: i };
188
+ })
189
+ .toSorted((obj1, obj2) => (itemAsked.isLess ? +1 : -1) * (obj1.data - obj2.data))[itemAsked.ordinal].categIndex;
190
+ return barChart.categories[categIndex];
191
+ };
192
+ const getAnswerBar = (barChart, itemAsked) => {
193
+ const categIndex = itemAsked.index;
194
+ const barIndex = barChart.bars
195
+ .map((bar) => bar.data[categIndex])
196
+ .map((data, i) => {
197
+ return { data: data, barIndex: i };
198
+ })
199
+ .toSorted((obj1, obj2) => (itemAsked.isLess ? +1 : -1) * (obj1.data - obj2.data))[itemAsked.ordinal].barIndex;
200
+ return barChart.bars[barIndex];
201
+ };
202
+ const getAnswer = (identifiers) => {
203
+ const { barChart, itemAsked } = identifiers;
204
+ switch (itemAsked.type) {
205
+ case "categoryForX":
206
+ return getAnswerCategory(barChart, itemAsked).props.name;
207
+ case "xForCategory":
208
+ return getAnswerBar(barChart, itemAsked).props.label;
209
+ }
210
+ };
211
+ const getPropositions = (n, { answer, ...identifiers }) => {
212
+ const { barChart, itemAsked } = identifiers;
213
+ const propositions = [];
214
+ switch (itemAsked.type) {
215
+ case "categoryForX":
216
+ {
217
+ addValidProp(propositions, answer, "raw");
218
+ barChart.categories.forEach((categ) => {
219
+ tryToAddWrongProp(propositions, categ.props.name, "raw");
220
+ });
221
+ }
222
+ break;
223
+ case "xForCategory":
224
+ {
225
+ addValidProp(propositions, answer, "raw");
226
+ barChart.bars.forEach((bar) => {
227
+ tryToAddWrongProp(propositions, bar.props.label, "raw");
228
+ });
229
+ }
230
+ break;
231
+ }
232
+ return shuffleProps(propositions, n);
233
+ };
234
+ const getHint = (identifiers) => {
235
+ const { barChart, itemAsked } = identifiers;
236
+ switch (itemAsked.type) {
237
+ case "categoryForX": {
238
+ const bar = barChart.bars[itemAsked.index];
239
+ return `Concentre-toi sur ${bar.props.frStr}.`;
240
+ }
241
+ case "xForCategory": {
242
+ const category = barChart.categories[itemAsked.index];
243
+ return `Concentre-toi sur les barres ${category.style.type === "color"
244
+ ? `en ${category.style.frStr}`
245
+ : `en style ${category.style.frStr}`}.`;
246
+ }
247
+ }
248
+ };
249
+ const getCorrection = (identifiers) => {
250
+ const { barChart, itemAsked, answerStr } = identifiers;
251
+ switch (itemAsked.type) {
252
+ case "categoryForX": {
253
+ const answerCategory = getAnswerCategory(barChart, itemAsked);
254
+ return `On cherche ${answerStr}.
255
+ ${capitalize(answerStr)} est ${answerCategory.props.frStr}.`;
256
+ }
257
+ case "xForCategory": {
258
+ const category = barChart.categories[itemAsked.index];
259
+ const answerBar = getAnswerBar(barChart, itemAsked);
260
+ return `Comme ${category.props.frStr} est indiquée ${category.style.type === "color"
261
+ ? `en ${category.style.frStr}`
262
+ : `en style ${category.style.frStr}`} sur le diagramme , on cherche ${answerStr}.
263
+ ${capitalize(answerStr)} est ${answerBar.props.frStr}.`;
264
+ }
265
+ }
266
+ };
267
+ const getGGBOptionsHorizMulti = (identifiers) => {
268
+ const { barChart } = identifiers;
269
+ const nbTotalBar = barChart.bars.length;
270
+ const nbTotalCateg = barChart.categories.length;
271
+ const yMax = Math.max(...barChart.bars.flatMap((bar) => bar.data));
272
+ const xMax = 3.0 * yMax;
273
+ function getXRangeForCategory(barIndex, categIndex) {
274
+ const xRangeBar = {
275
+ min: (xMax * (2 * barIndex + 1)) / (2 * nbTotalBar + 2),
276
+ max: (xMax * (2 * barIndex + 2)) / (2 * nbTotalBar + 2),
277
+ };
278
+ const progressMin = categIndex / (nbTotalCateg + 1);
279
+ const progressMax = (categIndex + 1) / (nbTotalCateg + 1);
280
+ return {
281
+ min: xRangeBar.min + progressMin * (xRangeBar.max - xRangeBar.min),
282
+ max: xRangeBar.min + progressMax * (xRangeBar.max - xRangeBar.min),
283
+ };
284
+ }
285
+ function createBarChartCommandsForCategory(barChart, categIndex) {
286
+ const arrayXRange = barChart.bars.map((_, barIndex) => getXRangeForCategory(barIndex, categIndex));
287
+ const arrayX = arrayXRange.map((xRange) => xRange.min);
288
+ const arrayY = barChart.bars.map((bar) => bar.data[categIndex]);
289
+ const categ = barChart.categories[categIndex];
290
+ const style = categ.style;
291
+ const B = `B_${categIndex}`;
292
+ const barChartCommand = [
293
+ `${B} = BarChart({${arrayX.join(",")}}, {${arrayY.join(",")}}, ${xMax / ((2 * nbTotalBar + 2) * (nbTotalCateg + 1))})`,
294
+ `ShowLabel(${B},false)`,
295
+ style.type === "color"
296
+ ? `SetColor(${B}, "${barChart.categories[categIndex].style.color}")`
297
+ : `SetDecoration(${B}, ${barChart.categories[categIndex].style.fill})`,
298
+ ];
299
+ return barChartCommand;
300
+ }
301
+ const commands = [
302
+ //offsetted barCharts
303
+ ...barChart.categories.flatMap((_, categIndex) => createBarChartCommandsForCategory(barChart, categIndex)),
304
+ //bar labels
305
+ ...barChart.bars.map((bar, barIndex) => `Text("\\footnotesize ${bar.props.label}", (${(xMax * (2 * barIndex + 1)) / (2 * nbTotalBar + 2)}, ${-yMax / 500}), true, true, 0, -1)`),
306
+ ];
307
+ const ggb = new GeogebraConstructor({
308
+ commands,
309
+ gridDistance: [xMax, yMax],
310
+ fontSize: 16,
311
+ lockedAxesRatio: 4 / 3,
312
+ xAxis: {
313
+ hideNumbers: true,
314
+ steps: 10 * xMax,
315
+ showPositive: true,
316
+ label: barChart.axisLabels[0],
317
+ },
318
+ yAxis: {
319
+ showPositive: true,
320
+ label: barChart.axisLabels[1],
321
+ // steps: 100,
322
+ },
323
+ });
324
+ return ggb.getOptions({
325
+ coords: ggb.getAdaptedCoords({
326
+ xMin: 0,
327
+ xMax: xMax,
328
+ yMin: 0,
329
+ yMax: yMax,
330
+ }),
331
+ });
332
+ };
333
+ const getGGBOptionsVertStacked = (identifiers) => {
334
+ const { barChart } = identifiers;
335
+ const nbTotalBar = barChart.bars.length;
336
+ const arrayOfBarHeights = barChart.bars.map((bar) => bar.data.reduce((acc, data) => acc + data, 0));
337
+ const yMax = Math.max(...arrayOfBarHeights);
338
+ const xMax = 3.0 * yMax;
339
+ const xPadding = 0.1 * xMax;
340
+ const xMargin = xPadding;
341
+ const barWidth = (xMax - 2 * xMargin - (nbTotalBar - 1) * xPadding) / nbTotalBar;
342
+ function getXRangeForBarIndex(barIndex) {
343
+ const xMin = xMargin + barIndex * (xPadding + barWidth);
344
+ return {
345
+ min: xMin,
346
+ max: xMin + barWidth,
347
+ };
348
+ }
349
+ function getYRangeForCategory(barIndex, categIndex) {
350
+ const slice = barChart.bars[barIndex].data.slice(0, categIndex);
351
+ const yMinForCateg = slice.reduce((acc, data) => acc + data, 0);
352
+ const yMaxForCateg = yMinForCateg + barChart.bars[barIndex].data[categIndex];
353
+ return {
354
+ min: yMinForCateg,
355
+ max: yMaxForCateg,
356
+ };
357
+ }
358
+ function createCommandsForBar(barChart, barIndex) {
359
+ //const bar = barChart.bars[barIndex];
360
+ const commands = barChart.categories.flatMap((categ, categIndex) => {
361
+ const xRange = getXRangeForBarIndex(barIndex);
362
+ const yRange = getYRangeForCategory(barIndex, categIndex);
363
+ const style = categ.style;
364
+ const B = `B_{${barIndex}${categIndex}}`;
365
+ const barChartCommand = [
366
+ `${B} = Polygon((${xRange.min}, ${yRange.min}), (${xRange.min}, ${yRange.max}),(${xRange.max}, ${yRange.max}),(${xRange.max}, ${yRange.min}))`,
367
+ `ShowLabel(${B},false)`,
368
+ style.type === "color"
369
+ ? `SetColor(${B}, "${barChart.categories[categIndex].style.color}")`
370
+ : `SetDecoration(${B}, ${barChart.categories[categIndex].style.fill})`,
371
+ ];
372
+ return barChartCommand;
373
+ });
374
+ return commands;
375
+ }
376
+ const commands = [
377
+ //stacked bars
378
+ ...barChart.bars.flatMap((_, barIndex) => createCommandsForBar(barChart, barIndex)),
379
+ //bar labels
380
+ ...barChart.bars.map((bar, barIndex) => `Text("\\footnotesize ${bar.props.label}", (${getXRangeForBarIndex(barIndex).min}, ${-yMax / 500}), true, true, 0, -1)`),
381
+ ];
382
+ const ggb = new GeogebraConstructor({
383
+ commands,
384
+ gridDistance: [xMax, yMax],
385
+ fontSize: 16,
386
+ lockedAxesRatio: 4 / 3,
387
+ xAxis: {
388
+ hideNumbers: true,
389
+ steps: 10 * xMax,
390
+ showPositive: true,
391
+ label: barChart.axisLabels[0],
392
+ },
393
+ yAxis: {
394
+ showPositive: true,
395
+ label: barChart.axisLabels[1],
396
+ // steps: 100,
397
+ },
398
+ });
399
+ return ggb.getOptions({
400
+ coords: ggb.getAdaptedCoords({
401
+ xMin: 0,
402
+ xMax: xMax,
403
+ yMin: 0,
404
+ yMax: yMax,
405
+ }),
406
+ });
407
+ };
408
+ const getGGBOptions = (identifiers, opts) => {
409
+ const { displayType } = identifiers;
410
+ switch (displayType) {
411
+ case "empilements":
412
+ return getGGBOptionsVertStacked(identifiers, opts);
413
+ default:
414
+ case "faisceaux":
415
+ return getGGBOptionsHorizMulti(identifiers, opts);
416
+ }
417
+ };
418
+ const getBarChartInterpretingQuestion = (optsIn) => {
419
+ console.log("optsIn", optsIn);
420
+ const arrayedOptions = optsIn ?? optsDefault;
421
+ const opts = {
422
+ displayType: random(arrayedOptions.displayType),
423
+ };
424
+ const styleType = "color";
425
+ const displayType = opts.displayType;
426
+ let nbBars;
427
+ let nbCateg;
428
+ switch (displayType) {
429
+ case "empilements":
430
+ {
431
+ nbBars = 5;
432
+ nbCateg = 3;
433
+ }
434
+ break;
435
+ default:
436
+ case "faisceaux":
437
+ {
438
+ nbBars = 3;
439
+ nbCateg = 3;
440
+ }
441
+ break;
442
+ }
443
+ const barChartSkeleton = random(arrayOfBarChartSkeleton);
444
+ const barChart = BarChartConstructor.randomFromSkeleton(barChartSkeleton, nbBars, nbCateg, styleType);
445
+ const itemAsked = random([
446
+ // {
447
+ // type: "xForCategory",
448
+ // isLess: coinFlip(),
449
+ // ordinal: probaLawFlip([
450
+ // [0, 0.7],
451
+ // [1, 0.3],
452
+ // ]),
453
+ // index: randint(0, nbCateg),
454
+ // },
455
+ {
456
+ type: "categoryForX",
457
+ isLess: coinFlip(),
458
+ ordinal: probaLawFlip([
459
+ [0, 0.7],
460
+ [1, 0.3],
461
+ ]),
462
+ index: randint(0, nbBars),
463
+ },
464
+ ]);
465
+ function questionStrForItemAsked(itemAsked) {
466
+ switch (itemAsked.type) {
467
+ case "xForCategory":
468
+ return barChartSkeleton.questionXForCategFunc(barChart.categories[itemAsked.index].props.name, itemAsked.isLess, itemAsked.ordinal);
469
+ case "categoryForX":
470
+ return barChartSkeleton.questionCategForXFunc(barChart.bars[itemAsked.index].props.label, itemAsked.isLess, itemAsked.ordinal);
471
+ }
472
+ }
473
+ const questionStr = questionStrForItemAsked(itemAsked);
474
+ function answerStrForItemAsked(itemAsked) {
475
+ switch (itemAsked.type) {
476
+ case "xForCategory":
477
+ return barChartSkeleton.answerXForCategFunc(barChart.categories[itemAsked.index].props.name, itemAsked.isLess, itemAsked.ordinal);
478
+ case "categoryForX":
479
+ return barChartSkeleton.answerCategForXFunc(barChart.bars[itemAsked.index].props.label, itemAsked.isLess, itemAsked.ordinal);
480
+ }
481
+ }
482
+ const answerStr = answerStrForItemAsked(itemAsked);
483
+ return getQuestionFromIdentifiers({
484
+ barChart,
485
+ itemAsked,
486
+ questionStr,
487
+ answerStr,
488
+ displayType,
489
+ }, opts);
490
+ };
491
+ const getQuestionFromIdentifiers = (identifiers, opts) => {
492
+ const question = {
493
+ answer: getAnswer(identifiers),
494
+ instruction: getInstruction(identifiers),
495
+ keys: [],
496
+ answerFormat: "tex",
497
+ identifiers,
498
+ hint: getHint(identifiers),
499
+ correction: getCorrection(identifiers),
500
+ ggbOptions: getGGBOptions(identifiers),
501
+ options: opts,
502
+ };
503
+ return question;
504
+ };
505
+ const optsDefault = {
506
+ displayType: ["faisceaux", "empilements"],
507
+ };
508
+ const options = [
509
+ {
510
+ id: "displayType",
511
+ label: "Type de diagramme",
512
+ target: GeneratorOptionTarget.generation,
513
+ type: GeneratorOptionType.multiselect,
514
+ values: ["faisceaux", "empilements"],
515
+ defaultValue: optsDefault.displayType,
516
+ },
517
+ ];
518
+ export const barChartInterpreting = {
519
+ id: "barChartInterpreting",
520
+ label: "Interpréter un diagramme en bâtons",
521
+ isSingleStep: true,
522
+ generator: (nb, opts) => getDistinctQuestions(() => getBarChartInterpretingQuestion(opts), nb),
523
+ options,
524
+ qcmTimer: 60,
525
+ freeTimer: 60,
526
+ getPropositions,
527
+ hasHintAndCorrection: true,
528
+ subject: "Mathématiques",
529
+ getQuestionFromIdentifiers,
530
+ hasGeogebra: true,
531
+ answerType: "QCM",
532
+ isQCM: true,
533
+ };
@@ -0,0 +1,7 @@
1
+ import { Exercise } from "../../../exercises/exercise.js";
2
+ type Identifiers = {
3
+ quartiles: number[];
4
+ };
5
+ export declare const boxPlotInterpreting: Exercise<Identifiers>;
6
+ export {};
7
+ //# sourceMappingURL=boxPlotInterpreting.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"boxPlotInterpreting.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/dataRepresentations/boxPlotInterpreting.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,6BAA6B,CAAC;AAYrC,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB,CAAC;AAgRF,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,WAAW,CAmBrD,CAAC"}