math-exercises 2.2.9 → 2.2.11

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 (293) hide show
  1. package/lib/exercises/exercise.d.ts +2 -1
  2. package/lib/exercises/exercise.d.ts.map +1 -1
  3. package/lib/exercises/math/calcul/arithmetics/commonDivisorsList.d.ts.map +1 -1
  4. package/lib/exercises/math/calcul/arithmetics/commonDivisorsList.js +24 -7
  5. package/lib/exercises/math/calcul/decimals/index.d.ts +3 -0
  6. package/lib/exercises/math/calcul/decimals/index.d.ts.map +1 -0
  7. package/lib/exercises/math/calcul/decimals/index.js +18 -0
  8. package/lib/exercises/math/calcul/decimals/multiplyDecimalByNegativeTens.d.ts +8 -0
  9. package/lib/exercises/math/calcul/decimals/multiplyDecimalByNegativeTens.d.ts.map +1 -0
  10. package/lib/exercises/math/calcul/decimals/multiplyDecimalByNegativeTens.js +53 -0
  11. package/lib/exercises/math/calcul/decimals/multiplyDecimalByTens.d.ts +9 -0
  12. package/lib/exercises/math/calcul/decimals/multiplyDecimalByTens.d.ts.map +1 -0
  13. package/lib/exercises/math/calcul/decimals/multiplyDecimalByTens.js +63 -0
  14. package/lib/exercises/math/calcul/fractions/fractionsSumsSameDenominators.d.ts.map +1 -1
  15. package/lib/exercises/math/calcul/fractions/fractionsSumsSameDenominators.js +33 -1
  16. package/lib/exercises/math/calcul/index.d.ts +2 -0
  17. package/lib/exercises/math/calcul/index.d.ts.map +1 -1
  18. package/lib/exercises/math/calcul/index.js +2 -0
  19. package/lib/exercises/math/calcul/operations/expressionNature.d.ts +8 -0
  20. package/lib/exercises/math/calcul/operations/expressionNature.d.ts.map +1 -1
  21. package/lib/exercises/math/calcul/operations/expressionNature.js +180 -80
  22. package/lib/exercises/math/calcul/operations/index.d.ts +3 -0
  23. package/lib/exercises/math/calcul/operations/index.d.ts.map +1 -1
  24. package/lib/exercises/math/calcul/operations/index.js +3 -0
  25. package/lib/exercises/math/calcul/operations/operationsPriorities.d.ts +1 -1
  26. package/lib/exercises/math/calcul/operations/operationsPriorities.d.ts.map +1 -1
  27. package/lib/exercises/math/calcul/operations/operationsPriorities.js +20 -5
  28. package/lib/exercises/math/calcul/operations/operationsPrioritiesParenthesis.d.ts +8 -0
  29. package/lib/exercises/math/calcul/operations/operationsPrioritiesParenthesis.d.ts.map +1 -0
  30. package/lib/exercises/math/calcul/operations/operationsPrioritiesParenthesis.js +111 -0
  31. package/lib/exercises/math/calcul/operations/operationsPrioritiesParenthesisNoRelatives.d.ts +8 -0
  32. package/lib/exercises/math/calcul/operations/operationsPrioritiesParenthesisNoRelatives.d.ts.map +1 -0
  33. package/lib/exercises/math/calcul/operations/operationsPrioritiesParenthesisNoRelatives.js +127 -0
  34. package/lib/exercises/math/calcul/operations/operationsPrioritiesWithoutRelative.d.ts.map +1 -1
  35. package/lib/exercises/math/calcul/operations/operationsPrioritiesWithoutRelative.js +18 -1
  36. package/lib/exercises/math/calcul/ordering/decimalOrdering.d.ts +9 -0
  37. package/lib/exercises/math/calcul/ordering/decimalOrdering.d.ts.map +1 -0
  38. package/lib/exercises/math/calcul/ordering/decimalOrdering.js +77 -0
  39. package/lib/exercises/math/calcul/ordering/framing.d.ts +10 -0
  40. package/lib/exercises/math/calcul/ordering/framing.d.ts.map +1 -0
  41. package/lib/exercises/math/calcul/ordering/framing.js +143 -0
  42. package/lib/exercises/math/calcul/ordering/index.d.ts +4 -0
  43. package/lib/exercises/math/calcul/ordering/index.d.ts.map +1 -0
  44. package/lib/exercises/math/calcul/ordering/index.js +19 -0
  45. package/lib/exercises/math/calcul/ordering/integerOrdering.d.ts +8 -0
  46. package/lib/exercises/math/calcul/ordering/integerOrdering.d.ts.map +1 -0
  47. package/lib/exercises/math/calcul/ordering/integerOrdering.js +61 -0
  48. package/lib/exercises/math/calculLitteral/distributivity/doubleDistributivity.d.ts.map +1 -1
  49. package/lib/exercises/math/calculLitteral/distributivity/firstIdentity.d.ts.map +1 -1
  50. package/lib/exercises/math/calculLitteral/distributivity/secondIdentity.d.ts.map +1 -1
  51. package/lib/exercises/math/calculLitteral/distributivity/simpleDistributivity.d.ts.map +1 -1
  52. package/lib/exercises/math/calculLitteral/distributivity/thirdIdentity.d.ts.map +1 -1
  53. package/lib/exercises/math/calculLitteral/equation/equationType2Exercise.d.ts.map +1 -1
  54. package/lib/exercises/math/calculLitteral/equation/equationType4Exercise.d.ts.map +1 -1
  55. package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq1.d.ts.map +1 -1
  56. package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq2.d.ts.map +1 -1
  57. package/lib/exercises/math/derivation/derivative/convexityQuadrinomials.d.ts.map +1 -1
  58. package/lib/exercises/math/derivation/derivative/powerFunctionDerivative.js +1 -1
  59. package/lib/exercises/math/functions/affines/leadingCoeffAndOriginOrdinate.js +1 -1
  60. package/lib/exercises/math/functions/basics/graphicInequation.d.ts.map +1 -1
  61. package/lib/exercises/math/functions/basics/graphicInequation.js +9 -6
  62. package/lib/exercises/math/functions/basics/twoFunctionsInequation.d.ts.map +1 -1
  63. package/lib/exercises/math/functions/basics/twoFunctionsInequation.js +15 -4
  64. package/lib/exercises/math/functions/trinoms/canonicalFromDevForm.d.ts.map +1 -1
  65. package/lib/exercises/math/geometry/cartesian/directionVector.d.ts.map +1 -1
  66. package/lib/exercises/math/geometry/cartesian/directionVectorEquation.d.ts.map +1 -1
  67. package/lib/exercises/math/geometry/cartesian/placeAPoint.d.ts.map +1 -1
  68. package/lib/exercises/math/geometry/cartesian/placeAPoint.js +0 -4
  69. package/lib/exercises/math/geometry/vectors/equalCaracteristicFromGraph.d.ts.map +1 -1
  70. package/lib/exercises/math/geometry/vectors/equalCaracteristicFromGraph.js +2 -3
  71. package/lib/exercises/math/geometry/vectors/vectorCoordinatesFromTwoPoints.d.ts.map +1 -1
  72. package/lib/exercises/math/geometry/vectors/vectorCoordinatesFromTwoPoints.js +17 -0
  73. package/lib/exercises/math/geometry/volumes/volumeOfCube.d.ts.map +1 -1
  74. package/lib/exercises/math/geometry/volumes/volumeOfCube.js +7 -1
  75. package/lib/exercises/math/index.d.ts +0 -1
  76. package/lib/exercises/math/index.d.ts.map +1 -1
  77. package/lib/exercises/math/index.js +0 -1
  78. package/lib/exercises/math/limits/rationalFracForbiddenValueLimit.d.ts.map +1 -1
  79. package/lib/exercises/math/percent/htToTTC.d.ts +8 -0
  80. package/lib/exercises/math/percent/htToTTC.d.ts.map +1 -0
  81. package/lib/exercises/math/percent/htToTTC.js +50 -0
  82. package/lib/exercises/math/percent/index.d.ts +2 -0
  83. package/lib/exercises/math/percent/index.d.ts.map +1 -1
  84. package/lib/exercises/math/percent/index.js +2 -0
  85. package/lib/exercises/math/percent/ttcToHT.d.ts +8 -0
  86. package/lib/exercises/math/percent/ttcToHT.d.ts.map +1 -0
  87. package/lib/exercises/math/percent/ttcToHT.js +50 -0
  88. package/lib/exercises/math/powers/powersDivision.d.ts.map +1 -1
  89. package/lib/exercises/math/powers/powersDivision.js +35 -2
  90. package/lib/exercises/math/probaStat/calculateProbaOfBinomialDistribution.d.ts.map +1 -1
  91. package/lib/exercises/math/probaStat/calculateProbaOfBinomialDistribution.js +21 -0
  92. package/lib/exercises/math/probaStat/probaFromTableWithContext.js +1 -1
  93. package/lib/exercises/math/probaStat/stats1var/averageList.d.ts +7 -0
  94. package/lib/exercises/math/probaStat/stats1var/averageList.d.ts.map +1 -0
  95. package/lib/exercises/math/probaStat/stats1var/averageList.js +52 -0
  96. package/lib/exercises/math/probaStat/stats1var/etendueList.d.ts +7 -0
  97. package/lib/exercises/math/probaStat/stats1var/etendueList.d.ts.map +1 -0
  98. package/lib/exercises/math/probaStat/stats1var/etendueList.js +49 -0
  99. package/lib/exercises/math/probaStat/stats1var/index.d.ts +2 -0
  100. package/lib/exercises/math/probaStat/stats1var/index.d.ts.map +1 -1
  101. package/lib/exercises/math/probaStat/stats1var/index.js +2 -0
  102. package/lib/exercises/math/probaStat/stats1var/marginalAndConditionalFrequency.d.ts.map +1 -1
  103. package/lib/exercises/math/probaStat/stats1var/marginalAndConditionalFrequency.js +2 -11
  104. package/lib/exercises/math/sequences/arithmetic/arithmeticFindTerm.d.ts.map +1 -1
  105. package/lib/exercises/math/sequences/arithmetic/arithmeticFindTerm.js +42 -0
  106. package/lib/exercises/math/sequences/arithmetic/recognizeArithmeticFromFirstTerms.d.ts.map +1 -1
  107. package/lib/exercises/math/sequences/arithmetic/recognizeArithmeticFromFirstTerms.js +7 -2
  108. package/lib/exercises/math/sequences/geometric/geometricFindTerm.d.ts.map +1 -1
  109. package/lib/exercises/math/sequences/geometric/geometricFindTerm.js +42 -0
  110. package/lib/exercises/math/sequences/geometric/geometricFirstTermsGeneralSum.d.ts +10 -0
  111. package/lib/exercises/math/sequences/geometric/geometricFirstTermsGeneralSum.d.ts.map +1 -0
  112. package/lib/exercises/math/sequences/geometric/geometricFirstTermsGeneralSum.js +56 -0
  113. package/lib/exercises/math/sequences/geometric/index.d.ts +1 -0
  114. package/lib/exercises/math/sequences/geometric/index.d.ts.map +1 -1
  115. package/lib/exercises/math/sequences/geometric/index.js +1 -0
  116. package/lib/exercises/math/sequences/index.d.ts +2 -0
  117. package/lib/exercises/math/sequences/index.d.ts.map +1 -1
  118. package/lib/exercises/math/sequences/index.js +2 -0
  119. package/lib/exercises/math/sequences/sequenceEvaluation.d.ts +10 -0
  120. package/lib/exercises/math/sequences/sequenceEvaluation.d.ts.map +1 -0
  121. package/lib/exercises/math/sequences/sequenceEvaluation.js +143 -0
  122. package/lib/exercises/math/sequences/sequencePlot.d.ts +9 -0
  123. package/lib/exercises/math/sequences/sequencePlot.d.ts.map +1 -0
  124. package/lib/exercises/math/sequences/sequencePlot.js +94 -0
  125. package/lib/exercises/math/sets/intervals/intervalsIntersection.d.ts.map +1 -1
  126. package/lib/exercises/math/sets/intervals/intervalsIntersection.js +19 -1
  127. package/lib/exercises/math/sets/intervals/intervalsUnion.js +1 -1
  128. package/lib/exercises/math/trigonometry/arcValue.d.ts.map +1 -1
  129. package/lib/exercises/math/trigonometry/arcValue.js +23 -0
  130. package/lib/exercises/pc/chemicalReactions/stoichiometricReaction.js +1 -1
  131. package/lib/exercises/pc/electricity/ohmicConductorOrGenerator.js +1 -1
  132. package/lib/exercises/pc/motion/typeOfAcceleration.js +1 -1
  133. package/lib/exercises/pc/motion/typeOfMovement.js +1 -1
  134. package/lib/exercises/pc/recognizeRefractionOrReflectionAngles.js +1 -1
  135. package/lib/index.d.ts +54 -10
  136. package/lib/index.d.ts.map +1 -1
  137. package/lib/math/geometry/point.d.ts +11 -0
  138. package/lib/math/geometry/point.d.ts.map +1 -1
  139. package/lib/math/geometry/point.js +8 -0
  140. package/lib/math/numbers/decimals/decimal.d.ts +2 -0
  141. package/lib/math/numbers/decimals/decimal.d.ts.map +1 -1
  142. package/lib/math/numbers/decimals/decimal.js +18 -0
  143. package/lib/math/numbers/reals/extendedRingElement.d.ts +3 -1
  144. package/lib/math/numbers/reals/extendedRingElement.d.ts.map +1 -1
  145. package/lib/math/numbers/reals/real.d.ts +1 -1
  146. package/lib/math/polynomials/trinom.d.ts +1 -1
  147. package/lib/math/sets/intervals/intervals.d.ts +3 -1
  148. package/lib/math/sets/intervals/intervals.d.ts.map +1 -1
  149. package/lib/math/sets/intervals/intervals.js +9 -5
  150. package/lib/math/sets/mathSet.d.ts +2 -2
  151. package/lib/math/sets/mathSet.d.ts.map +1 -1
  152. package/lib/math/sets/mathSetInterface.d.ts +1 -1
  153. package/lib/playground.d.ts.map +1 -1
  154. package/lib/playground.js +13 -2
  155. package/lib/server.d.ts.map +1 -1
  156. package/lib/tree/nodes/algebraicNode.d.ts.map +1 -1
  157. package/lib/tree/nodes/algebraicNode.js +0 -3
  158. package/lib/tree/nodes/complex/complexNode.d.ts +10 -1
  159. package/lib/tree/nodes/complex/complexNode.d.ts.map +1 -1
  160. package/lib/tree/nodes/complex/complexNode.js +7 -0
  161. package/lib/tree/nodes/equations/equalNode.d.ts +10 -1
  162. package/lib/tree/nodes/equations/equalNode.d.ts.map +1 -1
  163. package/lib/tree/nodes/equations/equalNode.js +7 -0
  164. package/lib/tree/nodes/equations/equationSolutionNode.d.ts +10 -1
  165. package/lib/tree/nodes/equations/equationSolutionNode.d.ts.map +1 -1
  166. package/lib/tree/nodes/equations/equationSolutionNode.js +6 -0
  167. package/lib/tree/nodes/equations/multiEqualNode.d.ts +7 -1
  168. package/lib/tree/nodes/equations/multiEqualNode.d.ts.map +1 -1
  169. package/lib/tree/nodes/equations/multiEqualNode.js +6 -0
  170. package/lib/tree/nodes/functions/absNode.d.ts +7 -1
  171. package/lib/tree/nodes/functions/absNode.d.ts.map +1 -1
  172. package/lib/tree/nodes/functions/absNode.js +6 -0
  173. package/lib/tree/nodes/functions/arcSinNode.d.ts +7 -1
  174. package/lib/tree/nodes/functions/arcSinNode.d.ts.map +1 -1
  175. package/lib/tree/nodes/functions/arcSinNode.js +8 -1
  176. package/lib/tree/nodes/functions/arccosNode.d.ts +7 -1
  177. package/lib/tree/nodes/functions/arccosNode.d.ts.map +1 -1
  178. package/lib/tree/nodes/functions/arccosNode.js +8 -1
  179. package/lib/tree/nodes/functions/arctanNode.d.ts +7 -1
  180. package/lib/tree/nodes/functions/arctanNode.d.ts.map +1 -1
  181. package/lib/tree/nodes/functions/arctanNode.js +8 -1
  182. package/lib/tree/nodes/functions/cosNode.d.ts +7 -1
  183. package/lib/tree/nodes/functions/cosNode.d.ts.map +1 -1
  184. package/lib/tree/nodes/functions/cosNode.js +8 -1
  185. package/lib/tree/nodes/functions/expNode.d.ts +7 -1
  186. package/lib/tree/nodes/functions/expNode.d.ts.map +1 -1
  187. package/lib/tree/nodes/functions/expNode.js +6 -0
  188. package/lib/tree/nodes/functions/integralNode.d.ts +19 -2
  189. package/lib/tree/nodes/functions/integralNode.d.ts.map +1 -1
  190. package/lib/tree/nodes/functions/integralNode.js +20 -0
  191. package/lib/tree/nodes/functions/log10Node.d.ts +7 -1
  192. package/lib/tree/nodes/functions/log10Node.d.ts.map +1 -1
  193. package/lib/tree/nodes/functions/log10Node.js +6 -0
  194. package/lib/tree/nodes/functions/logNode.d.ts +7 -1
  195. package/lib/tree/nodes/functions/logNode.d.ts.map +1 -1
  196. package/lib/tree/nodes/functions/logNode.js +6 -0
  197. package/lib/tree/nodes/functions/oppositeNode.d.ts +7 -1
  198. package/lib/tree/nodes/functions/oppositeNode.d.ts.map +1 -1
  199. package/lib/tree/nodes/functions/oppositeNode.js +6 -0
  200. package/lib/tree/nodes/functions/sinNode.d.ts +7 -1
  201. package/lib/tree/nodes/functions/sinNode.d.ts.map +1 -1
  202. package/lib/tree/nodes/functions/sinNode.js +8 -1
  203. package/lib/tree/nodes/functions/sqrtNode.d.ts +7 -1
  204. package/lib/tree/nodes/functions/sqrtNode.d.ts.map +1 -1
  205. package/lib/tree/nodes/functions/sqrtNode.js +6 -0
  206. package/lib/tree/nodes/functions/tanNode.d.ts +7 -1
  207. package/lib/tree/nodes/functions/tanNode.d.ts.map +1 -1
  208. package/lib/tree/nodes/functions/tanNode.js +8 -1
  209. package/lib/tree/nodes/geometry/degree.d.ts +5 -1
  210. package/lib/tree/nodes/geometry/degree.d.ts.map +1 -1
  211. package/lib/tree/nodes/geometry/degree.js +6 -0
  212. package/lib/tree/nodes/geometry/lengthNode.d.ts +5 -1
  213. package/lib/tree/nodes/geometry/lengthNode.d.ts.map +1 -1
  214. package/lib/tree/nodes/geometry/lengthNode.js +6 -0
  215. package/lib/tree/nodes/geometry/pointNode.d.ts +14 -1
  216. package/lib/tree/nodes/geometry/pointNode.d.ts.map +1 -1
  217. package/lib/tree/nodes/geometry/pointNode.js +6 -0
  218. package/lib/tree/nodes/geometry/vectorNode.d.ts +5 -1
  219. package/lib/tree/nodes/geometry/vectorNode.d.ts.map +1 -1
  220. package/lib/tree/nodes/geometry/vectorNode.js +6 -0
  221. package/lib/tree/nodes/hasVariableNode.d.ts +3 -0
  222. package/lib/tree/nodes/hasVariableNode.d.ts.map +1 -0
  223. package/lib/tree/nodes/hasVariableNode.js +16 -0
  224. package/lib/tree/nodes/inequations/inequationNode.d.ts +8 -1
  225. package/lib/tree/nodes/inequations/inequationNode.d.ts.map +1 -1
  226. package/lib/tree/nodes/inequations/inequationNode.js +7 -0
  227. package/lib/tree/nodes/inequations/inequationSolutionNode.d.ts +19 -1
  228. package/lib/tree/nodes/inequations/inequationSolutionNode.d.ts.map +1 -1
  229. package/lib/tree/nodes/inequations/inequationSolutionNode.js +7 -1
  230. package/lib/tree/nodes/node.d.ts +52 -8
  231. package/lib/tree/nodes/node.d.ts.map +1 -1
  232. package/lib/tree/nodes/node.js +49 -21
  233. package/lib/tree/nodes/nodeConstructor.d.ts +7 -0
  234. package/lib/tree/nodes/nodeConstructor.d.ts.map +1 -0
  235. package/lib/tree/nodes/nodeConstructor.js +170 -0
  236. package/lib/tree/nodes/numbers/constantNode.d.ts +7 -1
  237. package/lib/tree/nodes/numbers/constantNode.d.ts.map +1 -1
  238. package/lib/tree/nodes/numbers/constantNode.js +9 -1
  239. package/lib/tree/nodes/numbers/numberNode.d.ts +5 -1
  240. package/lib/tree/nodes/numbers/numberNode.d.ts.map +1 -1
  241. package/lib/tree/nodes/numbers/numberNode.js +6 -0
  242. package/lib/tree/nodes/numbers/percentNode.d.ts +5 -1
  243. package/lib/tree/nodes/numbers/percentNode.d.ts.map +1 -1
  244. package/lib/tree/nodes/numbers/percentNode.js +6 -0
  245. package/lib/tree/nodes/operators/addNode.d.ts +10 -1
  246. package/lib/tree/nodes/operators/addNode.d.ts.map +1 -1
  247. package/lib/tree/nodes/operators/addNode.js +16 -6
  248. package/lib/tree/nodes/operators/divideNode.d.ts +11 -1
  249. package/lib/tree/nodes/operators/divideNode.d.ts.map +1 -1
  250. package/lib/tree/nodes/operators/divideNode.js +12 -0
  251. package/lib/tree/nodes/operators/fractionNode.d.ts +10 -1
  252. package/lib/tree/nodes/operators/fractionNode.d.ts.map +1 -1
  253. package/lib/tree/nodes/operators/fractionNode.js +7 -0
  254. package/lib/tree/nodes/operators/limitNode.d.ts +11 -1
  255. package/lib/tree/nodes/operators/limitNode.d.ts.map +1 -1
  256. package/lib/tree/nodes/operators/limitNode.js +8 -0
  257. package/lib/tree/nodes/operators/multiplyNode.d.ts +10 -1
  258. package/lib/tree/nodes/operators/multiplyNode.d.ts.map +1 -1
  259. package/lib/tree/nodes/operators/multiplyNode.js +7 -0
  260. package/lib/tree/nodes/operators/powerNode.d.ts +10 -1
  261. package/lib/tree/nodes/operators/powerNode.d.ts.map +1 -1
  262. package/lib/tree/nodes/operators/powerNode.js +7 -0
  263. package/lib/tree/nodes/operators/substractNode.d.ts +11 -1
  264. package/lib/tree/nodes/operators/substractNode.d.ts.map +1 -1
  265. package/lib/tree/nodes/operators/substractNode.js +12 -0
  266. package/lib/tree/nodes/sets/belongsNode.d.ts +10 -1
  267. package/lib/tree/nodes/sets/belongsNode.d.ts.map +1 -1
  268. package/lib/tree/nodes/sets/belongsNode.js +7 -0
  269. package/lib/tree/nodes/sets/closure.d.ts +2 -0
  270. package/lib/tree/nodes/sets/closure.d.ts.map +1 -1
  271. package/lib/tree/nodes/sets/closure.js +20 -0
  272. package/lib/tree/nodes/sets/discreteSetNode.d.ts +10 -2
  273. package/lib/tree/nodes/sets/discreteSetNode.d.ts.map +1 -1
  274. package/lib/tree/nodes/sets/discreteSetNode.js +13 -3
  275. package/lib/tree/nodes/sets/intervalNode.d.ts +14 -2
  276. package/lib/tree/nodes/sets/intervalNode.d.ts.map +1 -1
  277. package/lib/tree/nodes/sets/intervalNode.js +22 -1
  278. package/lib/tree/nodes/sets/setNode.d.ts +1 -0
  279. package/lib/tree/nodes/sets/setNode.d.ts.map +1 -1
  280. package/lib/tree/nodes/sets/unionIntervalNode.d.ts +7 -1
  281. package/lib/tree/nodes/sets/unionIntervalNode.d.ts.map +1 -1
  282. package/lib/tree/nodes/sets/unionIntervalNode.js +7 -1
  283. package/lib/tree/nodes/variables/variableNode.d.ts +5 -1
  284. package/lib/tree/nodes/variables/variableNode.d.ts.map +1 -1
  285. package/lib/tree/nodes/variables/variableNode.js +6 -0
  286. package/lib/tree/utilities/operatorComposition.js +4 -2
  287. package/lib/types/keyProps.d.ts +13 -0
  288. package/lib/types/keyProps.d.ts.map +1 -0
  289. package/lib/types/keyProps.js +2 -0
  290. package/lib/utils/alignTex.js +11 -9
  291. package/lib/utils/diceFlip.d.ts.map +1 -1
  292. package/lib/utils/diceFlip.js +2 -6
  293. package/package.json +1 -1
