math-exercises 3.0.32 → 3.0.34
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/exercise.d.ts +2 -1
- package/lib/exercises/exercise.d.ts.map +1 -1
- package/lib/exercises/exercise.js +18 -2
- package/lib/exercises/math/calcul/addAndSub.d.ts.map +1 -1
- package/lib/exercises/math/calcul/addAndSub.js +35 -17
- package/lib/exercises/math/calcul/arithmetics/commonDivisorsList.d.ts.map +1 -1
- package/lib/exercises/math/calcul/arithmetics/commonDivisorsList.js +35 -13
- package/lib/exercises/math/calcul/arithmetics/divisibiltyCriteria.d.ts.map +1 -1
- package/lib/exercises/math/calcul/arithmetics/divisibiltyCriteria.js +1 -4
- package/lib/exercises/math/calcul/arithmetics/primeNumbers.d.ts +5 -2
- package/lib/exercises/math/calcul/arithmetics/primeNumbers.d.ts.map +1 -1
- package/lib/exercises/math/calcul/arithmetics/primeNumbers.js +125 -48
- package/lib/exercises/math/calculLitteral/distributivity/canonicalFormDevelopment.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/distributivity/canonicalFormDevelopment.js +57 -20
- package/lib/exercises/math/conversion/hoursToSecond.d.ts +9 -0
- package/lib/exercises/math/conversion/hoursToSecond.d.ts.map +1 -0
- package/lib/exercises/math/conversion/hoursToSecond.js +94 -0
- package/lib/exercises/math/conversion/index.d.ts +1 -0
- package/lib/exercises/math/conversion/index.d.ts.map +1 -1
- package/lib/exercises/math/conversion/index.js +1 -0
- package/lib/exercises/math/dataRepresentations/pieChartReading.d.ts.map +1 -1
- package/lib/exercises/math/dataRepresentations/pieChartReading.js +14 -3
- package/lib/exercises/math/derivation/derivative/thirdDegreeFunctionVariation.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/thirdDegreeFunctionVariation.js +41 -8
- package/lib/exercises/math/derivation/tangent/derivativeNumberReading.d.ts.map +1 -1
- package/lib/exercises/math/derivation/tangent/derivativeNumberReading.js +3 -1
- package/lib/exercises/math/derivation/tangent/derivativeTangentEquationReading.d.ts.map +1 -1
- package/lib/exercises/math/derivation/tangent/derivativeTangentEquationReading.js +3 -1
- package/lib/exercises/math/derivation/tangent/tangentEquations.d.ts.map +1 -1
- package/lib/exercises/math/derivation/tangent/tangentEquations.js +95 -26
- package/lib/exercises/math/functions/affines/leadingCoefficient.d.ts +4 -1
- package/lib/exercises/math/functions/affines/leadingCoefficient.d.ts.map +1 -1
- package/lib/exercises/math/functions/affines/leadingCoefficient.js +21 -7
- package/lib/exercises/math/functions/affines/leadingCoefficientCalculV1.d.ts.map +1 -1
- package/lib/exercises/math/functions/affines/leadingCoefficientCalculV1.js +63 -18
- package/lib/exercises/math/functions/affines/leadingCoefficientCalculV2.d.ts.map +1 -1
- package/lib/exercises/math/functions/affines/leadingCoefficientCalculV2.js +1 -1
- package/lib/exercises/math/functions/parity/parityFromGraph.d.ts.map +1 -1
- package/lib/exercises/math/functions/parity/parityFromGraph.js +0 -4
- package/lib/exercises/math/functions/trinoms/equation/solveSecondDegreeEquationByFactorisation.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/equation/solveSecondDegreeEquationFromCano.js +2 -2
- package/lib/exercises/math/functions/trinoms/factoForm/factorizedFormFromRoots.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/factoForm/factorizedFormFromRoots.js +39 -16
- package/lib/exercises/math/functions/trinoms/roots/niceRootsFromDevForm.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/roots/niceRootsFromDevForm.js +35 -16
- package/lib/exercises/math/functions/trinoms/roots/rootsFromDevForm.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/roots/rootsFromDevForm.js +31 -8
- package/lib/exercises/math/functions/trinoms/roots/rootsFromFactorizedForm.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/roots/rootsFromFactorizedForm.js +7 -5
- package/lib/exercises/math/geometry/triangles/index.d.ts +1 -0
- package/lib/exercises/math/geometry/triangles/index.d.ts.map +1 -1
- package/lib/exercises/math/geometry/triangles/index.js +1 -1
- package/lib/exercises/math/geometry/triangles/triangleNature.d.ts +1 -0
- package/lib/exercises/math/geometry/triangles/triangleNature.d.ts.map +1 -1
- package/lib/exercises/math/geometry/triangles/triangleNature.js +57 -18
- package/lib/exercises/math/percent/applyPercent.d.ts.map +1 -1
- package/lib/exercises/math/percent/applyPercent.js +8 -9
- package/lib/exercises/math/percent/averageEvolutionRate.d.ts.map +1 -1
- package/lib/exercises/math/percent/averageEvolutionRate.js +3 -3
- package/lib/exercises/math/percent/findStartValueAfterEvolution.d.ts.map +1 -1
- package/lib/exercises/math/percent/findStartValueAfterEvolution.js +4 -2
- package/lib/exercises/math/percent/percentWritings.js +1 -1
- package/lib/exercises/math/trigonometry/mainAngleMeasure.d.ts.map +1 -1
- package/lib/exercises/math/trigonometry/mainAngleMeasure.js +0 -1
- package/lib/index.d.ts +15 -3
- package/lib/index.d.ts.map +1 -1
- package/lib/math/geometry/angle.d.ts +1 -0
- package/lib/math/geometry/angle.d.ts.map +1 -1
- package/lib/math/geometry/spaceVector.d.ts.map +1 -1
- package/lib/math/geometry/spaceVector.js +2 -2
- package/lib/math/geometry/triangles/equilateralTriangle.d.ts +1 -0
- package/lib/math/geometry/triangles/equilateralTriangle.d.ts.map +1 -1
- package/lib/math/geometry/triangles/equilateralTriangle.js +6 -0
- package/lib/math/geometry/triangles/isoceleTriangle.d.ts +3 -1
- package/lib/math/geometry/triangles/isoceleTriangle.d.ts.map +1 -1
- package/lib/math/geometry/triangles/isoceleTriangle.js +7 -2
- package/lib/playground.d.ts.map +1 -1
- package/lib/playground.js +3 -1
- package/lib/tests/megaExosTest.d.ts +3 -0
- package/lib/tests/megaExosTest.d.ts.map +1 -0
- package/lib/tests/megaExosTest.js +6 -0
- package/lib/tests/megaml.test.d.ts +2 -0
- package/lib/tests/megaml.test.d.ts.map +1 -0
- package/lib/tests/megaml.test.js +10 -0
- package/lib/tests/questionTest.js +1 -1
- package/lib/tree/nodes/numbers/percentNode.d.ts +1 -1
- package/lib/tree/nodes/numbers/percentNode.d.ts.map +1 -1
- package/lib/tree/nodes/numbers/percentNode.js +5 -4
- package/lib/tree/parsers/latexParser.d.ts.map +1 -1
- package/lib/tree/parsers/latexParser.js +21 -4
- package/package.json +2 -1
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../exercises/exercise.js";
|
|
2
|
+
import { getDistinctQuestions } from "../../../exercises/utils/getDistinctQuestions.js";
|
|
3
|
+
import { numberVEA } from "../../../exercises/vea/numberVEA.js";
|
|
4
|
+
import { randint } from "../../../math/utils/random/randint.js";
|
|
5
|
+
const getPropositions = (n, { answer, ...identifiers }) => {
|
|
6
|
+
const propositions = [];
|
|
7
|
+
const { hours, mins, seconds } = identifiers;
|
|
8
|
+
addValidProp(propositions, answer);
|
|
9
|
+
tryToAddWrongProp(propositions, hours * 60 + 60 * mins + seconds + "");
|
|
10
|
+
tryToAddWrongProp(propositions, seconds + "");
|
|
11
|
+
while (propositions.length < n) {
|
|
12
|
+
tryToAddWrongProp(propositions, randint(5000, 100000) + "");
|
|
13
|
+
}
|
|
14
|
+
return shuffleProps(propositions, n);
|
|
15
|
+
};
|
|
16
|
+
const getAnswer = (identifiers) => {
|
|
17
|
+
const { hours, mins, seconds } = identifiers;
|
|
18
|
+
return hours * 3600 + 60 * mins + seconds + "";
|
|
19
|
+
};
|
|
20
|
+
const getInstruction = (identifiers) => {
|
|
21
|
+
const { hours, mins, seconds } = identifiers;
|
|
22
|
+
return `Combien y a-t-il de secondes dans $${hours}\\text{h } ${mins} \\text{min } ${seconds}\\text{s }$ ?`;
|
|
23
|
+
};
|
|
24
|
+
const getHint = (identifiers) => {
|
|
25
|
+
return `Dans une minute, il y a $60$ secondes. Dans une heure, il y a $60$ minutes.`;
|
|
26
|
+
};
|
|
27
|
+
const getCorrection = (identifiers) => {
|
|
28
|
+
const { hours, mins, seconds } = identifiers;
|
|
29
|
+
return `Dans une minute, il y a $60$ secondes. Donc, le nombre de secondes dans $${mins}$ minutes est :
|
|
30
|
+
|
|
31
|
+
$$
|
|
32
|
+
60\\times ${mins} = ${60 * mins}
|
|
33
|
+
$$
|
|
34
|
+
|
|
35
|
+
Puis, dans une heure, il y a $60$ minutes, qui chacune compte $60$ secondes. Ainsi, dans une heure, il y a $60\\times 60 = 3600$ secondes.
|
|
36
|
+
|
|
37
|
+
Le nombre de secondes dans $${hours}$ heures est donc :
|
|
38
|
+
|
|
39
|
+
$$
|
|
40
|
+
3600\\times ${hours} = ${3600 * hours}
|
|
41
|
+
$$
|
|
42
|
+
|
|
43
|
+
Au final, dans $${hours}\\text{h } ${mins} \\text{min } ${seconds}\\text{s }$, il y a donc :
|
|
44
|
+
|
|
45
|
+
$$
|
|
46
|
+
${3600 * hours}+ ${60 * mins} + ${seconds} = ${getAnswer(identifiers)}
|
|
47
|
+
$$
|
|
48
|
+
|
|
49
|
+
secondes.
|
|
50
|
+
`;
|
|
51
|
+
};
|
|
52
|
+
const getKeys = (identifiers) => {
|
|
53
|
+
return [];
|
|
54
|
+
};
|
|
55
|
+
const isAnswerValid = (ans, { answer }) => {
|
|
56
|
+
return numberVEA(ans, answer);
|
|
57
|
+
};
|
|
58
|
+
const getHoursToSecondQuestion = (ops) => {
|
|
59
|
+
const hours = randint(1, 24);
|
|
60
|
+
const mins = randint(1, 60);
|
|
61
|
+
const seconds = randint(1, 60);
|
|
62
|
+
const identifiers = {
|
|
63
|
+
hours,
|
|
64
|
+
mins,
|
|
65
|
+
seconds,
|
|
66
|
+
};
|
|
67
|
+
const question = {
|
|
68
|
+
answer: getAnswer(identifiers),
|
|
69
|
+
instruction: getInstruction(identifiers),
|
|
70
|
+
keys: getKeys(identifiers),
|
|
71
|
+
answerFormat: "tex",
|
|
72
|
+
identifiers,
|
|
73
|
+
hint: getHint(identifiers),
|
|
74
|
+
correction: getCorrection(identifiers),
|
|
75
|
+
};
|
|
76
|
+
return question;
|
|
77
|
+
};
|
|
78
|
+
export const hoursToSecond = {
|
|
79
|
+
id: "hoursToSecond",
|
|
80
|
+
connector: "=",
|
|
81
|
+
label: "Convertir une durée en 'h min s' en secondes",
|
|
82
|
+
isSingleStep: true,
|
|
83
|
+
generator: (nb, opts) => getDistinctQuestions(() => getHoursToSecondQuestion(opts), nb),
|
|
84
|
+
qcmTimer: 60,
|
|
85
|
+
freeTimer: 60,
|
|
86
|
+
getPropositions,
|
|
87
|
+
isAnswerValid,
|
|
88
|
+
subject: "Mathématiques",
|
|
89
|
+
getInstruction,
|
|
90
|
+
getHint,
|
|
91
|
+
getCorrection,
|
|
92
|
+
getAnswer,
|
|
93
|
+
hasHintAndCorrection: true,
|
|
94
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/conversion/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/conversion/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pieChartReading.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/dataRepresentations/pieChartReading.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAmBT,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"pieChartReading.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/dataRepresentations/pieChartReading.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAmBT,MAAM,6BAA6B,CAAC;AAyBrC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,EAAE,EAAE,CAAC;IACnB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB,CAAC;AAgMF,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,CAkBjD,CAAC"}
|
|
@@ -7,6 +7,7 @@ import { Point } from "../../../math/geometry/point.js";
|
|
|
7
7
|
import { randfloat } from "../../../math/utils/random/randfloat.js";
|
|
8
8
|
import { randint } from "../../../math/utils/random/randint.js";
|
|
9
9
|
import { round } from "../../../math/utils/round.js";
|
|
10
|
+
import { parseAlgebraic } from "../../../tree/parsers/latexParser.js";
|
|
10
11
|
import { percentParser } from "../../../tree/parsers/percentParser.js";
|
|
11
12
|
import { handleVEAError } from "../../../utils/errors/handleVEAError.js";
|
|
12
13
|
import { getLetter } from "../../../utils/strings/getLetter.js";
|
|
@@ -37,7 +38,7 @@ const getInstruction = (identifiers) => {
|
|
|
37
38
|
|
|
38
39
|
Quelle proportion des communications effectuées, les communications audio représentent-elles ?
|
|
39
40
|
|
|
40
|
-
Arrondir au centième.`;
|
|
41
|
+
Arrondir au centième de pourcentage.`;
|
|
41
42
|
};
|
|
42
43
|
// const getHint: GetHint<Identifiers> = (identifiers) => {};
|
|
43
44
|
// const getCorrection: GetCorrection<Identifiers> = (identifiers) => {};
|
|
@@ -100,8 +101,18 @@ const getKeys = (identifiers) => {
|
|
|
100
101
|
};
|
|
101
102
|
const isAnswerValid = (ans, { answer }) => {
|
|
102
103
|
try {
|
|
103
|
-
|
|
104
|
-
|
|
104
|
+
//!à factoriser
|
|
105
|
+
//!pb est que parseAlgebraic ne gère pas encore les %
|
|
106
|
+
let parsed;
|
|
107
|
+
if (ans.includes("%")) {
|
|
108
|
+
parsed = percentParser(ans);
|
|
109
|
+
return parsed === answer;
|
|
110
|
+
}
|
|
111
|
+
else {
|
|
112
|
+
parsed = parseAlgebraic(ans);
|
|
113
|
+
const nbAns = answer.replace("\\%", "").unfrenchify();
|
|
114
|
+
return Math.abs(parsed.evaluate() - nbAns / 100) < 0.0001;
|
|
115
|
+
}
|
|
105
116
|
}
|
|
106
117
|
catch (err) {
|
|
107
118
|
return handleVEAError(err);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"thirdDegreeFunctionVariation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/derivative/thirdDegreeFunctionVariation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"thirdDegreeFunctionVariation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/derivative/thirdDegreeFunctionVariation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAoBrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IAEV,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAwKF,eAAO,MAAM,4BAA4B,EAAE,QAAQ,CAAC,WAAW,CAmB9D,CAAC"}
|
|
@@ -23,20 +23,48 @@ const rebuildIdentifiers = (oldIds) => {
|
|
|
23
23
|
};
|
|
24
24
|
const getInstruction = (identifiers) => {
|
|
25
25
|
const { a, coin, racine1, racine2 } = identifiers;
|
|
26
|
-
return
|
|
27
|
-
|
|
26
|
+
return `Soit $f$ la fonction représentée ci-dessous.
|
|
27
|
+
|
|
28
|
+
Sur quel(s) intervalle(s) la fonction dérivée $f'$ de $f$ est-elle ${coin < 0 ? "négative" : "positive"} ?`;
|
|
28
29
|
};
|
|
29
|
-
const
|
|
30
|
+
const getHint = (identifiers) => {
|
|
31
|
+
return `Si la fonction $f$ est croissante sur un intervalle, alors sa fonction dérivée $f'$ sera positive sur cet intervalle.
|
|
32
|
+
|
|
33
|
+
À l'inverse, si la fonction $f$ est décroissante sur un intervalle, alors sa fonction dérivée $f'$ sera négative sur cet intervalle.`;
|
|
34
|
+
};
|
|
35
|
+
const getCorrection = (identifiers) => {
|
|
36
|
+
const { a, coin, racine1, racine2 } = identifiers;
|
|
37
|
+
const variation = coin < 0 ? "décroissante" : "croissante";
|
|
38
|
+
const sign = coin < 0 ? "négative" : "positive";
|
|
39
|
+
const intervals = getIntervalsSolution(identifiers);
|
|
40
|
+
return `Si la fonction $f$ est ${variation} sur un intervalle, alors sa fonction dérivée $f'$ sera ${sign} sur cet intervalle.
|
|
41
|
+
|
|
42
|
+
Ici, on lit graphiquement que $f$ est ${variation} sur $${intervals[0].toTex()}$${intervals[1] ? ` et sur $${intervals[1].toTex()}$` : ""}.
|
|
43
|
+
|
|
44
|
+
On en déduit que $f'$ est donc ${sign} sur :
|
|
45
|
+
|
|
46
|
+
$$
|
|
47
|
+
${getAnswer(identifiers)}
|
|
48
|
+
$$`;
|
|
49
|
+
};
|
|
50
|
+
const getIntervalsSolution = (identifiers) => {
|
|
30
51
|
const { a, coin, racine1, racine2 } = identifiers;
|
|
31
52
|
const racine1Tree = new NumberNode(racine1);
|
|
32
53
|
const racine2Tree = new NumberNode(racine2);
|
|
33
|
-
const
|
|
34
|
-
? new IntervalNode(racine1Tree, racine2Tree, ClosureType.FF)
|
|
35
|
-
:
|
|
54
|
+
const intervals = coin * a < 0
|
|
55
|
+
? [new IntervalNode(racine1Tree, racine2Tree, ClosureType.FF)]
|
|
56
|
+
: [
|
|
36
57
|
new IntervalNode(MinusInfinityNode, racine1Tree, ClosureType.OF),
|
|
37
58
|
new IntervalNode(racine2Tree, PlusInfinityNode, ClosureType.FO),
|
|
38
|
-
]
|
|
39
|
-
return
|
|
59
|
+
];
|
|
60
|
+
return intervals;
|
|
61
|
+
};
|
|
62
|
+
const getAnswer = (identifiers) => {
|
|
63
|
+
const intervals = getIntervalsSolution(identifiers);
|
|
64
|
+
if (intervals.length === 1)
|
|
65
|
+
return intervals[0].toTex();
|
|
66
|
+
else
|
|
67
|
+
return new UnionIntervalNode(intervals).toTex();
|
|
40
68
|
};
|
|
41
69
|
const getGGBOptions = (identifiers) => {
|
|
42
70
|
const { a, coin, racine1, racine2, c } = identifiers;
|
|
@@ -81,6 +109,8 @@ const getThirdDegreeFunctionVariation = () => {
|
|
|
81
109
|
answerFormat: "tex",
|
|
82
110
|
ggbOptions: getGGBOptions(identifiers),
|
|
83
111
|
identifiers,
|
|
112
|
+
hint: getHint(identifiers),
|
|
113
|
+
correction: getCorrection(identifiers),
|
|
84
114
|
};
|
|
85
115
|
return question;
|
|
86
116
|
};
|
|
@@ -132,4 +162,7 @@ export const thirdDegreeFunctionVariation = {
|
|
|
132
162
|
getAnswer,
|
|
133
163
|
getGGBOptions,
|
|
134
164
|
rebuildIdentifiers,
|
|
165
|
+
hasHintAndCorrection: true,
|
|
166
|
+
getHint,
|
|
167
|
+
getCorrection,
|
|
135
168
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"derivativeNumberReading.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/tangent/derivativeNumberReading.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,6BAA6B,CAAC;AAmBrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,EAAE,CAAC;IACZ,CAAC,EAAE,MAAM,EAAE,CAAC;IACZ,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB,CAAC;
|
|
1
|
+
{"version":3,"file":"derivativeNumberReading.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/tangent/derivativeNumberReading.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,6BAA6B,CAAC;AAmBrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,EAAE,CAAC;IACZ,CAAC,EAAE,MAAM,EAAE,CAAC;IACZ,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB,CAAC;AAkJF,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,WAAW,CAmBzD,CAAC"}
|
|
@@ -36,7 +36,9 @@ const getInstruction = (identifiers) => {
|
|
|
36
36
|
const xB = B[0];
|
|
37
37
|
const yA = A[1];
|
|
38
38
|
const yB = B[1];
|
|
39
|
-
return `Ci-dessous sont tracées la courbe $\\mathcal C_f$ de la fonction $f$ et la tangente à cette courbe au point d'abscisse $${xA}
|
|
39
|
+
return `Ci-dessous sont tracées la courbe $\\mathcal C_f$ de la fonction $f$ et la tangente à cette courbe au point d'abscisse $${xA}$.
|
|
40
|
+
|
|
41
|
+
Déterminer $f'(${xA})$.`;
|
|
40
42
|
};
|
|
41
43
|
const getAnswer = (identifiers) => {
|
|
42
44
|
const { A, B } = identifiers;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"derivativeTangentEquationReading.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/tangent/derivativeTangentEquationReading.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAkBT,MAAM,6BAA6B,CAAC;AAwBrC,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,GAAG,CAAC;IACb,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB,CAAC;
|
|
1
|
+
{"version":3,"file":"derivativeTangentEquationReading.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/tangent/derivativeTangentEquationReading.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAkBT,MAAM,6BAA6B,CAAC;AAwBrC,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,GAAG,CAAC;IACb,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB,CAAC;AAiQF,eAAO,MAAM,gCAAgC,EAAE,QAAQ,CAAC,WAAW,CAmBlE,CAAC;;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG"}
|
|
@@ -75,7 +75,9 @@ const getAnswer = ({ trinomCoeffs, xA, yA, yPrimeA, }) => {
|
|
|
75
75
|
return new EqualNode("y".toTree(), getAnswerTree({ xA, yA, yPrimeA, trinomCoeffs })).toTex();
|
|
76
76
|
};
|
|
77
77
|
const getInstruction = ({ xA }) => {
|
|
78
|
-
return `Ci-dessous sont tracées la courbe $\\mathcal C_f$ de la fonction $f$ et la tangente à cette courbe au point d'abscisse $${xA}
|
|
78
|
+
return `Ci-dessous sont tracées la courbe $\\mathcal C_f$ de la fonction $f$ et la tangente à cette courbe au point d'abscisse $${xA}$.
|
|
79
|
+
|
|
80
|
+
Déterminer l'équation de cette tangente.`;
|
|
79
81
|
};
|
|
80
82
|
const getHint = (identifiers) => {
|
|
81
83
|
return `L'équation de la tangente à la courbe de $f$ au point d'abscisse $a$ est :
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tangentEquations.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/tangent/tangentEquations.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"tangentEquations.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/tangent/tangentEquations.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAmBrC,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB,CAAC;AAmIF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAelD,CAAC"}
|
|
@@ -3,27 +3,85 @@ import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQue
|
|
|
3
3
|
import { Trinom, TrinomConstructor } from "../../../../math/polynomials/trinom.js";
|
|
4
4
|
import { randint } from "../../../../math/utils/random/randint.js";
|
|
5
5
|
import { EqualNode } from "../../../../tree/nodes/equations/equalNode.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
6
|
+
import { add } from "../../../../tree/nodes/operators/addNode.js";
|
|
7
|
+
import { multiply, MultiplyNode, } from "../../../../tree/nodes/operators/multiplyNode.js";
|
|
8
|
+
import { substract, SubstractNode, } from "../../../../tree/nodes/operators/substractNode.js";
|
|
8
9
|
import { VariableNode } from "../../../../tree/nodes/variables/variableNode.js";
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
import { parseAlgebraic } from "../../../../tree/parsers/latexParser.js";
|
|
11
|
+
import { handleVEAError } from "../../../../utils/errors/handleVEAError.js";
|
|
12
|
+
import { alignTex } from "../../../../utils/latex/alignTex.js";
|
|
13
|
+
const getHint = (identifiers) => {
|
|
14
|
+
return `Si $f$ est une fonction dérivable en $a$, alors l'équation de la tangente à la courbe de $f$ au point d'abscisse $a$ est donné par:
|
|
15
|
+
|
|
16
|
+
$$
|
|
17
|
+
y = f'(a)(x-a)+f(a)
|
|
18
|
+
$$`;
|
|
19
|
+
};
|
|
20
|
+
const getCorrection = (identifiers) => {
|
|
21
|
+
const { abscisse, trinome } = identifiers;
|
|
22
|
+
const trinom = new Trinom(trinome[0], trinome[1], trinome[2]);
|
|
23
|
+
const derivee = trinom.derivate();
|
|
14
24
|
const imagederivee = derivee.calculate(abscisse);
|
|
25
|
+
const image = trinom.calculate(abscisse);
|
|
26
|
+
return `L'équation de la tangente à la courbe de $f$ au point d'abscisse $a$ est donné par:
|
|
27
|
+
|
|
28
|
+
$$
|
|
29
|
+
y = f'(a)(x-a)+f(a)
|
|
30
|
+
$$
|
|
31
|
+
|
|
32
|
+
Ici, on a $f'(x) = ${derivee
|
|
33
|
+
.toTree()
|
|
34
|
+
.toTex()}$, donc $f'(${abscisse}) = ${imagederivee}$.
|
|
35
|
+
|
|
36
|
+
D'autre part, $f(${abscisse}) = ${image}$.
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
L'équation de la tangente en $${abscisse}$ est donc :
|
|
40
|
+
|
|
41
|
+
${alignTex([
|
|
42
|
+
[
|
|
43
|
+
"y",
|
|
44
|
+
"=",
|
|
45
|
+
add(multiply(imagederivee, substract("x", abscisse)), image).toTex(),
|
|
46
|
+
],
|
|
47
|
+
["", "=", getAnswer(identifiers).split("=")[1]],
|
|
48
|
+
])}
|
|
49
|
+
`;
|
|
50
|
+
};
|
|
51
|
+
const getAnswer = (identifiers) => {
|
|
52
|
+
const { abscisse, trinome } = identifiers;
|
|
53
|
+
const trinom = new Trinom(trinome[0], trinome[1], trinome[2]);
|
|
54
|
+
const derivee = trinom.derivate();
|
|
55
|
+
const imagederivee = derivee.calculate(abscisse);
|
|
56
|
+
const image = trinom.calculate(abscisse);
|
|
15
57
|
const k = abscisse * imagederivee;
|
|
16
58
|
const constante = k - image;
|
|
17
59
|
const equation = new EqualNode(new VariableNode("y"), new SubstractNode(new MultiplyNode(imagederivee.toTree(), new VariableNode("x")), constante.toTree()).simplify());
|
|
18
|
-
|
|
60
|
+
return equation.toTex();
|
|
61
|
+
};
|
|
62
|
+
const getInstruction = (identifiers) => {
|
|
63
|
+
const { abscisse, trinome } = identifiers;
|
|
64
|
+
const trinom = new Trinom(trinome[0], trinome[1], trinome[2]);
|
|
65
|
+
return `Soit $f$ la fonction définie par :
|
|
66
|
+
|
|
67
|
+
$$
|
|
68
|
+
f(x) = ${trinom.toTree().toTex()}
|
|
69
|
+
$$
|
|
70
|
+
|
|
71
|
+
Déterminer l'équation de la tangente à la courbe de $f$ au point d'abscisse $${abscisse}$.`;
|
|
72
|
+
};
|
|
73
|
+
const getTangentEquationQuestion = () => {
|
|
74
|
+
const trinome = TrinomConstructor.random();
|
|
75
|
+
const abscisse = randint(-10, 10);
|
|
76
|
+
const identifiers = { abscisse, trinome: [trinome.a, trinome.b, trinome.c] };
|
|
19
77
|
const question = {
|
|
20
|
-
answer:
|
|
21
|
-
instruction:
|
|
22
|
-
.toTree()
|
|
23
|
-
.toTex()}$. Déterminer l'équation de la tangente à la courbe de $f$ au point d'abscisse $${abscisse}$.`,
|
|
78
|
+
answer: getAnswer(identifiers),
|
|
79
|
+
instruction: getInstruction(identifiers),
|
|
24
80
|
keys: ["y", "x", "equal"],
|
|
25
81
|
answerFormat: "tex",
|
|
26
|
-
identifiers
|
|
82
|
+
identifiers,
|
|
83
|
+
hint: getHint(identifiers),
|
|
84
|
+
correction: getCorrection(identifiers),
|
|
27
85
|
};
|
|
28
86
|
return question;
|
|
29
87
|
};
|
|
@@ -40,28 +98,39 @@ const getPropositions = (n, { answer }) => {
|
|
|
40
98
|
return shuffleProps(propositions, n);
|
|
41
99
|
};
|
|
42
100
|
const isAnswerValid = (ans, { answer, abscisse, trinome }) => {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
101
|
+
try {
|
|
102
|
+
let valueAns = "";
|
|
103
|
+
const formated = ans.split("=");
|
|
104
|
+
if (formated.length === 1)
|
|
105
|
+
valueAns = formated[0];
|
|
106
|
+
else
|
|
107
|
+
valueAns = formated[1];
|
|
108
|
+
if (!valueAns)
|
|
109
|
+
return false;
|
|
110
|
+
const parsed = parseAlgebraic(valueAns);
|
|
111
|
+
return ("y=" +
|
|
112
|
+
parsed
|
|
113
|
+
.simplify({ towardsDistribute: true, forbidFactorize: true })
|
|
114
|
+
.toTex() ===
|
|
115
|
+
answer);
|
|
116
|
+
}
|
|
117
|
+
catch (err) {
|
|
118
|
+
return handleVEAError(err);
|
|
119
|
+
}
|
|
54
120
|
};
|
|
55
121
|
export const tangentEquations = {
|
|
56
122
|
id: "tangentEquations",
|
|
57
123
|
label: "Déterminer l'équation d'une tangente",
|
|
58
|
-
levels: ["1reSpé"],
|
|
59
124
|
isSingleStep: true,
|
|
60
|
-
sections: ["Dérivation"],
|
|
61
125
|
generator: (nb) => getDistinctQuestions(getTangentEquationQuestion, nb),
|
|
62
126
|
qcmTimer: 60,
|
|
63
127
|
freeTimer: 60,
|
|
64
128
|
getPropositions,
|
|
65
129
|
isAnswerValid,
|
|
66
130
|
subject: "Mathématiques",
|
|
131
|
+
getInstruction,
|
|
132
|
+
getAnswer,
|
|
133
|
+
getHint,
|
|
134
|
+
getCorrection,
|
|
135
|
+
hasHintAndCorrection: true,
|
|
67
136
|
};
|
|
@@ -5,6 +5,9 @@ type Identifiers = {
|
|
|
5
5
|
xB: number;
|
|
6
6
|
yB: number;
|
|
7
7
|
};
|
|
8
|
-
|
|
8
|
+
type Options = {
|
|
9
|
+
functionType?: string;
|
|
10
|
+
};
|
|
11
|
+
export declare const leadingCoefficient: Exercise<Identifiers, Options>;
|
|
9
12
|
export {};
|
|
10
13
|
//# sourceMappingURL=leadingCoefficient.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"leadingCoefficient.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/affines/leadingCoefficient.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"leadingCoefficient.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/affines/leadingCoefficient.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAYrC,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAiFF,KAAK,OAAO,GAAG;IACb,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAYF,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAiB7D,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { addValidProp, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
|
|
1
|
+
import { GeneratorOptionTarget, GeneratorOptionType, addValidProp, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
|
|
2
2
|
import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
3
|
import { rationalVEA } from "../../../../exercises/vea/rationalVEA.js";
|
|
4
4
|
import { randomColor } from "../../../../geogebra/colors.js";
|
|
@@ -35,9 +35,14 @@ const getGGBOptions = (identifiers) => {
|
|
|
35
35
|
coords: ggb.getAdaptedCoords({ xMin, xMax, yMin, yMax }),
|
|
36
36
|
});
|
|
37
37
|
};
|
|
38
|
-
const getLeadingCoefficientQuestion = () => {
|
|
38
|
+
const getLeadingCoefficientQuestion = (opts) => {
|
|
39
39
|
let xA, yA, xB, yB;
|
|
40
|
-
|
|
40
|
+
if (opts?.functionType === "Linéaires") {
|
|
41
|
+
xA = 0;
|
|
42
|
+
yA = 0;
|
|
43
|
+
}
|
|
44
|
+
else
|
|
45
|
+
[xA, yA] = [1, 2].map((el) => randint(-5, 6));
|
|
41
46
|
xB = xA > 0 ? randint(xA - 4, 6, [xA]) : randint(-4, xA + 5, [xA]); // l'écart entre les deux points ne soit pas grand
|
|
42
47
|
yB = yA > 0 ? randint(yA - 4, 6) : randint(-4, yA + 5);
|
|
43
48
|
const identifiers = { xA, xB, yA, yB };
|
|
@@ -65,14 +70,22 @@ const getPropositions = (n, { answer, xA, xB, yA, yB }) => {
|
|
|
65
70
|
const isAnswerValid = (ans, { answer, xA, xB, yA, yB }) => {
|
|
66
71
|
return rationalVEA(ans, answer);
|
|
67
72
|
};
|
|
73
|
+
const options = [
|
|
74
|
+
{
|
|
75
|
+
id: "functionType",
|
|
76
|
+
label: "Type de fonctions",
|
|
77
|
+
target: GeneratorOptionTarget.generation,
|
|
78
|
+
type: GeneratorOptionType.select,
|
|
79
|
+
values: ["Affines", "Linéaires", "Les deux"],
|
|
80
|
+
defaultValue: ["Les deux"],
|
|
81
|
+
},
|
|
82
|
+
];
|
|
68
83
|
export const leadingCoefficient = {
|
|
69
84
|
id: "leadingCoefficient",
|
|
70
85
|
connector: "=",
|
|
71
|
-
label: "Lire le coefficient directeur",
|
|
72
|
-
levels: ["3ème", "2nde", "1reESM", "2ndPro", "1rePro", "1reTech"],
|
|
86
|
+
label: "Lire le coefficient directeur d'une droite",
|
|
73
87
|
isSingleStep: false,
|
|
74
|
-
|
|
75
|
-
generator: (nb) => getDistinctQuestions(getLeadingCoefficientQuestion, nb),
|
|
88
|
+
generator: (nb, opts) => getDistinctQuestions(() => getLeadingCoefficientQuestion(opts), nb),
|
|
76
89
|
qcmTimer: 60,
|
|
77
90
|
freeTimer: 60,
|
|
78
91
|
getPropositions,
|
|
@@ -82,4 +95,5 @@ export const leadingCoefficient = {
|
|
|
82
95
|
getAnswer,
|
|
83
96
|
getInstruction,
|
|
84
97
|
getGGBOptions,
|
|
98
|
+
options,
|
|
85
99
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"leadingCoefficientCalculV1.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/affines/leadingCoefficientCalculV1.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"leadingCoefficientCalculV1.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/affines/leadingCoefficientCalculV1.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAOrC,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AA0GF,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,WAAW,CAe5D,CAAC"}
|
|
@@ -1,24 +1,56 @@
|
|
|
1
|
-
import { addValidProp, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
|
|
1
|
+
import { GeneratorOptionTarget, GeneratorOptionType, addValidProp, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
|
|
2
2
|
import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
|
+
import { rationalVEA } from "../../../../exercises/vea/rationalVEA.js";
|
|
3
4
|
import { Rational } from "../../../../math/numbers/rationals/rational.js";
|
|
4
5
|
import { randint } from "../../../../math/utils/random/randint.js";
|
|
5
6
|
import { shuffle } from "../../../../utils/alea/shuffle.js";
|
|
6
|
-
const
|
|
7
|
-
const
|
|
7
|
+
const getInstruction = (identifiers, opts) => {
|
|
8
|
+
const { xA, yA, xB, yB } = identifiers;
|
|
9
|
+
const usePoints = opts?.usePoints;
|
|
10
|
+
const useLinear = opts?.useLinear;
|
|
11
|
+
const fctTex = `Soit $f$ une fonction ${useLinear ? "linéaire" : "affine"}`;
|
|
12
|
+
// const values = usePoints ?
|
|
13
|
+
const pointA = usePoints
|
|
14
|
+
? `$A\\left(${xA};${yA}\\right)$`
|
|
15
|
+
: `$f\\left(${xA}\\right) = ${yA}$`;
|
|
16
|
+
const pointB = usePoints
|
|
17
|
+
? `$B\\left(${xB};${yB}\\right)$`
|
|
18
|
+
: `$f\\left(${xB}\\right) = ${yB}$`;
|
|
19
|
+
if (opts?.useLinear) {
|
|
20
|
+
return `${fctTex} telle que ${usePoints
|
|
21
|
+
? `le point ${pointB} appartient à la droite représentant $f$`
|
|
22
|
+
: pointB}.
|
|
23
|
+
|
|
24
|
+
Quel est le coefficient directeur de $f$ ?`;
|
|
25
|
+
}
|
|
26
|
+
return `${fctTex} telle que ${usePoints
|
|
27
|
+
? `les points ${pointA} et ${pointB} appartiennent à la droite représentant $f$`
|
|
28
|
+
: `${pointA} et ${pointB}`}.
|
|
29
|
+
|
|
30
|
+
Quel est le coefficient directeur de $f$ ?`;
|
|
31
|
+
};
|
|
32
|
+
const getAnswer = (identifiers) => {
|
|
33
|
+
const { xA, yA, xB, yB } = identifiers;
|
|
34
|
+
const answer = new Rational(yB - yA, xB - xA).simplify().toTree().toTex();
|
|
35
|
+
return answer;
|
|
36
|
+
};
|
|
37
|
+
const getLeadingCoefficientCalculV1Question = (opts) => {
|
|
38
|
+
const useLinear = opts?.useLinear;
|
|
39
|
+
const [xA, yA] = useLinear ? [0, 0] : [1, 2].map((el) => randint(-9, 10));
|
|
8
40
|
const xB = randint(-9, 10, [xA]);
|
|
9
41
|
const yB = randint(-9, 10);
|
|
10
|
-
const
|
|
42
|
+
const identifiers = { xA, xB, yA, yB };
|
|
11
43
|
const question = {
|
|
12
|
-
instruction:
|
|
44
|
+
instruction: getInstruction(identifiers, opts),
|
|
13
45
|
startStatement: "a",
|
|
14
|
-
answer,
|
|
46
|
+
answer: getAnswer(identifiers, opts),
|
|
15
47
|
answerFormat: "tex",
|
|
16
48
|
keys: [],
|
|
17
|
-
identifiers
|
|
49
|
+
identifiers,
|
|
18
50
|
};
|
|
19
51
|
return question;
|
|
20
52
|
};
|
|
21
|
-
const getPropositions = (n, { answer, xA, xB, yA, yB }) => {
|
|
53
|
+
const getPropositions = (n, { answer, xA, xB, yA, yB }, opts) => {
|
|
22
54
|
const propositions = [];
|
|
23
55
|
addValidProp(propositions, answer);
|
|
24
56
|
while (propositions.length < n) {
|
|
@@ -30,24 +62,37 @@ const getPropositions = (n, { answer, xA, xB, yA, yB }) => {
|
|
|
30
62
|
}
|
|
31
63
|
return shuffle(propositions);
|
|
32
64
|
};
|
|
33
|
-
const isAnswerValid = (ans, { xA, xB, yA, yB }) => {
|
|
34
|
-
|
|
35
|
-
.simplify()
|
|
36
|
-
.toTree({ allowFractionToDecimal: true });
|
|
37
|
-
const texs = answer.toAllValidTexs();
|
|
38
|
-
return texs.includes(ans);
|
|
65
|
+
const isAnswerValid = (ans, { answer, xA, xB, yA, yB }) => {
|
|
66
|
+
return rationalVEA(ans, answer);
|
|
39
67
|
};
|
|
68
|
+
const options = [
|
|
69
|
+
{
|
|
70
|
+
id: "useLinear",
|
|
71
|
+
label: "Utiliser des fonctions linéaires",
|
|
72
|
+
target: GeneratorOptionTarget.generation,
|
|
73
|
+
type: GeneratorOptionType.checkbox,
|
|
74
|
+
defaultValue: false,
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
id: "usePoints",
|
|
78
|
+
label: "Utiliser des points plutôt que des images",
|
|
79
|
+
target: GeneratorOptionTarget.instruction,
|
|
80
|
+
type: GeneratorOptionType.checkbox,
|
|
81
|
+
defaultValue: false,
|
|
82
|
+
},
|
|
83
|
+
];
|
|
40
84
|
export const leadingCoefficientCalculV1 = {
|
|
41
85
|
id: "leadingCoefficientCalculV1",
|
|
42
86
|
connector: "=",
|
|
43
|
-
label: "Calculer le coefficient directeur d'
|
|
44
|
-
levels: ["3ème", "2nde", "2ndPro", "1rePro", "1reTech"],
|
|
87
|
+
label: "Calculer le coefficient directeur à l'aide d'images/de points",
|
|
45
88
|
isSingleStep: true,
|
|
46
|
-
|
|
47
|
-
generator: (nb) => getDistinctQuestions(getLeadingCoefficientCalculV1Question, nb),
|
|
89
|
+
generator: (nb, opts) => getDistinctQuestions(() => getLeadingCoefficientCalculV1Question(opts), nb),
|
|
48
90
|
qcmTimer: 60,
|
|
49
91
|
freeTimer: 60,
|
|
50
92
|
getPropositions,
|
|
51
93
|
isAnswerValid,
|
|
52
94
|
subject: "Mathématiques",
|
|
95
|
+
options,
|
|
96
|
+
getInstruction,
|
|
97
|
+
getAnswer,
|
|
53
98
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"leadingCoefficientCalculV2.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/affines/leadingCoefficientCalculV2.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"leadingCoefficientCalculV2.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/affines/leadingCoefficientCalculV2.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,6BAA6B,CAAC;AAUrC,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAgDF,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,WAAW,CAe5D,CAAC"}
|
|
@@ -39,7 +39,7 @@ const isAnswerValid = (ans, { xA, xB, yA, yB }) => {
|
|
|
39
39
|
export const leadingCoefficientCalculV2 = {
|
|
40
40
|
id: "leadingCoefficientCalculV2",
|
|
41
41
|
connector: "=",
|
|
42
|
-
label: "
|
|
42
|
+
label: "Calculer le coefficient directeur d'une fonction affine à l'aide de deux points",
|
|
43
43
|
levels: ["3ème", "2nde", "2ndPro", "1rePro", "1reTech"],
|
|
44
44
|
isSingleStep: false,
|
|
45
45
|
sections: ["Droites", "Fonctions affines"],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parityFromGraph.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/parity/parityFromGraph.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,6BAA6B,CAAC;AAcrC,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;
|
|
1
|
+
{"version":3,"file":"parityFromGraph.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/parity/parityFromGraph.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,6BAA6B,CAAC;AAcrC,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAyGF,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,CAcjD,CAAC"}
|