math-exercises 3.0.126 → 3.0.127
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/calcul/mentalCaluls/mentalProgramSolve.d.ts +1 -1
- package/lib/exercises/math/calcul/mentalCaluls/mentalProgramSolve.d.ts.map +1 -1
- package/lib/exercises/math/calcul/mentalCaluls/mentalProgramSolve.js +56 -42
- package/lib/exercises/math/calcul/ordering/compareABUsingQuotient.d.ts.map +1 -1
- package/lib/exercises/math/calcul/ordering/compareABUsingQuotient.js +5 -103
- package/lib/exercises/math/calcul/ordering/compareFracABWithFracAPlusCBPlusC.d.ts.map +1 -1
- package/lib/exercises/math/calcul/ordering/compareFracABWithFracAPlusCBPlusC.js +22 -8
- package/lib/exercises/math/calcul/ordering/compareFracAndDec.d.ts.map +1 -1
- package/lib/exercises/math/calcul/ordering/compareFracAndDec.js +7 -6
- package/lib/exercises/math/calcul/ordering/compareWithSquareRoots.d.ts.map +1 -1
- package/lib/exercises/math/calcul/ordering/compareWithSquareRoots.js +4 -4
- package/lib/exercises/math/calculLitteral/equation/equationFromProblem.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/equationFromProblem.js +57 -17
- package/lib/exercises/math/calculLitteral/isolate/isolateUInInvXPlusInvYEqualsInvU.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/isolate/isolateUInInvXPlusInvYEqualsInvU.js +6 -27
- package/lib/exercises/math/calculLitteral/ordering/compareAMinusB.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/ordering/compareAMinusB.js +3 -5
- package/lib/exercises/math/calculLitteral/ordering/compareFromPiMinusFrac.js +1 -1
- package/lib/exercises/math/calculLitteral/writing/writeLitExpFromFrenchExp.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/writing/writeLitExpFromFrenchExp.js +69 -23
- package/lib/exercises/math/conversion/kmPerMinToKmPerHourConversion.d.ts +4 -1
- package/lib/exercises/math/conversion/kmPerMinToKmPerHourConversion.d.ts.map +1 -1
- package/lib/exercises/math/conversion/kmPerMinToKmPerHourConversion.js +52 -34
- package/lib/exercises/math/conversion/prefixToNumber.d.ts.map +1 -1
- package/lib/exercises/math/conversion/prefixToNumber.js +14 -4
- package/lib/exercises/math/conversion/secondsToHours.js +1 -1
- package/lib/exercises/math/dataRepresentations/barChartInterpreting.d.ts +5 -2
- package/lib/exercises/math/dataRepresentations/barChartInterpreting.d.ts.map +1 -1
- package/lib/exercises/math/dataRepresentations/barChartInterpreting.js +47 -31
- package/lib/exercises/math/dataRepresentations/cartesianGraphExtremaReading.d.ts.map +1 -1
- package/lib/exercises/math/dataRepresentations/cartesianGraphExtremaReading.js +5 -4
- package/lib/exercises/math/dataRepresentations/dataToGraphGraphToData.js +4 -4
- package/lib/exercises/math/dataRepresentations/graphReading.js +13 -13
- package/lib/exercises/math/dataRepresentations/histogramReading.d.ts.map +1 -1
- package/lib/exercises/math/dataRepresentations/histogramReading.js +32 -32
- package/lib/exercises/math/dataRepresentations/plausibleGraph.d.ts.map +1 -1
- package/lib/exercises/math/dataRepresentations/plausibleGraph.js +53 -4
- package/lib/exercises/math/functions/affines/coordsOfPointOnAffineFindX.d.ts.map +1 -1
- package/lib/exercises/math/functions/affines/coordsOfPointOnAffineFindX.js +17 -3
- package/lib/exercises/math/functions/affines/coordsOfPointOnAffineFindY.d.ts.map +1 -1
- package/lib/exercises/math/functions/affines/coordsOfPointOnAffineFindY.js +27 -9
- package/lib/exercises/math/functions/affines/drawAffineFromProgCalc.d.ts.map +1 -1
- package/lib/exercises/math/functions/affines/drawAffineFromProgCalc.js +33 -16
- package/lib/exercises/math/functions/affines/representationOfAffine.d.ts +3 -0
- package/lib/exercises/math/functions/affines/representationOfAffine.d.ts.map +1 -1
- package/lib/exercises/math/functions/affines/representationOfAffine.js +121 -30
- package/lib/exercises/math/functions/basics/coordsOfPointOnCurveFindY.d.ts.map +1 -1
- package/lib/exercises/math/functions/basics/coordsOfPointOnCurveFindY.js +29 -10
- package/lib/exercises/math/functions/composition/functionComposition.d.ts.map +1 -1
- package/lib/exercises/math/functions/composition/functionComposition.js +2 -2
- package/lib/exercises/math/probaStat/basicProbas/possibleValuesForProba.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/basicProbas/possibleValuesForProba.js +24 -9
- package/lib/exercises/math/probaStat/conditionalProbaWriteFromFrench.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/conditionalProbaWriteFromFrench.js +9 -5
- package/lib/exercises/math/probaStat/probaAsSumOfProbas.d.ts +0 -1
- package/lib/exercises/math/probaStat/probaAsSumOfProbas.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/probaAsSumOfProbas.js +13 -14
- package/lib/exercises/math/probaStat/stats1var/interpretIndicatorsForLists.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats1var/interpretIndicatorsForLists.js +2 -3
- package/lib/exercises/math/probaStat/stats1var/plausibilityOfAverage.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats1var/plausibilityOfAverage.js +26 -25
- package/lib/index.d.ts +10 -5
- package/lib/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -4,7 +4,7 @@ type Identifiers = {
|
|
|
4
4
|
itemAsked: AskedItem;
|
|
5
5
|
questionStr: string;
|
|
6
6
|
answerStr: string;
|
|
7
|
-
displayType:
|
|
7
|
+
displayType: string;
|
|
8
8
|
};
|
|
9
9
|
type AskedItem = {
|
|
10
10
|
type: "xForCategory" | "categoryForX";
|
|
@@ -45,6 +45,9 @@ type BarChart = {
|
|
|
45
45
|
bars: Bar[];
|
|
46
46
|
categories: Category[];
|
|
47
47
|
};
|
|
48
|
-
|
|
48
|
+
type Options = {
|
|
49
|
+
displayType: string;
|
|
50
|
+
};
|
|
51
|
+
export declare const barChartInterpreting: Exercise<Identifiers, Options>;
|
|
49
52
|
export {};
|
|
50
53
|
//# sourceMappingURL=barChartInterpreting.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"barChartInterpreting.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/dataRepresentations/barChartInterpreting.ts"],"names":[],"mappings":"AAAA,OAAO,EAaL,QAAQ,
|
|
1
|
+
{"version":3,"file":"barChartInterpreting.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/dataRepresentations/barChartInterpreting.ts"],"names":[],"mappings":"AAAA,OAAO,EAaL,QAAQ,EAKT,MAAM,6BAA6B,CAAC;AAYrC,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,QAAQ,CAAC;IACnB,SAAS,EAAE,SAAS,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,KAAK,SAAS,GAAG;IACf,IAAI,EAAE,cAAc,GAAG,cAAc,CAAC;IACtC,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,KAAK,UAAU,GAAG;IAChB,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,KAAK,SAAS,GAAG;IACf,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,KAAK,aAAa,GAAG;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,KAAK,aAAa,GAAG,UAAU,GAAG,SAAS,CAAC;AAE5C,KAAK,QAAQ,GAAG;IACd,KAAK,EAAE,aAAa,CAAC;IACrB,KAAK,EAAE,aAAa,CAAC;CACtB,CAAC;AAEF,KAAK,QAAQ,GAAG;IACd,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,KAAK,GAAG,GAAG;IACT,KAAK,EAAE,QAAQ,CAAC;IAChB,IAAI,EAAE,MAAM,EAAE,CAAC;CAChB,CAAC;AAEF,KAAK,QAAQ,GAAG;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,IAAI,EAAE,GAAG,EAAE,CAAC;IACZ,UAAU,EAAE,QAAQ,EAAE,CAAC;CACxB,CAAC;AAotBF,KAAK,OAAO,GAAG;IACb,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAsBF,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAgB/D,CAAC"}
|
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../exercises/exercise.js";
|
|
1
|
+
import { addValidProp, shuffleProps, tryToAddWrongProp, GeneratorOptionTarget, GeneratorOptionType, } from "../../../exercises/exercise.js";
|
|
2
2
|
import { random, randomMany } from "../../../utils/alea/random.js";
|
|
3
3
|
import { randfloat } from "../../../math/utils/random/randfloat.js";
|
|
4
|
-
import { blueMain, greenMain, orange,
|
|
4
|
+
import { blueMain, greenMain, orange, red } from "../../../geogebra/colors.js";
|
|
5
5
|
import { coinFlip } from "../../../utils/alea/coinFlip.js";
|
|
6
6
|
import { probaLawFlip } from "../../../utils/alea/probaLawFlip.js";
|
|
7
7
|
import { getDistinctQuestions } from "../../../exercises/utils/getDistinctQuestions.js";
|
|
8
8
|
import { randint } from "../../../math/utils/random/randint.js";
|
|
9
9
|
import { GeogebraConstructor } from "../../../geogebra/geogebraConstructor.js";
|
|
10
10
|
import { capitalize } from "../../../utils/strings/capitalize.js";
|
|
11
|
+
import { shuffle } from "../../../utils/alea/shuffle.js";
|
|
11
12
|
class BarChartConstructor {
|
|
12
13
|
static stylesPools = {
|
|
13
14
|
color: [
|
|
14
15
|
{
|
|
15
16
|
type: "color",
|
|
16
|
-
color:
|
|
17
|
-
frStr: "
|
|
17
|
+
color: blueMain,
|
|
18
|
+
frStr: "bleu",
|
|
18
19
|
},
|
|
19
20
|
{
|
|
20
21
|
type: "color",
|
|
@@ -23,13 +24,8 @@ class BarChartConstructor {
|
|
|
23
24
|
},
|
|
24
25
|
{
|
|
25
26
|
type: "color",
|
|
26
|
-
color:
|
|
27
|
-
frStr: "
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
type: "color",
|
|
31
|
-
color: blueMain,
|
|
32
|
-
frStr: "bleu",
|
|
27
|
+
color: red,
|
|
28
|
+
frStr: "rouge",
|
|
33
29
|
},
|
|
34
30
|
{
|
|
35
31
|
type: "color",
|
|
@@ -102,7 +98,7 @@ class BarChartConstructor {
|
|
|
102
98
|
}
|
|
103
99
|
static createRandomCategories(dictIsUsingCategory, categoryPropsPool, styleType) {
|
|
104
100
|
const nbCategUsed = Object.keys(dictIsUsingCategory).length;
|
|
105
|
-
const styles =
|
|
101
|
+
const styles = shuffle(this.stylesPools[styleType].slice(0, nbCategUsed));
|
|
106
102
|
return categoryPropsPool
|
|
107
103
|
.filter((_, i) => dictIsUsingCategory[i])
|
|
108
104
|
.map((props, i) => {
|
|
@@ -117,7 +113,7 @@ class BarChartConstructor {
|
|
|
117
113
|
const frenchOrdinals = [``, "deuxième", "troisième", "quatrième"];
|
|
118
114
|
const arrayOfBarChartSkeleton = [
|
|
119
115
|
{
|
|
120
|
-
description: `Le diagramme en barres ci-
|
|
116
|
+
description: `Le diagramme en barres ci-dessous donne la production d'électricité, en TWh (téraWatt-heure) selon son origine.`,
|
|
121
117
|
questionXForCategFunc(categName, isLess, ordinal) {
|
|
122
118
|
return `Quelle était l'année où la production d'électricité d'origine ${categName.toLocaleLowerCase()} était
|
|
123
119
|
la ${ordinal > 0 ? `${frenchOrdinals[ordinal]} la` : ``} ${isLess ? `moins` : `plus`} importante de toutes ces années ?`;
|
|
@@ -127,12 +123,10 @@ la ${ordinal > 0 ? `${frenchOrdinals[ordinal]} la` : ``} ${isLess ? `moins` : `
|
|
|
127
123
|
la ${ordinal > 0 ? `${frenchOrdinals[ordinal]} la` : ``} ${isLess ? `moins` : `plus`} importante de toutes ces années`;
|
|
128
124
|
},
|
|
129
125
|
questionCategForXFunc(barLabel, isLess, ordinal) {
|
|
130
|
-
return `Quelle était
|
|
131
|
-
la ${ordinal > 0 ? `${frenchOrdinals[ordinal]} la` : ``} ${isLess ? `moins` : `plus`} importante pour l'année $${barLabel}$ ?`;
|
|
126
|
+
return `Quelle était la ${ordinal > 0 ? `${frenchOrdinals[ordinal]}` : ``} ${isLess ? `moins` : `plus`} importante origine de production d'électricité pour l'année $${barLabel}$ ?`;
|
|
132
127
|
},
|
|
133
128
|
answerCategForXFunc(barLabel, isLess, ordinal) {
|
|
134
|
-
return `la production d'électricité
|
|
135
|
-
la ${ordinal > 0 ? `${frenchOrdinals[ordinal]} la` : ``} ${isLess ? `moins` : `plus`} importante pour l'année $${barLabel}$`;
|
|
129
|
+
return `la ${ordinal > 0 ? `${frenchOrdinals[ordinal]} la` : ``} ${isLess ? `moins` : `plus`} importante origine de production d'électricité pour l'année $${barLabel}$`;
|
|
136
130
|
},
|
|
137
131
|
axisLabels: ["Année", "Production d'électricité (en TWh)"],
|
|
138
132
|
categoryProps: (() => {
|
|
@@ -411,30 +405,37 @@ const getGGBOptionsVertStacked = (identifiers) => {
|
|
|
411
405
|
}),
|
|
412
406
|
});
|
|
413
407
|
};
|
|
414
|
-
const getGGBOptions = (identifiers) => {
|
|
408
|
+
const getGGBOptions = (identifiers, opts) => {
|
|
415
409
|
const { displayType } = identifiers;
|
|
416
410
|
switch (displayType) {
|
|
417
|
-
case "
|
|
418
|
-
return
|
|
419
|
-
|
|
420
|
-
|
|
411
|
+
case "empilements":
|
|
412
|
+
return getGGBOptionsVertStacked(identifiers, opts);
|
|
413
|
+
default:
|
|
414
|
+
case "faisceaux":
|
|
415
|
+
return getGGBOptionsHorizMulti(identifiers, opts);
|
|
421
416
|
}
|
|
422
417
|
};
|
|
423
|
-
const getBarChartInterpretingQuestion = () => {
|
|
424
|
-
|
|
425
|
-
const
|
|
418
|
+
const getBarChartInterpretingQuestion = (optsIn) => {
|
|
419
|
+
console.log("optsIn", optsIn);
|
|
420
|
+
const arrayedOptions = optsIn ?? optsDefault;
|
|
421
|
+
const opts = {
|
|
422
|
+
displayType: random(arrayedOptions.displayType),
|
|
423
|
+
};
|
|
424
|
+
const styleType = "color";
|
|
425
|
+
const displayType = opts.displayType;
|
|
426
426
|
let nbBars;
|
|
427
427
|
let nbCateg;
|
|
428
428
|
switch (displayType) {
|
|
429
|
-
case "
|
|
429
|
+
case "empilements":
|
|
430
430
|
{
|
|
431
|
-
nbBars =
|
|
431
|
+
nbBars = 5;
|
|
432
432
|
nbCateg = 3;
|
|
433
433
|
}
|
|
434
434
|
break;
|
|
435
|
-
|
|
435
|
+
default:
|
|
436
|
+
case "faisceaux":
|
|
436
437
|
{
|
|
437
|
-
nbBars =
|
|
438
|
+
nbBars = 3;
|
|
438
439
|
nbCateg = 3;
|
|
439
440
|
}
|
|
440
441
|
break;
|
|
@@ -485,9 +486,9 @@ const getBarChartInterpretingQuestion = () => {
|
|
|
485
486
|
questionStr,
|
|
486
487
|
answerStr,
|
|
487
488
|
displayType,
|
|
488
|
-
});
|
|
489
|
+
}, opts);
|
|
489
490
|
};
|
|
490
|
-
const getQuestionFromIdentifiers = (identifiers) => {
|
|
491
|
+
const getQuestionFromIdentifiers = (identifiers, opts) => {
|
|
491
492
|
const question = {
|
|
492
493
|
answer: getAnswer(identifiers),
|
|
493
494
|
instruction: getInstruction(identifiers),
|
|
@@ -497,14 +498,29 @@ const getQuestionFromIdentifiers = (identifiers) => {
|
|
|
497
498
|
hint: getHint(identifiers),
|
|
498
499
|
correction: getCorrection(identifiers),
|
|
499
500
|
ggbOptions: getGGBOptions(identifiers),
|
|
501
|
+
options: opts,
|
|
500
502
|
};
|
|
501
503
|
return question;
|
|
502
504
|
};
|
|
505
|
+
const optsDefault = {
|
|
506
|
+
displayType: ["faisceaux", "empilements"],
|
|
507
|
+
};
|
|
508
|
+
const options = [
|
|
509
|
+
{
|
|
510
|
+
id: "displayType",
|
|
511
|
+
label: "Type de diagramme",
|
|
512
|
+
target: GeneratorOptionTarget.generation,
|
|
513
|
+
type: GeneratorOptionType.multiselect,
|
|
514
|
+
values: ["faisceaux", "empilements"],
|
|
515
|
+
defaultValue: optsDefault.displayType,
|
|
516
|
+
},
|
|
517
|
+
];
|
|
503
518
|
export const barChartInterpreting = {
|
|
504
519
|
id: "barChartInterpreting",
|
|
505
520
|
label: "Interpréter un diagramme en bâtons",
|
|
506
521
|
isSingleStep: true,
|
|
507
522
|
generator: (nb, opts) => getDistinctQuestions(() => getBarChartInterpretingQuestion(opts), nb),
|
|
523
|
+
options,
|
|
508
524
|
qcmTimer: 60,
|
|
509
525
|
freeTimer: 60,
|
|
510
526
|
getPropositions,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cartesianGraphExtremaReading.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/dataRepresentations/cartesianGraphExtremaReading.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,6BAA6B,CAAC;AAQrC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,OAAO,CAAC;CACjB,CAAC;
|
|
1
|
+
{"version":3,"file":"cartesianGraphExtremaReading.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/dataRepresentations/cartesianGraphExtremaReading.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,6BAA6B,CAAC;AAQrC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,OAAO,CAAC;CACjB,CAAC;AA6JF,eAAO,MAAM,4BAA4B,EAAE,QAAQ,CAAC,WAAW,CAsB9D,CAAC"}
|
|
@@ -35,13 +35,14 @@ Durant cette période, en quelle année y a-t-il eu le ${isLess ? `moins` : `plu
|
|
|
35
35
|
};
|
|
36
36
|
const getHint = (identifiers) => {
|
|
37
37
|
const { isLess } = identifiers;
|
|
38
|
-
return `Observe quand la courbe
|
|
38
|
+
return `Observe quand la courbe atteint son ${isLess ? `minimum` : `maximum`}.`;
|
|
39
39
|
};
|
|
40
40
|
const getCorrection = (identifiers) => {
|
|
41
|
-
const { isLess } = identifiers;
|
|
41
|
+
const { isLess, answerIndex, yValues } = identifiers;
|
|
42
|
+
const yAnswer = yValues[answerIndex];
|
|
42
43
|
const answer = getAnswer(identifiers);
|
|
43
|
-
return `La courbe
|
|
44
|
-
Donc c'est en $${answer}$ qu'il y a eu le ${isLess ? `moins` : `plus`} de naissances en
|
|
44
|
+
return `La courbe atteint son ${isLess ? `minimum` : `maximum`} en $${answer}$.
|
|
45
|
+
Donc c'est en $${answer}$ qu'il y a eu le ${isLess ? `moins` : `plus`} de naissances (il y en a eu $${(yAnswer * 1000).frenchify()}$).
|
|
45
46
|
`;
|
|
46
47
|
};
|
|
47
48
|
const getGGBOptions = (identifiers) => {
|
|
@@ -11,7 +11,7 @@ et les autres ont plus de $65$ ans.`,
|
|
|
11
11
|
answer: "a",
|
|
12
12
|
hint: (n) => `$${n}$ est le tiers de $${n * 3}$.`,
|
|
13
13
|
correction: (n) => `Comme $${n}$ est le tiers de $${n * 3}$
|
|
14
|
-
alors seul le
|
|
14
|
+
alors seul le graphique $a$ convient, car c'est le seul à contenir un tiers de disque.`,
|
|
15
15
|
},
|
|
16
16
|
{
|
|
17
17
|
description: (n) => `Sur $${n * 5}$ personnes :
|
|
@@ -33,7 +33,7 @@ et les autres ont plus de $65$ ans.`,
|
|
|
33
33
|
answer: "c",
|
|
34
34
|
hint: (n) => `$${n}$ est le dixième de $${n * 10}$.`,
|
|
35
35
|
correction: (n) => `Comme $${n}$ est le dixième de $${n * 10}$
|
|
36
|
-
alors
|
|
36
|
+
alors seul le graphique $c$ convient.`,
|
|
37
37
|
},
|
|
38
38
|
{
|
|
39
39
|
description: (n) => `Sur $${n * 5}$ personnes :
|
|
@@ -44,8 +44,8 @@ et les autres ont plus de $65$ ans.`,
|
|
|
44
44
|
hint: (n) => `$${n * 2.5}$ est la moitié de $${n * 5}$.`,
|
|
45
45
|
correction: (n) => `Comme $${n * 2.5}$ est la moitié de $${n * 5}$
|
|
46
46
|
alors seuls les graphiques $b$ et $d$ conviennent.
|
|
47
|
-
De plus
|
|
48
|
-
et
|
|
47
|
+
De plus $${(n * 5) / 4}$ est le quart de $${n * 5}$
|
|
48
|
+
et seul le graphique D contient un secteur représentant le quart du cercle.`,
|
|
49
49
|
},
|
|
50
50
|
];
|
|
51
51
|
const getInstruction = (identifiers) => {
|
|
@@ -14,43 +14,43 @@ const situations = [
|
|
|
14
14
|
interval: { min: 2003, max: 2006 },
|
|
15
15
|
maxValue: 830_000,
|
|
16
16
|
answerIndexes: [0],
|
|
17
|
-
hint: `Observe les variations du
|
|
18
|
-
correction: `Comme la courbe
|
|
17
|
+
hint: `Observe les variations du graphique entre $2003$ et $2006$. Monotone signifie "que croissant" ou "que décroissant".`,
|
|
18
|
+
correction: `Comme la courbe est croissante entre $2003$ et $2006$ alors le nombre de naissances n'a pas cessé de croitre entre $2003$ et $2006$.`,
|
|
19
19
|
},
|
|
20
20
|
{
|
|
21
21
|
interval: { min: 2003, max: 2007 },
|
|
22
22
|
maxValue: 830_000,
|
|
23
23
|
answerIndexes: [1, 2],
|
|
24
|
-
hint: `Observe les variations du
|
|
25
|
-
correction: `Comme la courbe
|
|
24
|
+
hint: `Observe les variations du graphique entre $2003$ et $2007$. Monotone signifie "uniquement croissant" ou "uniquement décroissant".`,
|
|
25
|
+
correction: `Comme la courbe est croissante entre $2003$ et $2006$, puis est décroissante entre $2006$ et $2007$ alors le nombre de naissances a augmenté puis diminué entre $2003$ et $2007$.`,
|
|
26
26
|
},
|
|
27
27
|
{
|
|
28
28
|
interval: { min: 2007, max: 2008 },
|
|
29
29
|
maxValue: 828_000,
|
|
30
30
|
answerIndexes: [0],
|
|
31
|
-
hint: `Observe les variations du
|
|
32
|
-
correction: `Comme la courbe
|
|
31
|
+
hint: `Observe les variations du graphique entre $2007$ et $2008$. Monotone signifie "uniquement croissant" ou "uniquement décroissant".`,
|
|
32
|
+
correction: `Comme la courbe est croissante entre $2007$ et $2008$ alors le nombre de naissances n'a pas cessé de croitre entre $2007$ et $2008$.`,
|
|
33
33
|
},
|
|
34
34
|
{
|
|
35
35
|
interval: { min: 2006, max: 2008 },
|
|
36
36
|
maxValue: 830_000,
|
|
37
37
|
answerIndexes: [1],
|
|
38
|
-
hint: `Observe les variations du
|
|
39
|
-
correction: `Comme la courbe
|
|
38
|
+
hint: `Observe les variations du graphique entre $2006$ et $2008$. Monotone signifie "uniquement croissant" ou "uniquement décroissant".`,
|
|
39
|
+
correction: `Comme la courbe est décroissante entre $2006$ et $2007$ puis est croissante entre $2007$ et $2008$ alors le nombre de naissances a diminué puis augmenté entre $2006$ et $2008$.`,
|
|
40
40
|
},
|
|
41
41
|
{
|
|
42
42
|
interval: { min: 2008, max: 2009 },
|
|
43
43
|
maxValue: 828_000,
|
|
44
44
|
answerIndexes: [],
|
|
45
|
-
hint: `Observe les variations du
|
|
46
|
-
correction: `Comme la courbe
|
|
45
|
+
hint: `Observe les variations du graphique entre $2008$ et $2009$. Monotone signifie "uniquement croissant" ou "uniquement décroissant".`,
|
|
46
|
+
correction: `Comme la courbe est décroissante entre $2008$ et $2009$ alors le nombre de naissances a diminué entre $2008$ et $2009$.`,
|
|
47
47
|
},
|
|
48
48
|
{
|
|
49
49
|
interval: { min: 2009, max: 2011 },
|
|
50
50
|
maxValue: 833_000,
|
|
51
51
|
answerIndexes: [1, 2],
|
|
52
|
-
hint: `Observe les variations du
|
|
53
|
-
correction: `Comme la courbe
|
|
52
|
+
hint: `Observe les variations du graphique entre $2009$ et $2011$. Monotone signifie "uniquement croissant" ou "uniquement décroissant".`,
|
|
53
|
+
correction: `Comme la courbe est croissante entre $2009$ et $2010$, puis est décroissante entre $2010$ et $2011$ alors le nombre de naissances a augmenté puis diminué entre $2009$ et $2011$.`,
|
|
54
54
|
},
|
|
55
55
|
];
|
|
56
56
|
const getInstruction = (identifiers) => {
|
|
@@ -122,7 +122,7 @@ const getQuestionFromIdentifiers = (identifiers) => {
|
|
|
122
122
|
};
|
|
123
123
|
export const graphReading = {
|
|
124
124
|
id: "graphReading",
|
|
125
|
-
label: "Lire
|
|
125
|
+
label: "Lire et interpréter la courbe d’une fonction ($2$)",
|
|
126
126
|
isSingleStep: true,
|
|
127
127
|
generator: (nb, opts) => getDistinctQuestions(() => getGraphReadingQuestion(opts), nb),
|
|
128
128
|
qcmTimer: 60,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"histogramReading.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/dataRepresentations/histogramReading.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"histogramReading.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/dataRepresentations/histogramReading.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAcrC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAsMF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAmBlD,CAAC"}
|
|
@@ -4,17 +4,27 @@ import { numberVEA } from "../../../exercises/vea/numberVEA.js";
|
|
|
4
4
|
import { GeogebraConstructor } from "../../../geogebra/geogebraConstructor.js";
|
|
5
5
|
import { frenchify } from "../../../math/utils/latex/frenchify.js";
|
|
6
6
|
import { randint } from "../../../math/utils/random/randint.js";
|
|
7
|
+
import { round } from "../../../math/utils/round.js";
|
|
7
8
|
import { frac } from "../../../tree/nodes/operators/fractionNode.js";
|
|
9
|
+
import { multiply } from "../../../tree/nodes/operators/multiplyNode.js";
|
|
8
10
|
import { substract } from "../../../tree/nodes/operators/substractNode.js";
|
|
9
11
|
import { random } from "../../../utils/alea/random.js";
|
|
12
|
+
import { shuffle } from "../../../utils/alea/shuffle.js";
|
|
10
13
|
import { alignTex } from "../../../utils/latex/alignTex.js";
|
|
11
14
|
const getPropositions = (n, { answer, ...identifiers }) => {
|
|
12
15
|
const propositions = [];
|
|
13
|
-
const { data } = identifiers;
|
|
16
|
+
const { data, bounds } = identifiers;
|
|
14
17
|
addValidProp(propositions, answer);
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
+
const nodeWidths = [...Array(bounds.length - 1).keys()].map((i) => substract(bounds[i + 1], bounds[i]));
|
|
19
|
+
const nodeHeights = nodeWidths.map((nodeWidth, i) => frac(data[i], nodeWidth).simplify());
|
|
20
|
+
nodeHeights.forEach((nodeHeight) => {
|
|
21
|
+
tryToAddWrongProp(propositions, nodeHeight.toTex());
|
|
22
|
+
});
|
|
23
|
+
nodeHeights.forEach((nodeHeight, i) => {
|
|
24
|
+
if (propositions.length < n) {
|
|
25
|
+
tryToAddWrongProp(propositions, round(frac(nodeHeight, nodeWidths[i]).simplify().evaluate(), 0).frenchify());
|
|
26
|
+
}
|
|
27
|
+
});
|
|
18
28
|
return shuffleProps(propositions, n);
|
|
19
29
|
};
|
|
20
30
|
const getAnswer = (identifiers) => {
|
|
@@ -63,37 +73,36 @@ const getGGBOptions = (identifiers) => {
|
|
|
63
73
|
const offsettedBounds = bounds.map((bound) => bound + offsetX);
|
|
64
74
|
// const xMin = offsettedBounds[0];
|
|
65
75
|
const xMax = offsettedBounds[offsettedBounds.length - 1];
|
|
66
|
-
const heightMin = 0;
|
|
76
|
+
// const heightMin = 0;
|
|
67
77
|
const heightMax = Math.max(...heights);
|
|
68
78
|
const commands = [
|
|
69
79
|
`B = Histogram({${offsettedBounds}}, {${heights.join(",")}})`,
|
|
70
|
-
...bounds.map((bound, i) => `Text("\\footnotesize ${bound.frenchify()}", (${offsettedBounds[i]},
|
|
71
|
-
`Text("\\footnotesize Diamètre\\ (en \\ cm)", (3, -300), true, true, 0, -1)`,
|
|
80
|
+
...bounds.map((bound, i) => `XBound_{${i}} = Text("\\footnotesize ${bound.frenchify()}", (${offsettedBounds[i]}, 0), true, true, 0, -1)`),
|
|
72
81
|
`ShowLabel(B,false)`,
|
|
73
|
-
`
|
|
82
|
+
...heights.map((height, i) => `YBound_{${i}} = Text("\\footnotesize ${round(height, 0).frenchify()}", (0, ${height}), true, true, 0, 0)`),
|
|
74
83
|
];
|
|
75
84
|
const ggb = new GeogebraConstructor({
|
|
76
85
|
commands,
|
|
77
|
-
|
|
86
|
+
hideGrid: true,
|
|
78
87
|
fontSize: 16,
|
|
79
88
|
lockedAxesRatio: false,
|
|
80
89
|
xAxis: {
|
|
81
90
|
hideNumbers: true,
|
|
82
91
|
showPositive: true,
|
|
83
|
-
|
|
92
|
+
label: "$\\footnotesize Diamètre (cm)$",
|
|
84
93
|
},
|
|
85
94
|
yAxis: {
|
|
86
95
|
showPositive: true,
|
|
87
96
|
label: "$\\footnotesize Pommes/cm$",
|
|
88
|
-
|
|
97
|
+
hideNumbers: true,
|
|
89
98
|
},
|
|
90
99
|
});
|
|
91
100
|
return ggb.getOptions({
|
|
92
101
|
coords: ggb.getAdaptedCoords({
|
|
93
|
-
xMin: -1,
|
|
94
|
-
xMax: xMax
|
|
95
|
-
yMin:
|
|
96
|
-
yMax: heightMax
|
|
102
|
+
xMin: -xMax * 0.1,
|
|
103
|
+
xMax: xMax * 1.5,
|
|
104
|
+
yMin: -heightMax * 0.25,
|
|
105
|
+
yMax: heightMax * 1.5,
|
|
97
106
|
}),
|
|
98
107
|
});
|
|
99
108
|
};
|
|
@@ -104,24 +113,15 @@ const isAnswerValid = (ans, { answer }) => {
|
|
|
104
113
|
return numberVEA(ans, answer);
|
|
105
114
|
};
|
|
106
115
|
const getHistogramReadingQuestion = () => {
|
|
107
|
-
const
|
|
108
|
-
const
|
|
109
|
-
|
|
116
|
+
const boundsRaw = [11.5, 12, 13.5, 15, 15.5, 16, 16.2];
|
|
117
|
+
const nbBounds = 3;
|
|
118
|
+
const bounds = random([...Array(boundsRaw.length - nbBounds).keys()].map((i) => boundsRaw.slice(i, i + nbBounds)));
|
|
119
|
+
const heightPool = shuffle([...Array(10).keys()].map((i) => i * 100 + 300));
|
|
120
|
+
const data = [...Array(bounds.length - 1).keys()].map((i) => {
|
|
110
121
|
const nodeWidth = substract(bounds[i + 1], bounds[i]);
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
dataI =
|
|
115
|
-
50 *
|
|
116
|
-
randint(1, i < 3 ? 18 : 20, //pour ne pas que les 2 premieres barres touchent le label de l'axe
|
|
117
|
-
data.map((d) => d / 50));
|
|
118
|
-
isHeightAnInteger = !frac(dataI, nodeWidth)
|
|
119
|
-
.simplify()
|
|
120
|
-
.toTex()
|
|
121
|
-
.includes("frac");
|
|
122
|
-
} while (!isHeightAnInteger);
|
|
123
|
-
data.push(dataI);
|
|
124
|
-
}
|
|
122
|
+
const nodeHeight = heightPool[i].toTree();
|
|
123
|
+
return multiply(nodeWidth, nodeHeight).simplify().evaluate();
|
|
124
|
+
});
|
|
125
125
|
const itemAsked = randint(0, bounds.length - 1);
|
|
126
126
|
const identifiers = {
|
|
127
127
|
bounds,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plausibleGraph.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/dataRepresentations/plausibleGraph.ts"],"names":[],"mappings":"AAAA,OAAO,EAWL,QAAQ,
|
|
1
|
+
{"version":3,"file":"plausibleGraph.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/dataRepresentations/plausibleGraph.ts"],"names":[],"mappings":"AAAA,OAAO,EAWL,QAAQ,EAET,MAAM,6BAA6B,CAAC;AAoBrC,KAAK,WAAW,GAAG;IACjB,cAAc,EAAE,MAAM,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB,CAAC;AAyNF,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,WAAW,CAahD,CAAC"}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { addValidProp, tryToAddWrongProp, } from "../../../exercises/exercise.js";
|
|
2
2
|
import { getDistinctQuestions } from "../../../exercises/utils/getDistinctQuestions.js";
|
|
3
|
+
import { colorWithOpacity, greenDark, orange, pinkDark, purpleDark, red, } from "../../../geogebra/colors.js";
|
|
4
|
+
import { GeogebraConstructor } from "../../../geogebra/geogebraConstructor.js";
|
|
5
|
+
import { Point } from "../../../math/geometry/point.js";
|
|
3
6
|
import { randint } from "../../../math/utils/random/randint.js";
|
|
4
7
|
import { round } from "../../../math/utils/round.js";
|
|
8
|
+
import { add } from "../../../tree/nodes/operators/addNode.js";
|
|
5
9
|
import { frac } from "../../../tree/nodes/operators/fractionNode.js";
|
|
6
10
|
import { multiply } from "../../../tree/nodes/operators/multiplyNode.js";
|
|
7
11
|
import { random } from "../../../utils/alea/random.js";
|
|
@@ -53,13 +57,13 @@ const getInstruction = (identifiers) => {
|
|
|
53
57
|
const total = values.reduce((acc, x) => acc + x, 0);
|
|
54
58
|
return `Sur $${total.frenchify()}$ personnes, on distingue $3$ groupes :
|
|
55
59
|
|
|
56
|
-
groupe A : $${values[0].frenchify()}$ personnes
|
|
60
|
+
- groupe $A$ : $${values[0].frenchify()}$ personnes
|
|
57
61
|
|
|
58
|
-
groupe B : $${values[1].frenchify()}$ personnes
|
|
62
|
+
- groupe $B$ : $${values[1].frenchify()}$ personnes
|
|
59
63
|
|
|
60
|
-
groupe C : les autres.
|
|
64
|
+
- groupe $C$ : les autres.
|
|
61
65
|
|
|
62
|
-
Parmi les propositions ci-dessous, laquelle décrit
|
|
66
|
+
Parmi les propositions ci-dessous, laquelle décrit la représentation par un diagramme circulaire de cette situation ?`;
|
|
63
67
|
};
|
|
64
68
|
const getPropositions = (_, { ...identifiers }) => {
|
|
65
69
|
const { indexSituation } = identifiers;
|
|
@@ -106,6 +110,50 @@ $$
|
|
|
106
110
|
`)
|
|
107
111
|
.join(``)}`;
|
|
108
112
|
};
|
|
113
|
+
const getCorrectionGGBOptions = (identifiers) => {
|
|
114
|
+
const { values } = identifiers;
|
|
115
|
+
const proportions = getProportions(values);
|
|
116
|
+
const angles = proportions.map((fractionNode) => -round(multiply(fractionNode, 359.9).evaluate(), 2));
|
|
117
|
+
const anglesCumulated = angles.reduce((acc, x) => [...acc, add(acc[acc.length - 1], x).evaluate()], [0 + 90]);
|
|
118
|
+
const points = anglesCumulated
|
|
119
|
+
.map((angle) => (angle * Math.PI) / 180)
|
|
120
|
+
.map((radAngle) => [
|
|
121
|
+
round(Math.cos(radAngle), 6),
|
|
122
|
+
round(Math.sin(radAngle), 6),
|
|
123
|
+
]);
|
|
124
|
+
const labels = values.map((value) => value.frenchify());
|
|
125
|
+
const letters = ["A", "B", "C", "D", "E", "F", "G"];
|
|
126
|
+
const colors = [greenDark, orange, pinkDark, purpleDark, red];
|
|
127
|
+
const pointsObj = points.map((p, i) => new Point(letters[i], p[0], p[1]));
|
|
128
|
+
const getMidPoint = (angleA, angleB) => {
|
|
129
|
+
const angleM = (angleA + angleB) / 2.0;
|
|
130
|
+
const angleMInDegrees = (angleM * Math.PI) / 180;
|
|
131
|
+
return [1.2 * Math.cos(angleMInDegrees), 1.2 * Math.sin(angleMInDegrees)];
|
|
132
|
+
};
|
|
133
|
+
const ggb = new GeogebraConstructor({
|
|
134
|
+
commands: [
|
|
135
|
+
`C = Circle((0,0), 1)`,
|
|
136
|
+
`SetFixed(C, true)`,
|
|
137
|
+
`SetLineThickness(C, 1)`,
|
|
138
|
+
// ...pointsObj.flatMap((p) => p.toGGBCommand()),
|
|
139
|
+
...pointsObj
|
|
140
|
+
.slice(0, -1)
|
|
141
|
+
.flatMap((_, i) => [
|
|
142
|
+
`C_${i} = CircularSector((0,0), ${pointsObj[i].toMathString()}, ${pointsObj[i + 1].toMathString()})`,
|
|
143
|
+
`SetFixed(C_${i}, true)`,
|
|
144
|
+
`SetColor(C_${i}, "${colorWithOpacity(colors[i], 80)}")`,
|
|
145
|
+
`SetLineThickness(C_${i}, 0)`,
|
|
146
|
+
`Text("$\\tiny \\text{${labels[i]}$", (${getMidPoint(anglesCumulated[i], anglesCumulated[i + 1]).join(",")}), true, true, 0, 0)`,
|
|
147
|
+
]),
|
|
148
|
+
],
|
|
149
|
+
hideAxes: true,
|
|
150
|
+
hideGrid: true,
|
|
151
|
+
forbidShiftDragZoom: true,
|
|
152
|
+
});
|
|
153
|
+
return ggb.getOptions({
|
|
154
|
+
coords: [-1.4, 1.4, -1.4, 1.4],
|
|
155
|
+
});
|
|
156
|
+
};
|
|
109
157
|
const getPlausibleGraphQuestion = () => {
|
|
110
158
|
const indexSituation = randint(0, situations.length);
|
|
111
159
|
const bigNumber = random([
|
|
@@ -127,6 +175,7 @@ const getQuestionFromIdentifiers = (identifiers) => {
|
|
|
127
175
|
identifiers,
|
|
128
176
|
hint: getHint(identifiers),
|
|
129
177
|
correction: getCorrection(identifiers),
|
|
178
|
+
correctionGgbOptions: getCorrectionGGBOptions(identifiers),
|
|
130
179
|
};
|
|
131
180
|
return question;
|
|
132
181
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coordsOfPointOnAffineFindX.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/affines/coordsOfPointOnAffineFindX.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"coordsOfPointOnAffineFindX.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/affines/coordsOfPointOnAffineFindX.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAYrC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAqIF,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,WAAW,CAe5D,CAAC"}
|
|
@@ -6,6 +6,8 @@ import { randint } from "../../../../math/utils/random/randint.js";
|
|
|
6
6
|
import { equationResolutionTex } from "../../../../tree/nodes/equations/equalNode.js";
|
|
7
7
|
import { add } from "../../../../tree/nodes/operators/addNode.js";
|
|
8
8
|
import { frac } from "../../../../tree/nodes/operators/fractionNode.js";
|
|
9
|
+
import { substract } from "../../../../tree/nodes/operators/substractNode.js";
|
|
10
|
+
import { pointParser } from "../../../../tree/parsers/pointParser.js";
|
|
9
11
|
const getInstruction = (identifiers) => {
|
|
10
12
|
const { yValue, coeffs } = identifiers;
|
|
11
13
|
const affine = AffineConstructor.fromCoeffs(coeffs);
|
|
@@ -69,6 +71,17 @@ const getPropositions = (n, { answer, coeffs, yValue }) => {
|
|
|
69
71
|
tryToAddWrongProp(propositions, `(${frac(add(yValue, p), m).simplify().toTex()}, ${yValue.frenchify()})`);
|
|
70
72
|
return shuffleProps(propositions, n);
|
|
71
73
|
};
|
|
74
|
+
const isAnswerValid = (ans, { answer }) => {
|
|
75
|
+
const pointAns = pointParser(ans);
|
|
76
|
+
if (!pointAns) {
|
|
77
|
+
return false;
|
|
78
|
+
}
|
|
79
|
+
const pointAnswer = pointParser(answer);
|
|
80
|
+
return [
|
|
81
|
+
[pointAns.x, pointAnswer.x],
|
|
82
|
+
[pointAns.y, pointAnswer.y],
|
|
83
|
+
].every(([nodeAns, nodeAnswer]) => substract(nodeAns, nodeAnswer).evaluate() === 0);
|
|
84
|
+
};
|
|
72
85
|
const getCoordsOfPointOnAffineFindXQuestion = () => {
|
|
73
86
|
const polynome1 = new Polynomial([randint(-9, 10), randint(-5, 6, [0])]);
|
|
74
87
|
const xValue = randint(-9, 10);
|
|
@@ -80,7 +93,7 @@ const getQuestionFromIdentifiers = (identifiers) => {
|
|
|
80
93
|
const question = {
|
|
81
94
|
instruction: getInstruction(identifiers),
|
|
82
95
|
answer: getAnswer(identifiers),
|
|
83
|
-
keys: [],
|
|
96
|
+
keys: ["semicolon"],
|
|
84
97
|
answerFormat: "tex",
|
|
85
98
|
identifiers,
|
|
86
99
|
hint: getHint(identifiers),
|
|
@@ -90,8 +103,7 @@ const getQuestionFromIdentifiers = (identifiers) => {
|
|
|
90
103
|
};
|
|
91
104
|
export const coordsOfPointOnAffineFindX = {
|
|
92
105
|
id: "coordsOfPointOnAffineFindX",
|
|
93
|
-
|
|
94
|
-
label: "Déterminer les coordonnées d'un point appartenant à une courbe et dont on connaît l'ordonnée",
|
|
106
|
+
label: "Déterminer les coordonnées d'un point appartenant à une droite et dont on connaît l'ordonnée",
|
|
95
107
|
isSingleStep: true,
|
|
96
108
|
generator: (nb) => getDistinctQuestions(getCoordsOfPointOnAffineFindXQuestion, nb),
|
|
97
109
|
qcmTimer: 60,
|
|
@@ -100,4 +112,6 @@ export const coordsOfPointOnAffineFindX = {
|
|
|
100
112
|
getQuestionFromIdentifiers,
|
|
101
113
|
hasHintAndCorrection: true,
|
|
102
114
|
answerType: "QCU",
|
|
115
|
+
getPropositions,
|
|
116
|
+
isAnswerValid,
|
|
103
117
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coordsOfPointOnAffineFindY.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/affines/coordsOfPointOnAffineFindY.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"coordsOfPointOnAffineFindY.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/affines/coordsOfPointOnAffineFindY.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAUrC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AA+HF,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,WAAW,CAe5D,CAAC"}
|