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,402 @@
1
+ import { addValidProp, shuffleProps, tryToAddWrongProp, GeneratorOptionTarget, GeneratorOptionType, } from "../../../../exercises/exercise.js";
2
+ import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
3
+ import { GeogebraConstructor } from "../../../../geogebra/geogebraConstructor.js";
4
+ import { Angle } from "../../../../math/geometry/angle.js";
5
+ import { Line, LineConstructor, } from "../../../../math/geometry/line.js";
6
+ import { Point, PointConstructor, } from "../../../../math/geometry/point.js";
7
+ import { Vector } from "../../../../math/geometry/vector.js";
8
+ import { randfloat } from "../../../../math/utils/random/randfloat.js";
9
+ import { round } from "../../../../math/utils/round.js";
10
+ import { PiNode } from "../../../../tree/nodes/numbers/piNode.js";
11
+ import { add } from "../../../../tree/nodes/operators/addNode.js";
12
+ import { multiply } from "../../../../tree/nodes/operators/multiplyNode.js";
13
+ import { substract } from "../../../../tree/nodes/operators/substractNode.js";
14
+ import { coinFlip } from "../../../../utils/alea/coinFlip.js";
15
+ import { random } from "../../../../utils/alea/random.js";
16
+ const createVector = (from, to, name, precision = 5) => {
17
+ return new Vector(name, round(substract(to.x, from.x).evaluate(), precision).toTree(), round(substract(to.y, from.y).evaluate(), precision).toTree());
18
+ };
19
+ const createPoint = (x, y, name, precision = 5) => {
20
+ return new Point(name, round(x, precision), round(y, precision));
21
+ };
22
+ const midPoint = (pointA, pointB, name, precision = 2) => {
23
+ return createPoint(multiply(add(pointA.x, pointB.x), 0.5).evaluate(), multiply(add(pointA.y, pointB.y), 0.5).evaluate(), name, precision);
24
+ };
25
+ const degreesToRadians = (angleInDegrees, precision) => {
26
+ const oneOver180 = 0.00555555555555555;
27
+ return round(multiply(multiply(angleInDegrees, PiNode), oneOver180).evaluate(), precision);
28
+ };
29
+ const rotatePoint = (target, angle, center, name, precision = 2) => {
30
+ const vSrc = createVector(center, target, "vSrc", precision);
31
+ const vRotated = vSrc.rotate(angle, "vRotated");
32
+ return createPoint(add(center.x, vRotated.x).evaluate(), add(center.y, vRotated.y).evaluate(), name, precision);
33
+ };
34
+ const buildLines = (cAngleInDegreesTop, cAngleInDegreesBottom) => {
35
+ //we build the quasiparallels using corresponding angles
36
+ /*
37
+ cAngleTop/
38
+ topLine------------------------
39
+ /
40
+ /
41
+ cAngleBottom/
42
+ bottomLine----------------------
43
+ /
44
+ */
45
+ const precision = 5;
46
+ const [cAngleTop, cAngleBottom] = [
47
+ cAngleInDegreesTop,
48
+ cAngleInDegreesBottom,
49
+ ].map((angleInDegrees) => degreesToRadians(angleInDegrees, precision));
50
+ //build top line
51
+ const heightAvgTopLine = 2;
52
+ const lineTop = new Line(new Point("A", (-4 + randfloat(-1, 1, 1)).toTree(), (heightAvgTopLine + randfloat(-1, 1, 1)).toTree()), new Point("B", (4 + randfloat(-1, 1, 1)).toTree(), (heightAvgTopLine + randfloat(-1, 1, 1)).toTree()), "d_1");
53
+ //build secant line
54
+ const pointSTop = midPoint(lineTop.pointA, lineTop.pointB, "C", 5);
55
+ const lineSecant = new Line(pointSTop, rotatePoint(lineTop.pointA, PiNode.value - cAngleTop, pointSTop, "D", 5), "s");
56
+ //build bottom line
57
+ const lineBottom = new Line(lineSecant.pointB, rotatePoint(lineSecant.pointA, cAngleBottom, lineSecant.pointB, "E", 5), "d_2");
58
+ return {
59
+ lineTop,
60
+ lineSecant,
61
+ lineBottom,
62
+ };
63
+ };
64
+ class IntersectionConstructor {
65
+ static fromBaselines(pointName, lineHBase, lineVBase) {
66
+ const center = lineHBase.intersect(lineVBase, pointName);
67
+ const lineH = Intersection.createLineBothSideOfPoint(lineHBase, center, lineVBase, "x");
68
+ const lineV = Intersection.createLineBothSideOfPoint(lineVBase, center, lineHBase, "y");
69
+ return new Intersection(center, lineH, lineV);
70
+ }
71
+ static fromIdentifiers(intersectionIds) {
72
+ const center = PointConstructor.fromIdentifiers(intersectionIds.center);
73
+ const lineH = LineConstructor.fromIdentifiers(intersectionIds.lineH);
74
+ const lineV = LineConstructor.fromIdentifiers(intersectionIds.lineV);
75
+ return new Intersection(center, lineH, lineV);
76
+ }
77
+ static byRotatingIntersection(intersectionSrc, rotationCenter, rotationAngle, precision = 5) {
78
+ const arrPointSrc = [
79
+ intersectionSrc.center,
80
+ intersectionSrc.lineH.pointA,
81
+ intersectionSrc.lineH.pointB,
82
+ intersectionSrc.lineV.pointA,
83
+ intersectionSrc.lineV.pointB,
84
+ ];
85
+ const arrPointRotated = arrPointSrc.map((p) => {
86
+ return rotatePoint(p, rotationAngle, rotationCenter, p.name, precision);
87
+ });
88
+ return new Intersection(arrPointRotated[0], new Line(arrPointRotated[1], arrPointRotated[2], intersectionSrc.lineH.name), new Line(arrPointRotated[3], arrPointRotated[4], intersectionSrc.lineV.name));
89
+ }
90
+ }
91
+ class Intersection {
92
+ center;
93
+ lineH;
94
+ lineV;
95
+ constructor(center, lineH, lineV) {
96
+ this.center = center;
97
+ this.lineH = lineH;
98
+ this.lineV = lineV;
99
+ }
100
+ static createLineBothSideOfPoint(lineBase, pointCenter, lineIntersector, wrtAxis) {
101
+ switch (wrtAxis) {
102
+ case "x":
103
+ return new Line(lineBase.intersect(lineIntersector.translate(-1, 0), pointCenter.name + "_xm"), lineBase.intersect(lineIntersector.translate(+1, 0), pointCenter.name + "_xM"), lineBase.name);
104
+ case "y":
105
+ return new Line(lineBase.intersect(lineIntersector.translate(0, -1), pointCenter.name + "_ym"), lineBase.intersect(lineIntersector.translate(0, +1), pointCenter.name + "_yM"), lineBase.name);
106
+ }
107
+ }
108
+ getAngle(angleIndex) {
109
+ /*
110
+ lineV.pointB
111
+ 0 | 1
112
+ lineH.pointA--center--lineH.pointB
113
+ 3 | 2
114
+ lineV.pointA
115
+ */
116
+ switch ((angleIndex % 4)) {
117
+ case 0:
118
+ return new Angle([this.lineH.pointA, this.center, this.lineV.pointB]);
119
+ case 1:
120
+ return new Angle([this.lineV.pointB, this.center, this.lineH.pointB]);
121
+ case 2:
122
+ return new Angle([this.lineH.pointB, this.center, this.lineV.pointA]);
123
+ case 3:
124
+ return new Angle([this.lineV.pointA, this.center, this.lineH.pointA]);
125
+ }
126
+ }
127
+ toIdentifiers() {
128
+ return {
129
+ center: this.center.toIdentifiers(),
130
+ lineH: this.lineH.toIdentifiers(),
131
+ lineV: this.lineV.toIdentifiers(),
132
+ };
133
+ }
134
+ }
135
+ const getPropositions = (n, { answer }) => {
136
+ const propositions = [];
137
+ addValidProp(propositions, answer, "raw");
138
+ tryToAddWrongProp(propositions, "Oui", "raw");
139
+ tryToAddWrongProp(propositions, "Non", "raw");
140
+ tryToAddWrongProp(propositions, "On ne peut pas savoir", "raw");
141
+ return shuffleProps(propositions, n);
142
+ };
143
+ const getAnswer = (identifiers) => {
144
+ return identifiers.isParralel ? "Oui" : "Non";
145
+ };
146
+ const getInstruction = () => {
147
+ return `Les droites $d_{1}$ et $d_{2}$ sont-elles parallèles ?`;
148
+ };
149
+ const getHint = () => {
150
+ return `Trouve la relation entre les deux angles et déduis-en, en fonction de leurs valeurs, si les droites sont parallèles ou non.`;
151
+ };
152
+ const getCorrection = (identifiers) => {
153
+ const { isParralel, angleType } = identifiers;
154
+ if (angleType !== "autres") {
155
+ return `Les deux angles sont ${(() => {
156
+ switch (angleType) {
157
+ case "alternes-internes":
158
+ return `alternes-internes`;
159
+ case "correspondants":
160
+ return `correspondants`;
161
+ break;
162
+ case "alternes-externes":
163
+ return `alternes-externes.`;
164
+ }
165
+ })()}.
166
+ ${isParralel
167
+ ? "Ils ont la même mesure donc les deux droites sont parallèles."
168
+ : "Ils n'ont pas la même mesure donc les deux droites ne sont pas parallèles."}
169
+ `;
170
+ }
171
+ else {
172
+ return `On calcule les mesures de deux angles correspondants à partir des angles donnés.
173
+ ${isParralel
174
+ ? "Ils ont la même mesure donc les deux droites sont parallèles."
175
+ : "Ils n'ont pas la même mesure donc les deux droites ne sont pas parallèles."}
176
+ `;
177
+ }
178
+ };
179
+ const getGGBOptions = (identifiers, opts) => {
180
+ const { arrIntersectionIds, arrAngleIndex, arrAngleForLabel } = identifiers;
181
+ const nbDigits = opts?.nbDigits ?? 1;
182
+ const arrIntersection = arrIntersectionIds.map(IntersectionConstructor.fromIdentifiers);
183
+ const arrAngle = arrAngleIndex.map((angleIndex, i) => arrIntersection[i].getAngle(angleIndex));
184
+ const arrCommandPoints = arrAngle
185
+ .flatMap((a) => a.points)
186
+ .flatMap((p) => [
187
+ ...p.toGGBCommand({
188
+ isFixed: true,
189
+ showLabel: false,
190
+ showUnderlyingPoints: false,
191
+ showUnderlyingPointsLabel: false,
192
+ }),
193
+ //hide points
194
+ `SetVisibleInView(${p.name}, 1, false)`,
195
+ ]);
196
+ const arrCommandLines = [
197
+ arrIntersectionIds[0].lineH, //top
198
+ arrIntersectionIds[1].lineH, //bottom
199
+ arrIntersectionIds[0].lineV, //secant
200
+ ]
201
+ .map((lIds) => LineConstructor.fromIdentifiers(lIds))
202
+ .flatMap((l, i) => l.toGGBCommands(false, {
203
+ color: "black",
204
+ showLabel: i < 2,
205
+ }));
206
+ const arrCommandAngles = arrAngle
207
+ .map((angle, i) => {
208
+ angle.name = `angle_${i}`;
209
+ return angle;
210
+ })
211
+ .flatMap((a, i) => [
212
+ ...a.toCommands({
213
+ pointsAreNotBuilt: false,
214
+ color: ["red", "blue"][i],
215
+ showValue: false,
216
+ }),
217
+ //fake or real label
218
+ `ShowLabel(${a.name}, false)`,
219
+ ...a.getFitCaptionCommands({
220
+ text: round(arrAngleForLabel ? arrAngleForLabel[i] : a.evaluate(), nbDigits).frenchify(),
221
+ size: "small",
222
+ color: ["red", "blue"][i],
223
+ }),
224
+ ]);
225
+ const ggb = new GeogebraConstructor({
226
+ commands: [...arrCommandPoints, ...arrCommandLines, ...arrCommandAngles],
227
+ hideAxes: true,
228
+ hideGrid: true,
229
+ forbidShiftDragZoom: true,
230
+ });
231
+ return ggb.getOptions({
232
+ coords: [-5, 5, -5, 5],
233
+ });
234
+ };
235
+ const getKeys = () => {
236
+ return [];
237
+ };
238
+ const isAnswerValid = (ans, { answer }) => {
239
+ return ans === answer;
240
+ };
241
+ const optsDefault = {
242
+ angleTypes: ["alternes-internes"],
243
+ isFakeDisplay: true,
244
+ nbDigits: 0,
245
+ };
246
+ const options = [
247
+ {
248
+ id: "angleTypes",
249
+ label: "Type d'angles",
250
+ target: GeneratorOptionTarget.generation,
251
+ type: GeneratorOptionType.multiselect,
252
+ values: [
253
+ "alternes-internes",
254
+ "correspondants",
255
+ "alternes-externes",
256
+ "autres",
257
+ ],
258
+ defaultValue: optsDefault.angleTypes,
259
+ },
260
+ {
261
+ id: "isFakeDisplay",
262
+ label: "Affichage trompeur",
263
+ target: GeneratorOptionTarget.generation,
264
+ type: GeneratorOptionType.checkbox,
265
+ defaultValue: optsDefault.isFakeDisplay,
266
+ },
267
+ {
268
+ id: "nbDigits",
269
+ label: "Nombre de décimales",
270
+ target: GeneratorOptionTarget.generation,
271
+ type: GeneratorOptionType.select,
272
+ values: [0, 1, 2],
273
+ defaultValue: optsDefault.nbDigits,
274
+ },
275
+ ];
276
+ const getIsParallelUsingAnglesQuestion = (optsIn) => {
277
+ const isParralel = coinFlip();
278
+ const opts = optsIn ?? optsDefault;
279
+ //---create intersections---
280
+ //this config will be used to create ggb lines
281
+ function createConfigGeom(isParralelInGeom, isLookingParallel) {
282
+ const deviation = isLookingParallel ? 1 : 5;
283
+ const cAngleInDegreesMin = 30;
284
+ const cAngleInDegreesTop = randfloat(cAngleInDegreesMin, 180 - cAngleInDegreesMin, opts.nbDigits);
285
+ const cAngleInDegreesBottom = isParralelInGeom
286
+ ? cAngleInDegreesTop
287
+ : cAngleInDegreesTop +
288
+ randfloat(-deviation, deviation, opts.nbDigits, [0]);
289
+ return {
290
+ cAngleInDegreesTop,
291
+ cAngleInDegreesBottom,
292
+ };
293
+ }
294
+ const configGeom = createConfigGeom(opts.isFakeDisplay ? coinFlip() : isParralel, opts.isFakeDisplay ? coinFlip() : isParralel);
295
+ const dictLine = buildLines(configGeom.cAngleInDegreesTop, configGeom.cAngleInDegreesBottom);
296
+ const arrIntersectionRaw = [
297
+ //intersection: top
298
+ IntersectionConstructor.fromBaselines("I", dictLine.lineTop, dictLine.lineSecant),
299
+ //intersection: bottom
300
+ IntersectionConstructor.fromBaselines("J", dictLine.lineBottom, dictLine.lineSecant),
301
+ ];
302
+ //rotate randomly around center
303
+ const rotationCenter = midPoint(arrIntersectionRaw[0].center, arrIntersectionRaw[1].center, "K", 5);
304
+ const rotationAngle = randfloat(-PiNode.value, PiNode.value);
305
+ const arrIntersection = arrIntersectionRaw.map((intersection) => IntersectionConstructor.byRotatingIntersection(intersection, rotationCenter, rotationAngle));
306
+ //---create angles---
307
+ const angleType = random(opts.angleTypes);
308
+ function randomArrAngleIndex(angleType) {
309
+ /*
310
+ 0 | 1
311
+ -----
312
+ 3 | 2
313
+ |
314
+ 0 | 1
315
+ -----
316
+ 3 | 2
317
+ */
318
+ switch (angleType) {
319
+ case "alternes-internes":
320
+ return random([
321
+ [2, 0],
322
+ [3, 1],
323
+ ]);
324
+ case "correspondants":
325
+ return random([
326
+ [0, 0],
327
+ [1, 1],
328
+ [2, 2],
329
+ [3, 3],
330
+ ]);
331
+ case "alternes-externes":
332
+ return random([
333
+ [0, 2],
334
+ [1, 3],
335
+ ]);
336
+ case "autres":
337
+ return random([
338
+ [0, 1],
339
+ [0, 3],
340
+ [1, 2],
341
+ [1, 0],
342
+ [2, 1],
343
+ [2, 3],
344
+ [3, 0],
345
+ [3, 2],
346
+ ]);
347
+ }
348
+ }
349
+ const arrAngleIndex = randomArrAngleIndex(angleType);
350
+ //this is the fake display part:
351
+ let arrAngleForLabel;
352
+ if (opts.isFakeDisplay) {
353
+ const angleInDegreesMin = 25;
354
+ const cAngleInDegreesTop = randfloat(angleInDegreesMin, 180 - angleInDegreesMin, opts.nbDigits);
355
+ const cAngleInDegreesBottom = isParralel
356
+ ? cAngleInDegreesTop
357
+ : cAngleInDegreesTop + randfloat(-25, 50, opts.nbDigits, [0]);
358
+ //angles at angleIndexes 0 and 2 have same value. Same for angleIndexes 1 and 3.
359
+ arrAngleForLabel = [cAngleInDegreesTop, cAngleInDegreesBottom].map((angle, i) => {
360
+ return arrAngleIndex[i] % 2 == 0 ? angle : 180 - angle;
361
+ });
362
+ }
363
+ const identifiers = {
364
+ isParralel,
365
+ arrIntersectionIds: arrIntersection.map((intersection) => intersection.toIdentifiers()),
366
+ angleType,
367
+ arrAngleIndex,
368
+ arrAngleForLabel,
369
+ };
370
+ return getQuestionFromIdentifiers(identifiers, opts);
371
+ };
372
+ const getQuestionFromIdentifiers = (identifiers, opts) => {
373
+ const question = {
374
+ answer: getAnswer(identifiers),
375
+ instruction: getInstruction(identifiers),
376
+ keys: getKeys(identifiers),
377
+ answerFormat: "tex",
378
+ identifiers,
379
+ hint: getHint(identifiers),
380
+ correction: getCorrection(identifiers),
381
+ ggbOptions: getGGBOptions(identifiers, opts),
382
+ };
383
+ return question;
384
+ };
385
+ export const isParallelUsingAngles = {
386
+ id: "isParallelUsingAngles",
387
+ label: "Déterminer si deux droites sont parallèles en utilisant des angles issus d'une sécante",
388
+ isSingleStep: true,
389
+ generator: (nb, opts) => getDistinctQuestions(() => getIsParallelUsingAnglesQuestion(opts), nb),
390
+ options,
391
+ qcmTimer: 60,
392
+ freeTimer: 60,
393
+ getPropositions,
394
+ isAnswerValid,
395
+ subject: "Mathématiques",
396
+ getHint,
397
+ getCorrection,
398
+ hasHintAndCorrection: true,
399
+ answerType: "QCU",
400
+ getQuestionFromIdentifiers,
401
+ hasGeogebra: true,
402
+ };
@@ -1,13 +1,16 @@
1
1
  import { Exercise } from "../../../../exercises/exercise.js";
