math-exercises 3.0.185 → 3.0.187

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 (73) 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/derivativeReadingByManipulatingSecant.d.ts.map +1 -1
  16. package/lib/exercises/math/derivation/tangent/derivativeReadingByManipulatingSecant.js +0 -4
  17. package/lib/exercises/math/derivation/tangent/index.d.ts +9 -0
  18. package/lib/exercises/math/derivation/tangent/index.d.ts.map +1 -1
  19. package/lib/exercises/math/derivation/tangent/index.js +9 -0
  20. package/lib/exercises/math/derivation/variations/findAbscissaOfExtremaFromFunctionExpression.d.ts.map +1 -1
  21. package/lib/exercises/math/derivation/variations/findAbscissaOfExtremaFromFunctionExpression.js +3 -22
  22. package/lib/exercises/math/derivation/variations/index.d.ts +8 -0
  23. package/lib/exercises/math/derivation/variations/index.d.ts.map +1 -1
  24. package/lib/exercises/math/derivation/variations/index.js +8 -0
  25. package/lib/exercises/math/derivation/variations/signVarTable3dDegree.d.ts +10 -0
  26. package/lib/exercises/math/derivation/variations/signVarTable3dDegree.d.ts.map +1 -1
  27. package/lib/exercises/math/derivation/variations/signVarTable3dDegree.js +235 -231
  28. package/lib/exercises/math/functions/basics/inverseImageFunction.js +1 -1
  29. package/lib/exercises/math/functions/sign/affineSignTable.d.ts.map +1 -1
  30. package/lib/exercises/math/functions/sign/affineSignTable.js +1 -1
  31. package/lib/exercises/math/python/index.d.ts +1 -0
  32. package/lib/exercises/math/python/index.d.ts.map +1 -1
  33. package/lib/exercises/math/python/index.js +1 -0
  34. package/lib/exercises/math/python/list/index.d.ts +11 -0
  35. package/lib/exercises/math/python/list/index.d.ts.map +1 -0
  36. package/lib/exercises/math/python/list/index.js +10 -0
  37. package/lib/exercises/math/python/list/pyListAppend.d.ts +29 -0
  38. package/lib/exercises/math/python/list/pyListAppend.d.ts.map +1 -0
  39. package/lib/exercises/math/python/list/pyListAppend.js +280 -0
  40. package/lib/exercises/math/python/list/pyListCreateListByComprehension.d.ts +11 -0
  41. package/lib/exercises/math/python/list/pyListCreateListByComprehension.d.ts.map +1 -0
  42. package/lib/exercises/math/python/list/pyListCreateListByComprehension.js +231 -0
  43. package/lib/exercises/math/python/list/pyListCreateListInstructionCompletion.d.ts +9 -0
  44. package/lib/exercises/math/python/list/pyListCreateListInstructionCompletion.d.ts.map +1 -0
  45. package/lib/exercises/math/python/list/pyListCreateListInstructionCompletion.js +232 -0
  46. package/lib/exercises/math/python/list/pyListElemAtIndex.d.ts +9 -0
  47. package/lib/exercises/math/python/list/pyListElemAtIndex.d.ts.map +1 -0
  48. package/lib/exercises/math/python/list/pyListElemAtIndex.js +292 -0
  49. package/lib/exercises/math/python/list/pyListMutationMix.d.ts +29 -0
  50. package/lib/exercises/math/python/list/pyListMutationMix.d.ts.map +1 -0
  51. package/lib/exercises/math/python/list/pyListMutationMix.js +455 -0
  52. package/lib/exercises/math/python/list/pyListRemove.d.ts +29 -0
  53. package/lib/exercises/math/python/list/pyListRemove.d.ts.map +1 -0
  54. package/lib/exercises/math/python/list/pyListRemove.js +375 -0
  55. package/lib/exercises/math/python/list/pyListSetElemAtIndex.d.ts +29 -0
  56. package/lib/exercises/math/python/list/pyListSetElemAtIndex.d.ts.map +1 -0
  57. package/lib/exercises/math/python/list/pyListSetElemAtIndex.js +331 -0
  58. package/lib/exercises/math/python/list/pyListSetElemAtIndexInstructionCompletion.d.ts +9 -0
  59. package/lib/exercises/math/python/list/pyListSetElemAtIndexInstructionCompletion.d.ts.map +1 -0
  60. package/lib/exercises/math/python/list/pyListSetElemAtIndexInstructionCompletion.js +346 -0
  61. package/lib/exercises/math/python/list/pyListSetElemAtIndexWaterfall.d.ts +29 -0
  62. package/lib/exercises/math/python/list/pyListSetElemAtIndexWaterfall.d.ts.map +1 -0
  63. package/lib/exercises/math/python/list/pyListSetElemAtIndexWaterfall.js +394 -0
  64. package/lib/geogebra/geogebraConstructor.d.ts +1 -0
  65. package/lib/geogebra/geogebraConstructor.d.ts.map +1 -1
  66. package/lib/geogebra/geogebraConstructor.js +3 -0
  67. package/lib/index.d.ts +280 -0
  68. package/lib/index.d.ts.map +1 -1
  69. package/lib/math/geometry/line.js +1 -1
  70. package/lib/tree/nodes/functions/sqrtNode.d.ts +1 -1
  71. package/lib/tree/nodes/functions/sqrtNode.d.ts.map +1 -1
  72. package/lib/tree/nodes/functions/sqrtNode.js +5 -3
  73. 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
