math-exercises 2.2.5 → 2.2.7

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 (102) hide show
  1. package/lib/exercises/math/calcul/addAndSub.js +1 -1
  2. package/lib/exercises/math/calcul/addAndSubWithoutRelatives.js +1 -1
  3. package/lib/exercises/math/calcul/digitDecimalRank.d.ts.map +1 -1
  4. package/lib/exercises/math/calcul/digitDecimalRank.js +2 -3
  5. package/lib/exercises/math/calcul/digitDecimalRankNumber.d.ts +8 -0
  6. package/lib/exercises/math/calcul/digitDecimalRankNumber.d.ts.map +1 -0
  7. package/lib/exercises/math/calcul/digitDecimalRankNumber.js +59 -0
  8. package/lib/exercises/math/calcul/digitRank.d.ts.map +1 -1
  9. package/lib/exercises/math/calcul/digitRank.js +2 -3
  10. package/lib/exercises/math/calcul/digitRankNumber.d.ts.map +1 -1
  11. package/lib/exercises/math/calcul/digitRankNumber.js +3 -5
  12. package/lib/exercises/math/calcul/index.d.ts +1 -0
  13. package/lib/exercises/math/calcul/index.d.ts.map +1 -1
  14. package/lib/exercises/math/calcul/index.js +1 -0
  15. package/lib/exercises/math/calcul/mentalCaluls/index.d.ts +2 -0
  16. package/lib/exercises/math/calcul/mentalCaluls/index.d.ts.map +1 -1
  17. package/lib/exercises/math/calcul/mentalCaluls/index.js +2 -0
  18. package/lib/exercises/math/calcul/mentalCaluls/mentalAddAndSub.js +1 -1
  19. package/lib/exercises/math/calcul/mentalCaluls/mentalAddAndSubNoRelative.d.ts +7 -0
  20. package/lib/exercises/math/calcul/mentalCaluls/mentalAddAndSubNoRelative.d.ts.map +1 -0
  21. package/lib/exercises/math/calcul/mentalCaluls/mentalAddAndSubNoRelative.js +71 -0
  22. package/lib/exercises/math/calcul/mentalCaluls/mentalMultiplications.d.ts.map +1 -1
  23. package/lib/exercises/math/calcul/mentalCaluls/mentalMultiplications.js +25 -17
  24. package/lib/exercises/math/calcul/mentalCaluls/mentalMultiplicationsNoRelative.d.ts +7 -0
  25. package/lib/exercises/math/calcul/mentalCaluls/mentalMultiplicationsNoRelative.d.ts.map +1 -0
  26. package/lib/exercises/math/calcul/mentalCaluls/mentalMultiplicationsNoRelative.js +93 -0
  27. package/lib/exercises/math/calcul/operations/expressionNature.d.ts +1 -0
  28. package/lib/exercises/math/calcul/operations/expressionNature.d.ts.map +1 -0
  29. package/lib/exercises/math/calcul/operations/expressionNature.js +81 -0
  30. package/lib/exercises/math/functions/basics/inverseImageFunctionTable.d.ts +2 -0
  31. package/lib/exercises/math/functions/basics/inverseImageFunctionTable.d.ts.map +1 -1
  32. package/lib/exercises/math/functions/basics/inverseImageFunctionTable.js +46 -66
  33. package/lib/exercises/math/functions/trinoms/solveSecondDegreeEquationByFactorisation.js +1 -1
  34. package/lib/exercises/math/functions/trinoms/solveSecondDegreeEquationFromCano.js +1 -1
  35. package/lib/exercises/math/geometry/cartesian/placeAPoint.d.ts +4 -1
  36. package/lib/exercises/math/geometry/cartesian/placeAPoint.d.ts.map +1 -1
  37. package/lib/exercises/math/geometry/cartesian/placeAPoint.js +1 -1
  38. package/lib/exercises/math/percent/averageEvolutionRate.d.ts.map +1 -1
  39. package/lib/exercises/math/percent/averageEvolutionRate.js +16 -0
  40. package/lib/exercises/math/percent/cmToEvolution.d.ts +7 -0
  41. package/lib/exercises/math/percent/cmToEvolution.d.ts.map +1 -0
  42. package/lib/exercises/math/percent/cmToEvolution.js +70 -0
  43. package/lib/exercises/math/percent/evolutionToCM.d.ts +0 -1
  44. package/lib/exercises/math/percent/evolutionToCM.d.ts.map +1 -1
  45. package/lib/exercises/math/percent/evolutionToCM.js +20 -24
  46. package/lib/exercises/math/percent/findProportion.d.ts.map +1 -1
  47. package/lib/exercises/math/percent/findProportion.js +15 -0
  48. package/lib/exercises/math/percent/globalPercent.d.ts.map +1 -1
  49. package/lib/exercises/math/percent/globalPercent.js +14 -0
  50. package/lib/exercises/math/percent/index.d.ts +1 -0
  51. package/lib/exercises/math/percent/index.d.ts.map +1 -1
  52. package/lib/exercises/math/percent/index.js +1 -0
  53. package/lib/exercises/math/percent/isTableProportional.d.ts.map +1 -1
  54. package/lib/exercises/math/percent/isTableProportional.js +35 -33
  55. package/lib/exercises/math/percent/percentToDecimal.d.ts.map +1 -1
  56. package/lib/exercises/math/percent/percentToDecimal.js +14 -0
  57. package/lib/exercises/math/percent/reciprocalPercentage.d.ts.map +1 -1
  58. package/lib/exercises/math/percent/reciprocalPercentage.js +18 -0
  59. package/lib/exercises/math/percent/valuePercent.d.ts.map +1 -1
  60. package/lib/exercises/math/percent/valuePercent.js +7 -0
  61. package/lib/exercises/math/powers/powersProduct.d.ts.map +1 -1
  62. package/lib/exercises/math/powers/powersProduct.js +22 -0
  63. package/lib/exercises/math/probaStat/expectedValueOfBinomialProba.d.ts.map +1 -1
  64. package/lib/exercises/math/probaStat/expectedValueOfBinomialProba.js +14 -2
  65. package/lib/exercises/math/probaStat/probaFromTableNoContext.d.ts.map +1 -1
  66. package/lib/exercises/math/probaStat/probaFromTableNoContext.js +5 -4
  67. package/lib/exercises/math/probaStat/varianceOfBinomialProba.d.ts.map +1 -1
  68. package/lib/exercises/math/probaStat/varianceOfBinomialProba.js +21 -1
  69. package/lib/exercises/math/sequences/arithmetic/arithmeticExplicitFormulaUsage.d.ts.map +1 -1
  70. package/lib/exercises/math/sequences/arithmetic/arithmeticExplicitFormulaUsage.js +15 -0
  71. package/lib/exercises/math/sequences/arithmetic/arithmeticFindExplicitFormula.d.ts.map +1 -1
  72. package/lib/exercises/math/sequences/arithmetic/arithmeticFindExplicitFormula.js +17 -0
  73. package/lib/exercises/math/sequences/geometric/geometricExplicitFormulaUsage.d.ts.map +1 -1
  74. package/lib/exercises/math/sequences/geometric/geometricExplicitFormulaUsage.js +13 -0
  75. package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormula.d.ts.map +1 -1
  76. package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormula.js +15 -0
  77. package/lib/exercises/math/spaceGeometry/vectors/spaceVectorCoordinatesFromPoints.d.ts.map +1 -1
  78. package/lib/exercises/math/spaceGeometry/vectors/spaceVectorCoordinatesFromPoints.js +15 -0
  79. package/lib/exercises/math/spaceGeometry/vectors/spaceVectorNormCalculation.d.ts.map +1 -1
  80. package/lib/exercises/math/spaceGeometry/vectors/spaceVectorNormCalculation.js +26 -1
  81. package/lib/exercises/math/suites/sequenceEvaluation.js +1 -1
  82. package/lib/exercises/math/suites/sequencePlot.d.ts.map +1 -1
  83. package/lib/exercises/math/suites/sequencePlot.js +10 -3
  84. package/lib/index.d.ts +48 -2
  85. package/lib/index.d.ts.map +1 -1
  86. package/lib/index.js +3 -0
  87. package/lib/math/geometry/spaceVector.d.ts +1 -0
  88. package/lib/math/geometry/spaceVector.d.ts.map +1 -1
  89. package/lib/math/geometry/spaceVector.js +3 -0
  90. package/lib/math/polynomials/trinom.js +2 -2
  91. package/lib/math/utils/random/randTupleInt.d.ts +1 -0
  92. package/lib/math/utils/random/randTupleInt.d.ts.map +1 -1
  93. package/lib/math/utils/random/randTupleInt.js +5 -1
  94. package/lib/playground.d.ts.map +1 -1
  95. package/lib/playground.js +2 -13
  96. package/lib/server.d.ts +1 -0
  97. package/lib/server.d.ts.map +1 -1
  98. package/lib/server.js +6 -2
  99. package/lib/utils/numberPrototype/toSeparatedThousands.d.ts +2 -0
  100. package/lib/utils/numberPrototype/toSeparatedThousands.d.ts.map +1 -0
  101. package/lib/utils/numberPrototype/toSeparatedThousands.js +12 -0
  102. package/package.json +1 -1
