math-exercises 3.0.184 → 3.0.186

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 (89) hide show
  1. package/lib/exercises/exercise.d.ts +1 -0
  2. package/lib/exercises/exercise.d.ts.map +1 -1
  3. package/lib/exercises/math/derivation/derivative/exp/index.d.ts +2 -0
  4. package/lib/exercises/math/derivation/derivative/exp/index.d.ts.map +1 -1
  5. package/lib/exercises/math/derivation/derivative/exp/index.js +2 -0
  6. package/lib/exercises/math/derivation/derivative/index.d.ts +3 -0
  7. package/lib/exercises/math/derivation/derivative/index.d.ts.map +1 -1
  8. package/lib/exercises/math/derivation/derivative/index.js +3 -0
  9. package/lib/exercises/math/derivation/derivativeNumber/index.d.ts +2 -0
  10. package/lib/exercises/math/derivation/derivativeNumber/index.d.ts.map +1 -1
  11. package/lib/exercises/math/derivation/derivativeNumber/index.js +2 -0
  12. package/lib/exercises/math/derivation/index.d.ts +1 -0
  13. package/lib/exercises/math/derivation/index.d.ts.map +1 -1
  14. package/lib/exercises/math/derivation/index.js +1 -0
  15. package/lib/exercises/math/derivation/tangent/index.d.ts +9 -0
  16. package/lib/exercises/math/derivation/tangent/index.d.ts.map +1 -1
  17. package/lib/exercises/math/derivation/tangent/index.js +9 -0
  18. package/lib/exercises/math/derivation/variations/index.d.ts +8 -0
  19. package/lib/exercises/math/derivation/variations/index.d.ts.map +1 -1
  20. package/lib/exercises/math/derivation/variations/index.js +8 -0
  21. package/lib/exercises/math/derivation/variations/signVarTable3dDegree.d.ts +10 -0
  22. package/lib/exercises/math/derivation/variations/signVarTable3dDegree.d.ts.map +1 -1
  23. package/lib/exercises/math/derivation/variations/signVarTable3dDegree.js +235 -231
  24. package/lib/exercises/math/functions/exponential/algebraic/approxExpAPlusB.d.ts.map +1 -1
  25. package/lib/exercises/math/functions/exponential/algebraic/approxExpAPlusB.js +91 -38
  26. package/lib/exercises/math/probaStat/trees/index.d.ts +1 -1
  27. package/lib/exercises/math/probaStat/trees/index.d.ts.map +1 -1
  28. package/lib/exercises/math/probaStat/trees/index.js +1 -3
  29. package/lib/exercises/math/probaStat/trees/probabilityTree.d.ts +9 -3
  30. package/lib/exercises/math/probaStat/trees/probabilityTree.d.ts.map +1 -1
  31. package/lib/exercises/math/probaStat/trees/probabilityTree.js +419 -45
  32. package/lib/exercises/math/python/index.d.ts +1 -0
  33. package/lib/exercises/math/python/index.d.ts.map +1 -1
  34. package/lib/exercises/math/python/index.js +1 -0
  35. package/lib/exercises/math/python/list/index.d.ts +11 -0
  36. package/lib/exercises/math/python/list/index.d.ts.map +1 -0
  37. package/lib/exercises/math/python/list/index.js +10 -0
  38. package/lib/exercises/math/python/list/pyListAppend.d.ts +29 -0
  39. package/lib/exercises/math/python/list/pyListAppend.d.ts.map +1 -0
  40. package/lib/exercises/math/python/list/pyListAppend.js +280 -0
  41. package/lib/exercises/math/python/list/pyListCreateListByComprehension.d.ts +11 -0
  42. package/lib/exercises/math/python/list/pyListCreateListByComprehension.d.ts.map +1 -0
  43. package/lib/exercises/math/python/list/pyListCreateListByComprehension.js +231 -0
  44. package/lib/exercises/math/python/list/pyListCreateListInstructionCompletion.d.ts +9 -0
  45. package/lib/exercises/math/python/list/pyListCreateListInstructionCompletion.d.ts.map +1 -0
  46. package/lib/exercises/math/python/list/pyListCreateListInstructionCompletion.js +232 -0
  47. package/lib/exercises/math/python/list/pyListElemAtIndex.d.ts +9 -0
  48. package/lib/exercises/math/python/list/pyListElemAtIndex.d.ts.map +1 -0
  49. package/lib/exercises/math/python/list/pyListElemAtIndex.js +292 -0
  50. package/lib/exercises/math/python/list/pyListMutationMix.d.ts +29 -0
  51. package/lib/exercises/math/python/list/pyListMutationMix.d.ts.map +1 -0
  52. package/lib/exercises/math/python/list/pyListMutationMix.js +455 -0
  53. package/lib/exercises/math/python/list/pyListRemove.d.ts +29 -0
  54. package/lib/exercises/math/python/list/pyListRemove.d.ts.map +1 -0
  55. package/lib/exercises/math/python/list/pyListRemove.js +375 -0
  56. package/lib/exercises/math/python/list/pyListSetElemAtIndex.d.ts +29 -0
  57. package/lib/exercises/math/python/list/pyListSetElemAtIndex.d.ts.map +1 -0
  58. package/lib/exercises/math/python/list/pyListSetElemAtIndex.js +331 -0
  59. package/lib/exercises/math/python/list/pyListSetElemAtIndexInstructionCompletion.d.ts +9 -0
  60. package/lib/exercises/math/python/list/pyListSetElemAtIndexInstructionCompletion.d.ts.map +1 -0
  61. package/lib/exercises/math/python/list/pyListSetElemAtIndexInstructionCompletion.js +346 -0
  62. package/lib/exercises/math/python/list/pyListSetElemAtIndexWaterfall.d.ts +29 -0
  63. package/lib/exercises/math/python/list/pyListSetElemAtIndexWaterfall.d.ts.map +1 -0
  64. package/lib/exercises/math/python/list/pyListSetElemAtIndexWaterfall.js +394 -0
  65. package/lib/exercises/math/sequences/arithmetic/situations/arithmeticFindRankFromSituation.d.ts.map +1 -1
  66. package/lib/exercises/math/sequences/arithmetic/situations/arithmeticFindRankFromSituation.js +3 -3
  67. package/lib/exercises/math/sequences/arithmetic/situations/arithmeticFindThresholdFromSituation.d.ts.map +1 -1
  68. package/lib/exercises/math/sequences/arithmetic/situations/arithmeticFindThresholdFromSituation.js +2 -2
  69. package/lib/exercises/math/sequences/arithmetic/situations/index.d.ts +2 -0
  70. package/lib/exercises/math/sequences/arithmetic/situations/index.d.ts.map +1 -1
  71. package/lib/exercises/math/sequences/arithmetic/situations/index.js +2 -2
  72. package/lib/geogebra/geogebraConstructor.d.ts +1 -0
  73. package/lib/geogebra/geogebraConstructor.d.ts.map +1 -1
  74. package/lib/geogebra/geogebraConstructor.js +3 -0
  75. package/lib/index.d.ts +293 -0
  76. package/lib/index.d.ts.map +1 -1
  77. package/lib/math/geometry/line.js +1 -1
  78. package/lib/math/utils/sequences/situations/seqArithmeticSituations.d.ts +2 -0
  79. package/lib/math/utils/sequences/situations/seqArithmeticSituations.d.ts.map +1 -1
  80. package/lib/math/utils/sequences/situations/seqArithmeticSituations.js +150 -128
  81. package/lib/math/utils/sequences/situations/seqArithmeticUtils.d.ts +1 -1
  82. package/lib/math/utils/sequences/situations/seqArithmeticUtils.d.ts.map +1 -1
  83. package/lib/math/utils/sequences/situations/seqArithmeticUtils.js +4 -1
  84. package/lib/tests/questionTest.d.ts.map +1 -1
  85. package/lib/tests/questionTest.js +1 -0
  86. package/lib/tree/nodes/functions/sqrtNode.d.ts +1 -1
  87. package/lib/tree/nodes/functions/sqrtNode.d.ts.map +1 -1
  88. package/lib/tree/nodes/functions/sqrtNode.js +5 -3
  89. package/package.json +1 -1
