math-exercises 3.0.190 → 3.0.192
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/exercises/math/dataRepresentations/barChart/barChartInterpreting.d.ts +53 -0
- package/lib/exercises/math/dataRepresentations/barChart/barChartInterpreting.d.ts.map +1 -0
- package/lib/exercises/math/dataRepresentations/barChart/barChartInterpreting.js +543 -0
- package/lib/exercises/math/dataRepresentations/barChart/barChartReading.d.ts +94 -0
- package/lib/exercises/math/dataRepresentations/barChart/barChartReading.d.ts.map +1 -0
- package/lib/exercises/math/dataRepresentations/barChart/barChartReading.js +280 -0
- package/lib/exercises/math/dataRepresentations/barChart/index.d.ts +3 -0
- package/lib/exercises/math/dataRepresentations/barChart/index.d.ts.map +1 -0
- package/lib/exercises/math/dataRepresentations/barChart/index.js +2 -0
- package/lib/exercises/math/dataRepresentations/boxPlot/boxPlotInterpreting.d.ts +7 -0
- package/lib/exercises/math/dataRepresentations/boxPlot/boxPlotInterpreting.d.ts.map +1 -0
- package/lib/exercises/math/dataRepresentations/boxPlot/boxPlotInterpreting.js +223 -0
- package/lib/exercises/math/dataRepresentations/boxPlot/boxPlotReading.d.ts +9 -0
- package/lib/exercises/math/dataRepresentations/boxPlot/boxPlotReading.d.ts.map +1 -0
- package/lib/exercises/math/dataRepresentations/boxPlot/boxPlotReading.js +133 -0
- package/lib/exercises/math/dataRepresentations/boxPlot/boxPlotReadingPercentages.d.ts +11 -0
- package/lib/exercises/math/dataRepresentations/boxPlot/boxPlotReadingPercentages.d.ts.map +1 -0
- package/lib/exercises/math/dataRepresentations/boxPlot/boxPlotReadingPercentages.js +198 -0
- package/lib/exercises/math/dataRepresentations/boxPlot/compareBoxPlot.d.ts +13 -0
- package/lib/exercises/math/dataRepresentations/boxPlot/compareBoxPlot.d.ts.map +1 -0
- package/lib/exercises/math/dataRepresentations/boxPlot/compareBoxPlot.js +192 -0
- package/lib/exercises/math/dataRepresentations/boxPlot/index.d.ts +5 -0
- package/lib/exercises/math/dataRepresentations/boxPlot/index.d.ts.map +1 -0
- package/lib/exercises/math/dataRepresentations/boxPlot/index.js +4 -0
- package/lib/exercises/math/dataRepresentations/index.d.ts +4 -7
- package/lib/exercises/math/dataRepresentations/index.d.ts.map +1 -1
- package/lib/exercises/math/dataRepresentations/index.js +4 -11
- package/lib/exercises/math/dataRepresentations/scatterPlot/index.d.ts +6 -0
- package/lib/exercises/math/dataRepresentations/scatterPlot/index.d.ts.map +1 -0
- package/lib/exercises/math/dataRepresentations/scatterPlot/index.js +5 -0
- package/lib/exercises/math/dataRepresentations/scatterPlot/scatterPlotBuildScatterPlotFromDataTable.d.ts +12 -0
- package/lib/exercises/math/dataRepresentations/scatterPlot/scatterPlotBuildScatterPlotFromDataTable.d.ts.map +1 -0
- package/lib/exercises/math/dataRepresentations/scatterPlot/scatterPlotBuildScatterPlotFromDataTable.js +206 -0
- package/lib/exercises/math/dataRepresentations/scatterPlot/scatterPlotCommenting.d.ts +9 -0
- package/lib/exercises/math/dataRepresentations/scatterPlot/scatterPlotCommenting.d.ts.map +1 -0
- package/lib/exercises/math/dataRepresentations/scatterPlot/scatterPlotCommenting.js +210 -0
- package/lib/exercises/math/dataRepresentations/scatterPlot/scatterPlotFillDataTableFromScatterPlotData.d.ts +10 -0
- package/lib/exercises/math/dataRepresentations/scatterPlot/scatterPlotFillDataTableFromScatterPlotData.d.ts.map +1 -0
- package/lib/exercises/math/dataRepresentations/scatterPlot/scatterPlotFillDataTableFromScatterPlotData.js +252 -0
- package/lib/exercises/math/dataRepresentations/scatterPlot/scatterPlotFillDataTableWithDataClassesFromScatterPlotData.d.ts +12 -0
- package/lib/exercises/math/dataRepresentations/scatterPlot/scatterPlotFillDataTableWithDataClassesFromScatterPlotData.d.ts.map +1 -0
- package/lib/exercises/math/dataRepresentations/scatterPlot/scatterPlotFillDataTableWithDataClassesFromScatterPlotData.js +352 -0
- package/lib/exercises/math/dataRepresentations/scatterPlot/scatterPlotInterpreting.d.ts +11 -0
- package/lib/exercises/math/dataRepresentations/scatterPlot/scatterPlotInterpreting.d.ts.map +1 -0
- package/lib/exercises/math/dataRepresentations/scatterPlot/scatterPlotInterpreting.js +403 -0
- package/lib/exercises/math/dataRepresentations/tables/buildDoubleTableFromContext.d.ts +7 -0
- package/lib/exercises/math/dataRepresentations/tables/buildDoubleTableFromContext.d.ts.map +1 -0
- package/lib/exercises/math/dataRepresentations/tables/buildDoubleTableFromContext.js +222 -0
- package/lib/exercises/math/dataRepresentations/tables/fillDoubleTable.d.ts +7 -0
- package/lib/exercises/math/dataRepresentations/tables/fillDoubleTable.d.ts.map +1 -0
- package/lib/exercises/math/dataRepresentations/tables/fillDoubleTable.js +187 -0
- package/lib/exercises/math/dataRepresentations/tables/index.d.ts +4 -0
- package/lib/exercises/math/dataRepresentations/tables/index.d.ts.map +1 -0
- package/lib/exercises/math/dataRepresentations/tables/index.js +3 -0
- package/lib/exercises/math/dataRepresentations/tables/tableReading.d.ts +8 -0
- package/lib/exercises/math/dataRepresentations/tables/tableReading.d.ts.map +1 -0
- package/lib/exercises/math/dataRepresentations/tables/tableReading.js +109 -0
- package/lib/exercises/math/derivation/applications/findYearForDecreasingPopulation.d.ts +8 -0
- package/lib/exercises/math/derivation/applications/findYearForDecreasingPopulation.d.ts.map +1 -0
- package/lib/exercises/math/derivation/applications/findYearForDecreasingPopulation.js +145 -0
- package/lib/exercises/math/derivation/applications/index.d.ts +1 -0
- package/lib/exercises/math/derivation/applications/index.d.ts.map +1 -1
- package/lib/exercises/math/derivation/applications/index.js +1 -0
- package/lib/exercises/math/derivation/tangent/tangentEquationFromFunctionExpression.js +1 -1
- package/lib/exercises/math/derivation/variations/signVarTableFromFunctionExpression.d.ts.map +1 -1
- package/lib/exercises/math/derivation/variations/signVarTableFromFunctionExpression.js +4 -1
- package/lib/exercises/math/functions/affines/affineCompareTwoImagesFromVariations.d.ts +13 -0
- package/lib/exercises/math/functions/affines/affineCompareTwoImagesFromVariations.d.ts.map +1 -0
- package/lib/exercises/math/functions/affines/affineCompareTwoImagesFromVariations.js +205 -0
- package/lib/exercises/math/functions/affines/affineVarTableOnBoundedInterval.d.ts +9 -0
- package/lib/exercises/math/functions/affines/affineVarTableOnBoundedInterval.d.ts.map +1 -0
- package/lib/exercises/math/functions/affines/affineVarTableOnBoundedInterval.js +157 -0
- package/lib/exercises/math/functions/affines/affineVariations.d.ts +12 -0
- package/lib/exercises/math/functions/affines/affineVariations.d.ts.map +1 -0
- package/lib/exercises/math/functions/affines/affineVariations.js +176 -0
- package/lib/exercises/math/functions/affines/affineVariationsFromGraph.d.ts +8 -0
- package/lib/exercises/math/functions/affines/affineVariationsFromGraph.d.ts.map +1 -0
- package/lib/exercises/math/functions/affines/affineVariationsFromGraph.js +203 -0
- package/lib/exercises/math/functions/affines/affineVariationsFromTwoImages.d.ts +12 -0
- package/lib/exercises/math/functions/affines/affineVariationsFromTwoImages.d.ts.map +1 -0
- package/lib/exercises/math/functions/affines/affineVariationsFromTwoImages.js +259 -0
- package/lib/exercises/math/functions/exponentials/exponentialFunctionImage.d.ts +9 -0
- package/lib/exercises/math/functions/exponentials/exponentialFunctionImage.d.ts.map +1 -0
- package/lib/exercises/math/functions/exponentials/exponentialFunctionImage.js +99 -0
- package/lib/exercises/math/functions/exponentials/index.d.ts +5 -0
- package/lib/exercises/math/functions/exponentials/index.d.ts.map +1 -1
- package/lib/exercises/math/functions/exponentials/index.js +5 -0
- package/lib/exercises/math/functions/exponentials/realPowersFraction.d.ts +10 -0
- package/lib/exercises/math/functions/exponentials/realPowersFraction.d.ts.map +1 -0
- package/lib/exercises/math/functions/exponentials/realPowersFraction.js +125 -0
- package/lib/exercises/math/functions/exponentials/realPowersMixOperations.d.ts +12 -0
- package/lib/exercises/math/functions/exponentials/realPowersMixOperations.d.ts.map +1 -0
- package/lib/exercises/math/functions/exponentials/realPowersMixOperations.js +148 -0
- package/lib/exercises/math/functions/exponentials/realPowersPower.d.ts +10 -0
- package/lib/exercises/math/functions/exponentials/realPowersPower.d.ts.map +1 -0
- package/lib/exercises/math/functions/exponentials/realPowersPower.js +128 -0
- package/lib/exercises/math/functions/exponentials/realPowersProduct.d.ts +10 -0
- package/lib/exercises/math/functions/exponentials/realPowersProduct.d.ts.map +1 -0
- package/lib/exercises/math/functions/exponentials/realPowersProduct.js +128 -0
- package/lib/exercises/math/probaStat/conditional/fillTableConditionalProbabilitySituation.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/conditional/fillTableConditionalProbabilitySituation.js +7 -2
- package/lib/exercises/math/probaStat/stats1var/marginalAndConditionalFrequency.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats1var/marginalAndConditionalFrequency.js +131 -61
- package/lib/exercises/math/sequences/geometric/geometricFindNextTermFromTwoConsecutiveTerms.d.ts +12 -0
- package/lib/exercises/math/sequences/geometric/geometricFindNextTermFromTwoConsecutiveTerms.d.ts.map +1 -0
- package/lib/exercises/math/sequences/geometric/geometricFindNextTermFromTwoConsecutiveTerms.js +217 -0
- package/lib/exercises/math/sequences/geometric/geometricFindRecurrenceFormula.d.ts +10 -0
- package/lib/exercises/math/sequences/geometric/geometricFindRecurrenceFormula.d.ts.map +1 -0
- package/lib/exercises/math/sequences/geometric/geometricFindRecurrenceFormula.js +186 -0
- package/lib/exercises/math/sequences/geometric/graph/geometricPlaceFirstPoints.d.ts +14 -0
- package/lib/exercises/math/sequences/geometric/graph/geometricPlaceFirstPoints.d.ts.map +1 -0
- package/lib/exercises/math/sequences/geometric/graph/geometricPlaceFirstPoints.js +189 -0
- package/lib/exercises/math/sequences/geometric/graph/index.d.ts +2 -0
- package/lib/exercises/math/sequences/geometric/graph/index.d.ts.map +1 -0
- package/lib/exercises/math/sequences/geometric/graph/index.js +1 -0
- package/lib/index.d.ts +53 -25
- package/lib/index.d.ts.map +1 -1
- package/lib/tree/nodes/algebraicNode.d.ts +3 -0
- package/lib/tree/nodes/algebraicNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/fractionNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/fractionNode.js +5 -3
- package/lib/tree/nodes/operators/multiplyNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/multiplyNode.js +5 -3
- package/lib/tree/nodes/operators/powerNode.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
import { GeneratorOptionTarget, GeneratorOptionType, addValidProp, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
|
|
2
|
+
import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
|
+
import { randfloat } from "../../../../math/utils/random/randfloat.js";
|
|
4
|
+
import { randint } from "../../../../math/utils/random/randint.js";
|
|
5
|
+
import { NodeConstructor, } from "../../../../tree/nodes/nodeConstructor.js";
|
|
6
|
+
import { substract } from "../../../../tree/nodes/operators/substractNode.js";
|
|
7
|
+
import { VariableNode } from "../../../../tree/nodes/variables/variableNode.js";
|
|
8
|
+
import { probaLawFlip } from "../../../../utils/alea/probaLawFlip.js";
|
|
9
|
+
import { zip } from "../../../../utils/arrays/arrayZip.js";
|
|
10
|
+
const strTypeFFromNodeSlope = (nodeSlope) => {
|
|
11
|
+
const valueSlope = nodeSlope.evaluate();
|
|
12
|
+
if (valueSlope === 0) {
|
|
13
|
+
return "Constante";
|
|
14
|
+
}
|
|
15
|
+
else if (valueSlope > 0) {
|
|
16
|
+
return "Strictement croissante";
|
|
17
|
+
}
|
|
18
|
+
else {
|
|
19
|
+
return "Strictement décroissante";
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
const getInstruction = (identifiers) => {
|
|
23
|
+
const { nodeIdsAbscissa, nodeIdsSlope, typeAbscissa } = identifiers;
|
|
24
|
+
const [nodeX1, nodeX2] = nodeIdsAbscissa.map((nodeIds) => NodeConstructor.fromIdentifiers(nodeIds));
|
|
25
|
+
const [nodeX1Display, nodeX2Display] = typeAbscissa === "Nombres"
|
|
26
|
+
? [nodeX1, nodeX2]
|
|
27
|
+
: ["a", "b"].map((varName) => new VariableNode(varName));
|
|
28
|
+
const nodeSlope = NodeConstructor.fromIdentifiers(nodeIdsSlope);
|
|
29
|
+
const strVariationsF = strTypeFFromNodeSlope(nodeSlope);
|
|
30
|
+
return `Soit $f$ une fonction affine ${strVariationsF.toLocaleLowerCase()}.
|
|
31
|
+
|
|
32
|
+
${(() => {
|
|
33
|
+
switch (typeAbscissa) {
|
|
34
|
+
case "Lettres": {
|
|
35
|
+
const [nodeXDisplaySmall, nodeXDisplayBig] = zip([nodeX1Display, nodeX2Display], [nodeX1, nodeX2])
|
|
36
|
+
.toSorted(([, node1], [_, node2]) => substract(node1, node2).evaluate())
|
|
37
|
+
.map(([nodeXDisplay]) => nodeXDisplay);
|
|
38
|
+
return `Soient deux nombres $${nodeX1Display.toTex()}$ et $${nodeX2Display.toTex()}$ tels que :
|
|
39
|
+
|
|
40
|
+
$$
|
|
41
|
+
${nodeXDisplaySmall.toTex()} < ${nodeXDisplayBig.toTex()}
|
|
42
|
+
$$
|
|
43
|
+
|
|
44
|
+
`;
|
|
45
|
+
}
|
|
46
|
+
default:
|
|
47
|
+
return "";
|
|
48
|
+
}
|
|
49
|
+
})()}
|
|
50
|
+
|
|
51
|
+
Comparer $f(${nodeX1Display.toTex()})$ et $f(${nodeX2Display.toTex()})$.`;
|
|
52
|
+
};
|
|
53
|
+
const getAnswer = (identifiers) => {
|
|
54
|
+
const { nodeIdsAbscissa, nodeIdsSlope, typeAbscissa } = identifiers;
|
|
55
|
+
const [nodeX1, nodeX2] = nodeIdsAbscissa.map((nodeIds) => NodeConstructor.fromIdentifiers(nodeIds));
|
|
56
|
+
const [nodeX1Display, nodeX2Display] = typeAbscissa === "Nombres"
|
|
57
|
+
? [nodeX1, nodeX2]
|
|
58
|
+
: ["a", "b"].map((varName) => new VariableNode(varName));
|
|
59
|
+
const nodeSlope = NodeConstructor.fromIdentifiers(nodeIdsSlope);
|
|
60
|
+
const strVariationsF = strTypeFFromNodeSlope(nodeSlope);
|
|
61
|
+
const [nodeXDisplaySmall, nodeXDisplayBig] = zip([nodeX1Display, nodeX2Display], [nodeX1, nodeX2])
|
|
62
|
+
.toSorted(([, node1], [_, node2]) => substract(node1, node2).evaluate())
|
|
63
|
+
.map(([nodeXDisplay]) => nodeXDisplay);
|
|
64
|
+
switch (strVariationsF) {
|
|
65
|
+
case "Constante":
|
|
66
|
+
return `f(${nodeXDisplaySmall.toTex()}) = f(${nodeXDisplayBig.toTex()})`;
|
|
67
|
+
case "Strictement croissante":
|
|
68
|
+
return `f(${nodeXDisplaySmall.toTex()}) < f(${nodeXDisplayBig.toTex()})`;
|
|
69
|
+
case "Strictement décroissante":
|
|
70
|
+
return `f(${nodeXDisplaySmall.toTex()}) > f(${nodeXDisplayBig.toTex()})`;
|
|
71
|
+
default:
|
|
72
|
+
throw new Error("Unsupported strVariationsF: " + strVariationsF);
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
const getHint = () => {
|
|
76
|
+
return `Soit $f$ une fonction affine et $x_{1}$ et $x_{2}$ deux réels distincts tels que :
|
|
77
|
+
|
|
78
|
+
$$
|
|
79
|
+
x_{1}<x_{2}
|
|
80
|
+
$$
|
|
81
|
+
|
|
82
|
+
Si la fonction $f$ est strictement croissante alors :
|
|
83
|
+
|
|
84
|
+
$$
|
|
85
|
+
f(x_{1})<f(x_{2})
|
|
86
|
+
$$
|
|
87
|
+
|
|
88
|
+
Si la fonction $f$ est strictement décroissante alors :
|
|
89
|
+
|
|
90
|
+
$$
|
|
91
|
+
f(x_{1})>f(x_{2})
|
|
92
|
+
$$
|
|
93
|
+
|
|
94
|
+
Si la fonction $f$ est constante alors :
|
|
95
|
+
|
|
96
|
+
$$
|
|
97
|
+
f(x_{1})=f(x_{2})
|
|
98
|
+
$$
|
|
99
|
+
|
|
100
|
+
`;
|
|
101
|
+
};
|
|
102
|
+
const getCorrection = (identifiers) => {
|
|
103
|
+
const { nodeIdsAbscissa, nodeIdsSlope, typeAbscissa } = identifiers;
|
|
104
|
+
const [nodeX1, nodeX2] = nodeIdsAbscissa.map((nodeIds) => NodeConstructor.fromIdentifiers(nodeIds));
|
|
105
|
+
const [nodeX1Display, nodeX2Display] = typeAbscissa === "Nombres"
|
|
106
|
+
? [nodeX1, nodeX2]
|
|
107
|
+
: ["a", "b"].map((varName) => new VariableNode(varName));
|
|
108
|
+
const nodeSlope = NodeConstructor.fromIdentifiers(nodeIdsSlope);
|
|
109
|
+
const strVariationsF = strTypeFFromNodeSlope(nodeSlope);
|
|
110
|
+
const [nodeXDisplaySmall, nodeXDisplayBig] = zip([nodeX1Display, nodeX2Display], [nodeX1, nodeX2])
|
|
111
|
+
.toSorted(([, node1], [_, node2]) => substract(node1, node2).evaluate())
|
|
112
|
+
.map(([nodeXDisplay]) => nodeXDisplay);
|
|
113
|
+
return `$f$ est une fonction affine ${strVariationsF.toLocaleLowerCase()}.
|
|
114
|
+
|
|
115
|
+
On a :
|
|
116
|
+
|
|
117
|
+
$$
|
|
118
|
+
${nodeXDisplaySmall.toTex()} < ${nodeXDisplayBig.toTex()}
|
|
119
|
+
$$
|
|
120
|
+
|
|
121
|
+
Par conséquent :
|
|
122
|
+
|
|
123
|
+
$$
|
|
124
|
+
${getAnswer(identifiers)}
|
|
125
|
+
$$
|
|
126
|
+
|
|
127
|
+
`;
|
|
128
|
+
};
|
|
129
|
+
const getPropositions = (_n, { answer, ...identifiers }) => {
|
|
130
|
+
const { nodeIdsAbscissa, typeAbscissa } = identifiers;
|
|
131
|
+
const [nodeX1, nodeX2] = nodeIdsAbscissa.map((nodeIds) => NodeConstructor.fromIdentifiers(nodeIds));
|
|
132
|
+
const [nodeX1Display, nodeX2Display] = typeAbscissa === "Nombres"
|
|
133
|
+
? [nodeX1, nodeX2]
|
|
134
|
+
: ["a", "b"].map((varName) => new VariableNode(varName));
|
|
135
|
+
const [nodeXDisplaySmall, nodeXDisplayBig] = zip([nodeX1Display, nodeX2Display], [nodeX1, nodeX2])
|
|
136
|
+
.toSorted(([, node1], [_, node2]) => substract(node1, node2).evaluate())
|
|
137
|
+
.map(([nodeXDisplay]) => nodeXDisplay);
|
|
138
|
+
const propositions = [];
|
|
139
|
+
["<", ">", "="].map((strSymbol) => {
|
|
140
|
+
const tex = `f(${nodeXDisplaySmall.toTex()}) ${strSymbol} f(${nodeXDisplayBig.toTex()})`;
|
|
141
|
+
if (tex === answer) {
|
|
142
|
+
addValidProp(propositions, answer);
|
|
143
|
+
}
|
|
144
|
+
else {
|
|
145
|
+
tryToAddWrongProp(propositions, tex);
|
|
146
|
+
}
|
|
147
|
+
});
|
|
148
|
+
return propositions;
|
|
149
|
+
};
|
|
150
|
+
const getAffineCompareTwoImagesFromVariationsQuestion = (optsIn) => {
|
|
151
|
+
const opts = optsIn ?? optsDefault;
|
|
152
|
+
const { typeAbscissa } = opts;
|
|
153
|
+
const xA = randint(-9, 10);
|
|
154
|
+
const xB = randint(-9, 10, [xA]);
|
|
155
|
+
const slope = probaLawFlip([
|
|
156
|
+
[randfloat(0, 3, 2, [0]), 0.45],
|
|
157
|
+
[randfloat(-3, 0, 2, [0]), 0.45],
|
|
158
|
+
[0, 0.1],
|
|
159
|
+
]);
|
|
160
|
+
const identifiers = {
|
|
161
|
+
nodeIdsAbscissa: [xA, xB].map((v) => v.toTree().toIdentifiers()),
|
|
162
|
+
nodeIdsSlope: slope.toTree().toIdentifiers(),
|
|
163
|
+
typeAbscissa,
|
|
164
|
+
};
|
|
165
|
+
return getQuestionFromIdentifiers(identifiers, opts);
|
|
166
|
+
};
|
|
167
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
168
|
+
const question = {
|
|
169
|
+
instruction: getInstruction(identifiers),
|
|
170
|
+
answer: getAnswer(identifiers),
|
|
171
|
+
hint: getHint(identifiers),
|
|
172
|
+
correction: getCorrection(identifiers),
|
|
173
|
+
answerFormat: "tex",
|
|
174
|
+
identifiers,
|
|
175
|
+
};
|
|
176
|
+
return question;
|
|
177
|
+
};
|
|
178
|
+
const optsDefault = {
|
|
179
|
+
typeAbscissa: "Nombres",
|
|
180
|
+
};
|
|
181
|
+
const options = [
|
|
182
|
+
{
|
|
183
|
+
id: "typeAbscissa",
|
|
184
|
+
label: "Type d'abscisses :",
|
|
185
|
+
target: GeneratorOptionTarget.generation,
|
|
186
|
+
type: GeneratorOptionType.select,
|
|
187
|
+
values: ["Nombres", "Lettres"],
|
|
188
|
+
defaultValue: optsDefault.typeAbscissa,
|
|
189
|
+
},
|
|
190
|
+
];
|
|
191
|
+
export const affineCompareTwoImagesFromVariations = {
|
|
192
|
+
id: "affineCompareTwoImagesFromVariations",
|
|
193
|
+
connector: "=",
|
|
194
|
+
label: "Comparer deux images d'une fonction affine dont on connaît le sens de variation",
|
|
195
|
+
isSingleStep: true,
|
|
196
|
+
generator: (nb, opts) => getDistinctQuestions(() => getAffineCompareTwoImagesFromVariationsQuestion(opts), nb),
|
|
197
|
+
options,
|
|
198
|
+
qcmTimer: 60,
|
|
199
|
+
freeTimer: 60,
|
|
200
|
+
getPropositions,
|
|
201
|
+
subject: "Mathématiques",
|
|
202
|
+
hasHintAndCorrection: true,
|
|
203
|
+
getQuestionFromIdentifiers,
|
|
204
|
+
answerType: "QCU",
|
|
205
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Exercise } from "../../../../exercises/exercise.js";
|
|
2
|
+
import { NodeIdentifiers } from "../../../../tree/nodes/nodeConstructor.js";
|
|
3
|
+
type Identifiers = {
|
|
4
|
+
nodeIdsBounds: NodeIdentifiers[];
|
|
5
|
+
nodeIdsF: NodeIdentifiers;
|
|
6
|
+
};
|
|
7
|
+
export declare const affineVarTableOnBoundedInterval: Exercise<Identifiers>;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=affineVarTableOnBoundedInterval.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"affineVarTableOnBoundedInterval.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/affines/affineVarTableOnBoundedInterval.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,6BAA6B,CAAC;AAMrC,OAAO,EAEL,eAAe,EAChB,MAAM,qCAAqC,CAAC;AAK7C,KAAK,WAAW,GAAG;IACjB,aAAa,EAAE,eAAe,EAAE,CAAC;IACjC,QAAQ,EAAE,eAAe,CAAC;CAC3B,CAAC;AA8KF,eAAO,MAAM,+BAA+B,EAAE,QAAQ,CAAC,WAAW,CAqBjE,CAAC"}
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
|
|
2
|
+
import { varTableVEA } from "../../../../exercises/vea/varTableVEA.js";
|
|
3
|
+
import { AffineConstructor } from "../../../../math/polynomials/affine.js";
|
|
4
|
+
import { nodeBySubstitutingVar } from "../../../../math/utils/functions/functionComposition.js";
|
|
5
|
+
import { NodeConstructor, } from "../../../../tree/nodes/nodeConstructor.js";
|
|
6
|
+
import { randomMany } from "../../../../utils/alea/random.js";
|
|
7
|
+
import { handleVEAError } from "../../../../utils/errors/handleVEAError.js";
|
|
8
|
+
const getInstruction = (identifiers) => {
|
|
9
|
+
const { nodeIdsBounds, nodeIdsF } = identifiers;
|
|
10
|
+
const [nodeX1, nodeX2] = nodeIdsBounds.map((nodeIds) => NodeConstructor.fromIdentifiers(nodeIds));
|
|
11
|
+
const nodeF = NodeConstructor.fromIdentifiers(nodeIdsF);
|
|
12
|
+
const strInterval = `[${nodeX1.toTex()};${nodeX2.toTex()}]`;
|
|
13
|
+
return `Dresser le tableau de variations de la fonction $f$ sur l'intervalle $${strInterval}$.
|
|
14
|
+
|
|
15
|
+
On donne, pour tout $x$ dans $${strInterval}$ :
|
|
16
|
+
|
|
17
|
+
$$
|
|
18
|
+
f(x) = ${nodeF.toTex()}
|
|
19
|
+
$$
|
|
20
|
+
|
|
21
|
+
`;
|
|
22
|
+
};
|
|
23
|
+
const getAnswerTable = (identifiers) => {
|
|
24
|
+
const { nodeIdsBounds, nodeIdsF } = identifiers;
|
|
25
|
+
const [nodeX1, nodeX2] = nodeIdsBounds.map((nodeIds) => NodeConstructor.fromIdentifiers(nodeIds));
|
|
26
|
+
const nodeF = NodeConstructor.fromIdentifiers(nodeIdsF);
|
|
27
|
+
const [nodeImage1, nodeImage2] = [nodeX1, nodeX2].map((nodeX) => nodeBySubstitutingVar(nodeF, nodeX, "x".toTree()));
|
|
28
|
+
if (nodeImage1.evaluate() < nodeImage2.evaluate()) {
|
|
29
|
+
return [
|
|
30
|
+
["$x$", nodeX1.toTex(), "\\ ", nodeX2.toTex()],
|
|
31
|
+
[
|
|
32
|
+
"$\\ $",
|
|
33
|
+
"\\ ",
|
|
34
|
+
"\\ ",
|
|
35
|
+
nodeImage2.simplify({ towardsDistribute: true }).toTex(),
|
|
36
|
+
],
|
|
37
|
+
["$f(x)$", "\\ ", "\\nearrow", "\\ "],
|
|
38
|
+
[
|
|
39
|
+
"$\\ $",
|
|
40
|
+
nodeImage1.simplify({ towardsDistribute: true }).toTex(),
|
|
41
|
+
"\\ ",
|
|
42
|
+
"\\ ",
|
|
43
|
+
],
|
|
44
|
+
];
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
return [
|
|
48
|
+
["$x$", nodeX1.toTex(), "\\ ", nodeX2.toTex()],
|
|
49
|
+
[
|
|
50
|
+
"$\\ $",
|
|
51
|
+
nodeImage1.simplify({ towardsDistribute: true }).toTex(),
|
|
52
|
+
"\\ ",
|
|
53
|
+
"\\ ",
|
|
54
|
+
],
|
|
55
|
+
["$f(x)$", "\\ ", "\\searrow", "\\ "],
|
|
56
|
+
[
|
|
57
|
+
"$\\ $",
|
|
58
|
+
"\\ ",
|
|
59
|
+
"\\ ",
|
|
60
|
+
nodeImage2.simplify({ towardsDistribute: true }).toTex(),
|
|
61
|
+
],
|
|
62
|
+
];
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
const getHint = () => {
|
|
66
|
+
return `Inscris les bornes de l'intervalle sur la ligne "$x$".
|
|
67
|
+
Détermine le signe du coefficient directeur de la fonction $f$.
|
|
68
|
+
S'il est strictement positif, $f$ est strictement croissante sur $\\mathbb{R}$.
|
|
69
|
+
S'il est strictement négatif, $f$ est strictement décroissante sur $\\mathbb{R}$.
|
|
70
|
+
Tu peux donc choisir le sens de la flèche sur la ligne "$f(x)$" et monter ou descendre chaque boîte de saisie pour correspondre au sens de la flêche.
|
|
71
|
+
Ensuite, calcule l'image correspondant à chaque borne de l'intervalle pour terminer de remplir le tableau.
|
|
72
|
+
`;
|
|
73
|
+
};
|
|
74
|
+
const getCorrection = (identifiers) => {
|
|
75
|
+
const { nodeIdsBounds, nodeIdsF } = identifiers;
|
|
76
|
+
const [nodeX1, nodeX2] = nodeIdsBounds.map((nodeIds) => NodeConstructor.fromIdentifiers(nodeIds));
|
|
77
|
+
const nodeF = NodeConstructor.fromIdentifiers(nodeIdsF);
|
|
78
|
+
const nodeSlope = nodeF.derivative().simplify({ towardsDistribute: true });
|
|
79
|
+
const strInterval = `[${nodeX1.toTex()};${nodeX2.toTex()}]`;
|
|
80
|
+
const [nodeImage1, nodeImage2] = [nodeX1, nodeX2].map((nodeX) => nodeBySubstitutingVar(nodeF, nodeX, "x".toTree()));
|
|
81
|
+
const a = nodeSlope.evaluate();
|
|
82
|
+
return `On inscrit les bornes de $${strInterval}$ sur la ligne "$x$".
|
|
83
|
+
D'après l'expression de $f(x)$, le coefficient directeur de la fonction $f$ est $${nodeSlope.toTex()}$.
|
|
84
|
+
$f$ est donc ${a > 0 ? "strictement croissante" : "strictement décroissante"} sur $\\mathbb{R}$ et a fortiori sur l'intervalle $${strInterval}$.
|
|
85
|
+
On peut donc sélectionner le sens de la flèche (${a > 0 ? "vers le haut" : "vers le bas"}) et positionner les boîtes de saisie des images.
|
|
86
|
+
On calcule enfin l'image de chaque borne de l'intervalle :
|
|
87
|
+
|
|
88
|
+
$$
|
|
89
|
+
f(${nodeX1.toTex()}) = ${nodeImage1.toTex()} = ${nodeImage1
|
|
90
|
+
.simplify({ towardsDistribute: true })
|
|
91
|
+
.toTex()}
|
|
92
|
+
$$
|
|
93
|
+
|
|
94
|
+
$$
|
|
95
|
+
f(${nodeX2.toTex()}) = ${nodeImage2.toTex()} = ${nodeImage2
|
|
96
|
+
.simplify({ towardsDistribute: true })
|
|
97
|
+
.toTex()}
|
|
98
|
+
$$
|
|
99
|
+
|
|
100
|
+
`;
|
|
101
|
+
};
|
|
102
|
+
const getKeys = () => {
|
|
103
|
+
return [];
|
|
104
|
+
};
|
|
105
|
+
const isAnswerTableValid = (ans, { answerTable }) => {
|
|
106
|
+
try {
|
|
107
|
+
return varTableVEA(ans, answerTable);
|
|
108
|
+
}
|
|
109
|
+
catch (err) {
|
|
110
|
+
return handleVEAError(err);
|
|
111
|
+
}
|
|
112
|
+
};
|
|
113
|
+
const getAffineVarTableOnBoundedIntervalQuestion = () => {
|
|
114
|
+
const [nodeX1, nodeX2] = randomMany([...Array(21).keys()].map((i) => i - 10), 2)
|
|
115
|
+
.toSorted((v1, v2) => v1 - v2)
|
|
116
|
+
.map((v) => v.toTree());
|
|
117
|
+
const nodeF = AffineConstructor.random({ excludes: [0] }, { excludes: [0] }).toTree();
|
|
118
|
+
const identifiers = {
|
|
119
|
+
nodeIdsBounds: [nodeX1, nodeX2].map((nodeX) => nodeX.toIdentifiers()),
|
|
120
|
+
nodeIdsF: nodeF.toIdentifiers(),
|
|
121
|
+
};
|
|
122
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
123
|
+
};
|
|
124
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
125
|
+
return {
|
|
126
|
+
answerTable: getAnswerTable(identifiers),
|
|
127
|
+
instruction: getInstruction(identifiers),
|
|
128
|
+
keys: getKeys(identifiers),
|
|
129
|
+
answerFormat: "tex",
|
|
130
|
+
identifiers,
|
|
131
|
+
hint: getHint(identifiers),
|
|
132
|
+
correction: getCorrection(identifiers),
|
|
133
|
+
initTable: [
|
|
134
|
+
["$x$", "", "\\ ", ""],
|
|
135
|
+
["$\\ $", "\\ ", "\\ ", "\\ "],
|
|
136
|
+
["$f(x)$", "", "", ""],
|
|
137
|
+
["$\\ $", "\\ ", "\\ ", "\\ "],
|
|
138
|
+
],
|
|
139
|
+
};
|
|
140
|
+
};
|
|
141
|
+
export const affineVarTableOnBoundedInterval = {
|
|
142
|
+
id: "affineVarTableOnBoundedInterval",
|
|
143
|
+
label: "Dresser le tableau de variations d'une fonction affine sur un intervalle borné",
|
|
144
|
+
isSingleStep: true,
|
|
145
|
+
generator: (nb, opts) => getDistinctQuestions(() => getAffineVarTableOnBoundedIntervalQuestion(opts), nb),
|
|
146
|
+
qcmTimer: 60,
|
|
147
|
+
freeTimer: 60,
|
|
148
|
+
subject: "Mathématiques",
|
|
149
|
+
getInstruction,
|
|
150
|
+
getHint,
|
|
151
|
+
getCorrection,
|
|
152
|
+
getAnswerTable,
|
|
153
|
+
isAnswerTableValid,
|
|
154
|
+
getQuestionFromIdentifiers,
|
|
155
|
+
hasHintAndCorrection: true,
|
|
156
|
+
answerType: "varTable",
|
|
157
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Exercise } from "../../../../exercises/exercise.js";
|
|
2
|
+
import { NodeIdentifiers } from "../../../../tree/nodes/nodeConstructor.js";
|
|
3
|
+
type Identifiers = {
|
|
4
|
+
nodeIdsCoeff: NodeIdentifiers[];
|
|
5
|
+
formatExpr: string;
|
|
6
|
+
};
|
|
7
|
+
type Options = {
|
|
8
|
+
formatExpr: string;
|
|
9
|
+
};
|
|
10
|
+
export declare const affineVariations: Exercise<Identifiers, Options>;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=affineVariations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"affineVariations.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/affines/affineVariations.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAiBT,MAAM,6BAA6B,CAAC;AAKrC,OAAO,EAEL,eAAe,EAChB,MAAM,qCAAqC,CAAC;AAkC7C,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,eAAe,EAAE,CAAC;IAChC,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAuIF,KAAK,OAAO,GAAG;IACb,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAsBF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAyB3D,CAAC"}
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import { addValidProp, shuffleProps, tryToAddWrongProp, GeneratorOptionTarget, GeneratorOptionType, } from "../../../../exercises/exercise.js";
|
|
2
|
+
import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
|
+
import { RationalConstructor } from "../../../../math/numbers/rationals/rational.js";
|
|
4
|
+
import { randint } from "../../../../math/utils/random/randint.js";
|
|
5
|
+
import { NodeConstructor, } from "../../../../tree/nodes/nodeConstructor.js";
|
|
6
|
+
import { add } from "../../../../tree/nodes/operators/addNode.js";
|
|
7
|
+
import { multiply } from "../../../../tree/nodes/operators/multiplyNode.js";
|
|
8
|
+
import { coinFlip } from "../../../../utils/alea/coinFlip.js";
|
|
9
|
+
import { probaLawFlip } from "../../../../utils/alea/probaLawFlip.js";
|
|
10
|
+
import { random } from "../../../../utils/alea/random.js";
|
|
11
|
+
const createNodeF = (formatExpr, nodeA, nodeB) => {
|
|
12
|
+
const nodeVarX = "x".toTree();
|
|
13
|
+
switch (formatExpr) {
|
|
14
|
+
case "$b+ax$": {
|
|
15
|
+
const b = nodeB.evaluate();
|
|
16
|
+
if (b === 0) {
|
|
17
|
+
return multiply(nodeA, nodeVarX).simplify();
|
|
18
|
+
}
|
|
19
|
+
else {
|
|
20
|
+
return add(nodeB, multiply(nodeA, nodeVarX).simplify());
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
case "$ax+b$":
|
|
24
|
+
default:
|
|
25
|
+
return add(multiply(nodeA, nodeVarX), nodeB).simplify({
|
|
26
|
+
towardsDistribute: true,
|
|
27
|
+
forbidFactorize: true,
|
|
28
|
+
forceDistributeFractions: true,
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
const getPropositions = (n, { answer }) => {
|
|
33
|
+
const propositions = [];
|
|
34
|
+
addValidProp(propositions, answer, "raw");
|
|
35
|
+
tryToAddWrongProp(propositions, "Strictement croissante", "raw");
|
|
36
|
+
tryToAddWrongProp(propositions, "Strictement décroissante", "raw");
|
|
37
|
+
tryToAddWrongProp(propositions, "Constante", "raw");
|
|
38
|
+
tryToAddWrongProp(propositions, "Non monotone", "raw");
|
|
39
|
+
return shuffleProps(propositions, n);
|
|
40
|
+
};
|
|
41
|
+
const getAnswer = (identifiers) => {
|
|
42
|
+
const { nodeIdsCoeff } = identifiers;
|
|
43
|
+
const nodeA = NodeConstructor.fromIdentifiers(nodeIdsCoeff[1]);
|
|
44
|
+
const a = nodeA.evaluate();
|
|
45
|
+
if (a === 0) {
|
|
46
|
+
return "Constante";
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
return a > 0 ? "Strictement croissante" : "Strictement décroissante";
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
const getInstruction = (identifiers) => {
|
|
53
|
+
const { nodeIdsCoeff, formatExpr } = identifiers;
|
|
54
|
+
const [nodeB, nodeA] = nodeIdsCoeff.map((nodeIds) => NodeConstructor.fromIdentifiers(nodeIds));
|
|
55
|
+
const nodeF = createNodeF(formatExpr, nodeA, nodeB);
|
|
56
|
+
return `Soit $f$ la fonction définie sur $\\mathbb{R}$ par
|
|
57
|
+
|
|
58
|
+
$$
|
|
59
|
+
f(x) = ${nodeF.toTex()}
|
|
60
|
+
$$
|
|
61
|
+
|
|
62
|
+
Quel est le sens de variations de $f$ sur $\\mathbb{R}$ ?`;
|
|
63
|
+
};
|
|
64
|
+
const getHint = () => {
|
|
65
|
+
return `Sur $\\mathbb{R}$, la fonction $f(x) = ax+b = b+ax$ est :
|
|
66
|
+
|
|
67
|
+
- strictement croissante si $a>0$;
|
|
68
|
+
- strictement décroissante si $a<0$;
|
|
69
|
+
- constante si $a=0$.
|
|
70
|
+
|
|
71
|
+
Le coefficient $b$ n'a aucune influence sur les variations de $f$.
|
|
72
|
+
`;
|
|
73
|
+
};
|
|
74
|
+
const getCorrection = (identifiers) => {
|
|
75
|
+
const { nodeIdsCoeff } = identifiers;
|
|
76
|
+
const [_nodeB, nodeA] = nodeIdsCoeff.map((nodeIds) => NodeConstructor.fromIdentifiers(nodeIds));
|
|
77
|
+
return `Le coefficient directeur de $f$ est $${nodeA.toTex()}$.
|
|
78
|
+
|
|
79
|
+
La fonction $f$ est donc ${getAnswer(identifiers).toLocaleLowerCase()} sur $\\mathbb{R}$.`;
|
|
80
|
+
};
|
|
81
|
+
const getKeys = () => {
|
|
82
|
+
return [];
|
|
83
|
+
};
|
|
84
|
+
const getAffineVariationsQuestion = (optsIn) => {
|
|
85
|
+
const arrayedOptions = optsIn ?? optsDefault;
|
|
86
|
+
const opts = {
|
|
87
|
+
formatExpr: random(arrayedOptions.formatExpr),
|
|
88
|
+
};
|
|
89
|
+
const { formatExpr } = opts;
|
|
90
|
+
const createRandomNodeCoeff = ({ isAllowZero }) => {
|
|
91
|
+
function createRandomNodeNonZero() {
|
|
92
|
+
return probaLawFlip([
|
|
93
|
+
//>0
|
|
94
|
+
[randint(1, 100).toTree(), 0.6],
|
|
95
|
+
[
|
|
96
|
+
RationalConstructor.randomIrreductible(20, {
|
|
97
|
+
onlySupOne: true,
|
|
98
|
+
}).toTree(),
|
|
99
|
+
0.16,
|
|
100
|
+
],
|
|
101
|
+
[RationalConstructor.randomIrreductibleProba(50).toTree(), 0.14],
|
|
102
|
+
]);
|
|
103
|
+
}
|
|
104
|
+
const nodePos = (() => {
|
|
105
|
+
if (isAllowZero) {
|
|
106
|
+
return probaLawFlip([
|
|
107
|
+
[createRandomNodeNonZero(), 0.9],
|
|
108
|
+
[(0).toTree(), 0.1],
|
|
109
|
+
]);
|
|
110
|
+
}
|
|
111
|
+
else {
|
|
112
|
+
return createRandomNodeNonZero();
|
|
113
|
+
}
|
|
114
|
+
})();
|
|
115
|
+
const sign = coinFlip() ? +1 : -1;
|
|
116
|
+
return multiply(sign, nodePos).simplify();
|
|
117
|
+
};
|
|
118
|
+
const nodeA = createRandomNodeCoeff({ isAllowZero: true });
|
|
119
|
+
const nodeB = createRandomNodeCoeff({
|
|
120
|
+
isAllowZero: nodeA.evaluate() !== 0,
|
|
121
|
+
});
|
|
122
|
+
const identifiers = {
|
|
123
|
+
nodeIdsCoeff: [nodeB, nodeA].map((node) => node.toIdentifiers()),
|
|
124
|
+
formatExpr,
|
|
125
|
+
};
|
|
126
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
127
|
+
};
|
|
128
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
129
|
+
const question = {
|
|
130
|
+
answer: getAnswer(identifiers),
|
|
131
|
+
instruction: getInstruction(identifiers),
|
|
132
|
+
keys: getKeys(identifiers),
|
|
133
|
+
answerFormat: "raw",
|
|
134
|
+
identifiers,
|
|
135
|
+
hint: getHint(identifiers),
|
|
136
|
+
correction: getCorrection(identifiers),
|
|
137
|
+
};
|
|
138
|
+
return question;
|
|
139
|
+
};
|
|
140
|
+
const optsDefault = {
|
|
141
|
+
formatExpr: ["$ax+b$"],
|
|
142
|
+
};
|
|
143
|
+
const options = [
|
|
144
|
+
{
|
|
145
|
+
id: "formatExpr",
|
|
146
|
+
label: "Formats pour $f(x)$",
|
|
147
|
+
target: GeneratorOptionTarget.generation,
|
|
148
|
+
type: GeneratorOptionType.multiselect,
|
|
149
|
+
values: ["$ax+b$", "$b+ax$"],
|
|
150
|
+
defaultValue: optsDefault.formatExpr,
|
|
151
|
+
},
|
|
152
|
+
];
|
|
153
|
+
export const affineVariations = {
|
|
154
|
+
id: "affineVariations",
|
|
155
|
+
label: "Déterminer le sens de variations d'une fonction affine à partir de son expression algébrique",
|
|
156
|
+
isSingleStep: true,
|
|
157
|
+
generator: (nb, opts) => getDistinctQuestions(() => getAffineVariationsQuestion(opts), nb),
|
|
158
|
+
options,
|
|
159
|
+
validateOptions: (opts) => {
|
|
160
|
+
return {
|
|
161
|
+
valid: !!(opts?.formatExpr && opts?.formatExpr.length > 0),
|
|
162
|
+
message: "Veuillez choisir au moins un format pour $f(x)$'.",
|
|
163
|
+
};
|
|
164
|
+
},
|
|
165
|
+
qcmTimer: 60,
|
|
166
|
+
freeTimer: 60,
|
|
167
|
+
getPropositions,
|
|
168
|
+
subject: "Mathématiques",
|
|
169
|
+
getInstruction,
|
|
170
|
+
getHint,
|
|
171
|
+
getCorrection,
|
|
172
|
+
getAnswer,
|
|
173
|
+
answerType: "QCU",
|
|
174
|
+
hasHintAndCorrection: true,
|
|
175
|
+
getQuestionFromIdentifiers,
|
|
176
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Exercise } from "../../../../exercises/exercise.js";
|
|
2
|
+
type Identifiers = {
|
|
3
|
+
b: number;
|
|
4
|
+
secondPoint: number[];
|
|
5
|
+
};
|
|
6
|
+
export declare const affineVariationsFromGraph: Exercise<Identifiers>;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=affineVariationsFromGraph.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"affineVariationsFromGraph.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/affines/affineVariationsFromGraph.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAerC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB,CAAC;AAsNF,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,WAAW,CAe3D,CAAC"}
|