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,252 @@
|
|
|
1
|
+
import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
|
|
2
|
+
import { greenMain } from "../../../../geogebra/colors.js";
|
|
3
|
+
import { GeogebraConstructor } from "../../../../geogebra/geogebraConstructor.js";
|
|
4
|
+
import { Point, PointConstructor, } from "../../../../math/geometry/point.js";
|
|
5
|
+
import { frenchify } from "../../../../math/utils/latex/frenchify.js";
|
|
6
|
+
import { numberParser } from "../../../../tree/parsers/numberParser.js";
|
|
7
|
+
import { coinFlip } from "../../../../utils/alea/coinFlip.js";
|
|
8
|
+
import { random } from "../../../../utils/alea/random.js";
|
|
9
|
+
import { getCartesiansProducts } from "../../../../utils/arrays/cartesianProducts.js";
|
|
10
|
+
import { transpose } from "../../../../utils/arrays/transpose.js";
|
|
11
|
+
import { handleVEAError } from "../../../../utils/errors/handleVEAError.js";
|
|
12
|
+
const _getStrStatClassForIndexCateg = (indexCateg, data, bounds) => {
|
|
13
|
+
const labels = bounds.map(frenchify);
|
|
14
|
+
const isLastCateg = indexCateg == data.length;
|
|
15
|
+
return `[${labels[indexCateg]};${labels[indexCateg + 1]}${isLastCateg ? "]" : "["}`;
|
|
16
|
+
};
|
|
17
|
+
const getComponentOfPointForStrGroupBy = (point, strGroupBy) => {
|
|
18
|
+
switch (strGroupBy) {
|
|
19
|
+
case "x":
|
|
20
|
+
return point.x.evaluate();
|
|
21
|
+
case "y":
|
|
22
|
+
return point.y.evaluate();
|
|
23
|
+
default:
|
|
24
|
+
throw new Error("Unsupported strGroupBy: " + strGroupBy);
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
const getArrValueForScatterPlotData = (arrPoint, strGroupBy) => {
|
|
28
|
+
return [
|
|
29
|
+
...new Set(arrPoint.map((point) => getComponentOfPointForStrGroupBy(point, strGroupBy))),
|
|
30
|
+
].toSorted((v1, v2) => v1 - v2);
|
|
31
|
+
};
|
|
32
|
+
const getInstruction = () => {
|
|
33
|
+
return `Remplir le tableau avec les données issues du nuage de points ci-dessous.`;
|
|
34
|
+
};
|
|
35
|
+
const getInitTable = (identifiers) => {
|
|
36
|
+
const { pointIds, strGroupBy, isTransposed } = identifiers;
|
|
37
|
+
const arrPoint = pointIds.map((pointIds) => PointConstructor.fromIdentifiers(pointIds));
|
|
38
|
+
const arrValue = getArrValueForScatterPlotData(arrPoint, strGroupBy);
|
|
39
|
+
const tableRaw = [
|
|
40
|
+
[`$${strGroupBy}$`, ...arrValue.map(() => "\\ ")],
|
|
41
|
+
["\\text{valeur}", ...arrValue.map(() => "")],
|
|
42
|
+
["\\text{effectif}", ...arrValue.map(() => "")],
|
|
43
|
+
];
|
|
44
|
+
return isTransposed ? transpose(tableRaw) : tableRaw;
|
|
45
|
+
};
|
|
46
|
+
const getAnswerTable = (identifiers) => {
|
|
47
|
+
const { pointIds, strGroupBy, isTransposed } = identifiers;
|
|
48
|
+
const arrPoint = pointIds.map((pointIds) => PointConstructor.fromIdentifiers(pointIds));
|
|
49
|
+
const arrValue = getArrValueForScatterPlotData(arrPoint, strGroupBy);
|
|
50
|
+
const arrDict = arrValue.map((value) => {
|
|
51
|
+
const count = arrPoint.filter((point) => getComponentOfPointForStrGroupBy(point, strGroupBy) === value).length;
|
|
52
|
+
return {
|
|
53
|
+
value,
|
|
54
|
+
count,
|
|
55
|
+
};
|
|
56
|
+
});
|
|
57
|
+
const tableRaw = [
|
|
58
|
+
[`$${strGroupBy}$`, ...arrValue.map(() => "\\ ")],
|
|
59
|
+
["\\text{valeur}", ...arrDict.map(({ value }) => value.frenchify())],
|
|
60
|
+
["\\text{effectif}", ...arrDict.map(({ count }) => count.frenchify())],
|
|
61
|
+
];
|
|
62
|
+
return isTransposed ? transpose(tableRaw) : tableRaw;
|
|
63
|
+
};
|
|
64
|
+
const getHint = (identifiers) => {
|
|
65
|
+
const { strGroupBy } = identifiers;
|
|
66
|
+
return `Pour chaque valeur $v$ de ${strGroupBy}, compte le nombre de points qui ont $${strGroupBy}=v$.`;
|
|
67
|
+
};
|
|
68
|
+
const getCorrection = (identifiers) => {
|
|
69
|
+
const { pointIds, strGroupBy } = identifiers;
|
|
70
|
+
const arrPoint = pointIds.map((pointIds) => PointConstructor.fromIdentifiers(pointIds));
|
|
71
|
+
const arrValue = getArrValueForScatterPlotData(arrPoint, strGroupBy);
|
|
72
|
+
const arrDict = arrValue.map((value) => {
|
|
73
|
+
const count = arrPoint.filter((point) => getComponentOfPointForStrGroupBy(point, strGroupBy) === value).length;
|
|
74
|
+
return {
|
|
75
|
+
value,
|
|
76
|
+
count,
|
|
77
|
+
};
|
|
78
|
+
});
|
|
79
|
+
return `Pour chaque valeur $v$ de $${strGroupBy}$, on compte le nombre de points qui ont $${strGroupBy}=v$.
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
${arrDict.map(({ value, count }) => `Il y a $${count}$ point${count === 1 ? "" : "s"} qui ${count === 1 ? "a" : "ont"} $${strGroupBy}=${value}$.`).join(`
|
|
83
|
+
|
|
84
|
+
`)}`;
|
|
85
|
+
};
|
|
86
|
+
const getCorrectionGGBOptions = (identifiers) => {
|
|
87
|
+
const { pointIds, strGroupBy } = identifiers;
|
|
88
|
+
const arrPoint = pointIds.map((pointIds) => PointConstructor.fromIdentifiers(pointIds));
|
|
89
|
+
const arrValue = getArrValueForScatterPlotData(arrPoint, strGroupBy);
|
|
90
|
+
const commands = [
|
|
91
|
+
...arrPoint.flatMap((point) => point.toGGBCommand({
|
|
92
|
+
isFixed: true,
|
|
93
|
+
isSelectionnable: true,
|
|
94
|
+
showLabel: false,
|
|
95
|
+
size: 6,
|
|
96
|
+
style: 3,
|
|
97
|
+
})),
|
|
98
|
+
...(() => {
|
|
99
|
+
switch (strGroupBy) {
|
|
100
|
+
case "x":
|
|
101
|
+
return arrValue.flatMap((value, i) => [
|
|
102
|
+
`l${i} = Line((${value}, 0),(${value}, 1))`,
|
|
103
|
+
`SetColor(l${i}, "${greenMain}")`,
|
|
104
|
+
]);
|
|
105
|
+
case "y":
|
|
106
|
+
return arrValue.flatMap((value, i) => [
|
|
107
|
+
`l${i} = Line((0, ${value}),(1, ${value}))`,
|
|
108
|
+
`SetColor(l${i}, "${greenMain}")`,
|
|
109
|
+
]);
|
|
110
|
+
default:
|
|
111
|
+
throw new Error("Unsupported strGroupBy: " + strGroupBy);
|
|
112
|
+
}
|
|
113
|
+
})(),
|
|
114
|
+
];
|
|
115
|
+
const ggb = new GeogebraConstructor({
|
|
116
|
+
commands,
|
|
117
|
+
hideGrid: true,
|
|
118
|
+
fontSize: 16,
|
|
119
|
+
xAxis: {
|
|
120
|
+
showPositive: true,
|
|
121
|
+
label: "x",
|
|
122
|
+
steps: 1,
|
|
123
|
+
},
|
|
124
|
+
yAxis: {
|
|
125
|
+
showPositive: true,
|
|
126
|
+
label: "y",
|
|
127
|
+
steps: 1,
|
|
128
|
+
},
|
|
129
|
+
});
|
|
130
|
+
return ggb.getOptions({
|
|
131
|
+
coords: ggb.getAdaptedCoords({
|
|
132
|
+
xMin: -1,
|
|
133
|
+
xMax: 6,
|
|
134
|
+
yMin: -1,
|
|
135
|
+
yMax: 6,
|
|
136
|
+
}),
|
|
137
|
+
});
|
|
138
|
+
};
|
|
139
|
+
const getGGBOptions = (identifiers) => {
|
|
140
|
+
const { pointIds } = identifiers;
|
|
141
|
+
const arrPoint = pointIds.map((pointIds) => PointConstructor.fromIdentifiers(pointIds));
|
|
142
|
+
const commands = [
|
|
143
|
+
...arrPoint.flatMap((point) => point.toGGBCommand({
|
|
144
|
+
isFixed: true,
|
|
145
|
+
isSelectionnable: true,
|
|
146
|
+
showLabel: false,
|
|
147
|
+
size: 5,
|
|
148
|
+
style: 3,
|
|
149
|
+
})),
|
|
150
|
+
];
|
|
151
|
+
const ggb = new GeogebraConstructor({
|
|
152
|
+
commands,
|
|
153
|
+
hideGrid: true,
|
|
154
|
+
fontSize: 16,
|
|
155
|
+
xAxis: {
|
|
156
|
+
showPositive: true,
|
|
157
|
+
label: "x",
|
|
158
|
+
steps: 1,
|
|
159
|
+
},
|
|
160
|
+
yAxis: {
|
|
161
|
+
showPositive: true,
|
|
162
|
+
label: "y",
|
|
163
|
+
steps: 1,
|
|
164
|
+
},
|
|
165
|
+
});
|
|
166
|
+
return ggb.getOptions({
|
|
167
|
+
coords: ggb.getAdaptedCoords({
|
|
168
|
+
xMin: -1,
|
|
169
|
+
xMax: 6,
|
|
170
|
+
yMin: -1,
|
|
171
|
+
yMax: 6,
|
|
172
|
+
}),
|
|
173
|
+
});
|
|
174
|
+
};
|
|
175
|
+
const getKeys = () => {
|
|
176
|
+
return [];
|
|
177
|
+
};
|
|
178
|
+
const isAnswerTableValid = (ans, { answerTable }) => {
|
|
179
|
+
try {
|
|
180
|
+
return answerTable.every((rowAnswer, j) => rowAnswer.every((answer, i) => {
|
|
181
|
+
const ansParsed = numberParser(ans[i][j]);
|
|
182
|
+
const answerParsed = numberParser(answer);
|
|
183
|
+
return ansParsed === answerParsed;
|
|
184
|
+
}));
|
|
185
|
+
}
|
|
186
|
+
catch (err) {
|
|
187
|
+
return handleVEAError(err);
|
|
188
|
+
}
|
|
189
|
+
};
|
|
190
|
+
const getScatterPlotFillDataTableFromScatterPlotDataQuestion = () => {
|
|
191
|
+
const length = 5;
|
|
192
|
+
const height = 5;
|
|
193
|
+
const arrArrDict = getCartesiansProducts([
|
|
194
|
+
[...Array(length).keys()].map((i) => i + 1),
|
|
195
|
+
[...Array(height).keys()].map((i) => i + 1),
|
|
196
|
+
]).map(([x, y]) => {
|
|
197
|
+
return {
|
|
198
|
+
x,
|
|
199
|
+
y,
|
|
200
|
+
isActivated: coinFlip(),
|
|
201
|
+
};
|
|
202
|
+
});
|
|
203
|
+
//at least one point should be activated
|
|
204
|
+
{
|
|
205
|
+
const dictRandom = random(arrArrDict);
|
|
206
|
+
dictRandom.isActivated = true;
|
|
207
|
+
}
|
|
208
|
+
const arrPoint = arrArrDict
|
|
209
|
+
.filter(({ isActivated }) => isActivated)
|
|
210
|
+
.map(({ x, y }) => new Point(`P${x}${y}`, x, y));
|
|
211
|
+
const strGroupBy = coinFlip() ? "x" : "y";
|
|
212
|
+
const isTransposed = coinFlip();
|
|
213
|
+
const identifiers = {
|
|
214
|
+
pointIds: arrPoint.map((point) => point.toIdentifiers()),
|
|
215
|
+
strGroupBy,
|
|
216
|
+
isTransposed,
|
|
217
|
+
};
|
|
218
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
219
|
+
};
|
|
220
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
221
|
+
return {
|
|
222
|
+
instruction: getInstruction(identifiers),
|
|
223
|
+
initTable: getInitTable(identifiers),
|
|
224
|
+
answerTable: getAnswerTable(identifiers),
|
|
225
|
+
answerFormat: "tex",
|
|
226
|
+
keys: getKeys(identifiers),
|
|
227
|
+
identifiers,
|
|
228
|
+
hint: getHint(identifiers),
|
|
229
|
+
correction: getCorrection(identifiers),
|
|
230
|
+
correctionGgbOptions: getCorrectionGGBOptions(identifiers),
|
|
231
|
+
ggbOptions: getGGBOptions(identifiers),
|
|
232
|
+
};
|
|
233
|
+
};
|
|
234
|
+
export const scatterPlotFillDataTableFromScatterPlotData = {
|
|
235
|
+
id: "scatterPlotFillDataTableFromScatterPlotData",
|
|
236
|
+
label: "Remplir un tableau avec les données issues d'un nuage de points",
|
|
237
|
+
isSingleStep: true,
|
|
238
|
+
generator: (nb, opts) => getDistinctQuestions(() => getScatterPlotFillDataTableFromScatterPlotDataQuestion(opts), nb),
|
|
239
|
+
qcmTimer: 60,
|
|
240
|
+
freeTimer: 60,
|
|
241
|
+
subject: "Mathématiques",
|
|
242
|
+
isAnswerTableValid,
|
|
243
|
+
getAnswerTable,
|
|
244
|
+
getInstruction,
|
|
245
|
+
getGGBOptions,
|
|
246
|
+
hasGeogebra: true,
|
|
247
|
+
getQuestionFromIdentifiers,
|
|
248
|
+
getHint,
|
|
249
|
+
getCorrection,
|
|
250
|
+
hasHintAndCorrection: true,
|
|
251
|
+
answerType: "valueTable",
|
|
252
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Exercise } from "../../../../exercises/exercise.js";
|
|
2
|
+
import { PointIdentifiers } from "../../../../math/geometry/point.js";
|
|
3
|
+
import { NodeIdentifiers } from "../../../../tree/nodes/nodeConstructor.js";
|
|
4
|
+
type Identifiers = {
|
|
5
|
+
pointIds: PointIdentifiers[];
|
|
6
|
+
strGroupBy: string;
|
|
7
|
+
isTransposed: boolean;
|
|
8
|
+
nodeIdsDataClasses: NodeIdentifiers[];
|
|
9
|
+
};
|
|
10
|
+
export declare const scatterPlotFillDataTableWithDataClassesFromScatterPlotData: Exercise<Identifiers>;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=scatterPlotFillDataTableWithDataClassesFromScatterPlotData.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scatterPlotFillDataTableWithDataClassesFromScatterPlotData.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/dataRepresentations/scatterPlot/scatterPlotFillDataTableWithDataClassesFromScatterPlotData.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,6BAA6B,CAAC;AAIrC,OAAO,EAGL,gBAAgB,EACjB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAEL,eAAe,EAChB,MAAM,qCAAqC,CAAC;AA0B7C,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,gBAAgB,EAAE,CAAC;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,OAAO,CAAC;IACtB,kBAAkB,EAAE,eAAe,EAAE,CAAC;CACvC,CAAC;AAwXF,eAAO,MAAM,0DAA0D,EAAE,QAAQ,CAAC,WAAW,CA2B1F,CAAC"}
|
|
@@ -0,0 +1,352 @@
|
|
|
1
|
+
import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
|
|
2
|
+
import { greenDark, greenLight, orange } from "../../../../geogebra/colors.js";
|
|
3
|
+
import { GeogebraConstructor } from "../../../../geogebra/geogebraConstructor.js";
|
|
4
|
+
import { Point, PointConstructor, } from "../../../../math/geometry/point.js";
|
|
5
|
+
import { NodeConstructor, } from "../../../../tree/nodes/nodeConstructor.js";
|
|
6
|
+
import { add } from "../../../../tree/nodes/operators/addNode.js";
|
|
7
|
+
import { ClosureType } from "../../../../tree/nodes/sets/closure.js";
|
|
8
|
+
import { IntervalNode } from "../../../../tree/nodes/sets/intervalNode.js";
|
|
9
|
+
import { numberParser } from "../../../../tree/parsers/numberParser.js";
|
|
10
|
+
import { coinFlip } from "../../../../utils/alea/coinFlip.js";
|
|
11
|
+
import { probaFlip } from "../../../../utils/alea/probaFlip.js";
|
|
12
|
+
import { probaLawFlip } from "../../../../utils/alea/probaLawFlip.js";
|
|
13
|
+
import { random } from "../../../../utils/alea/random.js";
|
|
14
|
+
import { shuffle } from "../../../../utils/alea/shuffle.js";
|
|
15
|
+
import { zip } from "../../../../utils/arrays/arrayZip.js";
|
|
16
|
+
import { getCartesiansProducts } from "../../../../utils/arrays/cartesianProducts.js";
|
|
17
|
+
import { transpose } from "../../../../utils/arrays/transpose.js";
|
|
18
|
+
import { handleVEAError } from "../../../../utils/errors/handleVEAError.js";
|
|
19
|
+
const getComponentOfPointForStrGroupBy = (point, strGroupBy) => {
|
|
20
|
+
switch (strGroupBy) {
|
|
21
|
+
case "x":
|
|
22
|
+
return point.x;
|
|
23
|
+
case "y":
|
|
24
|
+
return point.y;
|
|
25
|
+
default:
|
|
26
|
+
throw new Error("Unsupported strGroupBy: " + strGroupBy);
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
const getInstruction = () => {
|
|
30
|
+
return `Remplir le tableau avec les données issues du nuage de points ci-dessous
|
|
31
|
+
(les classes sont déjà inscrites dans le tableau).`;
|
|
32
|
+
};
|
|
33
|
+
const getInitTable = (identifiers) => {
|
|
34
|
+
const { strGroupBy, isTransposed, nodeIdsDataClasses } = identifiers;
|
|
35
|
+
const arrDataClass = nodeIdsDataClasses.map((nodeIds) => NodeConstructor.fromIdentifiers(nodeIds));
|
|
36
|
+
const tableRaw = [
|
|
37
|
+
[`$${strGroupBy}$`, ...arrDataClass.map(() => `\\ `)],
|
|
38
|
+
[
|
|
39
|
+
"\\text{classe}",
|
|
40
|
+
...arrDataClass.map((intervalNode) => intervalNode.toTex()),
|
|
41
|
+
],
|
|
42
|
+
["\\text{effectif}", ...arrDataClass.map(() => "")],
|
|
43
|
+
];
|
|
44
|
+
return isTransposed ? transpose(tableRaw) : tableRaw;
|
|
45
|
+
};
|
|
46
|
+
const getAnswerTable = (identifiers) => {
|
|
47
|
+
const { pointIds, strGroupBy, isTransposed, nodeIdsDataClasses } = identifiers;
|
|
48
|
+
const arrPoint = pointIds.map((pointIds) => PointConstructor.fromIdentifiers(pointIds));
|
|
49
|
+
const arrDataClass = nodeIdsDataClasses.map((nodeIds) => NodeConstructor.fromIdentifiers(nodeIds));
|
|
50
|
+
const arrCount = arrDataClass.map((intervalNode) => {
|
|
51
|
+
return arrPoint.filter((point) => {
|
|
52
|
+
const nodeComponent = getComponentOfPointForStrGroupBy(point, strGroupBy);
|
|
53
|
+
return intervalNode.includes(nodeComponent);
|
|
54
|
+
}).length;
|
|
55
|
+
});
|
|
56
|
+
const tableRaw = [
|
|
57
|
+
[`$${strGroupBy}$`, ...arrDataClass.map(() => `\\ `)],
|
|
58
|
+
[
|
|
59
|
+
"\\text{classe}",
|
|
60
|
+
...arrDataClass.map((intervalNode) => intervalNode.toTex()),
|
|
61
|
+
],
|
|
62
|
+
["\\text{effectif}", ...arrCount.map((v) => v.frenchify())],
|
|
63
|
+
];
|
|
64
|
+
return isTransposed ? transpose(tableRaw) : tableRaw;
|
|
65
|
+
};
|
|
66
|
+
const getHint = (identifiers) => {
|
|
67
|
+
const { strGroupBy } = identifiers;
|
|
68
|
+
return `Pour chaque classe de $${strGroupBy}$, on compte le nombre de points qui ont $${strGroupBy}$ qui appartient à la classe.`;
|
|
69
|
+
};
|
|
70
|
+
const getCorrection = (identifiers) => {
|
|
71
|
+
const { pointIds, strGroupBy, nodeIdsDataClasses } = identifiers;
|
|
72
|
+
const arrPoint = pointIds.map((pointIds) => PointConstructor.fromIdentifiers(pointIds));
|
|
73
|
+
const arrDataClass = nodeIdsDataClasses.map((nodeIds) => NodeConstructor.fromIdentifiers(nodeIds));
|
|
74
|
+
const arrCount = arrDataClass.map((intervalNode) => {
|
|
75
|
+
return arrPoint.filter((point) => {
|
|
76
|
+
const nodeComponent = getComponentOfPointForStrGroupBy(point, strGroupBy);
|
|
77
|
+
return intervalNode.includes(nodeComponent);
|
|
78
|
+
}).length;
|
|
79
|
+
});
|
|
80
|
+
return `Pour chaque classe de $${strGroupBy}$, on compte le nombre de points qui ont $${strGroupBy}$ qui appartient à la classe.
|
|
81
|
+
|
|
82
|
+
${zip(arrDataClass, arrCount).map(([intervalNode, count]) => `Il y a $${count}$ point${count === 1 ? "" : "s"} qui ${count === 1 ? "a" : "ont"} $${strGroupBy}$ dans $${intervalNode.toTex()}$.`).join(`
|
|
83
|
+
|
|
84
|
+
`)}`;
|
|
85
|
+
};
|
|
86
|
+
const getCorrectionGGBOptions = (identifiers) => {
|
|
87
|
+
const { pointIds, strGroupBy, nodeIdsDataClasses } = identifiers;
|
|
88
|
+
const arrPoint = pointIds.map((pointIds) => PointConstructor.fromIdentifiers(pointIds));
|
|
89
|
+
const arrDataClass = nodeIdsDataClasses.map((nodeIds) => NodeConstructor.fromIdentifiers(nodeIds));
|
|
90
|
+
const arrArrPoint = arrDataClass.map((intervalNode) => {
|
|
91
|
+
return arrPoint.filter((point) => {
|
|
92
|
+
const nodeComponent = getComponentOfPointForStrGroupBy(point, strGroupBy);
|
|
93
|
+
return intervalNode.includes(nodeComponent);
|
|
94
|
+
});
|
|
95
|
+
});
|
|
96
|
+
const commands = [
|
|
97
|
+
...arrArrPoint.flatMap((arrPoint, i) => arrPoint.flatMap((point) => point.toGGBCommand({
|
|
98
|
+
isFixed: true,
|
|
99
|
+
isSelectionnable: true,
|
|
100
|
+
showLabel: false,
|
|
101
|
+
size: 6,
|
|
102
|
+
style: 3,
|
|
103
|
+
color: i % 2 === 0 ? greenDark : greenLight,
|
|
104
|
+
}))),
|
|
105
|
+
...(() => {
|
|
106
|
+
switch (strGroupBy) {
|
|
107
|
+
case "x":
|
|
108
|
+
return arrDataClass.flatMap((nodeInterval, i) => {
|
|
109
|
+
return [
|
|
110
|
+
...(() => {
|
|
111
|
+
if (nodeInterval.closure === ClosureType.FF ||
|
|
112
|
+
nodeInterval.closure === ClosureType.FO) {
|
|
113
|
+
const value = nodeInterval.a.evaluate();
|
|
114
|
+
return [
|
|
115
|
+
`l${i}l = Line((${value}, 0),(${value}, 1))`,
|
|
116
|
+
`SetColor(l${i}l, "${orange}")`,
|
|
117
|
+
];
|
|
118
|
+
}
|
|
119
|
+
else {
|
|
120
|
+
return [];
|
|
121
|
+
}
|
|
122
|
+
})(),
|
|
123
|
+
...(() => {
|
|
124
|
+
if (nodeInterval.closure === ClosureType.FF ||
|
|
125
|
+
nodeInterval.closure === ClosureType.OF) {
|
|
126
|
+
const value = nodeInterval.b.evaluate();
|
|
127
|
+
return [
|
|
128
|
+
`l${i}h = Line((${value}, 0),(${value}, 1))`,
|
|
129
|
+
`SetColor(l${i}h, "${orange}")`,
|
|
130
|
+
];
|
|
131
|
+
}
|
|
132
|
+
else {
|
|
133
|
+
return [];
|
|
134
|
+
}
|
|
135
|
+
})(),
|
|
136
|
+
];
|
|
137
|
+
});
|
|
138
|
+
case "y":
|
|
139
|
+
return arrDataClass.flatMap((nodeInterval, i) => {
|
|
140
|
+
return [
|
|
141
|
+
...(() => {
|
|
142
|
+
if (nodeInterval.closure === ClosureType.FF ||
|
|
143
|
+
nodeInterval.closure === ClosureType.FO) {
|
|
144
|
+
const value = nodeInterval.a.evaluate();
|
|
145
|
+
return [
|
|
146
|
+
`l${i}l = Line((0, ${value}),(1,${value}))`,
|
|
147
|
+
`SetColor(l${i}l, "${orange}")`,
|
|
148
|
+
];
|
|
149
|
+
}
|
|
150
|
+
else {
|
|
151
|
+
return [];
|
|
152
|
+
}
|
|
153
|
+
})(),
|
|
154
|
+
...(() => {
|
|
155
|
+
if (nodeInterval.closure === ClosureType.FF ||
|
|
156
|
+
nodeInterval.closure === ClosureType.OF) {
|
|
157
|
+
const value = nodeInterval.b.evaluate();
|
|
158
|
+
return [
|
|
159
|
+
`l${i}h = Line((0, ${value}),(1,${value}))`,
|
|
160
|
+
`SetColor(l${i}h, "${orange}")`,
|
|
161
|
+
];
|
|
162
|
+
}
|
|
163
|
+
else {
|
|
164
|
+
return [];
|
|
165
|
+
}
|
|
166
|
+
})(),
|
|
167
|
+
];
|
|
168
|
+
});
|
|
169
|
+
default:
|
|
170
|
+
throw new Error("Unsupported strGroupBy: " + strGroupBy);
|
|
171
|
+
}
|
|
172
|
+
})(),
|
|
173
|
+
];
|
|
174
|
+
const ggb = new GeogebraConstructor({
|
|
175
|
+
commands,
|
|
176
|
+
hideGrid: true,
|
|
177
|
+
fontSize: 16,
|
|
178
|
+
xAxis: {
|
|
179
|
+
showPositive: true,
|
|
180
|
+
label: "x",
|
|
181
|
+
steps: 1,
|
|
182
|
+
},
|
|
183
|
+
yAxis: {
|
|
184
|
+
showPositive: true,
|
|
185
|
+
label: "y",
|
|
186
|
+
steps: 1,
|
|
187
|
+
},
|
|
188
|
+
});
|
|
189
|
+
return ggb.getOptions({
|
|
190
|
+
coords: ggb.getAdaptedCoords({
|
|
191
|
+
xMin: -1,
|
|
192
|
+
xMax: 6,
|
|
193
|
+
yMin: -1,
|
|
194
|
+
yMax: 6,
|
|
195
|
+
}),
|
|
196
|
+
});
|
|
197
|
+
};
|
|
198
|
+
const getGGBOptions = (identifiers) => {
|
|
199
|
+
const { pointIds } = identifiers;
|
|
200
|
+
const arrPoint = pointIds.map((pointIds) => PointConstructor.fromIdentifiers(pointIds));
|
|
201
|
+
const commands = [
|
|
202
|
+
...arrPoint.flatMap((point) => point.toGGBCommand({
|
|
203
|
+
isFixed: true,
|
|
204
|
+
isSelectionnable: true,
|
|
205
|
+
showLabel: false,
|
|
206
|
+
size: 5,
|
|
207
|
+
style: 3,
|
|
208
|
+
})),
|
|
209
|
+
];
|
|
210
|
+
const ggb = new GeogebraConstructor({
|
|
211
|
+
commands,
|
|
212
|
+
hideGrid: false,
|
|
213
|
+
fontSize: 16,
|
|
214
|
+
xAxis: {
|
|
215
|
+
showPositive: true,
|
|
216
|
+
label: "x",
|
|
217
|
+
steps: 1,
|
|
218
|
+
},
|
|
219
|
+
yAxis: {
|
|
220
|
+
showPositive: true,
|
|
221
|
+
label: "y",
|
|
222
|
+
steps: 1,
|
|
223
|
+
},
|
|
224
|
+
});
|
|
225
|
+
return ggb.getOptions({
|
|
226
|
+
coords: ggb.getAdaptedCoords({
|
|
227
|
+
xMin: -1,
|
|
228
|
+
xMax: 6,
|
|
229
|
+
yMin: -1,
|
|
230
|
+
yMax: 6,
|
|
231
|
+
}),
|
|
232
|
+
});
|
|
233
|
+
};
|
|
234
|
+
const getKeys = () => {
|
|
235
|
+
return [];
|
|
236
|
+
};
|
|
237
|
+
const isAnswerTableValid = (ans, { answerTable }) => {
|
|
238
|
+
try {
|
|
239
|
+
return answerTable[2].every((answer, i) => {
|
|
240
|
+
const ansParsed = numberParser(ans[2][i]);
|
|
241
|
+
const answerParsed = numberParser(answer);
|
|
242
|
+
return ansParsed === answerParsed;
|
|
243
|
+
});
|
|
244
|
+
}
|
|
245
|
+
catch (err) {
|
|
246
|
+
return handleVEAError(err);
|
|
247
|
+
}
|
|
248
|
+
};
|
|
249
|
+
const getScatterPlotFillDataTableWithDataClassesFromScatterPlotDataQuestion = () => {
|
|
250
|
+
const length = 6;
|
|
251
|
+
const height = 6;
|
|
252
|
+
const arrArrDict1 = getCartesiansProducts([
|
|
253
|
+
[...Array(length).keys()].map((i) => i + 1),
|
|
254
|
+
[...Array(height).keys()].map((i) => i + 1),
|
|
255
|
+
]).map(([x, y]) => {
|
|
256
|
+
return {
|
|
257
|
+
x,
|
|
258
|
+
y,
|
|
259
|
+
isActivated: probaFlip(0.14),
|
|
260
|
+
};
|
|
261
|
+
});
|
|
262
|
+
const arrArrDict2 = getCartesiansProducts([
|
|
263
|
+
[...Array(length - 1).keys()].map((i) => i + 1),
|
|
264
|
+
[...Array(height - 1).keys()].map((i) => i + 1),
|
|
265
|
+
]).map(([x, y]) => {
|
|
266
|
+
return {
|
|
267
|
+
x: x + 0.333,
|
|
268
|
+
y: y + 0.333,
|
|
269
|
+
isActivated: probaFlip(0.14),
|
|
270
|
+
};
|
|
271
|
+
});
|
|
272
|
+
const arrArrDict3 = getCartesiansProducts([
|
|
273
|
+
[...Array(length - 1).keys()].map((i) => i + 1),
|
|
274
|
+
[...Array(height - 1).keys()].map((i) => i + 1),
|
|
275
|
+
]).map(([x, y]) => {
|
|
276
|
+
return {
|
|
277
|
+
x: x + 0.666,
|
|
278
|
+
y: y + 0.666,
|
|
279
|
+
isActivated: probaFlip(0.14),
|
|
280
|
+
};
|
|
281
|
+
});
|
|
282
|
+
//at least one point should be activated
|
|
283
|
+
{
|
|
284
|
+
const dictRandom = random(arrArrDict1);
|
|
285
|
+
dictRandom.isActivated = true;
|
|
286
|
+
}
|
|
287
|
+
const arrPoint = [...arrArrDict1, ...arrArrDict2, ...arrArrDict3]
|
|
288
|
+
.filter(({ isActivated }) => isActivated)
|
|
289
|
+
.map(({ x, y }, i) => new Point(`P${i}`, x, y));
|
|
290
|
+
const strGroupBy = coinFlip() ? "x" : "y";
|
|
291
|
+
const isTransposed = coinFlip();
|
|
292
|
+
const templateArrLengthDataClass = probaLawFlip([
|
|
293
|
+
[[1, 1, 1, 2], 0.2],
|
|
294
|
+
[[1, 2, 2], 0.4],
|
|
295
|
+
[[1, 1, 3], 0.3],
|
|
296
|
+
[[2, 3], 0.1],
|
|
297
|
+
]);
|
|
298
|
+
const arrLengthDataClass = shuffle(templateArrLengthDataClass);
|
|
299
|
+
const arrDataClass = arrLengthDataClass.reduce((acc, lengthDataClass, i, arr) => {
|
|
300
|
+
const nodeBoundLow = acc.nodeBoundLowWork;
|
|
301
|
+
const nodeBoundHigh = add(nodeBoundLow, lengthDataClass).simplify({
|
|
302
|
+
towardsDistribute: true,
|
|
303
|
+
});
|
|
304
|
+
const nodeDataClass = new IntervalNode(nodeBoundLow, nodeBoundHigh, i === arr.length - 1 ? ClosureType.FF : ClosureType.FO);
|
|
305
|
+
acc.dataClasses.push(nodeDataClass);
|
|
306
|
+
acc.nodeBoundLowWork = nodeBoundHigh;
|
|
307
|
+
return acc;
|
|
308
|
+
}, {
|
|
309
|
+
nodeBoundLowWork: (1).toTree(),
|
|
310
|
+
dataClasses: [],
|
|
311
|
+
}).dataClasses;
|
|
312
|
+
const identifiers = {
|
|
313
|
+
pointIds: arrPoint.map((point) => point.toIdentifiers()),
|
|
314
|
+
strGroupBy,
|
|
315
|
+
isTransposed,
|
|
316
|
+
nodeIdsDataClasses: arrDataClass.map((node) => node.toIdentifiers()),
|
|
317
|
+
};
|
|
318
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
319
|
+
};
|
|
320
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
321
|
+
return {
|
|
322
|
+
instruction: getInstruction(identifiers),
|
|
323
|
+
initTable: getInitTable(identifiers),
|
|
324
|
+
answerTable: getAnswerTable(identifiers),
|
|
325
|
+
answerFormat: "tex",
|
|
326
|
+
keys: getKeys(identifiers),
|
|
327
|
+
identifiers,
|
|
328
|
+
hint: getHint(identifiers),
|
|
329
|
+
correction: getCorrection(identifiers),
|
|
330
|
+
correctionGgbOptions: getCorrectionGGBOptions(identifiers),
|
|
331
|
+
ggbOptions: getGGBOptions(identifiers),
|
|
332
|
+
};
|
|
333
|
+
};
|
|
334
|
+
export const scatterPlotFillDataTableWithDataClassesFromScatterPlotData = {
|
|
335
|
+
id: "scatterPlotFillDataTableWithDataClassesFromScatterPlotData",
|
|
336
|
+
label: "Remplir un tableau avec les données issues d'un nuage de points (avec des classes)",
|
|
337
|
+
isSingleStep: true,
|
|
338
|
+
generator: (nb, opts) => getDistinctQuestions(() => getScatterPlotFillDataTableWithDataClassesFromScatterPlotDataQuestion(opts), nb),
|
|
339
|
+
qcmTimer: 60,
|
|
340
|
+
freeTimer: 60,
|
|
341
|
+
subject: "Mathématiques",
|
|
342
|
+
isAnswerTableValid,
|
|
343
|
+
getAnswerTable,
|
|
344
|
+
getInstruction,
|
|
345
|
+
getGGBOptions,
|
|
346
|
+
hasGeogebra: true,
|
|
347
|
+
getQuestionFromIdentifiers,
|
|
348
|
+
getHint,
|
|
349
|
+
getCorrection,
|
|
350
|
+
hasHintAndCorrection: true,
|
|
351
|
+
answerType: "valueTable",
|
|
352
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Exercise } from "../../../../exercises/exercise.js";
|
|
2
|
+
import { PointIdentifiers } from "../../../../math/geometry/point.js";
|
|
3
|
+
import { NodeIdentifiers } from "../../../../tree/nodes/nodeConstructor.js";
|
|
4
|
+
type Identifiers = {
|
|
5
|
+
pointIds: PointIdentifiers[];
|
|
6
|
+
strGroupBy: string;
|
|
7
|
+
nodeIdsDataClass: NodeIdentifiers;
|
|
8
|
+
};
|
|
9
|
+
export declare const scatterPlotInterpreting: Exercise<Identifiers>;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=scatterPlotInterpreting.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scatterPlotInterpreting.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/dataRepresentations/scatterPlot/scatterPlotInterpreting.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAgBT,MAAM,6BAA6B,CAAC;AAKrC,OAAO,EAGL,gBAAgB,EACjB,MAAM,8BAA8B,CAAC;AAGtC,OAAO,EAEL,eAAe,EAChB,MAAM,qCAAqC,CAAC;AAwC7C,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,gBAAgB,EAAE,CAAC;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,gBAAgB,EAAE,eAAe,CAAC;CACnC,CAAC;AA2aF,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,WAAW,CAmBzD,CAAC"}
|