math-exercises 2.2.9 → 2.2.10

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 (232) hide show
  1. package/lib/exercises/math/calcul/arithmetics/commonDivisorsList.d.ts.map +1 -1
  2. package/lib/exercises/math/calcul/arithmetics/commonDivisorsList.js +24 -7
  3. package/lib/exercises/math/calcul/fractions/fractionsSumsSameDenominators.d.ts.map +1 -1
  4. package/lib/exercises/math/calcul/fractions/fractionsSumsSameDenominators.js +33 -1
  5. package/lib/exercises/math/calcul/operations/expressionNature.d.ts +8 -0
  6. package/lib/exercises/math/calcul/operations/expressionNature.d.ts.map +1 -1
  7. package/lib/exercises/math/calcul/operations/expressionNature.js +180 -80
  8. package/lib/exercises/math/calcul/operations/index.d.ts +1 -0
  9. package/lib/exercises/math/calcul/operations/index.d.ts.map +1 -1
  10. package/lib/exercises/math/calcul/operations/index.js +1 -0
  11. package/lib/exercises/math/calculLitteral/distributivity/doubleDistributivity.d.ts.map +1 -1
  12. package/lib/exercises/math/calculLitteral/distributivity/firstIdentity.d.ts.map +1 -1
  13. package/lib/exercises/math/calculLitteral/distributivity/secondIdentity.d.ts.map +1 -1
  14. package/lib/exercises/math/calculLitteral/distributivity/simpleDistributivity.d.ts.map +1 -1
  15. package/lib/exercises/math/calculLitteral/distributivity/thirdIdentity.d.ts.map +1 -1
  16. package/lib/exercises/math/calculLitteral/equation/equationType2Exercise.d.ts.map +1 -1
  17. package/lib/exercises/math/calculLitteral/equation/equationType4Exercise.d.ts.map +1 -1
  18. package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq1.d.ts.map +1 -1
  19. package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq2.d.ts.map +1 -1
  20. package/lib/exercises/math/derivation/derivative/convexityQuadrinomials.d.ts.map +1 -1
  21. package/lib/exercises/math/functions/basics/graphicInequation.d.ts.map +1 -1
  22. package/lib/exercises/math/functions/basics/graphicInequation.js +4 -1
  23. package/lib/exercises/math/functions/basics/twoFunctionsInequation.d.ts.map +1 -1
  24. package/lib/exercises/math/functions/basics/twoFunctionsInequation.js +12 -1
  25. package/lib/exercises/math/functions/trinoms/canonicalFromDevForm.d.ts.map +1 -1
  26. package/lib/exercises/math/geometry/cartesian/directionVector.d.ts.map +1 -1
  27. package/lib/exercises/math/geometry/cartesian/directionVectorEquation.d.ts.map +1 -1
  28. package/lib/exercises/math/geometry/cartesian/placeAPoint.d.ts.map +1 -1
  29. package/lib/exercises/math/geometry/cartesian/placeAPoint.js +0 -4
  30. package/lib/exercises/math/geometry/vectors/equalCaracteristicFromGraph.d.ts.map +1 -1
  31. package/lib/exercises/math/geometry/vectors/equalCaracteristicFromGraph.js +2 -3
  32. package/lib/exercises/math/geometry/vectors/vectorCoordinatesFromTwoPoints.d.ts.map +1 -1
  33. package/lib/exercises/math/geometry/vectors/vectorCoordinatesFromTwoPoints.js +17 -0
  34. package/lib/exercises/math/geometry/volumes/volumeOfCube.d.ts.map +1 -1
  35. package/lib/exercises/math/geometry/volumes/volumeOfCube.js +7 -1
  36. package/lib/exercises/math/index.d.ts +0 -1
  37. package/lib/exercises/math/index.d.ts.map +1 -1
  38. package/lib/exercises/math/index.js +0 -1
  39. package/lib/exercises/math/limits/rationalFracForbiddenValueLimit.d.ts.map +1 -1
  40. package/lib/exercises/math/powers/powersDivision.d.ts.map +1 -1
  41. package/lib/exercises/math/powers/powersDivision.js +35 -2
  42. package/lib/exercises/math/probaStat/calculateProbaOfBinomialDistribution.d.ts.map +1 -1
  43. package/lib/exercises/math/probaStat/calculateProbaOfBinomialDistribution.js +21 -0
  44. package/lib/exercises/math/probaStat/probaFromTableWithContext.js +1 -1
  45. package/lib/exercises/math/probaStat/stats1var/averageList.d.ts +7 -0
  46. package/lib/exercises/math/probaStat/stats1var/averageList.d.ts.map +1 -0
  47. package/lib/exercises/math/probaStat/stats1var/averageList.js +52 -0
  48. package/lib/exercises/math/probaStat/stats1var/etendueList.d.ts +7 -0
  49. package/lib/exercises/math/probaStat/stats1var/etendueList.d.ts.map +1 -0
  50. package/lib/exercises/math/probaStat/stats1var/etendueList.js +49 -0
  51. package/lib/exercises/math/probaStat/stats1var/index.d.ts +2 -0
  52. package/lib/exercises/math/probaStat/stats1var/index.d.ts.map +1 -1
  53. package/lib/exercises/math/probaStat/stats1var/index.js +2 -0
  54. package/lib/exercises/math/sequences/arithmetic/arithmeticFindTerm.d.ts.map +1 -1
  55. package/lib/exercises/math/sequences/arithmetic/arithmeticFindTerm.js +42 -0
  56. package/lib/exercises/math/sequences/arithmetic/recognizeArithmeticFromFirstTerms.d.ts.map +1 -1
  57. package/lib/exercises/math/sequences/arithmetic/recognizeArithmeticFromFirstTerms.js +7 -2
  58. package/lib/exercises/math/sequences/geometric/geometricFindTerm.d.ts.map +1 -1
  59. package/lib/exercises/math/sequences/geometric/geometricFindTerm.js +42 -0
  60. package/lib/exercises/math/sequences/geometric/geometricFirstTermsGeneralSum.d.ts +10 -0
  61. package/lib/exercises/math/sequences/geometric/geometricFirstTermsGeneralSum.d.ts.map +1 -0
  62. package/lib/exercises/math/sequences/geometric/geometricFirstTermsGeneralSum.js +56 -0
  63. package/lib/exercises/math/sequences/geometric/index.d.ts +1 -0
  64. package/lib/exercises/math/sequences/geometric/index.d.ts.map +1 -1
  65. package/lib/exercises/math/sequences/geometric/index.js +1 -0
  66. package/lib/exercises/math/sequences/index.d.ts +2 -0
  67. package/lib/exercises/math/sequences/index.d.ts.map +1 -1
  68. package/lib/exercises/math/sequences/index.js +2 -0
  69. package/lib/exercises/math/sequences/sequenceEvaluation.d.ts +10 -0
  70. package/lib/exercises/math/sequences/sequenceEvaluation.d.ts.map +1 -0
  71. package/lib/exercises/math/sequences/sequenceEvaluation.js +143 -0
  72. package/lib/exercises/math/sequences/sequencePlot.d.ts +9 -0
  73. package/lib/exercises/math/sequences/sequencePlot.d.ts.map +1 -0
  74. package/lib/exercises/math/sequences/sequencePlot.js +94 -0
  75. package/lib/exercises/math/sets/intervals/intervalsIntersection.d.ts.map +1 -1
  76. package/lib/exercises/math/sets/intervals/intervalsIntersection.js +19 -1
  77. package/lib/exercises/math/sets/intervals/intervalsUnion.js +1 -1
  78. package/lib/exercises/math/trigonometry/arcValue.d.ts.map +1 -1
  79. package/lib/exercises/math/trigonometry/arcValue.js +23 -0
  80. package/lib/index.d.ts +22 -9
  81. package/lib/index.d.ts.map +1 -1
  82. package/lib/math/geometry/point.d.ts +11 -0
  83. package/lib/math/geometry/point.d.ts.map +1 -1
  84. package/lib/math/geometry/point.js +8 -0
  85. package/lib/math/numbers/reals/extendedRingElement.d.ts +3 -1
  86. package/lib/math/numbers/reals/extendedRingElement.d.ts.map +1 -1
  87. package/lib/math/numbers/reals/real.d.ts +1 -1
  88. package/lib/math/polynomials/trinom.d.ts +1 -1
  89. package/lib/math/sets/intervals/intervals.d.ts +3 -1
  90. package/lib/math/sets/intervals/intervals.d.ts.map +1 -1
  91. package/lib/math/sets/intervals/intervals.js +7 -3
  92. package/lib/math/sets/mathSet.d.ts +2 -2
  93. package/lib/math/sets/mathSet.d.ts.map +1 -1
  94. package/lib/math/sets/mathSetInterface.d.ts +1 -1
  95. package/lib/playground.d.ts.map +1 -1
  96. package/lib/playground.js +18 -2
  97. package/lib/server.d.ts.map +1 -1
  98. package/lib/tree/nodes/algebraicNode.d.ts.map +1 -1
  99. package/lib/tree/nodes/algebraicNode.js +0 -3
  100. package/lib/tree/nodes/complex/complexNode.d.ts +10 -1
  101. package/lib/tree/nodes/complex/complexNode.d.ts.map +1 -1
  102. package/lib/tree/nodes/complex/complexNode.js +7 -0
  103. package/lib/tree/nodes/equations/equalNode.d.ts +10 -1
  104. package/lib/tree/nodes/equations/equalNode.d.ts.map +1 -1
  105. package/lib/tree/nodes/equations/equalNode.js +7 -0
  106. package/lib/tree/nodes/equations/equationSolutionNode.d.ts +10 -1
  107. package/lib/tree/nodes/equations/equationSolutionNode.d.ts.map +1 -1
  108. package/lib/tree/nodes/equations/equationSolutionNode.js +6 -0
  109. package/lib/tree/nodes/equations/multiEqualNode.d.ts +7 -1
  110. package/lib/tree/nodes/equations/multiEqualNode.d.ts.map +1 -1
  111. package/lib/tree/nodes/equations/multiEqualNode.js +6 -0
  112. package/lib/tree/nodes/functions/absNode.d.ts +7 -1
  113. package/lib/tree/nodes/functions/absNode.d.ts.map +1 -1
  114. package/lib/tree/nodes/functions/absNode.js +6 -0
  115. package/lib/tree/nodes/functions/arcSinNode.d.ts +7 -1
  116. package/lib/tree/nodes/functions/arcSinNode.d.ts.map +1 -1
  117. package/lib/tree/nodes/functions/arcSinNode.js +8 -1
  118. package/lib/tree/nodes/functions/arccosNode.d.ts +7 -1
  119. package/lib/tree/nodes/functions/arccosNode.d.ts.map +1 -1
  120. package/lib/tree/nodes/functions/arccosNode.js +8 -1
  121. package/lib/tree/nodes/functions/arctanNode.d.ts +7 -1
  122. package/lib/tree/nodes/functions/arctanNode.d.ts.map +1 -1
  123. package/lib/tree/nodes/functions/arctanNode.js +8 -1
  124. package/lib/tree/nodes/functions/cosNode.d.ts +7 -1
  125. package/lib/tree/nodes/functions/cosNode.d.ts.map +1 -1
  126. package/lib/tree/nodes/functions/cosNode.js +8 -1
  127. package/lib/tree/nodes/functions/expNode.d.ts +7 -1
  128. package/lib/tree/nodes/functions/expNode.d.ts.map +1 -1
  129. package/lib/tree/nodes/functions/expNode.js +6 -0
  130. package/lib/tree/nodes/functions/integralNode.d.ts +19 -2
  131. package/lib/tree/nodes/functions/integralNode.d.ts.map +1 -1
  132. package/lib/tree/nodes/functions/integralNode.js +20 -0
  133. package/lib/tree/nodes/functions/log10Node.d.ts +7 -1
  134. package/lib/tree/nodes/functions/log10Node.d.ts.map +1 -1
  135. package/lib/tree/nodes/functions/log10Node.js +6 -0
  136. package/lib/tree/nodes/functions/logNode.d.ts +7 -1
  137. package/lib/tree/nodes/functions/logNode.d.ts.map +1 -1
  138. package/lib/tree/nodes/functions/logNode.js +6 -0
  139. package/lib/tree/nodes/functions/oppositeNode.d.ts +7 -1
  140. package/lib/tree/nodes/functions/oppositeNode.d.ts.map +1 -1
  141. package/lib/tree/nodes/functions/oppositeNode.js +6 -0
  142. package/lib/tree/nodes/functions/sinNode.d.ts +7 -1
  143. package/lib/tree/nodes/functions/sinNode.d.ts.map +1 -1
  144. package/lib/tree/nodes/functions/sinNode.js +8 -1
  145. package/lib/tree/nodes/functions/sqrtNode.d.ts +7 -1
  146. package/lib/tree/nodes/functions/sqrtNode.d.ts.map +1 -1
  147. package/lib/tree/nodes/functions/sqrtNode.js +6 -0
  148. package/lib/tree/nodes/functions/tanNode.d.ts +7 -1
  149. package/lib/tree/nodes/functions/tanNode.d.ts.map +1 -1
  150. package/lib/tree/nodes/functions/tanNode.js +8 -1
  151. package/lib/tree/nodes/geometry/degree.d.ts +5 -1
  152. package/lib/tree/nodes/geometry/degree.d.ts.map +1 -1
  153. package/lib/tree/nodes/geometry/degree.js +6 -0
  154. package/lib/tree/nodes/geometry/lengthNode.d.ts +5 -1
  155. package/lib/tree/nodes/geometry/lengthNode.d.ts.map +1 -1
  156. package/lib/tree/nodes/geometry/lengthNode.js +6 -0
  157. package/lib/tree/nodes/geometry/pointNode.d.ts +14 -1
  158. package/lib/tree/nodes/geometry/pointNode.d.ts.map +1 -1
  159. package/lib/tree/nodes/geometry/pointNode.js +6 -0
  160. package/lib/tree/nodes/geometry/vectorNode.d.ts +5 -1
  161. package/lib/tree/nodes/geometry/vectorNode.d.ts.map +1 -1
  162. package/lib/tree/nodes/geometry/vectorNode.js +6 -0
  163. package/lib/tree/nodes/hasVariableNode.d.ts +3 -0
  164. package/lib/tree/nodes/hasVariableNode.d.ts.map +1 -0
  165. package/lib/tree/nodes/hasVariableNode.js +16 -0
  166. package/lib/tree/nodes/inequations/inequationNode.d.ts +8 -1
  167. package/lib/tree/nodes/inequations/inequationNode.d.ts.map +1 -1
  168. package/lib/tree/nodes/inequations/inequationNode.js +7 -0
  169. package/lib/tree/nodes/inequations/inequationSolutionNode.d.ts +19 -1
  170. package/lib/tree/nodes/inequations/inequationSolutionNode.d.ts.map +1 -1
  171. package/lib/tree/nodes/inequations/inequationSolutionNode.js +6 -0
  172. package/lib/tree/nodes/node.d.ts +50 -8
  173. package/lib/tree/nodes/node.d.ts.map +1 -1
  174. package/lib/tree/nodes/node.js +49 -21
  175. package/lib/tree/nodes/nodeConstructor.d.ts +7 -0
  176. package/lib/tree/nodes/nodeConstructor.d.ts.map +1 -0
  177. package/lib/tree/nodes/nodeConstructor.js +170 -0
  178. package/lib/tree/nodes/numbers/constantNode.d.ts +7 -1
  179. package/lib/tree/nodes/numbers/constantNode.d.ts.map +1 -1
  180. package/lib/tree/nodes/numbers/constantNode.js +9 -1
  181. package/lib/tree/nodes/numbers/numberNode.d.ts +5 -1
  182. package/lib/tree/nodes/numbers/numberNode.d.ts.map +1 -1
  183. package/lib/tree/nodes/numbers/numberNode.js +6 -0
  184. package/lib/tree/nodes/numbers/percentNode.d.ts +5 -1
  185. package/lib/tree/nodes/numbers/percentNode.d.ts.map +1 -1
  186. package/lib/tree/nodes/numbers/percentNode.js +6 -0
  187. package/lib/tree/nodes/operators/addNode.d.ts +10 -1
  188. package/lib/tree/nodes/operators/addNode.d.ts.map +1 -1
  189. package/lib/tree/nodes/operators/addNode.js +7 -0
  190. package/lib/tree/nodes/operators/divideNode.d.ts +11 -1
  191. package/lib/tree/nodes/operators/divideNode.d.ts.map +1 -1
  192. package/lib/tree/nodes/operators/divideNode.js +12 -0
  193. package/lib/tree/nodes/operators/fractionNode.d.ts +10 -1
  194. package/lib/tree/nodes/operators/fractionNode.d.ts.map +1 -1
  195. package/lib/tree/nodes/operators/fractionNode.js +7 -0
  196. package/lib/tree/nodes/operators/limitNode.d.ts +11 -1
  197. package/lib/tree/nodes/operators/limitNode.d.ts.map +1 -1
  198. package/lib/tree/nodes/operators/limitNode.js +8 -0
  199. package/lib/tree/nodes/operators/multiplyNode.d.ts +10 -1
  200. package/lib/tree/nodes/operators/multiplyNode.d.ts.map +1 -1
  201. package/lib/tree/nodes/operators/multiplyNode.js +7 -0
  202. package/lib/tree/nodes/operators/powerNode.d.ts +10 -1
  203. package/lib/tree/nodes/operators/powerNode.d.ts.map +1 -1
  204. package/lib/tree/nodes/operators/powerNode.js +7 -0
  205. package/lib/tree/nodes/operators/substractNode.d.ts +11 -1
  206. package/lib/tree/nodes/operators/substractNode.d.ts.map +1 -1
  207. package/lib/tree/nodes/operators/substractNode.js +12 -0
  208. package/lib/tree/nodes/sets/belongsNode.d.ts +10 -1
  209. package/lib/tree/nodes/sets/belongsNode.d.ts.map +1 -1
  210. package/lib/tree/nodes/sets/belongsNode.js +7 -0
  211. package/lib/tree/nodes/sets/closure.d.ts +2 -0
  212. package/lib/tree/nodes/sets/closure.d.ts.map +1 -1
  213. package/lib/tree/nodes/sets/closure.js +20 -0
  214. package/lib/tree/nodes/sets/discreteSetNode.d.ts +10 -2
  215. package/lib/tree/nodes/sets/discreteSetNode.d.ts.map +1 -1
  216. package/lib/tree/nodes/sets/discreteSetNode.js +13 -3
  217. package/lib/tree/nodes/sets/intervalNode.d.ts +14 -2
  218. package/lib/tree/nodes/sets/intervalNode.d.ts.map +1 -1
  219. package/lib/tree/nodes/sets/intervalNode.js +21 -0
  220. package/lib/tree/nodes/sets/setNode.d.ts +1 -0
  221. package/lib/tree/nodes/sets/setNode.d.ts.map +1 -1
  222. package/lib/tree/nodes/sets/unionIntervalNode.d.ts +7 -1
  223. package/lib/tree/nodes/sets/unionIntervalNode.d.ts.map +1 -1
  224. package/lib/tree/nodes/sets/unionIntervalNode.js +6 -0
  225. package/lib/tree/nodes/variables/variableNode.d.ts +5 -1
  226. package/lib/tree/nodes/variables/variableNode.d.ts.map +1 -1
  227. package/lib/tree/nodes/variables/variableNode.js +6 -0
  228. package/lib/tree/utilities/operatorComposition.js +4 -2
  229. package/lib/utils/alignTex.js +11 -9
  230. package/lib/utils/diceFlip.d.ts.map +1 -1
  231. package/lib/utils/diceFlip.js +2 -6
  232. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"vectorCoordinatesFromTwoPoints.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/vectors/vectorCoordinatesFromTwoPoints.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAKlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,EAAE,CAAC;IACZ,CAAC,EAAE,MAAM,EAAE,CAAC;CACb,CAAC;AAyDF,eAAO,MAAM,8BAA8B,EAAE,QAAQ,CAAC,WAAW,CAchE,CAAC"}
