math-exercises 3.0.162 → 3.0.163
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.
- package/lib/exercises/math/calculLitteral/distributivity/doubleDistributivityAdd.js +1 -1
- package/lib/exercises/math/calculLitteral/distributivity/doubleDistributivitySubstract.js +1 -1
- package/lib/exercises/math/functions/basics/inverseImageFunctionGeogebra.d.ts.map +1 -1
- package/lib/exercises/math/functions/basics/inverseImageFunctionGeogebra.js +80 -13
- package/package.json +1 -1
|
@@ -72,7 +72,7 @@ $$
|
|
|
72
72
|
`;
|
|
73
73
|
};
|
|
74
74
|
const getHint = () => {
|
|
75
|
-
return "Développe et
|
|
75
|
+
return "Développe et réduis chacun des produits d'abord. Puis, additionne les deux résultats.";
|
|
76
76
|
};
|
|
77
77
|
const getCorrection = (identifiers) => {
|
|
78
78
|
const { affine1, affine2, affine3, type, affine4 } = identifiers;
|
|
@@ -72,7 +72,7 @@ $$
|
|
|
72
72
|
`;
|
|
73
73
|
};
|
|
74
74
|
const getHint = () => {
|
|
75
|
-
return "Développe et
|
|
75
|
+
return "Développe et réduis chacun des produits d'abord. Puis, soustrais les deux résultats.";
|
|
76
76
|
};
|
|
77
77
|
const getCorrection = (identifiers) => {
|
|
78
78
|
const { affine1, affine2, affine3, type, affine4 } = identifiers;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inverseImageFunctionGeogebra.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/basics/inverseImageFunctionGeogebra.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAiBT,MAAM,6BAA6B,CAAC;AAgBrC,KAAK,WAAW,GAAG;IAEjB,MAAM,EAAE,MAAM,CAAC;IAIf,MAAM,EAAE,MAAM,EAAE,EAAE,CAAC;CACpB,CAAC;
|
|
1
|
+
{"version":3,"file":"inverseImageFunctionGeogebra.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/basics/inverseImageFunctionGeogebra.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAiBT,MAAM,6BAA6B,CAAC;AAgBrC,KAAK,WAAW,GAAG;IAEjB,MAAM,EAAE,MAAM,CAAC;IAIf,MAAM,EAAE,MAAM,EAAE,EAAE,CAAC;CACpB,CAAC;AA8bF,eAAO,MAAM,4BAA4B,EAAE,QAAQ,CAAC,WAAW,CAoB9D,CAAC"}
|
|
@@ -46,7 +46,15 @@ const getGGBOptions = (identifiers) => {
|
|
|
46
46
|
const xMax = Math.max(...Xs);
|
|
47
47
|
const yMin = Math.min(...Ys);
|
|
48
48
|
const yMax = Math.max(...Ys);
|
|
49
|
-
const ggb = new GeogebraConstructor({
|
|
49
|
+
const ggb = new GeogebraConstructor({
|
|
50
|
+
commands,
|
|
51
|
+
xAxis: {
|
|
52
|
+
steps: 1,
|
|
53
|
+
},
|
|
54
|
+
yAxis: {
|
|
55
|
+
steps: 1,
|
|
56
|
+
},
|
|
57
|
+
});
|
|
50
58
|
return ggb.getOptions({
|
|
51
59
|
coords: ggb.getAdaptedCoords({
|
|
52
60
|
xMin,
|
|
@@ -227,7 +235,11 @@ const getFeedback = (ans, { answer, ...identifiers }) => {
|
|
|
227
235
|
if (Math.abs(studentAns - image.evaluate()) < 0.3) {
|
|
228
236
|
return {
|
|
229
237
|
errorType: "A3-1",
|
|
230
|
-
feedback:
|
|
238
|
+
feedback: `Pour lire une image, la technique est la suivante (ici l'image de $4$ est $2$) :
|
|
239
|
+
|
|
240
|
+

|
|
241
|
+
|
|
242
|
+
Et pour lire un antécédent, comment fait-on ? Sur quel axe, lit-on les antécédents ?`,
|
|
231
243
|
};
|
|
232
244
|
}
|
|
233
245
|
if (affine.a.evaluate() !== 0) {
|
|
@@ -235,7 +247,7 @@ const getFeedback = (ans, { answer, ...identifiers }) => {
|
|
|
235
247
|
if (Math.abs(studentAns - root.evaluate()) < 0.3) {
|
|
236
248
|
return {
|
|
237
249
|
errorType: "A3-2",
|
|
238
|
-
feedback: "Tu
|
|
250
|
+
feedback: "Tu as trouvé l'intersection de la courbe avec l'axe des abscisses. Cette technique est pertinente pour trouver les antécédents de 0, mais pas pour trouver les antécédents d'un nombre différent de 0. De manière générale, comment fait-on pour lire les antécédents d'un nombre ?",
|
|
239
251
|
};
|
|
240
252
|
}
|
|
241
253
|
}
|
|
@@ -243,14 +255,14 @@ const getFeedback = (ans, { answer, ...identifiers }) => {
|
|
|
243
255
|
if (Math.abs(studentAns - ordOrigine) < 0.3) {
|
|
244
256
|
return {
|
|
245
257
|
errorType: "A3-3",
|
|
246
|
-
feedback: "Tu
|
|
258
|
+
feedback: "Tu as trouvé l'intersection de la courbe avec l'axe des ordonnés, mais cela n'a a priori pas de rapports avec la recherche d'antécédent. Comment fait-on pour lire un antécédent ?",
|
|
247
259
|
};
|
|
248
260
|
}
|
|
249
261
|
const ansNb = answer.unfrenchify();
|
|
250
262
|
if (Math.abs(studentAns - ansNb) < 1) {
|
|
251
263
|
return {
|
|
252
264
|
errorType: "D",
|
|
253
|
-
feedback: "
|
|
265
|
+
feedback: "Ta lecture sur le graphique n'est pas assez précise, mais tu as bien compris la procédure à suivre pour répondre à la question.",
|
|
254
266
|
};
|
|
255
267
|
}
|
|
256
268
|
return {
|
|
@@ -270,7 +282,7 @@ const getFeedback = (ans, { answer, ...identifiers }) => {
|
|
|
270
282
|
validPoints.some((p) => Math.abs(p[0] - v) < 0.2)) {
|
|
271
283
|
return {
|
|
272
284
|
errorType: "C3-1",
|
|
273
|
-
feedback: "Tu as
|
|
285
|
+
feedback: "Tu as trouvé une partie de la réponse, mais ce n'est pas complet. Combien un nombre peut-il avoir d'antécédent ?",
|
|
274
286
|
};
|
|
275
287
|
}
|
|
276
288
|
}
|
|
@@ -283,31 +295,35 @@ const getFeedback = (ans, { answer, ...identifiers }) => {
|
|
|
283
295
|
if (Math.abs(v - image) < 0.2) {
|
|
284
296
|
return {
|
|
285
297
|
errorType: "A3-1",
|
|
286
|
-
feedback:
|
|
298
|
+
feedback: `Pour lire une image, la technique est la suivante (ici l'image de $4$ est $2$) :
|
|
299
|
+
|
|
300
|
+

|
|
301
|
+
|
|
302
|
+
Et pour lire un antécédent, comment fait-on ? Sur quel axe, lit-on les antécédents ?`,
|
|
287
303
|
};
|
|
288
304
|
}
|
|
289
305
|
if (Math.abs(v - c) < 0.2)
|
|
290
306
|
return {
|
|
291
307
|
errorType: "A3-3",
|
|
292
|
-
feedback: "Tu
|
|
308
|
+
feedback: "Tu as trouvé l'intersection de la courbe avec l'axe des ordonnés, mais cela n'a a priori pas de rapports avec la recherche d'antécédent. Comment fait-on pour lire un antécédent ?",
|
|
293
309
|
};
|
|
294
310
|
if (Math.abs(v - extrema) < 0.2)
|
|
295
311
|
if (trinom.a < 0)
|
|
296
312
|
return {
|
|
297
313
|
errorType: "A3-4",
|
|
298
|
-
feedback: "Tu
|
|
314
|
+
feedback: "Tu as trouvé le maximum de la courbe, mais cela n'a a priori pas de rapports avec la recherche d'antécédent. Comment fait-on pour lire un antécédent ?",
|
|
299
315
|
};
|
|
300
316
|
else {
|
|
301
317
|
return {
|
|
302
318
|
errorType: "A3-5",
|
|
303
|
-
feedback: "Tu
|
|
319
|
+
feedback: "Tu as trouvé le minimum de la courbe, mais cela n'a a priori pas de rapports avec la recherche d'antécédent. Comment fait-on pour lire un antécédent ?",
|
|
304
320
|
};
|
|
305
321
|
}
|
|
306
322
|
if (roots.length) {
|
|
307
323
|
if (Math.abs(v - roots[0]) < 0.2 || Math.abs(v - roots[1]) < 0.2) {
|
|
308
324
|
return {
|
|
309
325
|
errorType: "A3-2",
|
|
310
|
-
feedback: "Tu
|
|
326
|
+
feedback: "Tu as trouvé l'intersection de la courbe avec l'axe des abscisses. Cette technique est pertinente pour trouver les antécédents de 0, mais pas pour trouver les antécédents d'un nombre différent de 0. De manière générale, comment fait-on pour lire les antécédents d'un nombre ?",
|
|
311
327
|
};
|
|
312
328
|
}
|
|
313
329
|
}
|
|
@@ -330,10 +346,61 @@ const getFeedback = (ans, { answer, ...identifiers }) => {
|
|
|
330
346
|
}
|
|
331
347
|
};
|
|
332
348
|
const getMethodology = () => {
|
|
349
|
+
// const commands = [
|
|
350
|
+
// "f(x) = (x+2)(x-1)",
|
|
351
|
+
// `Conique_1 : 1.76x^2+6.43y^2+0.77x-51.42y = -102.21`,
|
|
352
|
+
// `step = Slider(1, 4, 1, 1, 100, false, true, true, false)`,
|
|
353
|
+
// "C = (2,4)",
|
|
354
|
+
// `SetVisibleInView(step, 1, false)`,
|
|
355
|
+
// `ShowLabel(C, false)`,
|
|
356
|
+
// "SetFixed(C, true, false)",
|
|
357
|
+
// `SetConditionToShowObject(C, step>1)`,
|
|
358
|
+
// "D = (-3,4)",
|
|
359
|
+
// `ShowLabel(D, false)`,
|
|
360
|
+
// "SetFixed(D, true, false)",
|
|
361
|
+
// `SetConditionToShowObject(D, step>1)`,
|
|
362
|
+
// `g: y=4`,
|
|
363
|
+
// `SetConditionToShowObject(g, step>1)`,
|
|
364
|
+
// "A = (-3,0)",
|
|
365
|
+
// `ShowLabel(A, false)`,
|
|
366
|
+
// "SetFixed(A, true, false)",
|
|
367
|
+
// `SetConditionToShowObject(A, step>2)`,
|
|
368
|
+
// "B = (2,0)",
|
|
369
|
+
// `ShowLabel(B, false)`,
|
|
370
|
+
// "SetFixed(B, true, false)",
|
|
371
|
+
// `SetConditionToShowObject(B, step>2)`,
|
|
372
|
+
// "S_1 = Segment(B,C)",
|
|
373
|
+
// `SetConditionToShowObject(B, step>2)`,
|
|
374
|
+
// `SetLineStyle(S_1, 2)`,
|
|
375
|
+
// "S_2 = Segment(A,D)",
|
|
376
|
+
// `SetConditionToShowObject(B, step>2)`,
|
|
377
|
+
// `SetLineStyle(S_2, 2)`,
|
|
378
|
+
// `text1 = Text("$\\scriptsize 2\\text{ est un}\\\\ \\text{antécédent de }4\\\\ \\text{ par la fonction }f$", (2.69357, 1.61646))`,
|
|
379
|
+
// `SetConditionToShowObject(text1, step>2)`,
|
|
380
|
+
// `SetConditionToShowObject(text1, step>2)`,
|
|
381
|
+
// `I = (2.64071, 0.39819)`,
|
|
382
|
+
// `SetVisibleInView(I, 1, false)`,
|
|
383
|
+
// `v = Vector(I, B)`,
|
|
384
|
+
// `SetConditionToShowObject(v, step>2)`,
|
|
385
|
+
// `text2 = Text("$\\scriptsize -3 \\text{ est un autre} \\\\ \\text{antécédent de } 4 \\\\ \\text{par la fonction }f$", (-6.27307, 1.61256))`,
|
|
386
|
+
// `SetConditionToShowObject(text2, step>3)`,
|
|
387
|
+
// `H = (-3.83865, 0.62044)`,
|
|
388
|
+
// `SetVisibleInView(H, 1, false)`,
|
|
389
|
+
// `u = Vector(H, A)`,
|
|
390
|
+
// `SetConditionToShowObject(u, step>3)`,
|
|
391
|
+
// `StartAnimation(step, true)`,
|
|
392
|
+
// ];
|
|
333
393
|
return {
|
|
334
|
-
methodology: `
|
|
394
|
+
methodology: `Chercher des antécédents d'un réel $4$ par la fonction f, c'est déterminer les réels $x$ tels que $f(x)=4$.
|
|
395
|
+
|
|
396
|
+
La donnée $4$ se trouve donc sur l'axe des ordonnées et les antécédents cherchés doivent donc se trouver sur l'axe des abscisses !
|
|
397
|
+
|
|
398
|
+
Voici la technique à employer pour trouver les antécédents de $4$ :
|
|
335
399
|
|
|
336
|
-
`,
|
|
401
|
+
// methodologyGGBOptions: ggb.getOptions({
|
|
402
|
+
// coords: [-8, 6, -3, 5],
|
|
403
|
+
// }),
|
|
337
404
|
};
|
|
338
405
|
};
|
|
339
406
|
export const inverseImageFunctionGeogebra = {
|