@@ -4,6 +4,8 @@ exports.vectorCoordinatesFromTwoPoints = void 0;
4
4
  const exercise_1 = require("../../../../exercises/exercise");
5
5
  const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQuestions");
6
6
  const randint_1 = require("../../../../math/utils/random/randint");
7
+ const substractNode_1 = require("../../../../tree/nodes/operators/substractNode");
8
+ const alignTex_1 = require("../../../../utils/alignTex");
7
9
  const randomLetter_1 = require("../../../../utils/randomLetter");
8
10
  const getVectorCoordinatesFromTwoPointsQuestion = () => {
9
11
  const A = [(0, randint_1.randint)(-9, 9), (0, randint_1.randint)(-9, 9)];
@@ -19,6 +21,20 @@ const getVectorCoordinatesFromTwoPointsQuestion = () => {
19
21
  instruction: `Soit $${startLetter}\\left(${A[0]};${A[1]}\\right)$ et $${endLetter}\\left(${B[0]};${B[1]}\\right)$. Quelles sont les coordonnées du vecteur $\\overrightarrow{${startLetter}${endLetter}}$ ?`,
20
22
  keys: ["semicolon"],
21
23
  answerFormat: "tex",
24
+ hint: `Si $A(x_A;y_A)$ et $B(x_B;y_B)$ sont deux points, alors le vecteur $\\overrightarrow{AB}$ a pour coordonnées :
25
+
26
+ $\\overrightarrow{AB} \\begin{pmatrix} x_B - x_A \\\\ y_B - y_A \\end{pmatrix}$`,
27
+ correction: `On a :
28
+
29
+ $${(0, alignTex_1.alignTex)([
30
+ [
31
+ `\\overrightarrow{${startLetter}${endLetter}} \\begin{pmatrix}
32
+ ${new substractNode_1.SubstractNode(B[0].toTree(), A[0].toTree()).toTex()}
33
+ \\\\ ${new substractNode_1.SubstractNode(B[1].toTree(), A[1].toTree()).toTex()}\\end{pmatrix} `,
34
+ "=",
35
+ `\\begin{pmatrix}${B[0] - A[0]} \\\\ ${B[1] - A[1]}\\end{pmatrix}`,
36
+ ],
37
+ ])}$`,
22
38
  identifiers: { A, B },
23
39
  };
24
40
  return question;
@@ -50,4 +66,5 @@ exports.vectorCoordinatesFromTwoPoints = {
50
66
  getPropositions,
51
67
  isAnswerValid,
52
68
  subject: "Mathématiques",
69
+ hasHintAndCorrection: true,
53
70
  };
@@ -1 +1 @@
1
- {"version":3,"file":"volumeOfCube.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/volumes/volumeOfCube.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAMlC,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAgEF,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,WAAW,CAe9C,CAAC"}
1
+ {"version":3,"file":"volumeOfCube.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/volumes/volumeOfCube.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAMlC,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAoEF,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,WAAW,CAgB9C,CAAC"}
@@ -22,13 +22,18 @@ const getVolumeOfCubeQuestion = () => {
22
22
  hideAxes: true,
23
23
  hideGrid: true,
24
24
  });