@@ -1,231 +1,235 @@
1
- // import {
2
- // Exercise,
3
- // QuestionGenerator,
4
- // GetHint,
5
- // GetCorrection,
6
- // GetInstruction,
7
- // GetKeys,
8
- // GetQuestionFromIdentifiers,
9
- // GetAnswerTable,
10
- // TableVEA,
11
- // GeneratorOption,
12
- // GeneratorOptionTarget,
13
- // GeneratorOptionType,
14
- // } from "../../../../exercises/exercise.js";
15
- // import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
16
- // import { varSignTableVEA } from "../../../../exercises/vea/varSignTableVEA.js";
17
- // import { Trinom, TrinomConstructor } from "../../../../math/polynomials/trinom.js";
18
- // import { opposite } from "../../../../tree/nodes/functions/oppositeNode.js";
19
- // import { add } from "../../../../tree/nodes/operators/addNode.js";
20
- // import { frac } from "../../../../tree/nodes/operators/fractionNode.js";
21
- // import { multiply } from "../../../../tree/nodes/operators/multiplyNode.js";
22
- // import { handleVEAError } from "../../../../utils/errors/handleVEAError.js";
23
- // import { alignTex } from "../../../../utils/latex/alignTex.js";
24
- export {};
25
- // //coeff de f'
26
- // type Identifiers = {
27
- // a: number;
28
- // b: number;
29
- // c: number;
30
- // };
31
- // const getAnswerTable: GetAnswerTable<Identifiers> = (identifiers) => {
32
- // const { a, b, c } = identifiers;
33
- // const trinom = new Trinom(a, b, c);
34
- // const poly = trinom.integrateToNode({}, true);
35
- // const roots = trinom.getRootsNode();
36
- // const imgs = roots.map((r) =>
37
- // poly
38
- // .toDetailedEvaluation({
39
- // x: r,
40
- // })
41
- // .simplify({
42
- // calculatePowers: true,
43
- // }),
44
- // );
45
- // return [
46
- // [
47
- // "$x$",
48
- // "-\\infty",
49
- // "\\ ",
50
- // roots[0].toTex(),
51
- // "\\ ",
52
- // roots[1].toTex(),
53
- // "\\ ",
54
- // "+\\infty",
55
- // ],
56
- // [
57
- // "$f'(x)$",
58
- // "\\ ",
59
- // a > 0 ? "+" : "-",
60
- // "0",
61
- // a > 0 ? "-" : "+",
62
- // "0",
63
- // a > 0 ? "+" : "-",
64
- // "\\ ",
65
- // ],
66
- // [
67
- // "$\\ $",
68
- // "\\ ",
69
- // "\\ ",
70
- // a > 0 ? imgs[0].toTex() : "\\ ",
71
- // "\\ ",
72
- // a < 0 ? imgs[1].toTex() : "\\ ",
73
- // "\\ ",
74
- // "\\ ",
75
- // ],
76
- // [
77
- // "$f(x)$",
78
- // "\\ ",
79
- // a > 0 ? "\\nearrow" : "\\searrow",
80
- // "\\ ",
81
- // a > 0 ? "\\searrow" : "\\nearrow",
82
- // "\\ ",
83
- // a > 0 ? "\\nearrow" : "\\searrow",
84
- // "\\ ",
85
- // ],
86
- // [
87
- // "$\\ $",
88
- // "\\ ",
89
- // "\\ ",
90
- // a < 0 ? imgs[0].toTex() : "\\ ",
91
- // "\\ ",
92
- // a > 0 ? imgs[1].toTex() : "\\ ",
93
- // "\\ ",
94
- // "\\ ",
95
- // ],
96
- // ];
97
- // };
98
- // const getInstruction: GetInstruction<Identifiers> = (identifiers) => {
99
- // const { a, b, c } = identifiers;
100
- // const trinom = new Trinom(a, b, c);
101
- // const poly = trinom.integrateToNode({}, true);
102
- // return `Soit $f$ la fonction définie sur $\\mathbb{R}$ par :
103
- // $$
104
- // f(x) = ${poly.toTex()}
105
- // $$
106
- // Dresser le tableau de signes de $f'$ et de variations de $f$.
107
- // `;
108
- // };
109
- // const getHint: GetHint<Identifiers> = () => {
110
- // return `Commence par déterminer la fonction dérivée $f'$ de $f$. Puis, étudie le signe de $f'$ en résolvant l'inéquation $f'(x)\\geq 0$.
111
- // Enfin, sers-toi de la propriété suivante :
112
- // - si $f'$ est positive sur un intervalle $I$, alors $f$ est croissante sur $I$;
113
- // - si $f'$ est négative sur un intervalle $I$, alors $f$ est décroissante sur $I$.`;
114
- // };
115
- // const getCorrection: GetCorrection<Identifiers> = (identifiers) => {
116
- // const { a, b, c } = identifiers;
117
- // const trinom = new Trinom(a, b, c);
118
- // const poly = trinom.integrateToNode({}, true);
119
- // const roots = trinom.getRootsNode();
120
- // const imgs = roots.map((r) =>
121
- // poly
122
- // .toDetailedEvaluation({
123
- // x: r,
124
- // })
125
- // .simplify({
126
- // calculatePowers: true,
127
- // }),
128
- // );
129
- // const words =
130
- // a > 0 ? ["décroissante", "croissante"] : ["croissante", "décroissante"];
131
- // const signWords = a > 0 ? ["négative", "positive"] : ["positive", "négative"];
132
- // return `On calcule $f'$ :
133
- // $$
134
- // f'(x) = ${poly.derivative().simplify().toTex()}
135
- // $$
136
- // On détermine ensuite le signe de $f'(x)$ :
137
- // ${alignTex([
138
- // ["", "f'(x) \\geq 0"],
139
- // [
140
- // "\\iff",
141
- // add(multiply(2, multiply(a, "x")), b)
142
- // .simplify()
143
- // .toTex() + "\\geq 0",
144
- // ],
145
- // ["\\iff", "x" + (a > 0 ? "\\geq" : "\\leq")],
146
- // ])}
147
- // `;
148
- // };
149
- // const getKeys: GetKeys<Identifiers> = () => {
150
- // return ["infty"];
151
- // };
152
- // const isAnswerTableValid: TableVEA<Identifiers> = (ans, { answerTable }) => {
153
- // try {
154
- // return varSignTableVEA(ans, answerTable);
155
- // } catch (err) {
156
- // return handleVEAError(err);
157
- // }
158
- // };
159
- // const getSignVarTableTrinomQuestion: QuestionGenerator<Identifiers, Options> = (
160
- // opts,
161
- // ) => {
162
- // const trinom = TrinomConstructor.randomNiceRoots();
163
- // const identifiers: Identifiers = {
164
- // a: trinom.a,
165
- // b: trinom.b,
166
- // c: trinom.c,
167
- // };
168
- // return getQuestionFromIdentifiers(identifiers, opts);
169
- // };
170
- // const getQuestionFromIdentifiers: GetQuestionFromIdentifiers<
171
- // Identifiers,
172
- // Options
173
- // > = (identifiers, opts) => {
174
- // return {
175
- // answerTable: getAnswerTable(identifiers),
176
- // instruction: getInstruction(identifiers, opts),
177
- // keys: getKeys(identifiers),
178
- // answerFormat: "tex",
179
- // identifiers,
180
- // hint: getHint(identifiers),
181
- // correction: getCorrection(identifiers, opts),
182
- // initTable: [
183
- // ["$x$", "", "\\ ", "", "\\ ", "", "\\ ", ""],
184
- // ["$f'(x)$", "\\ ", "", "", "", "", "", "\\ "],
185
- // ["$\\ $", "\\ ", "\\ ", "\\ ", "\\ ", "\\ ", "\\ ", "\\ "],
186
- // [
187
- // "$f(x)$",
188
- // "\\ ",
189
- // "",
190
- // opts?.askImages ? "" : "\\ ",
191
- // "",
192
- // opts?.askImages ? "" : "\\ ",
193
- // "",
194
- // "\\ ",
195
- // ],
196
- // ["$\\ $", "\\ ", "\\ ", "\\ ", "\\ ", "\\ ", "\\ ", "\\ "],
197
- // ],
198
- // };
199
- // };
200
- // type Options = {
201
- // askImages: boolean;
202
- // };
203
- // const options: GeneratorOption[] = [
204
- // {
205
- // id: "askImages",
206
- // label: "Demander les ordonnées des extrema locaux",
207
- // target: GeneratorOptionTarget.answer,
208
- // type: GeneratorOptionType.checkbox,
209
- // defaultValue: false,
210
- // },
211
- // ];
212
- // export const signVarTable3dDegree: Exercise<Identifiers, Options> = {
213
- // id: "signVarTable3dDegree",
214
- // label:
215
- // "Dresser le tableau de signes de $f'$ et de variations de $f$ pour une fonction polynôme de degré trois",
216
- // isSingleStep: true,
217
- // generator: (nb, opts) =>
218
- // getDistinctQuestions(() => getSignVarTableTrinomQuestion(opts), nb),
219
- // qcmTimer: 60,
220
- // freeTimer: 60,
221
- // isAnswerTableValid,
222
- // subject: "Mathématiques",
223
- // getInstruction,
224
- // getHint,
225
- // getCorrection,
226
- // getAnswerTable,
227
- // getQuestionFromIdentifiers,
228
- // hasHintAndCorrection: true,
229
- // answerType: "signVarTable",
230
- // options,
231
- // };
1
+ import { GeneratorOptionTarget, GeneratorOptionType, } from "../../../../exercises/exercise.js";
2
+ import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
3
+ import { varSignTableVEA } from "../../../../exercises/vea/varSignTableVEA.js";
4
+ import { Trinom, TrinomConstructor } from "../../../../math/polynomials/trinom.js";
5
+ import { handleVEAError } from "../../../../utils/errors/handleVEAError.js";
6
+ const getAnswerTable = (identifiers, opts) => {
7
+ const { a, b, c } = identifiers;
8
+ const trinom = new Trinom(a, b, c);
9
+ const poly = trinom.integrateToNode({}, true);
10
+ const roots = trinom.getRootsNode();
11
+ const imgs = opts?.doNotAskImages
12
+ ? ["\\ ", "\\ "]
13
+ : roots.map((r) => poly
14
+ .toDetailedEvaluation({
15
+ x: r,
16
+ })
17
+ .simplify({
18
+ calculatePowers: true,
19
+ })
20
+ .toTex());
21
+ return [
22
+ [
23
+ "$x$",
24
+ "-\\infty",
25
+ "\\ ",
26
+ roots[0].toTex(),
27
+ "\\ ",
28
+ roots[1].toTex(),
29
+ "\\ ",
30
+ "+\\infty",
31
+ ],
32
+ [
33
+ "$f'(x)$",
34
+ "\\ ",
35
+ a > 0 ? "+" : "-",
36
+ "0",
37
+ a > 0 ? "-" : "+",
38
+ "0",
39
+ a > 0 ? "+" : "-",
40
+ "\\ ",
41
+ ],
42
+ [
43
+ "$\\ $",
44
+ "\\ ",
45
+ "\\ ",
46
+ a > 0 ? imgs[0] : "\\ ",
47
+ "\\ ",
48
+ a < 0 ? imgs[1] : "\\ ",
49
+ "\\ ",
50
+ "\\ ",
51
+ ],
52
+ [
53
+ "$f(x)$",
54
+ "\\ ",
55
+ a > 0 ? "\\nearrow" : "\\searrow",
56
+ "\\ ",
57
+ a > 0 ? "\\searrow" : "\\nearrow",
58
+ "\\ ",
59
+ a > 0 ? "\\nearrow" : "\\searrow",
60
+ "\\ ",
61
+ ],
62
+ [
63
+ "$\\ $",
64
+ "\\ ",
65
+ "\\ ",
66
+ a < 0 ? imgs[0] : "\\ ",
67
+ "\\ ",
68
+ a > 0 ? imgs[1] : "\\ ",
69
+ "\\ ",
70
+ "\\ ",
71
+ ],
72
+ ];
73
+ };
74
+ const getInstruction = (identifiers) => {
75
+ const { a, b, c } = identifiers;
76
+ const trinom = new Trinom(a, b, c);
77
+ const poly = trinom.integrateToNode({}, true);
78
+ return `Soit $f$ la fonction définie sur $\\mathbb{R}$ par :
79
+
80
+ $$
81
+ f(x) = ${poly.toTex()}
82
+ $$
83
+
84
+ Dresser le tableau de signes de $f'$ et de variations de $f$.
85
+
86
+ `;
87
+ };
88
+ const getHint = () => {
89
+ return `Commence par déterminer la fonction dérivée $f'$ de $f$. Puis, étudie le signe de $f'$ en résolvant l'inéquation $f'(x)\\geq 0$.
90
+
91
+ Enfin, sers-toi de la propriété suivante :
92
+
93
+ - si $f'$ est positive sur un intervalle $I$, alors $f$ est croissante sur $I$;
94
+ - si $f'$ est négative sur un intervalle $I$, alors $f$ est décroissante sur $I$.`;
95
+ };
96
+ const getCorrection = (identifiers, opts) => {
97
+ const { a, b, c } = identifiers;
98
+ const trinom = new Trinom(a, b, c);
99
+ const poly = trinom.integrateToNode({}, true);
100
+ const delta = trinom.getDeltaNode();
101
+ const roots = trinom.getRootsNode();
102
+ const imgs = opts?.doNotAskImages
103
+ ? ["\\ ", "\\ "]
104
+ : roots.map((r) => poly
105
+ .toDetailedEvaluation({
106
+ x: r,
107
+ })
108
+ .simplify({
109
+ calculatePowers: true,
110
+ })
111
+ .toTex());
112
+ const signWords = a > 0 ? ["positive", "négative"] : ["négative", "positive"];
113
+ const varWords = a > 0 ? ["croissante", "décroissante"] : ["décroissante", "croissante"];
114
+ return `On calcule $f'$ :
115
+
116
+ $$
117
+ f'(x) = ${poly
118
+ .derivative()
119
+ .simplify({
120
+ forbidFactorize: true,
121
+ })
122
+ .toTex()}
123
+ $$
124
+
125
+ On détermine ensuite le signe de $f'(x)$. Pour cela, on remarque que $f'$ est un polynôme du second degré. Pour étudier son signe, on détermine donc ses racines, puis on utilise le fait qu'un polynôme du second degré est du signe de son coefficient $a$, sauf entre ses racines.
126
+
127
+ Ici, on a $\\Delta = ${delta.toTex()}$, donc $f'$ a $2$ racines :
128
+
129
+ $$
130
+ x_1 = ${roots[0].toTex()}
131
+ $$
132
+
133
+ et
134
+
135
+ $$
136
+ x_2 = ${roots[1].toTex()}
137
+ $$
138
+
139
+ On en déduit que $f'$ est ${signWords[0]} sur $]-\\infty; ${roots[0].toTex()}]$, puis ${signWords[1]} sur $[${roots[0].toTex()}; ${roots[1].toTex()}]$, puis ${signWords[0]} sur $[${roots[1].toTex()}; +\\infty[$.
140
+
141
+ $f$ est donc ${varWords[0]} sur $]-\\infty; ${roots[0].toTex()}]$, puis ${varWords[1]} sur $[${roots[0].toTex()}; ${roots[1].toTex()}]$, puis ${varWords[0]} sur $[${roots[1].toTex()}; +\\infty[$.
142
+
143
+ ${opts?.doNotAskImages
144
+ ? ""
145
+ : `Il ne reste plus qu'à calculer les images par $f$ de $${roots[0].toTex()}$ et de $${roots[1].toTex()}$ :
146
+
147
+ $$
148
+ f(${roots[0].toTex()}) = ${poly
149
+ .toDetailedEvaluation({ x: roots[0] })
150
+ .toTex()} = ${imgs[0]}
151
+ $$
152
+
153
+ et
154
+
155
+ $$
156
+ f(${roots[1].toTex()}) = ${poly
157
+ .toDetailedEvaluation({ x: roots[1] })
158
+ .toTex()} = ${imgs[1]}
159
+ $$`}
160
+ `;
161
+ };
162
+ const getKeys = () => {
163
+ return ["infty"];
164
+ };
165
+ const isAnswerTableValid = (ans, { answerTable }) => {
166
+ try {
167
+ return varSignTableVEA(ans, answerTable);
168
+ }
169
+ catch (err) {
170
+ return handleVEAError(err);
171
+ }
172
+ };
173
+ const getSignVarTableTrinomQuestion = (opts) => {
174
+ const trinom = TrinomConstructor.randomNiceRoots();
175
+ const identifiers = {
176
+ a: trinom.a,
177
+ b: trinom.b,
178
+ c: trinom.c,
179
+ };
180
+ return getQuestionFromIdentifiers(identifiers, opts);
181
+ };
182
+ const getQuestionFromIdentifiers = (identifiers, opts) => {
183
+ return {
184
+ answerTable: getAnswerTable(identifiers, opts),
185
+ instruction: getInstruction(identifiers, opts),
186
+ keys: getKeys(identifiers, opts),
187
+ answerFormat: "tex",
188
+ identifiers,
189
+ hint: getHint(identifiers, opts),
190
+ correction: getCorrection(identifiers, opts),
191
+ initTable: [
192
+ ["$x$", "", "\\ ", "", "\\ ", "", "\\ ", ""],
193
+ ["$f'(x)$", "\\ ", "", "", "", "", "", "\\ "],
194
+ ["$\\ $", "\\ ", "\\ ", "\\ ", "\\ ", "\\ ", "\\ ", "\\ "],
195
+ [
196
+ "$f(x)$",
197
+ "\\ ",
198
+ "",
199
+ opts?.doNotAskImages ? "\\ " : "",
200
+ "",
201
+ opts?.doNotAskImages ? "\\ " : "",
202
+ "",
203
+ "\\ ",
204
+ ],
205
+ ["$\\ $", "\\ ", "\\ ", "\\ ", "\\ ", "\\ ", "\\ ", "\\ "],
206
+ ],
207
+ };
208
+ };
209
+ const options = [
210
+ {
211
+ id: "doNotAskImages",
212
+ label: "Ne pas demander de calculer les images dans la ligne des variations",
213
+ target: GeneratorOptionTarget.answer,
214
+ type: GeneratorOptionType.checkbox,
215
+ defaultValue: false,
216
+ },
217
+ ];
218
+ export const signVarTable3dDegree = {
219
+ id: "signVarTable3dDegree",
220
+ label: "Dresser le tableau de signes de $f'$ et de variations de $f$ pour une fonction polynôme de degré trois",
221
+ isSingleStep: true,
222
+ generator: (nb, opts) => getDistinctQuestions(() => getSignVarTableTrinomQuestion(opts), nb),
223
+ qcmTimer: 60,
224
+ freeTimer: 60,
225
+ isAnswerTableValid,
226
+ subject: "Mathématiques",
227
+ getInstruction,
228
+ getHint,
229
+ getCorrection,
230
+ getAnswerTable,
231
+ getQuestionFromIdentifiers,
232
+ hasHintAndCorrection: true,
233
+ answerType: "signVarTable",
234
+ options,
235
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"approxExpAPlusB.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/exponential/algebraic/approxExpAPlusB.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAQrC,OAAO,EAEL,eAAe,EAChB,MAAM,qCAAqC,CAAC;AAY7C,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,eAAe,CAAC;IAC1B,QAAQ,EAAE,eAAe,CAAC;IAC1B,WAAW,EAAE,eAAe,CAAC;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAmXF,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,CAmBjD,CAAC"}
1
+ {"version":3,"file":"approxExpAPlusB.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/exponential/algebraic/approxExpAPlusB.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAOrC,OAAO,EAEL,eAAe,EAChB,MAAM,qCAAqC,CAAC;AAa7C,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,eAAe,CAAC;IAC1B,QAAQ,EAAE,eAAe,CAAC;IAC1B,WAAW,EAAE,eAAe,CAAC;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AA8cF,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,CAmBjD,CAAC"}