@@ -18,12 +18,29 @@ const getReciprocalPercentageQuestion = () => {
18
18
  const answer = `${(ans > 0
19
19
  ? "+" + (0, round_1.round)(ans, 2)
20
20
  : "" + (0, round_1.round)(ans, 2)).replace(".", ",")}\\%`;
21
+ const cm = (0, round_1.round)(1 + (isUp ? randPercent / 100 : -randPercent / 100), 4);
22
+ const recipCm = (0, round_1.round)(1 / cm, 4);
21
23
  const question = {
22
24
  instruction,
23
25
  answer,
24
26
  keys: ["percent"],
25
27
  answerFormat: "tex",
26
28
  identifiers: { isUp, randPercent },
29
+ hint: `Calcule le coefficient multiplicateur associé à une ${isUp ? "hausse" : "baisse"} de $${randPercent}\\%$. Puis, calcule le coefficient multiplicateur réciproque : c'est l'inverse du coefficient multiplicateur. Il ne reste alors plus qu'à transformer le coefficient multiplicateur réciproque en taux d'évolution.`,
30
+ correction: `Le coefficient multiplicateur correspondant à une ${isUp ? "hausse" : "baisse"} de $${randPercent}\\%$ est :
31
+
32
+ $1${isUp ? "+" : "-"}\\frac{${randPercent}}{100} = ${cm.frenchify()}$
33
+
34
+ Le coefficient multiplicateur réciproque est l'inverse du coefficient multiplicateur :
35
+
36
+ $\\frac{1}{${cm.frenchify()}} = ${recipCm.frenchify()}$
37
+
38
+ On transforme ce coefficient multiplicateur en taux d'évolution :
39
+
40
+ $(${recipCm.frenchify()}-1)\\times 100 = ${(0, round_1.round)(ans, 2).frenchify()}$.
41
+
42
+ Ainsi, le taux d'évolution permettant de revenir au prix initial est de $${answer}$.
43
+ `,
27
44
  };
28
45
  return question;
29
46
  };
@@ -59,4 +76,5 @@ exports.reciprocalPercentage = {
59
76
  getPropositions,
60
77
  isAnswerValid,
61
78
  subject: "Mathématiques",
79
+ hasHintAndCorrection: true,
62
80
  };