25
+ const answer = Math.pow(cubeSide, 3) + "";
25
26
  const question = {
26
- answer: Math.pow(cubeSide, 3) + "",
27
+ answer,
27
28
  instruction: `$ABCDEFGH$ est un cube d'arête $${cubeSide}$. Calculer son volume.`,
28
29
  keys: [],
29
30
  answerFormat: "tex",
30
31
  commands: ggb.commands,
31
32
  options: ggb.getOptions(),
33
+ hint: "Le volume d'un cube est donné par $V = a^3$, où $a$ est l'arête du cube.",
34
+ correction: `Le volume d'un cube est donné par $V = a^3$, où $a$ est l'arête du cube. Ici, le volume de $ABCDEFGH$ est donc :
35
+
36
+ $V = ${cubeSide}^3 = ${answer}.$`,
32
37
  coords: [0, cubeSide + 1, 0, cubeSide + 1, 0, cubeSide + 1],
33
38
  identifiers: { cubeSide },
34
39
  };
@@ -67,4 +72,5 @@ exports.volumeOfCube = {
67
72
  isAnswerValid,
68
73
  hasGeogebra: true,
69
74
  subject: "Mathématiques",
75
+ hasHintAndCorrection: true,
70
76
  };
@@ -19,5 +19,4 @@ export * from "./spaceGeometry";
19
19
  export * from "./squareRoots";