2
2
  import { NumberType } from "../../../../math/numbers/nombre.js";
3
+ import { NodeIdentifiers } from "../../../../tree/nodes/nodeConstructor.js";
3
4
  type Identifiers = {
4
5
  abscissType: NumberType;
5
- axisUnit: number;
6
- oneUnitTex: string;
7
- absciss: number;
8
- abscissTex: string;
9
- coeff: number;
6
+ axisUnit: NodeIdentifiers;
7
+ absciss1: NodeIdentifiers;
8
+ absciss2: NodeIdentifiers;
10
9
  };
11
- export declare const placeAbscissOnSemiLine: Exercise<Identifiers>;
10
+ type Options = {
11
+ questionType: "standard" | "éviter le comptage";
12
+ numberType: "Entiers" | "Rationnels" | "Décimaux";
13
+ };
14
+ export declare const placeAbscissOnSemiLine: Exercise<Identifiers, Options>;
12
15
  export {};
13
16
  //# sourceMappingURL=placeAbscissOnSemiLine.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"placeAbscissOnSemiLine.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/cartesian/placeAbscissOnSemiLine.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,6BAA6B,CAAC;AAOrC,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAQ1D,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,UAAU,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AA0IF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,CAWxD,CAAC"}
1
+ {"version":3,"file":"placeAbscissOnSemiLine.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/cartesian/placeAbscissOnSemiLine.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAWT,MAAM,6BAA6B,CAAC;AAQrC,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAK1D,OAAO,EAEL,eAAe,EAChB,MAAM,qCAAqC,CAAC;AAK7C,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,UAAU,CAAC;IACxB,QAAQ,EAAE,eAAe,CAAC;IAC1B,QAAQ,EAAE,eAAe,CAAC;IAC1B,QAAQ,EAAE,eAAe,CAAC;CAC3B,CAAC;AAkOF,KAAK,OAAO,GAAG;IACb,YAAY,EAAE,UAAU,GAAG,oBAAoB,CAAC;IAChD,UAAU,EAAE,SAAS,GAAG,YAAY,GAAG,UAAU,CAAC;CACnD,CAAC;AA6BF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAYjE,CAAC"}