math-exercises 2.1.10 → 2.1.12
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 +3 -0
- package/lib/exercises/exercise.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/binomialsTrinomialsProposedSolutions.js +2 -2
- package/lib/exercises/math/calculLitteral/equation/equationFromSentenceExercise.js +4 -4
- package/lib/exercises/math/calculLitteral/equation/firstDegreeEquationIntType1.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/firstDegreeEquationIntType1.js +1 -1
- package/lib/exercises/math/calculLitteral/equation/firstDegreeEquationIntType2.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/firstDegreeEquationIntType2.js +1 -1
- package/lib/exercises/math/calculLitteral/equation/firstDegreeEquationIntType3.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/firstDegreeEquationIntType3.js +2 -2
- package/lib/exercises/math/derivation/derivative/convexityTrinomials.js +2 -2
- package/lib/exercises/math/derivation/derivative/inflexionPointQuadrinomials.js +2 -2
- package/lib/exercises/math/derivation/derivative/secondDerivativeOfExpoFunction.js +2 -2
- package/lib/exercises/math/derivation/derivative/secondDerivativeOfThirdDegreeFunction.js +3 -3
- package/lib/exercises/math/derivation/derivative/secondDerivativeOfTrinom.js +3 -3
- package/lib/exercises/math/derivation/derivative/sinSecondDegreeDerivative.js +1 -1
- package/lib/exercises/math/functions/affines/affineAdjustment.js +4 -4
- package/lib/exercises/math/functions/affines/affineAdjustmentComplete.js +10 -10
- package/lib/exercises/math/functions/affines/affineAdjustmentRsquared.js +4 -4
- package/lib/exercises/math/functions/affines/algebricExpressionOfAffine.d.ts.map +1 -1
- package/lib/exercises/math/functions/affines/algebricExpressionOfAffine.js +3 -2
- package/lib/exercises/math/functions/affines/leadingCoeffAndOriginOrdinate.js +1 -1
- package/lib/exercises/math/functions/trinoms/extremumTypeFromAlgebricForm.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/extremumTypeFromAlgebricForm.js +3 -2
- package/lib/exercises/math/geometry/cartesian/cartesianEquationOfLine.d.ts.map +1 -1
- package/lib/exercises/math/geometry/cartesian/cartesianEquationOfLine.js +24 -21
- package/lib/exercises/math/geometry/cartesian/directionVector.d.ts.map +1 -1
- package/lib/exercises/math/geometry/cartesian/directionVector.js +23 -5
- package/lib/exercises/math/geometry/cartesian/directionVectorEquation.js +1 -1
- package/lib/exercises/math/geometry/cartesian/pointCoordinates.js +2 -2
- package/lib/exercises/math/geometry/convexity/convexityQuadrinomialsGeo.d.ts +1 -0
- package/lib/exercises/math/geometry/convexity/convexityQuadrinomialsGeo.d.ts.map +1 -1
- package/lib/exercises/math/geometry/convexity/convexityQuadrinomialsGeo.js +8 -15
- package/lib/exercises/math/geometry/convexity/convexityTrinomialsGeo.d.ts.map +1 -1
- package/lib/exercises/math/geometry/convexity/convexityTrinomialsGeo.js +5 -3
- package/lib/exercises/math/geometry/vectors/lineFromDirectorVector.js +2 -2
- package/lib/exercises/math/geometry/vectors/vectorNormCalculation.d.ts.map +1 -1
- package/lib/exercises/math/geometry/vectors/vectorNormCalculation.js +4 -3
- package/lib/exercises/math/probaStat/stats1var/median.js +2 -2
- package/lib/exercises/math/probaStat/stats1var/quartiles.js +2 -2
- package/lib/exercises/math/probaStat/stats2var/averagePoint.js +2 -2
- package/lib/exercises/math/probaStat/stats2var/fineAdjustementExercise.js +1 -1
- package/lib/exercises/math/python/conditionIf.d.ts +1 -0
- package/lib/exercises/math/python/conditionIf.d.ts.map +1 -1
- package/lib/exercises/math/python/conditionIf.js +8 -6
- package/lib/exercises/math/python/pyForLoop1Exercise.js +1 -1
- package/lib/exercises/math/python/pyNestedForLoopExercise.js +1 -1
- package/lib/exercises/math/python/pyWhileLoop1Exercise.js +1 -1
- package/lib/index.d.ts +2 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/tree/nodes/functions/sqrtNode.d.ts +1 -1
- package/lib/tree/nodes/functions/sqrtNode.d.ts.map +1 -1
- package/lib/tree/nodes/functions/sqrtNode.js +2 -2
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exercise.d.ts","sourceRoot":"","sources":["../../src/exercises/exercise.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAI3C,eAAO,MAAM,YAAY,UAChB,WAAW,EAAE,aACT,MAAM,WACT,KAAK,GAAG,KAAK,SAQtB,CAAC;AACF,eAAO,MAAM,YAAY,UAChB,WAAW,EAAE,aACT,MAAM,WACT,KAAK,GAAG,KAAK,SAQtB,CAAC;AACF,eAAO,MAAM,iBAAiB,UACrB,WAAW,EAAE,aACT,MAAM,WACT,KAAK,GAAG,KAAK,SAUtB,CAAC;AAEF,eAAO,MAAM,YAAY,UAAW,WAAW,EAAE,KAAK,MAAM,kBAE3D,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,EAAE,CAAC;AAElC,MAAM,MAAM,WAAW,GAAG;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,OAAO,CAAC;IACvB,MAAM,EAAE,KAAK,GAAG,KAAK,CAAC;CACvB,CAAC;AACF,MAAM,WAAW,QAAQ,CAAC,YAAY,GAAG,EAAE;IACzC,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,KAAK,GAAG,KAAK,CAAC;IAC5B,IAAI,CAAC,EAAE,KAAK,EAAE,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,CAAC,EAAE;QACR,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,KAAK,CAAC;QACxC,QAAQ,CAAC,EAAE,OAAO,CAA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GAClB,WAAW,GACX,SAAS,GACT,cAAc,GACd,+CAA+C,GAC/C,OAAO,GACP,KAAK,GACL,wBAAwB,GACxB,SAAS,GACT,KAAK,GACL,aAAa,CAAC"}
|
|
@@ -44,7 +44,7 @@ const getBinomialsTrinomialsProposedSolutionsQuestion = () => {
|
|
|
44
44
|
const answer = answertype ? "Oui" : "Non";
|
|
45
45
|
const question = {
|
|
46
46
|
answer: answer,
|
|
47
|
-
instruction: `
|
|
47
|
+
instruction: `Le nombre $${solution}$ est-il une solution de l'équation $${equation.toTex()}$ ?`,
|
|
48
48
|
keys: [],
|
|
49
49
|
answerFormat: "raw",
|
|
50
50
|
identifiers: {},
|
|
@@ -64,7 +64,7 @@ const isAnswerValid = (ans, { answer }) => {
|
|
|
64
64
|
};
|
|
65
65
|
exports.binomialsTrinomialsProposedSolutions = {
|
|
66
66
|
id: "binomialsTrinomialsProposedSolutions",
|
|
67
|
-
label: "
|
|
67
|
+
label: "Vérifier si un nombre est solution d'une équation",
|
|
68
68
|
levels: ["1rePro"],
|
|
69
69
|
isSingleStep: true,
|
|
70
70
|
sections: ["Équations"],
|
|
@@ -127,18 +127,18 @@ const generateExercise = () => {
|
|
|
127
127
|
switch (type) {
|
|
128
128
|
case 1:
|
|
129
129
|
instruction = `On appelle $x$ le nombre à trouver.
|
|
130
|
-
Traduire par une équation la phrase "${flip ? `Le double` : `La moitié`} du nombre à trouver vaut $${resultNb}$"
|
|
130
|
+
Traduire par une équation la phrase "${flip ? `Le double` : `La moitié`} du nombre à trouver vaut $${resultNb}$".`;
|
|
131
131
|
break;
|
|
132
132
|
case 2:
|
|
133
133
|
randAdd = (0, randint_1.randint)(1, 11);
|
|
134
134
|
instruction = `On appelle $x$ le nombre à trouver.
|
|
135
|
-
Traduire par une équation la phrase "${flip ? `La somme` : `La différence`} du nombre à trouver et de $${randAdd}$ a pour résultat $${resultNb}$"
|
|
135
|
+
Traduire par une équation la phrase "${flip ? `La somme` : `La différence`} du nombre à trouver et de $${randAdd}$ a pour résultat $${resultNb}$".`;
|
|
136
136
|
break;
|
|
137
137
|
case 3:
|
|
138
138
|
randAdd = (0, randint_1.randint)(1, 11);
|
|
139
139
|
op2 = (0, coinFlip_1.coinFlip)() ? `augmenté` : `diminué`;
|
|
140
140
|
instruction = `On appelle $x$ le nombre à trouver.
|
|
141
|
-
Traduire par une équation la phrase "${flip ? `Le double` : `La moitié`} du nombre à trouver ${flip ? op2 : op2 + "e"} de $${randAdd}$ vaut $${resultNb}$"
|
|
141
|
+
Traduire par une équation la phrase "${flip ? `Le double` : `La moitié`} du nombre à trouver ${flip ? op2 : op2 + "e"} de $${randAdd}$ vaut $${resultNb}$".`;
|
|
142
142
|
break;
|
|
143
143
|
}
|
|
144
144
|
const vars = { randAdd, resultNb, op2, flip };
|
|
@@ -147,7 +147,7 @@ const generateExercise = () => {
|
|
|
147
147
|
};
|
|
148
148
|
exports.equationFromSentenceExericse = {
|
|
149
149
|
id: "equationFromSentenceExercise",
|
|
150
|
-
label: "Traduire une phrase en une
|
|
150
|
+
label: "Traduire une phrase en une équation mathématique",
|
|
151
151
|
levels: ["5ème"],
|
|
152
152
|
isSingleStep: true,
|
|
153
153
|
sections: ["Calcul littéral"],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"firstDegreeEquationIntType1.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/equation/firstDegreeEquationIntType1.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAMlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAoEF,eAAO,MAAM,2BAA2B,EAAE,QAAQ,CAAC,WAAW,
|
|
1
|
+
{"version":3,"file":"firstDegreeEquationIntType1.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/equation/firstDegreeEquationIntType1.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAMlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAoEF,eAAO,MAAM,2BAA2B,EAAE,QAAQ,CAAC,WAAW,CAa7D,CAAC"}
|
|
@@ -52,7 +52,7 @@ const isAnswerValid = (ans, { answer, x }) => {
|
|
|
52
52
|
};
|
|
53
53
|
exports.firstDegreeEquationIntType1 = {
|
|
54
54
|
id: "firstDegreeEquationIntType1",
|
|
55
|
-
label: "Résoudre une équation du
|
|
55
|
+
label: "Résoudre une équation du type $ax = b$ (solution entière)",
|
|
56
56
|
levels: ["2nde"],
|
|
57
57
|
isSingleStep: true,
|
|
58
58
|
sections: ["Équations"],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"firstDegreeEquationIntType2.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/equation/firstDegreeEquationIntType2.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA6EF,eAAO,MAAM,2BAA2B,EAAE,QAAQ,CAAC,WAAW,
|
|
1
|
+
{"version":3,"file":"firstDegreeEquationIntType2.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/equation/firstDegreeEquationIntType2.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA6EF,eAAO,MAAM,2BAA2B,EAAE,QAAQ,CAAC,WAAW,CAa7D,CAAC"}
|
|
@@ -59,7 +59,7 @@ const isAnswerValid = (ans, { answer, x }) => {
|
|
|
59
59
|
};
|
|
60
60
|
exports.firstDegreeEquationIntType2 = {
|
|
61
61
|
id: "firstDegreeEquationIntType2",
|
|
62
|
-
label: "Résoudre une équation du
|
|
62
|
+
label: "Résoudre une équation du type $ax + b = c$ (solution entière)",
|
|
63
63
|
levels: ["2nde"],
|
|
64
64
|
isSingleStep: true,
|
|
65
65
|
sections: ["Équations"],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"firstDegreeEquationIntType3.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/equation/firstDegreeEquationIntType3.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAsFF,eAAO,MAAM,2BAA2B,EAAE,QAAQ,CAAC,WAAW,
|
|
1
|
+
{"version":3,"file":"firstDegreeEquationIntType3.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/equation/firstDegreeEquationIntType3.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAsFF,eAAO,MAAM,2BAA2B,EAAE,QAAQ,CAAC,WAAW,CAa7D,CAAC"}
|
|
@@ -12,7 +12,7 @@ const variableNode_1 = require("../../../../tree/nodes/variables/variableNode");
|
|
|
12
12
|
const getFirstDegreeEquationIntQuestion = () => {
|
|
13
13
|
const a = (0, randint_1.randint)(-15, 15, [0]);
|
|
14
14
|
const x = (0, randint_1.randint)(-15, 15, [0]);
|
|
15
|
-
const c = (0, randint_1.randint)(-15, 15, [0]);
|
|
15
|
+
const c = (0, randint_1.randint)(-15, 15, [0, a]);
|
|
16
16
|
const d = (0, randint_1.randint)(-15, 15, [0]);
|
|
17
17
|
const b = d - (a - c) * x;
|
|
18
18
|
const answer = new equalNode_1.EqualNode(new variableNode_1.VariableNode("x"), x.toTree()).toTex();
|
|
@@ -65,7 +65,7 @@ const isAnswerValid = (ans, { answer, x }) => {
|
|
|
65
65
|
};
|
|
66
66
|
exports.firstDegreeEquationIntType3 = {
|
|
67
67
|
id: "firstDegreeEquationIntType3",
|
|
68
|
-
label: "Résoudre une équation du
|
|
68
|
+
label: "Résoudre une équation du type $ax + b = cx + d$ (solution entière)",
|
|
69
69
|
levels: ["2nde"],
|
|
70
70
|
isSingleStep: true,
|
|
71
71
|
sections: ["Équations"],
|
|
@@ -9,7 +9,7 @@ const getConvexityTrinomialsQuestion = () => {
|
|
|
9
9
|
const isConvex = trinom.a > 0 ? "Convexe" : "Concave";
|
|
10
10
|
const question = {
|
|
11
11
|
answer: isConvex,
|
|
12
|
-
instruction: `Soit la fonction $f(x) = ${trinom.toTex()}$.
|
|
12
|
+
instruction: `Soit la fonction $f(x) = ${trinom.toTex()}$. Sur $\\mathbb{R}$, $f$ est :`,
|
|
13
13
|
keys: [],
|
|
14
14
|
answerFormat: "raw",
|
|
15
15
|
identifiers: { coeffs: trinom.coefficients },
|
|
@@ -30,7 +30,7 @@ const isAnswerValid = (ans, { answer }) => {
|
|
|
30
30
|
};
|
|
31
31
|
exports.convexityTrinomials = {
|
|
32
32
|
id: "convexityTrinomials",
|
|
33
|
-
label: "
|
|
33
|
+
label: "Déterminer la convexité d'un trinôme",
|
|
34
34
|
levels: ["TermSpé"],
|
|
35
35
|
isSingleStep: true,
|
|
36
36
|
sections: ["Dérivation"],
|
|
@@ -54,7 +54,7 @@ const getPropositions = (n, { answer, quadcoeffs }) => {
|
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
while (propositions.length < n) {
|
|
57
|
-
(0, exercise_1.tryToAddWrongProp)(propositions, (0, randint_1.randint)(-
|
|
57
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, (0, randint_1.randint)(-10, 10).toString());
|
|
58
58
|
}
|
|
59
59
|
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
60
60
|
};
|
|
@@ -70,7 +70,7 @@ const isAnswerValid = (ans, { answer, quadcoeffs }) => {
|
|
|
70
70
|
};
|
|
71
71
|
exports.inflexionPointQuadrinomials = {
|
|
72
72
|
id: "inflexionPointQuadrinomials",
|
|
73
|
-
label: "Calcul du point d'inflexion
|
|
73
|
+
label: "Calcul du point d'inflexion",
|
|
74
74
|
levels: ["TermSpé"],
|
|
75
75
|
isSingleStep: true,
|
|
76
76
|
sections: ["Dérivation"],
|
|
@@ -15,7 +15,7 @@ const getSecondDerivativeOfExpoFunctionQuestion = () => {
|
|
|
15
15
|
const question = {
|
|
16
16
|
answer: correctAnswer.toTex(),
|
|
17
17
|
instruction: `Déterminer la fonction dérivée seconde $f''$ de la fonction $f$ définie par $f(x)=${funct.toTex()}$`,
|
|
18
|
-
keys: ["epower", "x"],
|
|
18
|
+
keys: ["epower", "x", "ln"],
|
|
19
19
|
answerFormat: "tex",
|
|
20
20
|
identifiers: { coeffs: polynom.coefficients },
|
|
21
21
|
};
|
|
@@ -46,7 +46,7 @@ const generateProposition = (coeffs) => {
|
|
|
46
46
|
};
|
|
47
47
|
exports.secondDerivativeOfExpoFunction = {
|
|
48
48
|
id: "secondDerivativeOfExpoFunction",
|
|
49
|
-
label: "
|
|
49
|
+
label: "Dérivée seconde d'une fonction de type $\\exp(u)$",
|
|
50
50
|
levels: ["TermSpé"],
|
|
51
51
|
isSingleStep: true,
|
|
52
52
|
sections: ["Dérivation"],
|
|
@@ -10,7 +10,7 @@ const getSecondDerivativeOfThirdDegreeFunction = () => {
|
|
|
10
10
|
const correctAnswer = funct.secondDerivate().toTree();
|
|
11
11
|
const instruction = `Déterminer la fonction dérivée seconde $f''$ de la fonction $f$ définie par $f(x)=${funct
|
|
12
12
|
.toTree()
|
|
13
|
-
.toTex()}
|
|
13
|
+
.toTex()}$.`;
|
|
14
14
|
const coeff = {
|
|
15
15
|
a: coefficients[3],
|
|
16
16
|
b: coefficients[2],
|
|
@@ -20,7 +20,7 @@ const getSecondDerivativeOfThirdDegreeFunction = () => {
|
|
|
20
20
|
const question = {
|
|
21
21
|
answer: correctAnswer.toTex(),
|
|
22
22
|
instruction: instruction,
|
|
23
|
-
keys: ["x"
|
|
23
|
+
keys: ["x"],
|
|
24
24
|
answerFormat: "tex",
|
|
25
25
|
identifiers: { ...coeff },
|
|
26
26
|
};
|
|
@@ -47,7 +47,7 @@ const isAnswerValid = (ans, { a, b, c, d }) => {
|
|
|
47
47
|
};
|
|
48
48
|
exports.secondDerivativeOfThridDegreeFunction = {
|
|
49
49
|
id: "secondDerivativeOfThirdDegreeFunction",
|
|
50
|
-
label: "
|
|
50
|
+
label: "Dérivée seconde d'un polynôme de degré 3",
|
|
51
51
|
levels: ["TermSpé"],
|
|
52
52
|
isSingleStep: true,
|
|
53
53
|
sections: ["Dérivation"],
|
|
@@ -10,12 +10,12 @@ const numberNode_1 = require("../../../../tree/nodes/numbers/numberNode");
|
|
|
10
10
|
const getSecondDerivativeOfTrinomQuestion = () => {
|
|
11
11
|
const trinom = trinom_1.TrinomConstructor.random();
|
|
12
12
|
const trinomTree = trinom.toTree();
|
|
13
|
-
const instruction = `Déterminer la fonction dérivée seconde $f''$ de la fonction $f$ définie par $f(x)=${trinomTree.toTex()}
|
|
13
|
+
const instruction = `Déterminer la fonction dérivée seconde $f''$ de la fonction $f$ définie par $f(x)=${trinomTree.toTex()}$.`;
|
|
14
14
|
const correctAnswer = trinom.derivate().derivate().toTree();
|
|
15
15
|
const question = {
|
|
16
16
|
answer: correctAnswer.toTex(),
|
|
17
17
|
instruction: instruction,
|
|
18
|
-
keys: ["
|
|
18
|
+
keys: ["x"],
|
|
19
19
|
answerFormat: "tex",
|
|
20
20
|
identifiers: { a: trinom.a, b: trinom.b, c: trinom.c },
|
|
21
21
|
};
|
|
@@ -43,7 +43,7 @@ const generateProposition = (a, b, c) => {
|
|
|
43
43
|
};
|
|
44
44
|
exports.secondDerivativeOfTrinom = {
|
|
45
45
|
id: "secondDerivativeOfTrinom",
|
|
46
|
-
label: "
|
|
46
|
+
label: "Dérivée seconde d'un trinôme",
|
|
47
47
|
levels: ["TermSpé"],
|
|
48
48
|
isSingleStep: true,
|
|
49
49
|
sections: ["Dérivation"],
|
|
@@ -66,7 +66,7 @@ const isAnswerValid = (ans, { answer, affinecoeffs }) => {
|
|
|
66
66
|
};
|
|
67
67
|
exports.sinSecondDegreeDerivative = {
|
|
68
68
|
id: "sinSecondDegreeDerivative",
|
|
69
|
-
label: "Dérivée seconde de sin(u)",
|
|
69
|
+
label: "Dérivée seconde de $\\sin(u)$",
|
|
70
70
|
levels: ["TermSpé"],
|
|
71
71
|
isSingleStep: true,
|
|
72
72
|
sections: ["Dérivation"],
|
|
@@ -42,18 +42,18 @@ const getAffineAdjustmentQuestion = () => {
|
|
|
42
42
|
const bfixed = (0, round_1.round)(b, 2);
|
|
43
43
|
const answer = new equalNode_1.EqualNode(new variableNode_1.VariableNode("y"), new addNode_1.AddNode(new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(afixed), new variableNode_1.VariableNode("x")), new numberNode_1.NumberNode(bfixed)).simplify({ forbidFactorize: true })).toTex();
|
|
44
44
|
let dataTable = `
|
|
45
|
-
|
|
|
45
|
+
| $x$ | ${xValues.join(" | ")} |
|
|
46
46
|
|-|-|-|-|-|-|-|-|-|-|-|
|
|
47
|
-
|
|
|
48
|
-
| y | ${yValues.join(" | ")} |
|
|
47
|
+
| $y$ | ${yValues.map((n) => n.frenchify()).join(" | ")} |
|
|
49
48
|
`;
|
|
50
49
|
const question = {
|
|
51
50
|
answer: answer,
|
|
52
|
-
instruction:
|
|
51
|
+
instruction: `On considère la série statistique ci-dessous. Déterminez l'équation de la droite d'ajustement obtenue par la méthode des moindres carrés. ${dataTable}
|
|
53
52
|
`,
|
|
54
53
|
keys: ["equal", "y", "x", "a", "b"],
|
|
55
54
|
answerFormat: "tex",
|
|
56
55
|
identifiers: { G1x, G2x, G1y, G2y },
|
|
56
|
+
style: { tableHasNoHeader: true },
|
|
57
57
|
};
|
|
58
58
|
return question;
|
|
59
59
|
};
|
|
@@ -59,18 +59,18 @@ const getAffineAdjustmentCompleteQuestion = () => {
|
|
|
59
59
|
const answerEq = new equalNode_1.EqualNode(new variableNode_1.VariableNode("y"), new addNode_1.AddNode(new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(afixed), new variableNode_1.VariableNode("x")), new numberNode_1.NumberNode(bfixed)).simplify({ forbidFactorize: true })).toTex();
|
|
60
60
|
const answerR = new equalNode_1.EqualNode(new powerNode_1.PowerNode(new variableNode_1.VariableNode("R"), new numberNode_1.NumberNode(2)), (0, round_1.round)(rSquared, 2).toTree()).toTex();
|
|
61
61
|
let dataTable = `
|
|
62
|
-
|
|
|
62
|
+
| $x$ | ${xValues.join(" | ")} |
|
|
63
63
|
|-|-|-|-|-|-|-|-|-|-|-|
|
|
64
|
-
|
|
|
65
|
-
| y | ${yValues.join(" | ")} |
|
|
64
|
+
| $y$ | ${yValues.map((n) => n.frenchify()).join(" | ")} |
|
|
66
65
|
`;
|
|
67
66
|
const question = {
|
|
68
|
-
answer: `${answerEq}\\
|
|
69
|
-
instruction: `
|
|
67
|
+
answer: `${answerEq}\\newline ${answerR}`,
|
|
68
|
+
instruction: `On considère la série statistique ci-dessous. A l'aide de la calculatrice, déterminer l'équation de la droite d'ajustement et la valeur du coefficient de détermination. Arrondir au centième. ${dataTable}
|
|
70
69
|
`,
|
|
71
70
|
keys: [],
|
|
72
71
|
answerFormat: "tex",
|
|
73
72
|
identifiers: { G1x, G2x, G1y, G2y, rSquared },
|
|
73
|
+
style: { tableHasNoHeader: true },
|
|
74
74
|
};
|
|
75
75
|
return question;
|
|
76
76
|
};
|
|
@@ -88,10 +88,10 @@ const getPropositions = (n, { answer, G1x, G2x, G1y, G2y, rSquared }) => {
|
|
|
88
88
|
const wrongAnswerEq2 = new equalNode_1.EqualNode(new variableNode_1.VariableNode("y"), new addNode_1.AddNode(new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode((0, round_1.round)(awrong, 2)), new variableNode_1.VariableNode("x")), new numberNode_1.NumberNode(bfixed)).simplify({ forbidFactorize: true })).toTex();
|
|
89
89
|
const wrongAnswerR1 = new equalNode_1.EqualNode(new variableNode_1.VariableNode("R"), (0, round_1.round)(rSquared, 2).toTree()).toTex();
|
|
90
90
|
const wrongAnswerR2 = new equalNode_1.EqualNode(new powerNode_1.PowerNode(new variableNode_1.VariableNode("R"), new numberNode_1.NumberNode(2)), (-(0, round_1.round)(rSquared, 2)).toTree()).toTex();
|
|
91
|
-
const wrongAnswer1 = `${answerEq}\\
|
|
92
|
-
const wrongAnswer2 = `${answerEq}\\
|
|
93
|
-
const wrongAnswer3 = `${wrongAnswerEq1}\\
|
|
94
|
-
const wrongAnswer4 = `${wrongAnswerEq2}\\
|
|
91
|
+
const wrongAnswer1 = `${answerEq}\\newline ${wrongAnswerR1}`;
|
|
92
|
+
const wrongAnswer2 = `${answerEq}\\newline ${wrongAnswerR2}`;
|
|
93
|
+
const wrongAnswer3 = `${wrongAnswerEq1}\\newline ${answerR}`;
|
|
94
|
+
const wrongAnswer4 = `${wrongAnswerEq2}\\newline ${answerR}`;
|
|
95
95
|
(0, exercise_1.tryToAddWrongProp)(propositions, wrongAnswer1);
|
|
96
96
|
(0, exercise_1.tryToAddWrongProp)(propositions, wrongAnswer2);
|
|
97
97
|
(0, exercise_1.tryToAddWrongProp)(propositions, wrongAnswer3);
|
|
@@ -101,7 +101,7 @@ const getPropositions = (n, { answer, G1x, G2x, G1y, G2y, rSquared }) => {
|
|
|
101
101
|
const b = (0, randint_1.randint)(-10, 10);
|
|
102
102
|
const wrongAnswerEq = new equalNode_1.EqualNode(new variableNode_1.VariableNode("y"), new addNode_1.AddNode(new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(a), new variableNode_1.VariableNode("x")), new numberNode_1.NumberNode(b)).simplify({ forbidFactorize: true })).toTex();
|
|
103
103
|
const wrongAnswerR = new equalNode_1.EqualNode(new powerNode_1.PowerNode(new variableNode_1.VariableNode("R"), new numberNode_1.NumberNode(2)), (0, round_1.round)(Math.random(), 2).toTree()).toTex();
|
|
104
|
-
const wrongAnswer = `${wrongAnswerEq}\\
|
|
104
|
+
const wrongAnswer = `${wrongAnswerEq}\\newline ${wrongAnswerR}`;
|
|
105
105
|
(0, exercise_1.tryToAddWrongProp)(propositions, wrongAnswer);
|
|
106
106
|
}
|
|
107
107
|
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
@@ -47,18 +47,18 @@ const getAffineAdjustmentRsquaredQuestion = () => {
|
|
|
47
47
|
const rSquared = calculateRSquared(xValues, yValues);
|
|
48
48
|
const answer = new equalNode_1.EqualNode(new powerNode_1.PowerNode(new variableNode_1.VariableNode("R"), new numberNode_1.NumberNode(2)), (0, round_1.round)(rSquared, 2).toTree()).toTex();
|
|
49
49
|
let dataTable = `
|
|
50
|
-
|
|
|
50
|
+
| $x$ | ${xValues.join(" | ")} |
|
|
51
51
|
|-|-|-|-|-|-|-|-|-|-|-|
|
|
52
|
-
|
|
|
53
|
-
| y | ${yValues.join(" | ")} |
|
|
52
|
+
| $y$ | ${yValues.map((n) => n.frenchify()).join(" | ")} |
|
|
54
53
|
`;
|
|
55
54
|
const question = {
|
|
56
55
|
answer: answer,
|
|
57
|
-
instruction:
|
|
56
|
+
instruction: `On considère la série statistique ci-dessous. Déterminez la valeur du coefficient de détermination. ${dataTable}
|
|
58
57
|
`,
|
|
59
58
|
keys: ["R", "equal"],
|
|
60
59
|
answerFormat: "tex",
|
|
61
60
|
identifiers: { rSquared },
|
|
61
|
+
style: { tableHasNoHeader: true },
|
|
62
62
|
};
|
|
63
63
|
return question;
|
|
64
64
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"algebricExpressionOfAffine.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/affines/algebricExpressionOfAffine.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"algebricExpressionOfAffine.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/affines/algebricExpressionOfAffine.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAKlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAoDF,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,WAAW,CAa5D,CAAC"}
|
|
@@ -4,6 +4,7 @@ exports.algebricExpressionOfAffine = void 0;
|
|
|
4
4
|
const exercise_1 = require("../../../../exercises/exercise");
|
|
5
5
|
const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQuestions");
|
|
6
6
|
const affine_1 = require("../../../../math/polynomials/affine");
|
|
7
|
+
const randint_1 = require("../../../../math/utils/random/randint");
|
|
7
8
|
const getAlgebricExpressionOfAffineQuestion = () => {
|
|
8
9
|
const f = affine_1.AffineConstructor.random();
|
|
9
10
|
const a = f.a;
|
|
@@ -33,7 +34,7 @@ const isAnswerValid = (ans, { a, b }) => {
|
|
|
33
34
|
return f.toTree().toAllValidTexs().includes(ans);
|
|
34
35
|
};
|
|
35
36
|
const generatePropositions = (a, b) => {
|
|
36
|
-
const firstProposition = new affine_1.Affine(b, a, "x");
|
|
37
|
+
const firstProposition = new affine_1.Affine(b !== 0 ? b : (0, randint_1.randint)(-10, 11, [0]), a, "x");
|
|
37
38
|
const secondProposition = new affine_1.Affine(a, -b, "x");
|
|
38
39
|
return [
|
|
39
40
|
firstProposition.toTree().toTex(),
|
|
@@ -42,7 +43,7 @@ const generatePropositions = (a, b) => {
|
|
|
42
43
|
};
|
|
43
44
|
exports.algebricExpressionOfAffine = {
|
|
44
45
|
id: "algebricExpressionOfAffine",
|
|
45
|
-
label: "Écrire l'expression algébrique d'une fonction affine
|
|
46
|
+
label: "Écrire l'expression algébrique d'une fonction affine",
|
|
46
47
|
levels: ["2nde"],
|
|
47
48
|
isSingleStep: true,
|
|
48
49
|
sections: ["Fonctions affines"],
|
|
@@ -48,7 +48,7 @@ const generateExercise = () => {
|
|
|
48
48
|
};
|
|
49
49
|
exports.leadingCoeffAndOriginOrdinate = {
|
|
50
50
|
id: "leadingCoeffAndOriginOrdinate",
|
|
51
|
-
label: "
|
|
51
|
+
label: "Identifier le coefficient directeur ou l'ordonnée à l'origine d'une fonction affine",
|
|
52
52
|
levels: ["2nde"],
|
|
53
53
|
isSingleStep: true,
|
|
54
54
|
sections: ["Fonctions affines"],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extremumTypeFromAlgebricForm.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/trinoms/extremumTypeFromAlgebricForm.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAMlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;
|
|
1
|
+
{"version":3,"file":"extremumTypeFromAlgebricForm.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/trinoms/extremumTypeFromAlgebricForm.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAMlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAkCF,eAAO,MAAM,4BAA4B,EAAE,QAAQ,CAAC,WAAW,CAc9D,CAAC"}
|
|
@@ -25,9 +25,10 @@ const getPropositions = (n, { answer, a }) => {
|
|
|
25
25
|
const propositions = [];
|
|
26
26
|
(0, exercise_1.addValidProp)(propositions, answer, "raw");
|
|
27
27
|
(0, exercise_1.tryToAddWrongProp)(propositions, a < 0 ? "Un minimum" : "Un maximum", "raw");
|
|
28
|
-
(0,
|
|
28
|
+
(0, shuffle_1.shuffle)(propositions);
|
|
29
29
|
(0, exercise_1.addWrongProp)(propositions, "On ne peut pas savoir", "raw");
|
|
30
|
-
|
|
30
|
+
(0, exercise_1.addWrongProp)(propositions, "Ni l'un ni l'autre", "raw");
|
|
31
|
+
return propositions;
|
|
31
32
|
};
|
|
32
33
|
exports.extremumTypeFromAlgebricForm = {
|
|
33
34
|
id: "extremumTypeFromAlgebricForm",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cartesianEquationOfLine.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/cartesian/cartesianEquationOfLine.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAclC,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;
|
|
1
|
+
{"version":3,"file":"cartesianEquationOfLine.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/cartesian/cartesianEquationOfLine.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAclC,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;AA+NF,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,WAAW,CAczD,CAAC"}
|
|
@@ -26,7 +26,7 @@ const getCartesianEquationOfLineQuestion = () => {
|
|
|
26
26
|
];
|
|
27
27
|
const ggb = new geogebraConstructor_1.GeogebraConstructor(commands, { isGridSimple: true });
|
|
28
28
|
const correctAnswer = line.getCartesianEquation();
|
|
29
|
-
const instruction = `Déterminer
|
|
29
|
+
const instruction = `Déterminer une équation cartesienne de la droite $d$ représentée ci-dessous :`;
|
|
30
30
|
const aX = a.getXnumber();
|
|
31
31
|
const aY = a.getYnumber();
|
|
32
32
|
const bX = b.getXnumber();
|
|
@@ -52,36 +52,39 @@ const getPropositions = (n, { answer, aX, aY, bX, bY }) => {
|
|
|
52
52
|
const propositions = [];
|
|
53
53
|
(0, exercise_1.addValidProp)(propositions, answer);
|
|
54
54
|
generateProposition(aX, aY, bX, bY).forEach((value) => (0, exercise_1.tryToAddWrongProp)(propositions, value.toTex()));
|
|
55
|
-
let
|
|
56
|
-
let
|
|
55
|
+
let a;
|
|
56
|
+
let b;
|
|
57
|
+
const x = new variableNode_1.VariableNode("x");
|
|
58
|
+
const y = new variableNode_1.VariableNode("y");
|
|
59
|
+
let node;
|
|
57
60
|
while (propositions.length < n) {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
(0, exercise_1.tryToAddWrongProp)(propositions, getCorrectAnswer(aXrand, aYrand, bX, bY).toTex());
|
|
61
|
+
node = generateRandomWrongProp(aX, aY, bX, bY, x, y);
|
|
62
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, node.toTex());
|
|
61
63
|
}
|
|
62
64
|
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
63
65
|
};
|
|
64
|
-
const
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
66
|
+
const generateRandomWrongProp = (aX, aY, bX, bY, x, y) => {
|
|
67
|
+
let a;
|
|
68
|
+
let b;
|
|
69
|
+
let c;
|
|
70
|
+
do {
|
|
71
|
+
a = (0, randint_1.randint)(-10, 11, [0]);
|
|
72
|
+
b = (0, randint_1.randint)(-10, 11, [0]);
|
|
73
|
+
c = (0, randint_1.randint)(-10, 11);
|
|
74
|
+
} while (a * aX + b * aY + c === 0 && a * bX + b * bY + c === 0);
|
|
75
|
+
return new equalNode_1.EqualNode(new addNode_1.AddNode(new addNode_1.AddNode(new multiplyNode_1.MultiplyNode(a.toTree(), x).simplify(), new multiplyNode_1.MultiplyNode(b.toTree(), y).simplify()), c.toTree()), zero);
|
|
69
76
|
};
|
|
70
77
|
const generateProposition = (aX, aY, bX, bY) => {
|
|
71
78
|
const x = new variableNode_1.VariableNode("x");
|
|
72
79
|
const y = new variableNode_1.VariableNode("y");
|
|
73
80
|
const firstProposition = getFirstProposition(x, y, aX, aY, bX, bY);
|
|
74
|
-
|
|
75
|
-
|
|
81
|
+
return [firstProposition].filter((value) => {
|
|
82
|
+
const leftChild = value.leftChild;
|
|
83
|
+
return (leftChild.evaluate({ x: aX, y: aY }) !== 0 ||
|
|
84
|
+
leftChild.evaluate({ x: bX, y: bY }) !== 0);
|
|
85
|
+
});
|
|
76
86
|
};
|
|
77
87
|
const getFirstProposition = (x, y, aX, aY, bX, bY) => {
|
|
78
|
-
const u = new vector_1.Vector("u", new numberNode_1.NumberNode(bX - aX), new numberNode_1.NumberNode(bY - aY));
|
|
79
|
-
const b = u.getXAsNumber();
|
|
80
|
-
const a = -u.getYAsNumber();
|
|
81
|
-
const c = -a * aX - b * aY;
|
|
82
|
-
return new equalNode_1.EqualNode(new addNode_1.AddNode(new addNode_1.AddNode(new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(a), x).simplify(), new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(b), y).simplify()), new numberNode_1.NumberNode(c)), zero);
|
|
83
|
-
};
|
|
84
|
-
const getSecondPropoition = (x, y, aX, aY, bX, bY) => {
|
|
85
88
|
const u = new vector_1.Vector("u", new numberNode_1.NumberNode(aX - bX), new numberNode_1.NumberNode(aY - bY));
|
|
86
89
|
const b = -u.getXAsNumber();
|
|
87
90
|
const a = u.getYAsNumber();
|
|
@@ -158,7 +161,7 @@ const getNodeFromVariableString = (str, splitter) => {
|
|
|
158
161
|
};
|
|
159
162
|
exports.cartesianEquationOfLine = {
|
|
160
163
|
id: "cartesianEquationOfLine",
|
|
161
|
-
label: "Déterminer une
|
|
164
|
+
label: "Déterminer une équation cartesienne de droite par lecture graphique",
|
|
162
165
|
levels: ["2nde"],
|
|
163
166
|
isSingleStep: true,
|
|
164
167
|
sections: ["Droites"],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"directionVector.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/cartesian/directionVector.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"directionVector.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/cartesian/directionVector.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAyIF,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,CAajD,CAAC"}
|
|
@@ -5,6 +5,7 @@ const exercise_1 = require("../../../../exercises/exercise");
|
|
|
5
5
|
const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQuestions");
|
|
6
6
|
const geogebraConstructor_1 = require("../../../../geogebra/geogebraConstructor");
|
|
7
7
|
const vector_1 = require("../../../../math/geometry/vector");
|
|
8
|
+
const gcd_1 = require("../../../../math/utils/arithmetic/gcd");
|
|
8
9
|
const randint_1 = require("../../../../math/utils/random/randint");
|
|
9
10
|
function parseVector(input) {
|
|
10
11
|
const tex = input.replace("\\left", "");
|
|
@@ -19,6 +20,16 @@ function parseVector(input) {
|
|
|
19
20
|
}
|
|
20
21
|
return null;
|
|
21
22
|
}
|
|
23
|
+
function normalizeVector(x, y) {
|
|
24
|
+
const divisor = (0, gcd_1.gcd)(Math.abs(x), Math.abs(y));
|
|
25
|
+
let newX = x / divisor;
|
|
26
|
+
let newY = y / divisor;
|
|
27
|
+
if (newX < 0) {
|
|
28
|
+
newX = -newX;
|
|
29
|
+
newY = -newY;
|
|
30
|
+
}
|
|
31
|
+
return { x: newX, y: newY };
|
|
32
|
+
}
|
|
22
33
|
const getDirectionVectorQuestion = () => {
|
|
23
34
|
let x1 = (0, randint_1.randint)(-8, 8);
|
|
24
35
|
let x2 = (0, randint_1.randint)(-8, 8);
|
|
@@ -30,11 +41,15 @@ const getDirectionVectorQuestion = () => {
|
|
|
30
41
|
while (y2 === y1) {
|
|
31
42
|
y2 = (0, randint_1.randint)(-8, 8);
|
|
32
43
|
}
|
|
33
|
-
const
|
|
34
|
-
const
|
|
44
|
+
const rawXValue = x2 - x1;
|
|
45
|
+
const rawYValue = y2 - y1;
|
|
46
|
+
const { x: xValue, y: yValue } = normalizeVector(rawXValue, rawYValue);
|
|
35
47
|
const vector = new vector_1.Vector("v", xValue.toTree(), yValue.toTree());
|
|
36
|
-
const instruction = `
|
|
37
|
-
const commands = [
|
|
48
|
+
const instruction = `Lire les coordonnées d'un vecteur directeur de la droite représentée ci-dessous :`;
|
|
49
|
+
const commands = [
|
|
50
|
+
`line = Line((${x1}, ${y1}), (${x2}, ${y2}))`,
|
|
51
|
+
`SetFixed(line, true)`,
|
|
52
|
+
];
|
|
38
53
|
const xMin = Math.min(x1, x2);
|
|
39
54
|
const yMin = Math.min(y1, y2);
|
|
40
55
|
const xMax = Math.max(x1, x2);
|
|
@@ -71,7 +86,10 @@ const getPropositions = (n, { answer, xValue, yValue }) => {
|
|
|
71
86
|
(0, exercise_1.tryToAddWrongProp)(propositions, wrongAnswer3.toInlineCoordsTex());
|
|
72
87
|
}
|
|
73
88
|
while (propositions.length < n) {
|
|
74
|
-
const
|
|
89
|
+
const randomX = (0, randint_1.randint)(-5, 5);
|
|
90
|
+
const randomY = (0, randint_1.randint)(-5, 5);
|
|
91
|
+
const { x: wrongX, y: wrongY } = normalizeVector(randomX, randomY);
|
|
92
|
+
const wrongAnswer = new vector_1.Vector("v", wrongX.toTree(), wrongY.toTree());
|
|
75
93
|
if (wrongAnswer.isColinear(vector) === false) {
|
|
76
94
|
(0, exercise_1.tryToAddWrongProp)(propositions, wrongAnswer.toInlineCoordsTex());
|
|
77
95
|
}
|
|
@@ -41,7 +41,7 @@ const getDirectionVectorEquationQuestion = () => {
|
|
|
41
41
|
const equation = new equalNode_1.EqualNode(new addNode_1.AddNode(new addNode_1.AddNode(new multiplyNode_1.MultiplyNode(yValue.toTree(), new variableNode_1.VariableNode("x")), new multiplyNode_1.MultiplyNode((-xValue).toTree(), new variableNode_1.VariableNode("y"))).simplify({ forbidFactorize: true }), c.toTree()), new numberNode_1.NumberNode(0)).toTex();
|
|
42
42
|
const question = {
|
|
43
43
|
answer: vector.toInlineCoordsTex(),
|
|
44
|
-
instruction: `Soit
|
|
44
|
+
instruction: `Soit une droite $d$ d'équation cartésienne $${equation}$. Déterminez les coordonnées d'un vecteur directeur de $d$.`,
|
|
45
45
|
keys: ["semicolon", "x", "y"],
|
|
46
46
|
answerFormat: "tex",
|
|
47
47
|
identifiers: { xValue, yValue },
|
|
@@ -13,7 +13,7 @@ const getPointCoordinatesQuestion = () => {
|
|
|
13
13
|
const xMax = Math.max(x) + 5;
|
|
14
14
|
const yMin = Math.min(y) - 5;
|
|
15
15
|
const yMax = Math.max(y) + 5;
|
|
16
|
-
const instruction = `
|
|
16
|
+
const instruction = `Lire les coordonnées du point $A$ représenté dans le repère ci-dessous : `;
|
|
17
17
|
const commands = [
|
|
18
18
|
`A = (${x}, ${y})`,
|
|
19
19
|
`ShowLabel(A, true)`,
|
|
@@ -63,7 +63,7 @@ const isAnswerValid = (ans, { answer, x, y }) => {
|
|
|
63
63
|
};
|
|
64
64
|
exports.pointCoordinates = {
|
|
65
65
|
id: "pointCoordinates",
|
|
66
|
-
label: "
|
|
66
|
+
label: "Lire les coordonnées d'un point",
|
|
67
67
|
levels: ["1rePro"],
|
|
68
68
|
isSingleStep: true,
|
|
69
69
|
sections: ["Géométrie cartésienne"],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"convexityQuadrinomialsGeo.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/convexity/convexityQuadrinomialsGeo.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAoBlC,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,MAAM,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"convexityQuadrinomialsGeo.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/convexity/convexityQuadrinomialsGeo.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAoBlC,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC;AA0LF,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,WAAW,CAc3D,CAAC"}
|
|
@@ -9,8 +9,6 @@ const polynomial_1 = require("../../../../math/polynomials/polynomial");
|
|
|
9
9
|
const randint_1 = require("../../../../math/utils/random/randint");
|
|
10
10
|
const infiniteNode_1 = require("../../../../tree/nodes/numbers/infiniteNode");
|
|
11
11
|
const numberNode_1 = require("../../../../tree/nodes/numbers/numberNode");
|
|
12
|
-
const fractionNode_1 = require("../../../../tree/nodes/operators/fractionNode");
|
|
13
|
-
const multiplyNode_1 = require("../../../../tree/nodes/operators/multiplyNode");
|
|
14
12
|
const closure_1 = require("../../../../tree/nodes/sets/closure");
|
|
15
13
|
const intervalNode_1 = require("../../../../tree/nodes/sets/intervalNode");
|
|
16
14
|
const coinFlip_1 = require("../../../../utils/coinFlip");
|
|
@@ -61,7 +59,7 @@ const getConvexityQuadrinomialsGeoQuestion = () => {
|
|
|
61
59
|
: new intervalNode_1.IntervalNode(infiniteNode_1.MinusInfinityNode, inflexionPointX.toTree(), closure_1.ClosureType.OO).toTex();
|
|
62
60
|
}
|
|
63
61
|
const questionType = askConvex ? "convexe" : "concave";
|
|
64
|
-
const instruction = `Ci-dessous est tracée la courbe $\\mathcal C_f$
|
|
62
|
+
const instruction = `Ci-dessous est tracée la courbe représentative $\\mathcal C_f$ d'une fonction $f$. Sur quel intervalle $f$ est-elle ${questionType} ?`;
|
|
65
63
|
const commands = [
|
|
66
64
|
`f(x) = ${quadrinomial.toString()}`,
|
|
67
65
|
`SetColor(f, "${colors_1.blueMain}")`,
|
|
@@ -80,19 +78,15 @@ const getConvexityQuadrinomialsGeoQuestion = () => {
|
|
|
80
78
|
options: ggb.getOptions(),
|
|
81
79
|
keys: ["rbracket", "lbracket", "semicolon", "infty", "reals"],
|
|
82
80
|
answerFormat: "tex",
|
|
83
|
-
identifiers: { askConvex, quadcoeffs },
|
|
81
|
+
identifiers: { askConvex, quadcoeffs, inflexionPoint: inflexionPointX },
|
|
84
82
|
};
|
|
85
83
|
return question;
|
|
86
84
|
};
|
|
87
|
-
const getPropositions = (n, { answer,
|
|
85
|
+
const getPropositions = (n, { answer, inflexionPoint }) => {
|
|
88
86
|
const propositions = [];
|
|
89
87
|
(0, exercise_1.addValidProp)(propositions, answer, "tex");
|
|
90
|
-
const
|
|
91
|
-
const
|
|
92
|
-
const seconddcoeffs = secondderivative.coefficients;
|
|
93
|
-
const inflexionPoint = new fractionNode_1.FractionNode(new multiplyNode_1.MultiplyNode(seconddcoeffs[0].toTree(), new numberNode_1.NumberNode(-1)), seconddcoeffs[1].toTree()).simplify();
|
|
94
|
-
const wrongInterval1 = new intervalNode_1.IntervalNode(inflexionPoint, infiniteNode_1.PlusInfinityNode, closure_1.ClosureType.OO).toTex();
|
|
95
|
-
const wrongInterval2 = new intervalNode_1.IntervalNode(infiniteNode_1.MinusInfinityNode, inflexionPoint, closure_1.ClosureType.OO).toTex();
|
|
88
|
+
const wrongInterval1 = new intervalNode_1.IntervalNode(inflexionPoint.toTree(), infiniteNode_1.PlusInfinityNode, closure_1.ClosureType.OO).toTex();
|
|
89
|
+
const wrongInterval2 = new intervalNode_1.IntervalNode(infiniteNode_1.MinusInfinityNode, inflexionPoint.toTree(), closure_1.ClosureType.OO).toTex();
|
|
96
90
|
const wrongInterval3 = new intervalNode_1.IntervalNode(infiniteNode_1.MinusInfinityNode, infiniteNode_1.PlusInfinityNode, closure_1.ClosureType.OO).toTex();
|
|
97
91
|
const wrongInterval4 = new intervalNode_1.IntervalNode(new numberNode_1.NumberNode((0, randint_1.randint)(-1, 2)), infiniteNode_1.PlusInfinityNode, closure_1.ClosureType.FO).toTex();
|
|
98
92
|
(0, exercise_1.tryToAddWrongProp)(propositions, wrongInterval1);
|
|
@@ -101,8 +95,7 @@ const getPropositions = (n, { answer, quadcoeffs }) => {
|
|
|
101
95
|
(0, exercise_1.tryToAddWrongProp)(propositions, wrongInterval4);
|
|
102
96
|
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
103
97
|
};
|
|
104
|
-
const isAnswerValid = (ans, { askConvex, quadcoeffs }) => {
|
|
105
|
-
const inflexionPoint = -quadcoeffs[2] / (3 * quadcoeffs[3]);
|
|
98
|
+
const isAnswerValid = (ans, { askConvex, quadcoeffs, inflexionPoint }) => {
|
|
106
99
|
let interval;
|
|
107
100
|
if (askConvex) {
|
|
108
101
|
interval =
|
|
@@ -116,12 +109,12 @@ const isAnswerValid = (ans, { askConvex, quadcoeffs }) => {
|
|
|
116
109
|
? new intervalNode_1.IntervalNode(inflexionPoint.toTree(), infiniteNode_1.PlusInfinityNode, closure_1.ClosureType.OO)
|
|
117
110
|
: new intervalNode_1.IntervalNode(infiniteNode_1.MinusInfinityNode, inflexionPoint.toTree(), closure_1.ClosureType.OO);
|
|
118
111
|
}
|
|
119
|
-
const latexs = interval.toAllValidTexs({
|
|
112
|
+
const latexs = interval.toAllValidTexs({});
|
|
120
113
|
return latexs.includes(ans);
|
|
121
114
|
};
|
|
122
115
|
exports.convexityQuadrinomialsGeo = {
|
|
123
116
|
id: "convexityQuadrinomialsGeo",
|
|
124
|
-
label: "
|
|
117
|
+
label: "Déterminer graphiquement la convexité d'un polynôme de degré $3$",
|
|
125
118
|
levels: ["TermSpé"],
|
|
126
119
|
isSingleStep: true,
|
|
127
120
|
sections: ["Dérivation"],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"convexityTrinomialsGeo.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/convexity/convexityTrinomialsGeo.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"convexityTrinomialsGeo.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/convexity/convexityTrinomialsGeo.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB,CAAC;AAkDF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,CAexD,CAAC"}
|
|
@@ -6,9 +6,10 @@ const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQ
|
|
|
6
6
|
const colors_1 = require("../../../../geogebra/colors");
|
|
7
7
|
const geogebraConstructor_1 = require("../../../../geogebra/geogebraConstructor");
|
|
8
8
|
const trinom_1 = require("../../../../math/polynomials/trinom");
|
|
9
|
+
const shuffle_1 = require("../../../../utils/shuffle");
|
|
9
10
|
const getConvexityTrinomialsGeoQuestion = () => {
|
|
10
11
|
const trinom = trinom_1.TrinomConstructor.random();
|
|
11
|
-
const instruction = `Ci-dessous est tracée la courbe $\\mathcal C_f$
|
|
12
|
+
const instruction = `Ci-dessous est tracée la courbe représentative $\\mathcal C_f$ d'une fonction $f$. Sur $\\mathbb{R}$, la fonction $f$ est :`;
|
|
12
13
|
const commands = [
|
|
13
14
|
`f(x) = ${trinom.toString()}`,
|
|
14
15
|
`SetColor(f, "${colors_1.blueMain}")`,
|
|
@@ -37,16 +38,17 @@ const getPropositions = (n, { answer }) => {
|
|
|
37
38
|
(0, exercise_1.addValidProp)(propositions, answer, "raw");
|
|
38
39
|
(0, exercise_1.tryToAddWrongProp)(propositions, "Concave", "raw");
|
|
39
40
|
(0, exercise_1.tryToAddWrongProp)(propositions, "Convexe", "raw");
|
|
41
|
+
(0, shuffle_1.shuffle)(propositions);
|
|
40
42
|
(0, exercise_1.tryToAddWrongProp)(propositions, "Ni l'un ni l'autre", "raw");
|
|
41
43
|
(0, exercise_1.tryToAddWrongProp)(propositions, "On ne peut pas savoir", "raw");
|
|
42
|
-
return
|
|
44
|
+
return propositions;
|
|
43
45
|
};
|
|
44
46
|
const isAnswerValid = (ans, { answer }) => {
|
|
45
47
|
return ans === answer;
|
|
46
48
|
};
|
|
47
49
|
exports.convexityTrinomialsGeo = {
|
|
48
50
|
id: "convexityTrinomialsGeo",
|
|
49
|
-
label: "
|
|
51
|
+
label: "Déterminer graphiquement la convexité d'un trinôme",
|
|
50
52
|
levels: ["TermSpé"],
|
|
51
53
|
isSingleStep: true,
|
|
52
54
|
sections: ["Dérivation"],
|
|
@@ -20,7 +20,7 @@ const getLineFromDirectorVectorQuestion = () => {
|
|
|
20
20
|
const b = new point_1.Point("b", new numberNode_1.NumberNode(a.getXnumber() - u.getXAsNumber()), new numberNode_1.NumberNode(a.getYnumber() - u.getYAsNumber()));
|
|
21
21
|
const line = new line_1.Line(b, a);
|
|
22
22
|
const correctAnswer = line.getEquation(u, a);
|
|
23
|
-
const instruction = `Soit $d$ une droite de vecteur directeur $${u.toTexWithCoords()}$ passant par le point $${a.toTexWithCoords()}$. Déterminer l'équation réduite de la droite $d
|
|
23
|
+
const instruction = `Soit $d$ une droite de vecteur directeur $${u.toTexWithCoords()}$ passant par le point $${a.toTexWithCoords()}$. Déterminer l'équation réduite de la droite $d$.`;
|
|
24
24
|
const question = {
|
|
25
25
|
answer: correctAnswer.toTex(),
|
|
26
26
|
instruction: instruction,
|
|
@@ -99,7 +99,7 @@ const getCorrecAnswer = (uX, uY, aX, aY) => {
|
|
|
99
99
|
};
|
|
100
100
|
exports.lineFromDirectorVector = {
|
|
101
101
|
id: "lineFromDirectorVector",
|
|
102
|
-
label: "Équation réduite
|
|
102
|
+
label: "Équation réduite d'une droite connaissant un point et un vecteur directeur",
|
|
103
103
|
levels: ["2nde"],
|
|
104
104
|
isSingleStep: true,
|
|
105
105
|
sections: ["Droites"],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vectorNormCalculation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/vectors/vectorNormCalculation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;
|
|
1
|
+
{"version":3,"file":"vectorNormCalculation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/vectors/vectorNormCalculation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA+CF,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,WAAW,CAavD,CAAC"}
|
|
@@ -8,7 +8,6 @@ const real_1 = require("../../../../math/numbers/reals/real");
|
|
|
8
8
|
const sqrtNode_1 = require("../../../../tree/nodes/functions/sqrtNode");
|
|
9
9
|
const numberNode_1 = require("../../../../tree/nodes/numbers/numberNode");
|
|
10
10
|
const addNode_1 = require("../../../../tree/nodes/operators/addNode");
|
|
11
|
-
const powerNode_1 = require("../../../../tree/nodes/operators/powerNode");
|
|
12
11
|
const getVectorNormCalculationQuestion = () => {
|
|
13
12
|
const u = vector_1.VectorConstructor.random("u", false);
|
|
14
13
|
const x = u.x.simplify().value;
|
|
@@ -43,8 +42,10 @@ const generateProposition = (x, y) => {
|
|
|
43
42
|
return [firstProposition];
|
|
44
43
|
};
|
|
45
44
|
const isAnswerValid = (ans, { x, y }) => {
|
|
46
|
-
const correctAnswer = new sqrtNode_1.SqrtNode(
|
|
47
|
-
return correctAnswer
|
|
45
|
+
const correctAnswer = new sqrtNode_1.SqrtNode((x ** 2 + y ** 2).toTree());
|
|
46
|
+
return correctAnswer
|
|
47
|
+
.toAllValidTexs({ allowSimplifySqrt: true })
|
|
48
|
+
.includes(ans);
|
|
48
49
|
};
|
|
49
50
|
exports.vectorNormCalculation = {
|
|
50
51
|
id: "vectorNormCalculation",
|
|
@@ -32,9 +32,8 @@ const getMedianWithTable = () => {
|
|
|
32
32
|
const question = {
|
|
33
33
|
instruction: `On considère le tableau d'effectifs suivant :
|
|
34
34
|
|
|
35
|
-
| | | | | | |
|
|
36
|
-
|-|-|-|-|-|-|
|
|
37
35
|
|Valeur|${randomValues[0]}|${randomValues[1]}|${randomValues[2]}|${randomValues[3]}|${randomValues[4]}|
|
|
36
|
+
|-|-|-|-|-|-|
|
|
38
37
|
|Effectif|${randomEffectives[0]}|${randomEffectives[1]}|${randomEffectives[2]}|${randomEffectives[3]}|${randomEffectives[4]}|
|
|
39
38
|
|
|
40
39
|
Calculer la médiane de cette série de valeurs.`,
|
|
@@ -42,6 +41,7 @@ Calculer la médiane de cette série de valeurs.`,
|
|
|
42
41
|
keys: [],
|
|
43
42
|
answerFormat: "tex",
|
|
44
43
|
identifiers: { randomValues },
|
|
44
|
+
style: { tableHasNoHeader: true },
|
|
45
45
|
};
|
|
46
46
|
return question;
|
|
47
47
|
};
|
|
@@ -45,9 +45,8 @@ const getQuartiles = () => {
|
|
|
45
45
|
const question = {
|
|
46
46
|
instruction: `On considère le tableau d'effectifs suivant :
|
|
47
47
|
|
|
48
|
-
| | | | | | |
|
|
49
|
-
|-|-|-|-|-|-|
|
|
50
48
|
|Valeur|${randomValues[0]}|${randomValues[1]}|${randomValues[2]}|${randomValues[3]}|${randomValues[4]}|
|
|
49
|
+
|-|-|-|-|-|-|
|
|
51
50
|
|Effectif|${randomEffectives[0]}|${randomEffectives[1]}|${randomEffectives[2]}|${randomEffectives[3]}|${randomEffectives[4]}|
|
|
52
51
|
|
|
53
52
|
Calculer le ${quartileToString} de cette série de valeurs.`,
|
|
@@ -55,6 +54,7 @@ Calculer le ${quartileToString} de cette série de valeurs.`,
|
|
|
55
54
|
keys: [],
|
|
56
55
|
answerFormat: "tex",
|
|
57
56
|
identifiers: { randomValues, randomEffectives, randomQuartile },
|
|
57
|
+
style: { tableHasNoHeader: true },
|
|
58
58
|
};
|
|
59
59
|
return question;
|
|
60
60
|
};
|
|
@@ -14,9 +14,8 @@ const getAveragePointQuestion = () => {
|
|
|
14
14
|
const points = (0, randTupleInt_1.distinctRandTupleInt)(4, 2, { from: -9, to: 10 });
|
|
15
15
|
const sortedPoints = points.sort((a, b) => a[0] - b[0]);
|
|
16
16
|
const tab = `
|
|
17
|
-
| | | | | |
|
|
18
|
-
|-|-|-|-|-|
|
|
19
17
|
|x|${sortedPoints[0][0]}|${sortedPoints[1][0]}|${sortedPoints[2][0]}|${sortedPoints[3][0]}|
|
|
18
|
+
|-|-|-|-|-|
|
|
20
19
|
|y|${sortedPoints[0][1]}|${sortedPoints[1][1]}|${sortedPoints[2][1]}|${sortedPoints[3][1]}|
|
|
21
20
|
`;
|
|
22
21
|
const instruction = `On considère la liste de points suivante : ${tab}
|
|
@@ -35,6 +34,7 @@ const getAveragePointQuestion = () => {
|
|
|
35
34
|
xValues: sortedPoints.map((el) => el[0]),
|
|
36
35
|
yValues: sortedPoints.map((el) => el[1]),
|
|
37
36
|
},
|
|
37
|
+
style: { tableHasNoHeader: true },
|
|
38
38
|
};
|
|
39
39
|
return question;
|
|
40
40
|
};
|
|
@@ -33,7 +33,7 @@ const getFineAdjustementExerciseQuestion = () => {
|
|
|
33
33
|
const yMax = Math.max(...yValues);
|
|
34
34
|
const question = {
|
|
35
35
|
answer: exercise.correctAnswer,
|
|
36
|
-
instruction:
|
|
36
|
+
instruction: `On considère le nuage de points ci-dessous. Un ajustement affine semble-t-il justifié ? Quelle peut être la valeur du coefficient de détermination ?`,
|
|
37
37
|
commands: ggb.commands,
|
|
38
38
|
options: ggb.getOptions(),
|
|
39
39
|
coords: ggb.getAdaptedCoords({ xMin, xMax, yMin, yMax }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conditionIf.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/python/conditionIf.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAIlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,QAAQ,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"conditionIf.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/python/conditionIf.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAIlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAiEF,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAC,WAAW,CAY7C,CAAC"}
|
|
@@ -16,7 +16,11 @@ const getConditionIfQuestion = () => {
|
|
|
16
16
|
const opIndex = (0, randint_1.randint)(0, operations.length);
|
|
17
17
|
const operation = operations[opIndex];
|
|
18
18
|
const opresult = operation.func(a, b);
|
|
19
|
-
|
|
19
|
+
// Choisir aléatoirement entre les deux conditions
|
|
20
|
+
const condition = (0, randint_1.randint)(0, 2) === 0 ? "a <= b" : "b <= a";
|
|
21
|
+
const answer = (condition === "a <= b" ? opresult <= b : opresult >= b)
|
|
22
|
+
? b
|
|
23
|
+
: opresult;
|
|
20
24
|
const question = {
|
|
21
25
|
answer: answer.toString(),
|
|
22
26
|
instruction: `Quel sera l'affichage du code suivant ?
|
|
@@ -24,14 +28,14 @@ const getConditionIfQuestion = () => {
|
|
|
24
28
|
a = ${a}
|
|
25
29
|
b = ${b}
|
|
26
30
|
a = a ${operation.name} b
|
|
27
|
-
if
|
|
31
|
+
if ${condition} :
|
|
28
32
|
a = b
|
|
29
33
|
print(a)
|
|
30
34
|
\`\`\`
|
|
31
35
|
`,
|
|
32
36
|
keys: ["a", "b", "equal"],
|
|
33
37
|
answerFormat: "tex",
|
|
34
|
-
identifiers: { a, b, opresult },
|
|
38
|
+
identifiers: { a, b, opresult, condition },
|
|
35
39
|
};
|
|
36
40
|
return question;
|
|
37
41
|
};
|
|
@@ -42,9 +46,7 @@ const getPropositions = (n, { answer, a, b, opresult }) => {
|
|
|
42
46
|
(0, exercise_1.tryToAddWrongProp)(propositions, b.toString());
|
|
43
47
|
(0, exercise_1.tryToAddWrongProp)(propositions, opresult.toString());
|
|
44
48
|
while (propositions.length < n) {
|
|
45
|
-
|
|
46
|
-
(0, exercise_1.tryToAddWrongProp)(propositions, (0, randint_1.randint)(0, 10).toString());
|
|
47
|
-
}
|
|
49
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, (0, randint_1.randint)(0, 10).toString());
|
|
48
50
|
}
|
|
49
51
|
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
50
52
|
};
|
|
@@ -131,7 +131,7 @@ const isAnswerValid = (ans, { exercise }) => {
|
|
|
131
131
|
};
|
|
132
132
|
exports.pythonForLoop1Exercise = {
|
|
133
133
|
id: "pyForLoop1Exercise",
|
|
134
|
-
label: "
|
|
134
|
+
label: "Boucles for 1",
|
|
135
135
|
levels: ["2nde"],
|
|
136
136
|
isSingleStep: true,
|
|
137
137
|
sections: ["Python"],
|
|
@@ -71,7 +71,7 @@ const getCorrectAnswer = (exo) => {
|
|
|
71
71
|
};
|
|
72
72
|
exports.pyNestedForLoopExercise = {
|
|
73
73
|
id: "pyNestedForLoopExercise",
|
|
74
|
-
label: "
|
|
74
|
+
label: "Boucles for imbriquées",
|
|
75
75
|
levels: ["2nde"],
|
|
76
76
|
isSingleStep: true,
|
|
77
77
|
sections: ["Python"],
|
|
@@ -101,7 +101,7 @@ const generateType17Instruction = (a, b, op) => {
|
|
|
101
101
|
};
|
|
102
102
|
exports.pyWhileLoop1Exercise = {
|
|
103
103
|
id: "pyWhileLoop1Exercise",
|
|
104
|
-
label: "
|
|
104
|
+
label: "Boucles while 1",
|
|
105
105
|
levels: ["2nde"],
|
|
106
106
|
isSingleStep: true,
|
|
107
107
|
sections: ["Python"],
|
package/lib/index.d.ts
CHANGED
|
@@ -836,6 +836,7 @@ declare const mathExercises: (import("./exercises/exercise").Exercise<{
|
|
|
836
836
|
}> | import("./exercises/exercise").Exercise<{
|
|
837
837
|
askConvex: boolean;
|
|
838
838
|
quadcoeffs: number[];
|
|
839
|
+
inflexionPoint: number;
|
|
839
840
|
}> | import("./exercises/exercise").Exercise<{
|
|
840
841
|
coeffs: number[];
|
|
841
842
|
to: string;
|
|
@@ -1245,6 +1246,7 @@ declare const mathExercises: (import("./exercises/exercise").Exercise<{
|
|
|
1245
1246
|
a: number;
|
|
1246
1247
|
b: number;
|
|
1247
1248
|
opresult: number;
|
|
1249
|
+
condition: string;
|
|
1248
1250
|
}> | import("./exercises/exercise").Exercise<{
|
|
1249
1251
|
exercise: {
|
|
1250
1252
|
op: string;
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAG3D,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,MAAM,EAAE,MAAM,aAAa,CAAC;QAC5B,SAAS,EAAE,MAAM,MAAM,CAAC;QACxB,YAAY,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,KAAK,aAAa,CAAC;KACpD;CACF;AAcD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+BE;AAEF,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAjCnB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA+BE
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAG3D,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,MAAM,EAAE,MAAM,aAAa,CAAC;QAC5B,SAAS,EAAE,MAAM,MAAM,CAAC;QACxB,YAAY,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,KAAK,aAAa,CAAC;KACpD;CACF;AAcD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+BE;AAEF,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;IA/BF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA+BE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAEgD,CAAC;AACnD,QAAA,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAA6B,CAAC;AAE/C,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -12,7 +12,7 @@ export declare class SqrtNode implements FunctionNode {
|
|
|
12
12
|
toMathString(): string;
|
|
13
13
|
toTex(): string;
|
|
14
14
|
toEquivalentNodes(opts?: NodeOptions): AlgebraicNode[];
|
|
15
|
-
toAllValidTexs(): string[];
|
|
15
|
+
toAllValidTexs(opts?: NodeOptions): string[];
|
|
16
16
|
evaluate(vars: Record<string, number>): number;
|
|
17
17
|
simplify(opts?: SimplifyOptions): AlgebraicNode;
|
|
18
18
|
equals(node: AlgebraicNode): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sqrtNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/functions/sqrtNode.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,YAAY,EAAkB,MAAM,gBAAgB,CAAC;AAK5E,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAElE,wBAAgB,UAAU,CAAC,CAAC,EAAE,IAA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CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAGrC,QAAQ,CAAC,IAAI,CAAC,EAAE,eAAe;IAmC/B,MAAM,CAAC,IAAI,EAAE,aAAa,GAAG,OAAO;CAGrC"}
|
|
@@ -49,8 +49,8 @@ class SqrtNode {
|
|
|
49
49
|
}
|
|
50
50
|
return res;
|
|
51
51
|
}
|
|
52
|
-
toAllValidTexs() {
|
|
53
|
-
return this.toEquivalentNodes().map((node) => node.toTex());
|
|
52
|
+
toAllValidTexs(opts) {
|
|
53
|
+
return this.toEquivalentNodes(opts).map((node) => node.toTex());
|
|
54
54
|
}
|
|
55
55
|
evaluate(vars) {
|
|
56
56
|
return Math.sqrt(this.child.evaluate(vars));
|