20
20
  export * from "./trigonometry";
21
21
  export * from "./python";
22
- export * from "./suites";
23
22
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/exercises/math/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC;AACvB,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/exercises/math/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC;AACvB,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC"}
@@ -35,4 +35,3 @@ __exportStar(require("./spaceGeometry"), exports);
35
35
  __exportStar(require("./squareRoots"), exports);
36
36
  __exportStar(require("./trigonometry"), exports);
37
37
  __exportStar(require("./python"), exports);
38
- __exportStar(require("./suites"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"rationalFracForbiddenValueLimit.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/limits/rationalFracForbiddenValueLimit.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAYlC,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,WAAW,EAAE,MAAM,EAAE,CAAC;IAEtB,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAyEF,eAAO,MAAM,+BAA+B,EAAE,QAAQ,CAAC,WAAW,CAcjE,CAAC"}
1
+ {"version":3,"file":"rationalFracForbiddenValueLimit.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/limits/rationalFracForbiddenValueLimit.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,WAAW,EAAE,MAAM,EAAE,CAAC;IAEtB,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAyEF,eAAO,MAAM,+BAA+B,EAAE,QAAQ,CAAC,WAAW,CAcjE,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { Exercise } from "../../../exercises/exercise";
2
+ type Identifiers = {
3
+ TVA: number;
4
+ ht: number;
5
+ };
6
+ export declare const htToTTC: Exercise<Identifiers>;
7
+ export {};
8
+ //# sourceMappingURL=htToTTC.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"htToTTC.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/percent/htToTTC.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AAQlC,KAAK,WAAW,GAAG;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAgCF,eAAO,MAAM,OAAO,EAAE,QAAQ,CAAC,WAAW,CAazC,CAAC"}
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.htToTTC = void 0;
4
+ const exercise_1 = require("../../../exercises/exercise");
5
+ const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
6
+ const randfloat_1 = require("../../../math/utils/random/randfloat");
7
+ const randint_1 = require("../../../math/utils/random/randint");
8
+ const round_1 = require("../../../math/utils/round");
9
+ const coinFlip_1 = require("../../../utils/coinFlip");
10
+ const random_1 = require("../../../utils/random");
11
+ const getHtToTtcQuestion = () => {
12
+ const TVA = (0, random_1.random)([20, 5.5]);
13
+ const ht = (0, coinFlip_1.coinFlip)() ? (0, randint_1.randint)(50, 1000) : (0, randfloat_1.randfloat)(20, 200, 2);
14
+ const answer = (0, round_1.round)(ht * (1 + TVA / 100), 2).frenchify();
15
+ const question = {
16
+ answer,
17
+ instruction: `Un object coûte $${ht.frenchify()}€$ en HT. Quel est son prix TTC, sachant que la TVA est de $${TVA.frenchify()}\\%$ ? (arrondir au centième)`,
18
+ keys: [],
19
+ answerFormat: "tex",
20
+ identifiers: { TVA, ht },
21
+ };
22
+ return question;
23
+ };
24
+ const getPropositions = (n, { answer, TVA, ht }) => {
25
+ const propositions = [];
26
+ (0, exercise_1.addValidProp)(propositions, answer);
27
+ (0, exercise_1.tryToAddWrongProp)(propositions, (0, round_1.round)((ht * TVA) / 100, 2).frenchify());
28
+ (0, exercise_1.tryToAddWrongProp)(propositions, (0, round_1.round)(ht + TVA / 100, 2).frenchify());
29
+ while (propositions.length < n) {
30
+ (0, exercise_1.tryToAddWrongProp)(propositions, (0, randfloat_1.randfloat)(50, 400, 2).frenchify());
31
+ }
32
+ return (0, exercise_1.shuffleProps)(propositions, n);
33
+ };
34
+ const isAnswerValid = (ans, { answer }) => {
35
+ return ans === answer;
36
+ };
37
+ exports.htToTTC = {
38
+ id: "htToTTC",
39
+ connector: "=",
40
+ label: "Passer d'un prix HT à un prix TTC",
41
+ levels: [],
42
+ isSingleStep: true,
43
+ sections: [],
44
+ generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getHtToTtcQuestion, nb),
45
+ qcmTimer: 60,
46
+ freeTimer: 60,
47
+ getPropositions,
48
+ isAnswerValid,
49
+ subject: "Mathématiques",
50
+ };
@@ -8,4 +8,6 @@ export * from "./valuePercent";
8
8
  export * from "./findProportion";
9
9
  export * from "./isTableProportional";
10
10
  export * from "./cmToEvolution";
11
+ export * from "./htToTTC";
12
+ export * from "./ttcToHT";
11
13
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/percent/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC;AACvC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/percent/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC;AACvC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC"}
@@ -24,3 +24,5 @@ __exportStar(require("./valuePercent"), exports);
24
24
  __exportStar(require("./findProportion"), exports);
25
25
  __exportStar(require("./isTableProportional"), exports);
26
26
  __exportStar(require("./cmToEvolution"), exports);
27
+ __exportStar(require("./htToTTC"), exports);
28
+ __exportStar(require("./ttcToHT"), exports);
@@ -0,0 +1,8 @@
1
+ import { Exercise } from "../../../exercises/exercise";
2
+ type Identifiers = {
3
+ TTC: number;
4
+ TVA: number;
5
+ };
6
+ export declare const ttcToHT: Exercise<Identifiers>;
7
+ export {};
8
+ //# sourceMappingURL=ttcToHT.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ttcToHT.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/percent/ttcToHT.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AAQlC,KAAK,WAAW,GAAG;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAuCF,eAAO,MAAM,OAAO,EAAE,QAAQ,CAAC,WAAW,CAazC,CAAC"}
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ttcToHT = void 0;
4
+ const exercise_1 = require("../../../exercises/exercise");
5
+ const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
6
+ const randfloat_1 = require("../../../math/utils/random/randfloat");
7
+ const randint_1 = require("../../../math/utils/random/randint");
8
+ const round_1 = require("../../../math/utils/round");
9
+ const coinFlip_1 = require("../../../utils/coinFlip");
10
+ const random_1 = require("../../../utils/random");
11
+ const getTtcToHtQuestion = () => {
12
+ const TVA = (0, random_1.random)([20, 5.5]);
13
+ const TTC = (0, coinFlip_1.coinFlip)() ? (0, randint_1.randint)(50, 1000) : (0, randfloat_1.randfloat)(20, 200, 2);
14
+ const answer = (0, round_1.round)(TTC / (1 + TVA / 100), 2).frenchify();
15
+ const question = {
16
+ answer,
17
+ instruction: `Un object coûte $${TTC.frenchify()}€$ en TTC. Quel est son prix HT, sachant que la TVA est de $${TVA.frenchify()}\\%$ ? (arrondir au centième)`,
18
+ keys: [],
19
+ answerFormat: "tex",
20
+ identifiers: { TTC, TVA },
21
+ };
22
+ return question;
23
+ };
24
+ const getPropositions = (n, { answer, TTC, TVA }) => {
25
+ const propositions = [];
26
+ (0, exercise_1.addValidProp)(propositions, answer);
27
+ (0, exercise_1.tryToAddWrongProp)(propositions, (0, round_1.round)(TTC * (1 + TVA / 100), 2).frenchify());
28
+ (0, exercise_1.tryToAddWrongProp)(propositions, (0, round_1.round)(TTC - (1 + TVA / 100) * TTC, 2).frenchify());
29
+ while (propositions.length < n) {
30
+ (0, exercise_1.tryToAddWrongProp)(propositions, (0, randfloat_1.randfloat)(50, 400, 2).frenchify());
31
+ }
32
+ return (0, exercise_1.shuffleProps)(propositions, n);
33
+ };
34
+ const isAnswerValid = (ans, { answer }) => {
35
+ return ans === answer;
36
+ };
37
+ exports.ttcToHT = {
38
+ id: "ttcToHT",
39
+ connector: "=",
40
+ label: "Passer d'un prix TTC à un prix HT",
41
+ levels: [],
42
+ isSingleStep: true,
43
+ sections: [],
44
+ generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getTtcToHtQuestion, nb),
45
+ qcmTimer: 60,
46
+ freeTimer: 60,
47
+ getPropositions,
48
+ isAnswerValid,
49
+ subject: "Mathématiques",
50
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"powersDivision.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/powers/powersDivision.ts"],"names":[],"mappings":"AAAA;;GAEG;AAQH,OAAO,EACL,QAAQ,EAQT,MAAM,gBAAgB,CAAC;AAGxB,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAmDF,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,WAAW,CA4BhD,CAAC;AACF,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,WAAW,CAiBrD,CAAC"}
1
+ {"version":3,"file":"powersDivision.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/powers/powersDivision.ts"],"names":[],"mappings":"AAAA;;GAEG;AAUH,OAAO,EACL,QAAQ,EAQT,MAAM,gBAAgB,CAAC;AAGxB,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAuFF,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,WAAW,CA6BhD,CAAC;AACF,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,WAAW,CAkBrD,CAAC"}
@@ -9,6 +9,8 @@ const randint_1 = require("../../../math/utils/random/randint");
9
9
  const numberNode_1 = require("../../../tree/nodes/numbers/numberNode");