+ };
@@ -105,7 +105,7 @@ export const inverseImageFunction = {
105
105
  id: "inverseImageFunction",
106
106
  connector: "\\iff",
107
107
  getPropositions,
108
- label: "Calculer des antécédents",
108
+ label: "Calculer des antécédents (fonctions affines)",
109
109
  isSingleStep: true,
110
110
  generator: (nb) => getDistinctQuestions(getInverseImageFunction, nb),
111
111
  qcmTimer: 60,
@@ -1 +1 @@
1
- {"version":3,"file":"affineSignTable.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/sign/affineSignTable.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAQrC,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,SAAS,EAAE,MAAM,EAAE,EAAE,CAAC;CACvB,CAAC;AAqGF,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,CAkBjD,CAAC"}
1
+ {"version":3,"file":"affineSignTable.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/sign/affineSignTable.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAQrC,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,SAAS,EAAE,MAAM,EAAE,EAAE,CAAC;CACvB,CAAC;AAqGF,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,CAmBjD,CAAC"}
@@ -90,7 +90,7 @@ const getQuestionFromIdentifiers = (identifiers) => {
90
90
  };
91
91
  export const affineSignTable = {
92
92
  id: "affineSignTable",
93
- label: "Dresser le tableau de signes d'une fonction affine",
93
+ label: "Dresser le tableau de signes d'une fonction affine à partir de son expression algébrique",
94
94
  isSingleStep: true,
95
95
  generator: (nb, opts) => getDistinctQuestions(() => getTestSignTableQuestion(opts), nb),
96
96
  qcmTimer: 60,
@@ -18,5 +18,6 @@ export * from "./pythonWhileStatementCompletion.js";
18
18
  export * from "./pythonWhileStatementOperationCompletion.js";
19
19
  export * from "./pythonForLoopInstructionCompletion.js";
20
20
  export * from "./pythonSimpleFunctionInstructionCompletion.js";
21
+ export * from "./list/index.js";
21
22
  export * from "./sequences/index.js";
22
23
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/python/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,kBAAkB,CAAC;AACjC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,kCAAkC,CAAC;AACjD,cAAc,qCAAqC,CAAC;AACpD,cAAc,8CAA8C,CAAC;AAC7D,cAAc,yCAAyC,CAAC;AACxD,cAAc,gDAAgD,CAAC;AAC/D,cAAc,sBAAsB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/python/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,kBAAkB,CAAC;AACjC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,kCAAkC,CAAC;AACjD,cAAc,qCAAqC,CAAC;AACpD,cAAc,8CAA8C,CAAC;AAC7D,cAAc,yCAAyC,CAAC;AACxD,cAAc,gDAAgD,CAAC;AAE/D,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC"}
@@ -18,4 +18,5 @@ export * from "./pythonWhileStatementCompletion.js";
18
18
  export * from "./pythonWhileStatementOperationCompletion.js";
19
19
  export * from "./pythonForLoopInstructionCompletion.js";
20
20
  export * from "./pythonSimpleFunctionInstructionCompletion.js";
21
+ export * from "./list/index.js";
21
22
  export * from "./sequences/index.js";
@@ -0,0 +1,11 @@
1
+ export * from "./pyListElemAtIndex.js";
2
+ export * from "./pyListCreateListInstructionCompletion.js";
3
+ export * from "./pyListCreateListByComprehension.js";
4
+ export * from "./pyListAppend.js";
5
+ export * from "./pyListRemove.js";
6
+ export * from "./pyListElemAtIndex.js";
7
+ export * from "./pyListSetElemAtIndex.js";
8
+ export * from "./pyListSetElemAtIndexWaterfall.js";
9
+ export * from "./pyListMutationMix.js";
10
+ export * from "./pyListSetElemAtIndexInstructionCompletion.js";
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/python/list/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,4CAA4C,CAAC;AAC3D,cAAc,sCAAsC,CAAC;AACrD,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oCAAoC,CAAC;AACnD,cAAc,wBAAwB,CAAC;AACvC,cAAc,gDAAgD,CAAC"}
@@ -0,0 +1,10 @@
1
+ export * from "./pyListElemAtIndex.js";
2
+ export * from "./pyListCreateListInstructionCompletion.js";
3
+ export * from "./pyListCreateListByComprehension.js";
4
+ export * from "./pyListAppend.js";
5
+ export * from "./pyListRemove.js";
6
+ export * from "./pyListElemAtIndex.js";
7
+ export * from "./pyListSetElemAtIndex.js";
8
+ export * from "./pyListSetElemAtIndexWaterfall.js";
9
+ export * from "./pyListMutationMix.js";
10
+ export * from "./pyListSetElemAtIndexInstructionCompletion.js";
@@ -0,0 +1,29 @@
1
+ import { Exercise } from "../../../../exercises/exercise.js";
2
+ type Append<T> = {
3
+ nameList: string;
4
+ value: T;
5
+ };
6
+ type Remove<T> = {
7
+ nameList: string;
8
+ value: T;
9
+ };
10
+ type Injection<T> = {
11
+ nameList: string;
12
+ index: number;
13
+ value: T;
14
+ };
15
+ type Instruction<T> = ({
16
+ type: "append";
17
+ } & Append<T>) | ({
18
+ type: "remove";
19
+ } & Remove<T>) | ({
20
+ type: "injection";
21
+ } & Injection<T>);
22
+ type Identifiers = {
23
+ nameList: string;
24
+ listInitial: unknown[];
25
+ arrInstruction: Instruction<unknown>[];
26
+ };
27
+ export declare const pyListAppend: Exercise<Identifiers>;
28
+ export {};
29
+ //# sourceMappingURL=pyListAppend.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pyListAppend.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/python/list/pyListAppend.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAgIrC,KAAK,MAAM,CAAC,CAAC,IAAI;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,CAAC,CAAC;CACV,CAAC;AAEF,KAAK,MAAM,CAAC,CAAC,IAAI;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,CAAC,CAAC;CACV,CAAC;AAEF,KAAK,SAAS,CAAC,CAAC,IAAI;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,CAAC,CAAC;CACV,CAAC;AAEF,KAAK,WAAW,CAAC,CAAC,IACd,CAAC;IAAE,IAAI,EAAE,QAAQ,CAAA;CAAE,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,GAChC,CAAC;IAAE,IAAI,EAAE,QAAQ,CAAA;CAAE,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,GAChC,CAAC;IAAE,IAAI,EAAE,WAAW,CAAA;CAAE,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;AAE3C,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,OAAO,EAAE,CAAC;IACvB,cAAc,EAAE,WAAW,CAAC,OAAO,CAAC,EAAE,CAAC;CACxC,CAAC;AAkOF,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,WAAW,CAa9C,CAAC"}