@@ -1 +1 @@
1
- {"version":3,"file":"valuePercent.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/percent/valuePercent.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAMlC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAmCF,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,WAAW,CAa9C,CAAC"}
1
+ {"version":3,"file":"valuePercent.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/percent/valuePercent.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAMlC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAyCF,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,WAAW,CAc9C,CAAC"}
@@ -16,6 +16,12 @@ const getValuePercentQuestion = () => {
16
16
  keys: [],
17
17
  answerFormat: "tex",
18
18
  identifiers: { percent, nb },
19
+ hint: `Pour calculer $x\\%$ d'un nombre, on le multiplie par $\\frac{x}{100}$.`,
20
+ correction: `Pour calculer $${percent}\\%$ de $${nb}$, on multiplie $${nb}$ par $\\frac{${percent}}{100}$ :
21
+
22
+ $
23
+ ${nb}\\times \\frac{${percent}}{100} = ${ans}
24
+ $`,
19
25
  };
20
26
  return question;
21
27
  };
@@ -43,4 +49,5 @@ exports.valuePercent = {
43
49
  getPropositions,
44
50
  isAnswerValid,
45
51
  subject: "Mathématiques",
52
+ hasHintAndCorrection: true,
46
53
  };
@@ -1 +1 @@
1
- {"version":3,"file":"powersProduct.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/powers/powersProduct.ts"],"names":[],"mappings":"AAAA;;GAEG;AAQH,OAAO,EACL,QAAQ,EAQT,MAAM,gBAAgB,CAAC;AAIxB,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAuDF,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,WAAW,CA6BpD,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,WAAW,CAiB/C,CAAC"}
1
+ {"version":3,"file":"powersProduct.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/powers/powersProduct.ts"],"names":[],"mappings":"AAAA;;GAEG;AAUH,OAAO,EACL,QAAQ,EAQT,MAAM,gBAAgB,CAAC;AAIxB,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA6EF,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,WAAW,CA8BpD,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,WAAW,CAkB/C,CAAC"}
@@ -7,8 +7,10 @@ exports.powersProduct = exports.powersOfTenProduct = void 0;
7
7
  const power_1 = require("../../../math/numbers/integer/power");
8
8
  const randint_1 = require("../../../math/utils/random/randint");
9
9
  const numberNode_1 = require("../../../tree/nodes/numbers/numberNode");
10
+ const addNode_1 = require("../../../tree/nodes/operators/addNode");
10
11
  const multiplyNode_1 = require("../../../tree/nodes/operators/multiplyNode");
11
12
  const powerNode_1 = require("../../../tree/nodes/operators/powerNode");
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");
@@ -26,6 +28,24 @@ const getPowersProductQuestion = (opts) => {
26
28
  keys: [],
27
29
  answerFormat: "tex",
28
30
  identifiers: { a, b, c },
31
+ hint: `Utilise la propriété : ${opts?.useOnlyPowersOfTen
32
+ ? `$10^n \\times 10^m = 10^{n+m}$`
33
+ : `$a^n \\times a^m = a^{n+m}$`}`,
34
+ correction: `On sait que ${opts?.useOnlyPowersOfTen
35
+ ? `$10^n \\times 10^m = 10^{n+m}$`
36
+ : `$a^n \\times a^m = a^{n+m}$`}.
37
+
38
+ On a donc :
39
+
40
+ ${(0, alignTex_1.alignTex)([
41
+ [
42
+ statmentTex,
43
+ "=",
44
+ new powerNode_1.PowerNode(a.toTree(), new addNode_1.AddNode(b.toTree(), c.toTree())).toTex(),
45
+ ],
46
+ ["", "=", answer],
47
+ ])}
48
+ `,
29
49
  };
30
50
  return question;
31
51
  };
@@ -74,6 +94,7 @@ exports.powersOfTenProduct = {
74
94
  getPropositions,
75
95
  isAnswerValid,
76
96
  subject: "Mathématiques",
97
+ hasHintAndCorrection: true,
77
98
  };