10
10
  const fractionNode_1 = require("../../../tree/nodes/operators/fractionNode");
11
11
  const powerNode_1 = require("../../../tree/nodes/operators/powerNode");
12
+ const substractNode_1 = require("../../../tree/nodes/operators/substractNode");
13
+ const alignTex_1 = require("../../../utils/alignTex");
12
14
  const shuffle_1 = require("../../../utils/shuffle");
13
15
  const exercise_1 = require("../../exercise");
14
16
  const getDistinctQuestions_1 = require("../../utils/getDistinctQuestions");
@@ -18,11 +20,40 @@ const getPowersDivisionQuestion = (opts) => {
18
20
  const statement = new fractionNode_1.FractionNode(new powerNode_1.PowerNode(new numberNode_1.NumberNode(a), new numberNode_1.NumberNode(b)), new powerNode_1.PowerNode(new numberNode_1.NumberNode(a), new numberNode_1.NumberNode(c)));
19
21
  const answerTree = new power_1.Power(a, b - c).simplify();
20
22
  const answer = answerTree.toTex();
23
+ const statementTex = statement.toTex();
21
24
  const question = {
22
- instruction: `Simplifier : $${statement.toTex()}$`,
23
- startStatement: statement.toTex(),
25
+ instruction: `Simplifier : $${statementTex}$`,
26
+ startStatement: statementTex,
24
27
  answer,
25
28
  keys: [],
29
+ hint: `${opts?.useOnlyPowersOfTen
30
+ ? `Pour diviser deux puissances de $10$, on utilise la propriété :
31
+
32
+ $\\frac{10^a}{10^b} = 10^{a-b}$`
33
+ : `Pour diviser deux puissances d'un même nombre $x$, on utilise la propriété :
34
+
35
+ $\\frac{x^a}{x^b} = x^{a-b}$`}`,
36
+ correction: `${opts?.useOnlyPowersOfTen
37
+ ? `On utilise la propriété : $\\frac{10^a}{10^b} = 10^{a-b}$. On a alors :
38
+
39
+ ${(0, alignTex_1.alignTex)([
40
+ [
41
+ statementTex,
42
+ "=",
43
+ `10^{${new substractNode_1.SubstractNode(b.toTree(), c.toTree()).toTex()}}`,
44
+ ],
45
+ ["", "=", answer],
46
+ ])}`
47
+ : `On utilise la propriété : $\\frac{x^a}{x^b} = x^{a-b}$. On a alors :
48
+
49
+ ${(0, alignTex_1.alignTex)([
50
+ [
51
+ statementTex,
52
+ "=",
53
+ `${a.toTree().toTex()}^{${new substractNode_1.SubstractNode(b.toTree(), c.toTree()).toTex()}}`,
54
+ ],
55
+ ["", "=", answer],
56
+ ])}`} `,
26
57
  answerFormat: "tex",
27
58
  identifiers: { a, b, c },
28
59
  };
@@ -72,6 +103,7 @@ exports.powersDivision = {
72
103
  getPropositions,
73
104
  isAnswerValid,
74
105
  subject: "Mathématiques",
106
+ hasHintAndCorrection: true,
75
107
  };
76
108
  exports.powersOfTenDivision = {
77
109
  id: "powersOfTenDivision",
@@ -86,4 +118,5 @@ exports.powersOfTenDivision = {
86
118
  getPropositions,
87
119
  isAnswerValid,
88
120
  subject: "Mathématiques",
121
+ hasHintAndCorrection: true,
89
122
  };
@@ -1 +1 @@
1
- {"version":3,"file":"calculateProbaOfBinomialDistribution.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/probaStat/calculateProbaOfBinomialDistribution.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAQlC,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,YAAY,CAAC;CAC5B,CAAC;AAEF,KAAK,YAAY,GAAG;IAClB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA8FF,eAAO,MAAM,oCAAoC,EAAE,QAAQ,CAAC,WAAW,CAatE,CAAC"}
1
+ {"version":3,"file":"calculateProbaOfBinomialDistribution.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/probaStat/calculateProbaOfBinomialDistribution.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAWlC,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,YAAY,CAAC;CAC5B,CAAC;AAEF,KAAK,YAAY,GAAG;IAClB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAqHF,eAAO,MAAM,oCAAoC,EAAE,QAAQ,CAAC,WAAW,CActE,CAAC"}
@@ -8,6 +8,9 @@ const combination_1 = require("../../../math/utils/combinatorics/combination");
8
8
  const randfloat_1 = require("../../../math/utils/random/randfloat");
9
9
  const randint_1 = require("../../../math/utils/random/randint");
10
10
  const numberNode_1 = require("../../../tree/nodes/numbers/numberNode");
11
+ const multiplyNode_1 = require("../../../tree/nodes/operators/multiplyNode");
12
+ const powerNode_1 = require("../../../tree/nodes/operators/powerNode");
13
+ const alignTex_1 = require("../../../utils/alignTex");
11
14
  const getCalculateProbaOfBinomialDistributionQuestion = () => {
12
15
  const exercise = generateExercise();
13
16
  const p = new rational_1.Rational(exercise.a, exercise.b);
@@ -20,6 +23,23 @@ const getCalculateProbaOfBinomialDistributionQuestion = () => {
20
23
  .toTex()}$. Donner une valeur arrondie au centième de $P(X=${exercise.k}).$`,
21
24
  keys: [],
22
25
  answerFormat: "tex",
26
+ hint: `Si $X$ est une variable aléatoire qui suit une loi binomiale de paramètres $n$ et $p$, alors on a :
27
+
28
+ $P(X=k) = \\binom{n}{k} p^k (1-p)^{n-k}$`,
29
+ correction: `Si $X$ est une variable aléatoire qui suit une loi binomiale de paramètres $n$ et $p$, alors on a :
30
+
31
+ $P(X=k) = \\binom{n}{k} p^k (1-p)^{n-k}$
32
+
33
+ Ici, on a donc :
34
+
35
+ ${(0, alignTex_1.alignTex)([
36
+ [
37
+ `P(X=${exercise.k})`,
38
+ "=",
39
+ `\\binom{${exercise.n}}{${exercise.k}} ${new multiplyNode_1.MultiplyNode(new powerNode_1.PowerNode(p.toTree(), exercise.k.toTree()), new powerNode_1.PowerNode(new rational_1.Rational(exercise.b - exercise.a, exercise.b).toTree(), (exercise.n - exercise.k).toTree())).toTex()}`,
40
+ ],
41
+ ["", "\\approx", correctAns.toTex()],
42
+ ])}`,
23
43
  identifiers: { exerciseVars: exercise },
24
44
  };
25
45
  return question;
@@ -82,4 +102,5 @@ exports.calculateProbaOfBinomialDistribution = {
82
102
  getPropositions,
83
103
  isAnswerValid,
84
104
  subject: "Mathématiques",
105
+ hasHintAndCorrection: true,
85
106
  };
@@ -67,7 +67,7 @@ const getProbaFromTableWithContextQuestion = () => {
67
67
  answer,
68
68
  instruction: `Le tableau suivant donne le nombre de filles et de garçons portant des lunettes dans un lycée :
69
69
 
70
- | | Porte des lunettes    | Ne porte pas de lunettes |
70
+ | | Porte des lunettes | Ne porte pas de lunettes |
71
71
  |-------|:----------------------:|----------------------------|
72
72
  |Filles |${aCapB} |${aCapBBarre}|
73
73
  |Garçons |${aBarreCapB} |${aBarreCapBBarre} |
@@ -0,0 +1,7 @@
1
+ import { Exercise } from "../../../../exercises/exercise";
2
+ type Identifiers = {
3
+ sortedValues: number[];
4
+ };
5
+ export declare const averageList: Exercise<Identifiers>;
6
+ export {};
7
+ //# sourceMappingURL=averageList.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"averageList.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/stats1var/averageList.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AAOlC,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB,CAAC;AA4CF,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAC,WAAW,CAa7C,CAAC"}
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.averageList = void 0;
4
+ const exercise_1 = require("../../../../exercises/exercise");
5
+ const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQuestions");
6
+ const randfloat_1 = require("../../../../math/utils/random/randfloat");
7
+ const randint_1 = require("../../../../math/utils/random/randint");
8
+ const round_1 = require("../../../../math/utils/round");
9
+ const average_1 = require("../../../../utils/average");
10
+ const getAverageListQuestion = () => {
11
+ let randomValues = [];
12
+ const length = (0, randint_1.randint)(6, 10);
13
+ for (let i = 0; i < length; i++)
14
+ randomValues.push((0, randint_1.randint)(1, 20));
15
+ const sortedValues = randomValues.sort((a, b) => a - b);
16
+ const answer = (0, round_1.round)((0, average_1.average)(sortedValues), 2).frenchify();
17
+ const question = {
18
+ answer,
19
+ instruction: `On considère la liste suivante : $${randomValues.join(";\\ ")}.$
20
+ $\\\\$Calculer la moyenne de cette liste de valeurs (arrondir au centième).`,
21
+ keys: [],
22
+ answerFormat: "tex",
23
+ identifiers: { sortedValues },
24
+ };
25
+ return question;
26
+ };
27
+ const getPropositions = (n, { answer, sortedValues }) => {
28
+ const propositions = [];
29
+ (0, exercise_1.addValidProp)(propositions, answer);
30
+ (0, exercise_1.tryToAddWrongProp)(propositions, sortedValues.reduce((acc, curr) => acc + curr) + "");
31
+ while (propositions.length < n) {
32
+ (0, exercise_1.tryToAddWrongProp)(propositions, (0, randfloat_1.randfloat)(3, 20, 2).frenchify());
33
+ }
34
+ return (0, exercise_1.shuffleProps)(propositions, n);
35
+ };
36
+ const isAnswerValid = (ans, { answer }) => {
37
+ return ans === answer;
38
+ };
39
+ exports.averageList = {
40
+ id: "averageList",
41
+ connector: "=",
42
+ label: "Calcul de la moyenne d'une liste de valeurs",
43
+ levels: [],
44
+ isSingleStep: true,
45
+ sections: [],
46
+ generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getAverageListQuestion, nb),
47
+ qcmTimer: 60,
48
+ freeTimer: 60,
49
+ getPropositions,
50
+ isAnswerValid,
51
+ subject: "Mathématiques",
52
+ };
@@ -0,0 +1,7 @@
1
+ import { Exercise } from "../../../../exercises/exercise";
2
+ type Identifiers = {
3
+ sortedValues: number[];
4
+ };
5
+ export declare const etendueList: Exercise<Identifiers>;
6
+ export {};
7
+ //# sourceMappingURL=etendueList.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"etendueList.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/stats1var/etendueList.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AAIlC,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB,CAAC;AA2CF,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAC,WAAW,CAa7C,CAAC"}
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.etendueList = void 0;
4
+ const exercise_1 = require("../../../../exercises/exercise");
5
+ const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQuestions");
6
+ const randint_1 = require("../../../../math/utils/random/randint");
7
+ const getEtendueListQuestion = () => {
8
+ let randomValues = [];
9
+ const length = (0, randint_1.randint)(6, 10);
10
+ for (let i = 0; i < length; i++)
11
+ randomValues.push((0, randint_1.randint)(1, 20));
12
+ const sortedValues = randomValues.sort((a, b) => a - b);
13
+ const answer = (sortedValues[sortedValues.length - 1] - sortedValues[0]).frenchify();
14
+ const question = {
15
+ answer,
16
+ instruction: `On considère la liste suivante : $${randomValues.join(";\\ ")}.$
17
+ $\\\\$Calculer l'étendue de cette liste de valeurs.`,
18
+ keys: [],
19
+ answerFormat: "tex",
20
+ identifiers: { sortedValues },
21
+ };
22
+ return question;
23
+ };
24
+ const getPropositions = (n, { answer, sortedValues }) => {
25
+ const propositions = [];
26
+ (0, exercise_1.addValidProp)(propositions, answer);
27
+ (0, exercise_1.tryToAddWrongProp)(propositions, sortedValues[sortedValues.length - 1] + "");
28
+ while (propositions.length < n) {
29
+ (0, exercise_1.tryToAddWrongProp)(propositions, (0, randint_1.randint)(5, 20) + "");
30
+ }
31
+ return (0, exercise_1.shuffleProps)(propositions, n);
32
+ };
33
+ const isAnswerValid = (ans, { answer }) => {
34
+ return ans === answer;
35
+ };
36
+ exports.etendueList = {
37
+ id: "etendueList",
38
+ connector: "=",
39
+ label: "Calcul de l'étendue d'une liste de valeurs",
40
+ levels: [],
41
+ isSingleStep: true,
42
+ sections: [],
43
+ generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getEtendueListQuestion, nb),
44
+ qcmTimer: 60,
45
+ freeTimer: 60,
46
+ getPropositions,
47
+ isAnswerValid,
48
+ subject: "Mathématiques",
49
+ };
@@ -4,4 +4,6 @@ export * from "./median";
4
4
  export * from "./medianList";
5
5
  export * from "./quartiles";
6
6
  export * from "./quartilesList";
7
+ export * from "./averageList";
8
+ export * from "./etendueList";
7
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/stats1var/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,mCAAmC,CAAC;AAClD,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/stats1var/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,mCAAmC,CAAC;AAClD,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC"}
@@ -20,3 +20,5 @@ __exportStar(require("./median"), exports);
20
20
  __exportStar(require("./medianList"), exports);
21
21
  __exportStar(require("./quartiles"), exports);
22
22
  __exportStar(require("./quartilesList"), exports);
23
+ __exportStar(require("./averageList"), exports);
24
+ __exportStar(require("./etendueList"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"marginalAndConditionalFrequency.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/stats1var/marginalAndConditionalFrequency.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,QAAQ,EAQT,MAAM,mBAAmB,CAAC;AAG3B,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AA2IF,eAAO,MAAM,+BAA+B,EAAE,QAAQ,CAAC,WAAW,CAcjE,CAAC"}
1
+ {"version":3,"file":"marginalAndConditionalFrequency.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/stats1var/marginalAndConditionalFrequency.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,QAAQ,EAQT,MAAM,mBAAmB,CAAC;AAG3B,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAkIF,eAAO,MAAM,+BAA+B,EAAE,QAAQ,CAAC,WAAW,CAcjE,CAAC"}
@@ -8,15 +8,6 @@ const exercise_1 = require("../../../exercise");
8
8
  const getDistinctQuestions_1 = require("../../../utils/getDistinctQuestions");
9
9
  const getAnswer = (rand, x1, x2, x3, x4) => {
10
10
  const x = x1 + x2 + x3 + x4;
11
- const total = x1 + x2 + x3 + x4;
12
- const totalA = x1 + x3;
13
- const totalB = x2 + x4;
14
- const totalC = x1 + x2;
15
- const totalD = x3 + x4;
16
- const A_C = x1;
17
- const A_D = x3;
18
- const B_C = x2;
19
- const B_D = x4;
20
11
  let freqString;
21
12
  let frequence;
22
13
  let answer;
@@ -112,8 +103,8 @@ const getPropositions = (n, { answer, rand, x1, x2, x3, x4 }) => {
112
103
  const propositions = [];
113
104
  (0, exercise_1.addValidProp)(propositions, answer);
114
105
  while (propositions.length < n) {
115
- const rand = (0, randint_1.randint)(0, 12);
116
- const { answer: answerTree } = getAnswer(rand, x1, x2, x3, x4);
106
+ const fakeRand = (0, randint_1.randint)(0, 12);
107
+ const { answer: answerTree } = getAnswer(fakeRand, x1, x2, x3, x4);
117
108
  (0, exercise_1.tryToAddWrongProp)(propositions, answerTree.toTex());
118
109
  }
119
110
  return (0, shuffle_1.shuffle)(propositions);
@@ -1 +1 @@
1
- {"version":3,"file":"arithmeticFindTerm.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sequences/arithmetic/arithmeticFindTerm.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AAKlC,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAqCF,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,WAAW,CAepD,CAAC"}
1
+ {"version":3,"file":"arithmeticFindTerm.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sequences/arithmetic/arithmeticFindTerm.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAyFF,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,WAAW,CAgBpD,CAAC"}
@@ -4,6 +4,11 @@ exports.arithmeticFindTerm = void 0;
4
4
  const exercise_1 = require("../../../../exercises/exercise");
5
5
  const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQuestions");
6
6
  const randint_1 = require("../../../../math/utils/random/randint");
7
+ const addNode_1 = require("../../../../tree/nodes/operators/addNode");
8
+ const multiplyNode_1 = require("../../../../tree/nodes/operators/multiplyNode");
9
+ const substractNode_1 = require("../../../../tree/nodes/operators/substractNode");
10
+ const variableNode_1 = require("../../../../tree/nodes/variables/variableNode");
11
+ const alignTex_1 = require("../../../../utils/alignTex");
7
12
  const random_1 = require("../../../../utils/random");
8
13
  const getArithmeticFindTermQuestion = () => {
9
14
  const firstRank = (0, random_1.random)([0, 1]);
@@ -17,6 +22,42 @@ const getArithmeticFindTermQuestion = () => {
17
22
  keys: [],
18
23
  answerFormat: "tex",
19
24
  identifiers: { firstRank, askedRank, firstTerm, reason },
25
+ hint: `Le terme général d'une suite arithmétique est :
26
+
27
+ ${!firstRank
28
+ ? `$u_n = u_0 + r\\times n$, où $u_0$`
29
+ : `$u_n = u_1 + r \\times (n-1)$, où $u_1$`} est le premier terme et $r$ la raison.`,
30
+ correction: `Le terme général de la suite $u$ est :
31
+
32
+ ${!firstRank
33
+ ? (0, alignTex_1.alignTex)([
34
+ [`u_n`, "=", `u_0 + r\\times n`],
35
+ [
36
+ "",
37
+ "=",
38
+ new addNode_1.AddNode(firstTerm.toTree(), new multiplyNode_1.MultiplyNode(reason.toTree(), new variableNode_1.VariableNode("n"))).toTex(),
39
+ ],
40
+ ])
41
+ : (0, alignTex_1.alignTex)([
42
+ [`u_n`, "=", `u_1 + r \\times (n-1)`],
43
+ [
44
+ "",
45
+ "=",
46
+ new addNode_1.AddNode(firstTerm.toTree(), new multiplyNode_1.MultiplyNode(reason.toTree(), new substractNode_1.SubstractNode(new variableNode_1.VariableNode("n"), (1).toTree()))).toTex(),
47
+ ],
48
+ ])}
49
+
50
+ Il suffit alors de remplacer $n$ par $${askedRank}$ dans la formule :
51
+
52
+ ${(0, alignTex_1.alignTex)([
53
+ [
54
+ `u_{${askedRank}}`,
55
+ "=",
56
+ `${new addNode_1.AddNode(firstTerm.toTree(), new multiplyNode_1.MultiplyNode(reason.toTree(), (askedRank - firstRank).toTree())).toTex()}`,
57
+ ],
58
+ ["", "=", `${answer}`],
59
+ ])}
60
+ `,
20
61
  };
21
62
  return question;
22
63
  };
@@ -45,4 +86,5 @@ exports.arithmeticFindTerm = {
45
86
  getPropositions,
46
87
  isAnswerValid,
47
88
  subject: "Mathématiques",
89
+ hasHintAndCorrection: true,
48
90
  };
@@ -1 +1 @@
1
- {"version":3,"file":"recognizeArithmeticFromFirstTerms.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sequences/arithmetic/recognizeArithmeticFromFirstTerms.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AAOlC,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,MAAM,EAAE,EAAE,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAsEF,eAAO,MAAM,iCAAiC,EAAE,QAAQ,CAAC,WAAW,CAcnE,CAAC"}
1
+ {"version":3,"file":"recognizeArithmeticFromFirstTerms.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sequences/arithmetic/recognizeArithmeticFromFirstTerms.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AAOlC,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,MAAM,EAAE,EAAE,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AA0EF,eAAO,MAAM,iCAAiC,EAAE,QAAQ,CAAC,WAAW,CAenE,CAAC"}