1
+ {"version":3,"file":"vectorCoordinatesFromTwoPoints.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/vectors/vectorCoordinatesFromTwoPoints.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAOlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,EAAE,CAAC;IACZ,CAAC,EAAE,MAAM,EAAE,CAAC;CACb,CAAC;AA0EF,eAAO,MAAM,8BAA8B,EAAE,QAAQ,CAAC,WAAW,CAehE,CAAC"}
@@ -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"}
@@ -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":"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"}
@@ -33,12 +33,15 @@ const getRecognizeArithmeticFromFirstTermsQuestion = () => {
33
33
  .map((el, index) => firstTerm + index * reason);
34
34
  const answerIndex = (0, randint_1.randint)(0, 4);
35
35
  sequences.splice(answerIndex, 0, rightSequence);
36
- const answer = `\\text{Suite ${answerIndex + 1} : }${rightSequence.join("\\ ; \\ ")}`;
36
+ const names = ["u", "v", "w", "z"];
37
+ const answer = `\\text{Suite } ${names[answerIndex]} : \\quad ${rightSequence.join("\\ ; \\ ")}`;
37
38
  const question = {
38
39
  answer,
39
40
  instruction: `Parmi les suites suivantes, laquelle semble être arithmétique ?`,
40
41
  keys: [],
41
42
  answerFormat: "tex",
43
+ hint: `Une suite est arithmétique lorsque, pour passer d'un terme au suivant, on additionne ou on soustrait toujours par le même nombre.`,
44
+ correction: `La suite $${names[answerIndex]}$ semble bien être arithmétique, puisque pour passer d'un terme au suivant, on additionne par $${reason}$.`,
42
45
  identifiers: { sequences, answerIndex },
43
46
  };
44
47
  return question;
@@ -46,10 +49,11 @@ const getRecognizeArithmeticFromFirstTermsQuestion = () => {
46
49
  const getPropositions = (n, { answer, sequences, answerIndex }) => {
47
50
  const propositions = [];
48
51
  (0, exercise_1.addValidProp)(propositions, answer);
52
+ const names = ["u", "v", "w", "z"];
49
53
  sequences.forEach((sequence, index) => {
50
54
  if (index === answerIndex)
51
55
  return;
52
- (0, exercise_1.addWrongProp)(propositions, `\\text{Suite ${index + 1} : }${sequence.join("\\ ; \\ ")}`);
56
+ (0, exercise_1.addWrongProp)(propositions, `\\text{Suite } ${names[index]} : \\quad ${sequence.join("\\ ; \\ ")}`);
53
57
  });
54
58
  return (0, shuffle_1.shuffle)(propositions);
55
59
  };
@@ -69,4 +73,5 @@ exports.recognizeArithmeticFromFirstTerms = {
69
73
  isAnswerValid,
70
74
  answerType: "QCU",
71
75
  subject: "Mathématiques",
76
+ hasHintAndCorrection: true,
72
77
  };
@@ -1 +1 @@
1
- {"version":3,"file":"geometricFindTerm.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sequences/geometric/geometricFindTerm.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,iBAAiB,EAAE,QAAQ,CAAC,WAAW,CAenD,CAAC"}
1
+ {"version":3,"file":"geometricFindTerm.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sequences/geometric/geometricFindTerm.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,iBAAiB,EAAE,QAAQ,CAAC,WAAW,CAgBnD,CAAC"}
@@ -4,6 +4,11 @@ exports.geometricFindTerm = 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 multiplyNode_1 = require("../../../../tree/nodes/operators/multiplyNode");
8
+ const powerNode_1 = require("../../../../tree/nodes/operators/powerNode");
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 getGeometricFindTermQuestion = () => {
9
14
  const firstRank = (0, random_1.random)([0, 1]);
@@ -16,6 +21,42 @@ const getGeometricFindTermQuestion = () => {
16
21
  instruction: `Soit $u$ la suite géométrique de premier terme $u_${firstRank} = ${firstTerm}$ et de raison $q = ${reason}$. Calculer $u_{${askedRank}}$.`,
17
22
  keys: [],
18
23
  answerFormat: "tex",
24
+ hint: `Le terme général d'une suite geométrique est :
25
+
26
+ ${!firstRank
27
+ ? `$u_n = u_0 \\times q^n$, où $u_0$`
28
+ : `$u_n = u_1 \\times q^{n-1}$, où $u_1$`} est le premier terme et $q$ la raison.`,
29
+ correction: `Le terme général de la suite $u$ est :
30
+
31
+ ${!firstRank
32
+ ? (0, alignTex_1.alignTex)([
33
+ [`u_n`, "=", `u_0 \\times q^n`],
34
+ [
35
+ "",
36
+ "=",
37
+ new multiplyNode_1.MultiplyNode(firstTerm.toTree(), new powerNode_1.PowerNode(reason.toTree(), new variableNode_1.VariableNode("n"))).toTex(),
38
+ ],
39
+ ])
40
+ : (0, alignTex_1.alignTex)([
41
+ [`u_n`, "=", `u_1 \\times q^{n-1}`],
42
+ [
43
+ "",
44
+ "=",
45
+ new multiplyNode_1.MultiplyNode(firstTerm.toTree(), new powerNode_1.PowerNode(reason.toTree(), new substractNode_1.SubstractNode(new variableNode_1.VariableNode("n"), (1).toTree()))).toTex(),
46
+ ],
47
+ ])}
48
+
49
+ Il suffit alors de remplacer $n$ par $${askedRank}$ dans la formule :
50
+
51
+ ${(0, alignTex_1.alignTex)([
52
+ [
53
+ `u_{${askedRank}}`,
54
+ "=",
55
+ `${new multiplyNode_1.MultiplyNode(firstTerm.toTree(), new powerNode_1.PowerNode(reason.toTree(), (askedRank - firstRank).toTree())).toTex()}`,
56
+ ],
57
+ ["", "=", `${answer}`],
58
+ ])}
59
+ `,
19
60
  identifiers: { firstRank, askedRank, firstTerm, reason },
20
61
  };
21
62
  return question;
@@ -45,4 +86,5 @@ exports.geometricFindTerm = {
45
86
  getPropositions,
46
87
  isAnswerValid,
47
88
  subject: "Mathématiques",
89
+ hasHintAndCorrection: true,
48
90
  };
@@ -0,0 +1,10 @@
1
+ import { Exercise } from "../../../../exercises/exercise";
2
+ type Identifiers = {
3
+ firstRank: number;
4
+ firstValue: number;
5
+ reason: number;
6
+ nbTerms: number;
7
+ };
8
+ export declare const geometricFirstTermsGeneralSum: Exercise<Identifiers>;
9
+ export {};
10
+ //# sourceMappingURL=geometricFirstTermsGeneralSum.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"geometricFirstTermsGeneralSum.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sequences/geometric/geometricFirstTermsGeneralSum.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AAKlC,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AA+CF,eAAO,MAAM,6BAA6B,EAAE,QAAQ,CAAC,WAAW,CAc/D,CAAC"}
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.geometricFirstTermsGeneralSum = 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 random_1 = require("../../../../utils/random");
8
+ const getGeometricFirstTermsGeneralSumQuestion = () => {
9
+ const firstRank = (0, random_1.random)([0, 1]);
10
+ const firstValue = (0, randint_1.randint)(-9, 10, [0]);
11
+ const reason = (0, randint_1.randint)(-5, 5, [0, 1]);
12
+ const nbTerms = (0, randint_1.randint)(4, 9);
13
+ const answer = (firstValue * (1 - Math.pow(reason, nbTerms))) / (1 - reason);
14
+ const question = {
15
+ answer: answer + "",
16
+ instruction: `Soit $u$ une suite géométrique de premier terme $u_${firstRank} = ${firstValue}$ et de raison $${reason}$. Calculer la somme des $${nbTerms}$ premiers termes de $u$.`,
17
+ keys: [],
18
+ answerFormat: "tex",
19
+ identifiers: {
20
+ firstRank,
21
+ firstValue,
22
+ reason,
23
+ nbTerms,
24
+ },
25
+ };
26
+ return question;
27
+ };
28
+ const getPropositions = (n, { answer, firstRank, firstValue, reason, nbTerms }) => {
29
+ const propositions = [];
30
+ (0, exercise_1.addValidProp)(propositions, answer);
31
+ while (propositions.length < n) {
32
+ const fake = (firstValue *
33
+ (1 -
34
+ Math.pow(reason === -1 ? (0, randint_1.randint)(2, 5) : reason, (0, randint_1.randint)(3, 10)))) /
35
+ (1 - reason);
36
+ (0, exercise_1.tryToAddWrongProp)(propositions, fake.frenchify());
37
+ }
38
+ return (0, exercise_1.shuffleProps)(propositions, n);
39
+ };
40
+ const isAnswerValid = (ans, { answer }) => {
41
+ return ans === answer;
42
+ };
43
+ exports.geometricFirstTermsGeneralSum = {
44
+ id: "geometricFirstTermsGeneralSum",
45
+ connector: "=",
46
+ label: "Somme des termes d'une suite géométrique (cas général)",
47
+ levels: [],
48
+ isSingleStep: true,
49
+ sections: [],
50
+ generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getGeometricFirstTermsGeneralSumQuestion, nb),
51
+ qcmTimer: 60,
52
+ freeTimer: 60,
53
+ getPropositions,
54
+ isAnswerValid,
55
+ subject: "Mathématiques",
56
+ };
@@ -7,4 +7,5 @@ export * from "./geometricRecurrenceFormulaUsage";
7
7
  export * from "./geometricFindExplicitFormulaFirstTermRandom";
8
8
  export * from "./geometricFindTerm";
9
9
  export * from "./geometricRecognizeReasonFromFirstTerms";
10
+ export * from "./geometricFirstTermsGeneralSum";
10
11
  //# sourceMappingURL=index.d.ts.map