78
99
  exports.powersProduct = {
79
100
  id: "powersProduct",
@@ -88,4 +109,5 @@ exports.powersProduct = {
88
109
  getPropositions,
89
110
  isAnswerValid,
90
111
  subject: "Mathématiques",
112
+ hasHintAndCorrection: true,
91
113
  };
@@ -1 +1 @@
1
- {"version":3,"file":"expectedValueOfBinomialProba.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/probaStat/expectedValueOfBinomialProba.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAWlC,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAwEF,eAAO,MAAM,4BAA4B,EAAE,QAAQ,CAAC,WAAW,CAa9D,CAAC"}
1
+ {"version":3,"file":"expectedValueOfBinomialProba.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/probaStat/expectedValueOfBinomialProba.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAYlC,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAiFF,eAAO,MAAM,4BAA4B,EAAE,QAAQ,CAAC,WAAW,CAc9D,CAAC"}
@@ -8,21 +8,32 @@ const randint_1 = require("../../../math/utils/random/randint");
8
8
  const numberNode_1 = require("../../../tree/nodes/numbers/numberNode");
9
9
  const multiplyNode_1 = require("../../../tree/nodes/operators/multiplyNode");
10
10
  const substractNode_1 = require("../../../tree/nodes/operators/substractNode");
11
+ const alignTex_1 = require("../../../utils/alignTex");
11
12
  const getExpectedValueOfBinomialProbaQuestion = () => {
12
13
  const nX = (0, randint_1.randint)(1, 9);
13
14
  const b = (0, randint_1.randint)(2, 11);
14
15
  const a = (0, randint_1.randint)(1, b);
15
16
  const p = new rational_1.Rational(a, b);
16
17
  const node = getCorrectAnswer(nX, p);
18
+ const answer = node.toTex();
17
19
  const question = {
18
- answer: node.toTex(),
19
- instruction: `Soit $X$ une variable aléatoire qui suit une loi binomiale de paramètre $n=${nX}$ et $p=${p
20
+ answer,
21
+ instruction: `Soit $X$ une variable aléatoire qui suit une loi binomiale de paramètres $n=${nX}$ et $p=${p
20
22
  .toTree()
21
23
  .simplify()
22
24
  .toTex()}$. Calculez l'espérance de $X$.`,
23
25
  keys: [],
24
26
  answerFormat: "tex",
25
27
  identifiers: { nX, a, b },
28
+ hint: `L'espérance d'une variable aléatoire $X$ qui suit une loi binomiale de paramètres $n$ et $p$ est donnée par $E(X) = np$.`,
29
+ correction: `L'espérance d'une variable aléatoire $X$ qui suit une loi binomiale de paramètres $n$ et $p$ est donnée par $E(X) = np$.
30
+
31
+ Ici, on a donc :
32
+
33
+ ${(0, alignTex_1.alignTex)([
34
+ ["E(X)", "=", new multiplyNode_1.MultiplyNode(nX.toTree(), p.toTree()).toTex()],
35
+ ["", "=", answer],
36
+ ])}`,
26
37
  };
27
38
  return question;
28
39
  };
@@ -74,4 +85,5 @@ exports.expectedValueOfBinomialProba = {
74
85
  getPropositions,
75
86
  isAnswerValid,
76
87
  subject: "Mathématiques",
88
+ hasHintAndCorrection: true,
77
89
  };
@@ -1 +1 @@
1
- {"version":3,"file":"probaFromTableNoContext.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/probaStat/probaFromTableNoContext.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAOlC,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB,CAAC;AAkHF,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,WAAW,CAezD,CAAC"}
1
+ {"version":3,"file":"probaFromTableNoContext.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/probaStat/probaFromTableNoContext.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAOlC,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB,CAAC;AAmHF,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,WAAW,CAezD,CAAC"}
@@ -62,10 +62,11 @@ const getProbaFromTableNoContextQuestion = () => {
62
62
  answer,
63
63
  instruction: `On considère deux événements $A$ et $B$. Le tableau suivant donne le nombre d'issues pour chacun des événements $A\\cap B$, $\\overline A\\cap B$, $A\\cap \\overline B$ et $\\overline A \\cap \\overline B$. Calculer la probabilité $${event}$.
64
64
 
65
- | | $B$ | $\\overline{B}$|
66
- |-|-|-|
67
- |$A$|${aCapB}|${aCapBBarre}|
68
- |$\\overline{A}$|${aBarreCapB}|${aBarreCapBBarre}|
65
+ | | $B$ | $\\overline{B}$| Total
66
+ |-|-|-|-|
67
+ |$A$|${aCapB}|${aCapBBarre}|${aTotal}|
68
+ |$\\overline{A}$|${aBarreCapB}|${aBarreCapBBarre}|${aBarreTotal}|
69
+ |Total|${bTotal}|${bBarreTotal}|${total}|
69
70
 
70
71
  `,
71
72
  keys: [],
@@ -1 +1 @@
1
- {"version":3,"file":"varianceOfBinomialProba.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/probaStat/varianceOfBinomialProba.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAYlC,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA0EF,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,WAAW,CAazD,CAAC"}
1
+ {"version":3,"file":"varianceOfBinomialProba.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/probaStat/varianceOfBinomialProba.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAalC,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA+FF,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,WAAW,CAczD,CAAC"}
@@ -9,6 +9,7 @@ const numberNode_1 = require("../../../tree/nodes/numbers/numberNode");
9
9
  const multiplyNode_1 = require("../../../tree/nodes/operators/multiplyNode");
10
10
  const powerNode_1 = require("../../../tree/nodes/operators/powerNode");
11
11
  const substractNode_1 = require("../../../tree/nodes/operators/substractNode");
12
+ const alignTex_1 = require("../../../utils/alignTex");
12
13
  const nbOneNode = new numberNode_1.NumberNode(1);
13
14
  const getVarianceOfBinomialProbaQuestion = () => {
14
15
  const nX = (0, randint_1.randint)(1, 9);
@@ -16,8 +17,9 @@ const getVarianceOfBinomialProbaQuestion = () => {
16
17
  const a = (0, randint_1.randint)(1, b);
17
18
  const p = new rational_1.Rational(a, b);
18
19
  const correctAns = getCorrectAnswer(nX, p);
20
+ const answer = correctAns.toTex();
19
21
  const question = {
20
- answer: correctAns.toTex(),
22
+ answer,
21
23
  instruction: `Soit $X$ une variable aléatoire qui suit une loi binomiale de paramètres $n=${nX}$ et $p=${p
22
24
  .toTree()
23
25
  .simplify()
@@ -25,6 +27,23 @@ const getVarianceOfBinomialProbaQuestion = () => {
25
27
  keys: [],
26
28
  answerFormat: "tex",
27
29
  identifiers: { nX, a, b },
30
+ hint: `L'espérance d'une variable aléatoire $X$ qui suit une loi binomiale de paramètres $n$ et $p$ est donnée par :
31
+
32
+ $V(X) = np(1-p)$.`,
33
+ correction: `L'espérance d'une variable aléatoire $X$ qui suit une loi binomiale de paramètres $n$ et $p$ est donnée par :
34
+
35
+ $V(X) = np(1-p)$.
36
+
37
+ Ici, on a donc :
38
+
39
+ ${(0, alignTex_1.alignTex)([
40
+ [
41
+ "V(X)",
42
+ "=",
43
+ new multiplyNode_1.MultiplyNode(nX.toTree(), new multiplyNode_1.MultiplyNode(p.toTree(), new substractNode_1.SubstractNode((1).toTree(), p.toTree())), { forceTimesSign: true }).toTex(),
44
+ ],
45
+ ["", "=", answer],
46
+ ])}`,
28
47
  };
29
48
  return question;
30
49
  };
@@ -71,4 +90,5 @@ exports.varianceOfBinomialProba = {
71
90
  getPropositions,
72
91
  isAnswerValid,
73
92
  subject: "Mathématiques",
93
+ hasHintAndCorrection: true,
74
94
  };
@@ -1 +1 @@
1
- {"version":3,"file":"arithmeticExplicitFormulaUsage.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sequences/arithmetic/arithmeticExplicitFormulaUsage.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAMlC,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAiDF,eAAO,MAAM,8BAA8B,EAAE,QAAQ,CAAC,WAAW,CAchE,CAAC"}
1
+ {"version":3,"file":"arithmeticExplicitFormulaUsage.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sequences/arithmetic/arithmeticExplicitFormulaUsage.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AA+DF,eAAO,MAAM,8BAA8B,EAAE,QAAQ,CAAC,WAAW,CAehE,CAAC"}
@@ -5,6 +5,9 @@ const exercise_1 = require("../../../../exercises/exercise");
5
5
  const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQuestions");
6
6
  const polynomial_1 = require("../../../../math/polynomials/polynomial");
7
7
  const randint_1 = require("../../../../math/utils/random/randint");
8
+ const addNode_1 = require("../../../../tree/nodes/operators/addNode");
9
+ const multiplyNode_1 = require("../../../../tree/nodes/operators/multiplyNode");
10
+ const alignTex_1 = require("../../../../utils/alignTex");
8
11
  const shuffle_1 = require("../../../../utils/shuffle");
9
12
  const getArithmeticExplicitFormulaUsage = () => {
10
13
  const askedRank = (0, randint_1.randint)(0, 10);
@@ -21,6 +24,17 @@ const getArithmeticExplicitFormulaUsage = () => {
21
24
  keys: ["u", "underscore", "equal"],
22
25
  answerFormat: "tex",
23
26
  identifiers: { firstValue, askedRank, reason },
27
+ hint: `Il suffit de remplacer $n$ par $${askedRank}$ dans la formule donnée.`,
28
+ correction: `On remplace $n$ par $${askedRank}$ dans la formule donnée :
29
+
30
+ ${(0, alignTex_1.alignTex)([
31
+ [
32
+ `u_{${askedRank}}`,
33
+ "=",
34
+ new addNode_1.AddNode(new multiplyNode_1.MultiplyNode(reason.toTree(), askedRank.toTree()), firstValue.toTree()).toTex(),
35
+ ],
36
+ ["", "=", answer],
37
+ ])}`,
24
38
  };
25
39
  return question;
26
40
  };
@@ -52,4 +66,5 @@ exports.arithmeticExplicitFormulaUsage = {
52
66
  getPropositions,
53
67
  isAnswerValid,
54
68
  subject: "Mathématiques",
69
+ hasHintAndCorrection: true,
55
70
  };
@@ -1 +1 @@
1
- {"version":3,"file":"arithmeticFindExplicitFormula.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sequences/arithmetic/arithmeticFindExplicitFormula.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAsDF,eAAO,MAAM,6BAA6B,EAAE,QAAQ,CAAC,WAAW,CAc/D,CAAC"}
1
+ {"version":3,"file":"arithmeticFindExplicitFormula.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sequences/arithmetic/arithmeticFindExplicitFormula.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAsEF,eAAO,MAAM,6BAA6B,EAAE,QAAQ,CAAC,WAAW,CAe/D,CAAC"}
@@ -20,6 +20,22 @@ const getArithmeticFindExplicitFormula = () => {
20
20
  keys: ["un", "equal", "n"],
21
21
  answerFormat: "tex",
22
22
  identifiers: { firstValue, reason },
23
+ hint: `Utilise la formule générale d'une suite arithmétique :
24
+
25
+ $u_n = u_0 + n \\times r $,
26
+
27
+ où $u_0$ est le premier terme et $r$ la raison.`,
28
+ correction: `La formule générale d'une suite arithmétique est :
29
+
30
+ $u_n = u_0 + n \\times r $,
31
+
32
+ où $u_0$ est le premier terme et $r$ la raison.
33
+
34
+ Ici, puisque $u_0 = ${firstValue}$ et $r = ${reason}$, on a :
35
+
36
+ $${answer}$
37
+
38
+ `,
23
39
  };
24
40
  return question;
25
41
  };
@@ -56,4 +72,5 @@ exports.arithmeticFindExplicitFormula = {
56
72
  getPropositions,
57
73
  isAnswerValid,
58
74
  subject: "Mathématiques",
75
+ hasHintAndCorrection: true,
59
76
  };
@@ -1 +1 @@
1
- {"version":3,"file":"geometricExplicitFormulaUsage.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sequences/geometric/geometricExplicitFormulaUsage.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAgDF,eAAO,MAAM,6BAA6B,EAAE,QAAQ,CAAC,WAAW,CAc/D,CAAC"}
1
+ {"version":3,"file":"geometricExplicitFormulaUsage.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sequences/geometric/geometricExplicitFormulaUsage.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AA8DF,eAAO,MAAM,6BAA6B,EAAE,QAAQ,CAAC,WAAW,CAe/D,CAAC"}
@@ -8,6 +8,7 @@ const numberNode_1 = require("../../../../tree/nodes/numbers/numberNode");
8
8
  const multiplyNode_1 = require("../../../../tree/nodes/operators/multiplyNode");
9
9
  const powerNode_1 = require("../../../../tree/nodes/operators/powerNode");
10
10
  const variableNode_1 = require("../../../../tree/nodes/variables/variableNode");
11
+ const alignTex_1 = require("../../../../utils/alignTex");
11
12
  const shuffle_1 = require("../../../../utils/shuffle");
12
13
  const getGeometricExplicitFormulaUsage = () => {
13
14
  const askedRank = (0, randint_1.randint)(0, 10);
@@ -23,6 +24,17 @@ const getGeometricExplicitFormulaUsage = () => {
23
24
  keys: ["u", "underscore", "equal"],
24
25
  answerFormat: "tex",
25
26
  identifiers: { firstValue, reason, askedRank },
27
+ hint: `Il suffit de remplacer $n$ par $${askedRank}$ dans la formule donnée.`,
28
+ correction: `On remplace $n$ par $${askedRank}$ dans la formule donnée :
29
+
30
+ ${(0, alignTex_1.alignTex)([
31
+ [
32
+ `u_{${askedRank}}`,
33
+ "=",
34
+ new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(firstValue), new powerNode_1.PowerNode(new numberNode_1.NumberNode(reason), askedRank.toTree())).toTex(),
35
+ ],
36
+ ["", "=", answer],
37
+ ])}`,
26
38
  };
27
39
  return question;
28
40
  };
@@ -54,4 +66,5 @@ exports.geometricExplicitFormulaUsage = {
54
66
  getPropositions,
55
67
  isAnswerValid,
56
68
  subject: "Mathématiques",
69
+ hasHintAndCorrection: true,
57
70
  };
@@ -1 +1 @@
1
- {"version":3,"file":"geometricFindExplicitFormula.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sequences/geometric/geometricFindExplicitFormula.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAmEF,eAAO,MAAM,4BAA4B,EAAE,QAAQ,CAAC,WAAW,CAc9D,CAAC"}
1
+ {"version":3,"file":"geometricFindExplicitFormula.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sequences/geometric/geometricFindExplicitFormula.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAiFF,eAAO,MAAM,4BAA4B,EAAE,QAAQ,CAAC,WAAW,CAe9D,CAAC"}
@@ -22,6 +22,20 @@ const getGeometricFindExplicitFormula = () => {
22
22
  keys: ["un", "equal", "n"],
23
23
  answerFormat: "tex",
24
24
  identifiers: { reason, firstValue },
25
+ hint: `Utilise la formule générale d'une suite géométrique :
26
+
27
+ $u_n = u_0 \\times r^n $,
28
+
29
+ où $u_0$ est le premier terme et $r$ la raison.`,
30
+ correction: `La formule générale d'une suite géométrique est :
31
+
32
+ $u_n = u_0 \\times r^n $,
33
+
34
+ où $u_0$ est le premier terme et $r$ la raison.
35
+
36
+ Ici, puisque $u_0 = ${firstValue}$ et $r = ${reason}$, on a :
37
+
38
+ $${answer}$`,
25
39
  };
26
40
  return question;
27
41
  };
@@ -58,4 +72,5 @@ exports.geometricFindExplicitFormula = {
58
72
  getPropositions,
59
73
  isAnswerValid,
60
74
  subject: "Mathématiques",
75
+ hasHintAndCorrection: true,
61
76
  };
@@ -1 +1 @@
1
- {"version":3,"file":"spaceVectorCoordinatesFromPoints.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/spaceGeometry/vectors/spaceVectorCoordinatesFromPoints.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AAQlC,KAAK,WAAW,GAAG,EAAE,CAAC;AA6CtB,eAAO,MAAM,gCAAgC,EAAE,QAAQ,CAAC,WAAW,CAelE,CAAC"}
1
+ {"version":3,"file":"spaceVectorCoordinatesFromPoints.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/spaceGeometry/vectors/spaceVectorCoordinatesFromPoints.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG,EAAE,CAAC;AAmEtB,eAAO,MAAM,gCAAgC,EAAE,QAAQ,CAAC,WAAW,CAgBlE,CAAC"}
@@ -5,6 +5,8 @@ const exercise_1 = require("../../../../exercises/exercise");
5
5
  const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQuestions");
6
6
  const spacePoint_1 = require("../../../../math/geometry/spacePoint");
7
7
  const spaceVector_1 = require("../../../../math/geometry/spaceVector");
8
+ const substractNode_1 = require("../../../../tree/nodes/operators/substractNode");
9
+ const alignTex_1 = require("../../../../utils/alignTex");
8
10
  const getSpaceVectorCoordinatesFromPointsQuestion = () => {
9
11
  const points = spacePoint_1.SpacePointConstructor.randomDifferent(["A", "B"]);
10
12
  const vector = spaceVector_1.SpaceVectorConstructor.fromPoints(points[0], points[1]);
@@ -22,6 +24,18 @@ const getSpaceVectorCoordinatesFromPointsQuestion = () => {
22
24
  by: points[1].y.evaluate({}),
23
25
  bz: points[1].z.evaluate({}),
24
26
  },
27
+ hint: `Soient deux points $M(x_M;y_M;z_M)$ et $N(x_N;y_N;z_N)$, alors le vecteur $\\overrightarrow{MN}$ a pour coordonnées :
28
+
29
+ $\\overrightarrow{MN} \\begin{pmatrix} x_N - x_M \\\\ y_N - y_M \\\\ z_N - z_M \\end{pmatrix}$`,
30
+ correction: `Les coordonnées du vecteur $\\overrightarrow{AB}$ sont :
31
+
32
+ ${(0, alignTex_1.alignTex)([
33
+ [
34
+ `\\begin{pmatrix} ${new substractNode_1.SubstractNode(points[1].x, points[0].x).toTex()} \\\\ ${new substractNode_1.SubstractNode(points[1].y, points[0].y).toTex()} \\\\ ${new substractNode_1.SubstractNode(points[1].z, points[0].z).toTex()} \\end{pmatrix}`,
35
+ "=",
36
+ vector.toCoordsTex(),
37
+ ],
38
+ ])}`,
25
39
  };
26
40
  return question;
27
41
  };
@@ -49,4 +63,5 @@ exports.spaceVectorCoordinatesFromPoints = {
49
63
  getPropositions,
50
64
  isAnswerValid,
51
65
  subject: "Mathématiques",
66
+ hasHintAndCorrection: true,
52
67
  };
@@ -1 +1 @@
1
- {"version":3,"file":"spaceVectorNormCalculation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/spaceGeometry/vectors/spaceVectorNormCalculation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAWlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA2CF,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,WAAW,CAa5D,CAAC"}
1
+ {"version":3,"file":"spaceVectorNormCalculation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/spaceGeometry/vectors/spaceVectorNormCalculation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAYlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAwEF,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,WAAW,CAc5D,CAAC"}
@@ -6,11 +6,15 @@ const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQ
6
6
  const spaceVector_1 = require("../../../../math/geometry/spaceVector");
7
7
  const real_1 = require("../../../../math/numbers/reals/real");
8
8
  const sqrtNode_1 = require("../../../../tree/nodes/functions/sqrtNode");
9
+ const addNode_1 = require("../../../../tree/nodes/operators/addNode");
10
+ const powerNode_1 = require("../../../../tree/nodes/operators/powerNode");
11
+ const alignTex_1 = require("../../../../utils/alignTex");
9
12
  const getSpaceVectorNormCalculationQuestion = () => {
10
13
  const u = spaceVector_1.SpaceVectorConstructor.random("u", false);
11
14
  const correctAnswer = u.getNorm();
15
+ const answer = correctAnswer.simplify().toTex();
12
16
  const question = {
13
- answer: correctAnswer.simplify().toTex(),
17
+ answer,
14
18
  instruction: `Cacluler la norme du vecteur $${u.toTexWithCoords()}$`,
15
19
  keys: [],
16
20
  answerFormat: "tex",
@@ -19,6 +23,26 @@ const getSpaceVectorNormCalculationQuestion = () => {
19
23
  y: u.y.evaluate({}),
20
24
  z: u.z.evaluate({}),
21
25
  },
26
+ hint: "La norme d'un vecteur de l'espace est la racine carrée de la somme des carrés de ses coordonnées.",
27
+ correction: `La norme d'un vecteur de l'espace est la racine carrée de la somme des carrés de ses coordonnées. Ici, on a donc :
28
+
29
+ ${(0, alignTex_1.alignTex)([
30
+ [
31
+ "\\lVert \\overrightarrow u \\rVert",
32
+ "=",
33
+ new sqrtNode_1.SqrtNode(new addNode_1.AddNode(new powerNode_1.SquareNode(u.x), new addNode_1.AddNode(new powerNode_1.SquareNode(u.y), new powerNode_1.SquareNode(u.z)))).toTex(),
34
+ ],
35
+ [
36
+ "",
37
+ "=",
38
+ new sqrtNode_1.SqrtNode((u.x.evaluate({}) ** 2 +
39
+ u.y.evaluate({}) ** 2 +
40
+ u.z.evaluate({}) ** 2).toTree()).toTex(),
41
+ ],
42
+ ])}
43
+
44
+ Donc $\\lVert \\overrightarrow u \\rVert = ${answer}$.
45
+ `,
22
46
  };
23
47
  return question;
24
48
  };
@@ -51,4 +75,5 @@ exports.spaceVectorNormCalculation = {
51
75
  getPropositions,
52
76
  isAnswerValid,
53
77
  subject: "Mathématiques",
78
+ hasHintAndCorrection: true,
54
79
  };
@@ -130,7 +130,7 @@ const isAnswerValid = (ans, { affine, termeid, termeAdd, termeMult }) => {
130
130
  };
131
131
  exports.sequenceEvaluation = {
132
132
  id: "sequenceEvaluation",
133
- label: "Évaluer un terme d'une suite",
133
+ label: "Exprimer $u_{f(n)}$ en connaissant $u_n$",
134
134
  levels: ["1reSpé"],
135
135
  isSingleStep: true,
136
136
  sections: ["Suites"],
@@ -1 +1 @@
1
- {"version":3,"file":"sequencePlot.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/suites/sequencePlot.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAOlC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,EAAE,EAAE,CAAC;IACnB,YAAY,EAAE,OAAO,CAAC;CACvB,CAAC;AAqFF,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,WAAW,CAc9C,CAAC"}
1
+ {"version":3,"file":"sequencePlot.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/suites/sequencePlot.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAOlC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,EAAE,EAAE,CAAC;IACnB,YAAY,EAAE,OAAO,CAAC;CACvB,CAAC;AA2FF,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,WAAW,CAe9C,CAAC"}
@@ -16,11 +16,11 @@ const getSequencePlotQuestion = () => {
16
16
  for (let n = 0; n <= nMax; n++) {
17
17
  let u_n;
18
18
  if (isArithmetic) {
19
- const noise = (0, randfloat_1.randfloat)(-1, 1, 1);
19
+ const noise = (0, randfloat_1.randfloat)(-2, 2, 1);
20
20
  u_n = a * n + b + noise;
21
21
  }
22
22
  else {
23
- const noise = (0, randfloat_1.randfloat)(-1, 1, 1);
23
+ const noise = (0, randfloat_1.randfloat)(-2, 2, 1);
24
24
  u_n = b * Math.pow(a, n) + noise;
25
25
  }
26
26
  points.push([n, Math.round(u_n)]);
@@ -41,8 +41,9 @@ const getSequencePlotQuestion = () => {
41
41
  isXAxesNatural: true,
42
42
  isGridSimple: true,
43
43
  });
44
+ const answer = u_nValue.toString();
44
45
  const question = {
45
- answer: u_nValue.toString(),
46
+ answer,
46
47
  instruction: `Ci-dessous est tracé un nuage de points représentant les valeurs d'une suite $(u_n)$. Quelle est la valeur de $u_{${nValue}}$ ?`,
47
48
  commands: ggb.commands,
48
49
  options: ggb.getOptions(),
@@ -55,6 +56,11 @@ const getSequencePlotQuestion = () => {
55
56
  keys: [],
56
57
  answerFormat: "raw",
57
58
  identifiers: { nValue, points, isArithmetic },
59
+ hint: `$u_{${nValue}}$ est l'ordonnée du point d'absicsse $${nValue}$ dans le nuage de points.`,
60
+ correction: `$u_{${nValue}}$ est l'ordonnée du point d'absicsse $${nValue}$ dans le nuage de points.
61
+
62
+ On lit donc : $u_{${nValue}}=${answer}$.
63
+ `,
58
64
  };
59
65
  return question;
60
66
  };
@@ -84,4 +90,5 @@ exports.sequencePlot = {
84
90
  getPropositions,
85
91
  isAnswerValid,
86
92
  subject: "Mathématiques",
93
+ hasHintAndCorrection: true,
87
94
  };
package/lib/index.d.ts CHANGED
@@ -7,6 +7,7 @@ declare global {
7
7
  }
8
8
  interface String {
9
9
  toTree: () => AlgebraicNode;
10
+ unfrenchify: () => number;
10
11
  }
11
12
  }
12
13
  /**
@@ -105,6 +106,10 @@ declare const mathExercises: (import("./exercises/exercise").Exercise<{
105
106
  rand: number;
106
107
  a: number;
107
108
  b: number;
109
+ }> | import("./exercises/exercise").Exercise<{
110
+ numbers: number[];
111
+ }> | import("./exercises/exercise").Exercise<{
112
+ numbers: number[];
108
113
  }> | import("./exercises/exercise").Exercise<{
109
114
  type: number;
110
115
  a: number;
@@ -148,6 +153,9 @@ declare const mathExercises: (import("./exercises/exercise").Exercise<{
148
153
  }> | import("./exercises/exercise").Exercise<{
149
154
  nb: number;
150
155
  rankAsked: number;
156
+ }> | import("./exercises/exercise").Exercise<{
157
+ nb: number;
158
+ rankAsked: number;
151
159
  }> | import("./exercises/exercise").Exercise<{
152
160
  a: number;
153
161
  b: number;
@@ -591,12 +599,46 @@ declare const mathExercises: (import("./exercises/exercise").Exercise<{
591
599
  ineqSymbol: import("./math/inequations/inequation").InegalitySymbols;
592
600
  intervals: {
593
601
  a: number;
602
+ /**
603
+ * TODO
604
+ * Décimal : permettre facilement -0.xxx
605
+ * Tree shaking export
606
+ *
607
+ * VEA:
608
+ * -> -3x est bien transofmré en -3*x, x*(-3) mais pas en -x*3
609
+ * ->> faire le meme delire que pour les power mais pour les opposite ?
610
+ * c'est à dire créer toutes les permuts en déplacant le moins qquepart
611
+ * -> faire des nodes pour les Ensembles de nombre
612
+ *
613
+ * !-> choses pour lesquelles la v1 ne marchera pas :
614
+ * !-- fractions non réduites
615
+ * !-- nbs décimaux avec des 0
616
+ * !-- nb quelconque de moins, genre -3*-4 ou -x/-y
617
+ * !-> pour ces choses là il faut obligatoirement parser la rpéonse élève ?
618
+ *
619
+ * Passer les sqrtNode en tree-iable
620
+ *
621
+ *
622
+ *
623
+ * !!!à fix :
624
+ * ! fraction réductible
625
+ * ! 0,20 au lieu de 0,2
626
+ * ! moins partout dans fraction
627
+ * !puissances négatives vers inverse fraction
628
+ * ! simplification du ln
629
+ * ! meileure gestion des [] : le clavier devriat pouvoir produire des left/right ;
630
+ * !aussi en tapant [ puis diviser, le crochet passe en numérateur
631
+ * ! espace tous les 3 chiffres dans un nb (le clavier doit le fournir aussi!)
632
+
633
+ */
594
634
  b: number;
595
635
  closure: import("./tree/nodes/sets/closure").ClosureType;
596
636
  }[];
597
637
  }> | import("./exercises/exercise").Exercise<{
598
638
  xValues: number[];
599
639
  imageValues: number[];
640
+ isAskingImage: boolean;
641
+ value: number;
600
642
  }> | import("./exercises/exercise").Exercise<{
601
643
  k: number;
602
644
  }> | import("./exercises/exercise").Exercise<{
@@ -795,7 +837,10 @@ declare const mathExercises: (import("./exercises/exercise").Exercise<{
795
837
  }> | import("./exercises/exercise").Exercise<{
796
838
  correctA: number;
797
839
  correctB: number;
798
- }> | import("./exercises/exercise").Exercise<{}> | import("./exercises/exercise").Exercise<{
840
+ }> | import("./exercises/exercise").Exercise<{
841
+ x: number;
842
+ y: number;
843
+ }> | import("./exercises/exercise").Exercise<{
799
844
  coin: boolean;
800
845
  radius: number;
801
846
  diametre: number;
@@ -994,7 +1039,6 @@ declare const mathExercises: (import("./exercises/exercise").Exercise<{
994
1039
  rate: number;
995
1040
  nbMois: number;
996
1041
  }> | import("./exercises/exercise").Exercise<{
997
- isFromEvolutionToCM: boolean;
998
1042
  evolution: number;
999
1043
  }> | import("./exercises/exercise").Exercise<{
1000
1044
  evolutions: string[];
@@ -1011,6 +1055,8 @@ declare const mathExercises: (import("./exercises/exercise").Exercise<{
1011
1055
  total: number;
1012
1056
  lefties: number;
1013
1057
  }> | import("./exercises/exercise").Exercise<{}> | import("./exercises/exercise").Exercise<{
1058
+ evolution: number;
1059
+ }> | import("./exercises/exercise").Exercise<{
1014
1060
  int: number;
1015
1061
  power: number;
1016
1062
  }> | import("./exercises/exercise").Exercise<{