math-exercises 3.0.40 → 3.0.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/exercises/exercise.d.ts +1 -0
- package/lib/exercises/exercise.d.ts.map +1 -1
- package/lib/exercises/math/calcul/fractions/simplifyFraction.js +1 -1
- package/lib/exercises/math/dataRepresentations/index.d.ts +3 -0
- package/lib/exercises/math/dataRepresentations/index.d.ts.map +1 -1
- package/lib/exercises/math/dataRepresentations/index.js +3 -1
- package/lib/exercises/math/dataRepresentations/testGen.d.ts.map +1 -1
- package/lib/exercises/math/dataRepresentations/testGen.js +34 -14
- package/lib/exercises/math/dataRepresentations/testGenGGB.d.ts +8 -0
- package/lib/exercises/math/dataRepresentations/testGenGGB.d.ts.map +1 -0
- package/lib/exercises/math/dataRepresentations/testGenGGB.js +105 -0
- package/lib/exercises/math/dataRepresentations/testGenStudentGGB.d.ts +8 -0
- package/lib/exercises/math/dataRepresentations/testGenStudentGGB.d.ts.map +1 -0
- package/lib/exercises/math/dataRepresentations/testGenStudentGGB.js +110 -0
- package/lib/exercises/math/sequences/arithmetic/arithmeticFindExplictFormulaFirstTermRandom.d.ts.map +1 -1
- package/lib/exercises/math/sequences/arithmetic/arithmeticFindExplictFormulaFirstTermRandom.js +76 -16
- package/lib/exercises/math/spaceGeometry/relativePositions/index.d.ts +2 -0
- package/lib/exercises/math/spaceGeometry/relativePositions/index.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/relativePositions/index.js +1 -0
- package/lib/exercises/math/spaceGeometry/relativePositions/linesRelativePositions.d.ts +2 -0
- package/lib/exercises/math/spaceGeometry/relativePositions/linesRelativePositions.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/relativePositions/linesRelativePositions.js +75 -0
- package/lib/index.d.ts +9 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/tests/questionTest.d.ts.map +1 -1
- package/lib/tests/questionTest.js +5 -0
- package/lib/utils/iterators/dualReturn.d.ts +7 -1
- package/lib/utils/iterators/dualReturn.d.ts.map +1 -1
- package/lib/utils/iterators/dualReturn.js +1 -2
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exercise.d.ts","sourceRoot":"","sources":["../../src/exercises/exercise.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAInD,eAAO,MAAM,SAAS,iBACN,WAAW,EAAE,KACxB,MAAM,WACA,MAAM,IAAI,SAQpB,CAAC;AACF,eAAO,MAAM,YAAY,UAChB,WAAW,EAAE,aACT,MAAM,WACT,KAAK,GAAG,KAAK,SAQtB,CAAC;AACF,eAAO,MAAM,YAAY,UAChB,WAAW,EAAE,aACT,MAAM,WACT,KAAK,GAAG,KAAK,SAQtB,CAAC;AACF,eAAO,MAAM,iBAAiB,UACrB,WAAW,EAAE,aACT,MAAM,WACT,KAAK,GAAG,KAAK,SAUtB,CAAC;AAEF,eAAO,MAAM,YAAY,UAChB,WAAW,EAAE,KACjB,MAAM,sBACW,MAAM,kBAQ3B,CAAC;AAEF,oBAAY,qBAAqB;IAC/B,UAAU,eAAe;IACzB,GAAG,QAAQ;IACX,GAAG,QAAQ;IACX,WAAW,gBAAgB;IAC3B,IAAI,SAAS;IACb,UAAU,eAAe;IACzB,MAAM,WAAW;IACjB,GAAG,QAAQ;IACX,IAAI,SAAS;CACd;AACD,oBAAY,mBAAmB;IAC7B,QAAQ,aAAa;IACrB,MAAM,WAAW;IACjB,WAAW,gBAAgB;CAC5B;AACD,MAAM,MAAM,eAAe,CAAC,MAAM,GAAG,GAAG,IAAI;IAC1C,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,mBAAmB,CAAC;IAC1B,MAAM,EAAE,qBAAqB,CAAC;IAC9B,WAAW,CAAC,EAAE,MAAM,CAAC;IACr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ACP,cAAc,GACd,iBAAiB,GACjB,SAAS,GACT,8BAA8B,GAC9B,aAAa,GACb,YAAY,GACZ,SAAS,GACT,0BAA0B,GAC1B,WAAW,GACX,2BAA2B,GAC3B,eAAe,GACf,eAAe,GACf,kBAAkB,GAClB,WAAW,GACX,mBAAmB,GACnB,wBAAwB,GACxB,WAAW,GACX,uBAAuB,GACvB,uBAAuB,GACvB,aAAa,GACb,aAAa,GACb,SAAS,GACT,qBAAqB,GACrB,oBAAoB,GACpB,UAAU,GACV,mBAAmB,GACnB,YAAY,GACZ,cAAc,GACd,YAAY,GACZ,cAAc,GACd,kBAAkB,GAClB,kBAAkB,GAClB,QAAQ,GACR,YAAY,GACZ,QAAQ,GACR,iBAAiB,GACjB,cAAc,GACd,cAAc,GACd,QAAQ,GACR,UAAU,GACV,uBAAuB,GACvB,oBAAoB,GACpB,eAAe,GACf,gBAAgB,GAChB,UAAU,CAAC;AAEf,MAAM,MAAM,SAAS,GACjB,mBAAmB,GACnB,sBAAsB,GACtB,QAAQ,GACR,kBAAkB,GAClB,WAAW,GACX,SAAS,GACT,cAAc,GACd,+CAA+C,GAC/C,OAAO,GACP,KAAK,GACL,wBAAwB,GACxB,SAAS,GACT,KAAK,GACL,aAAa,GACb,4BAA4B,GAC5B,oBAAoB,GACpB,WAAW,GACX,iBAAiB,GACjB,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"exercise.d.ts","sourceRoot":"","sources":["../../src/exercises/exercise.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAInD,eAAO,MAAM,SAAS,iBACN,WAAW,EAAE,KACxB,MAAM,WACA,MAAM,IAAI,SAQpB,CAAC;AACF,eAAO,MAAM,YAAY,UAChB,WAAW,EAAE,aACT,MAAM,WACT,KAAK,GAAG,KAAK,SAQtB,CAAC;AACF,eAAO,MAAM,YAAY,UAChB,WAA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,cAAc,GACd,QAAQ,GACR,UAAU,GACV,uBAAuB,GACvB,oBAAoB,GACpB,eAAe,GACf,gBAAgB,GAChB,UAAU,CAAC;AAEf,MAAM,MAAM,SAAS,GACjB,mBAAmB,GACnB,sBAAsB,GACtB,QAAQ,GACR,kBAAkB,GAClB,WAAW,GACX,SAAS,GACT,cAAc,GACd,+CAA+C,GAC/C,OAAO,GACP,KAAK,GACL,wBAAwB,GACxB,SAAS,GACT,KAAK,GACL,aAAa,GACb,4BAA4B,GAC5B,oBAAoB,GACpB,WAAW,GACX,iBAAiB,GACjB,SAAS,CAAC"}
|
|
@@ -48,7 +48,7 @@ ${alignTex([
|
|
|
48
48
|
[
|
|
49
49
|
frac(num, denum).toTex(),
|
|
50
50
|
"=",
|
|
51
|
-
frac(multiply(numDiv, pgcd.toTree()), multiply(denumDiv, pgcd.toTree())).toTex(),
|
|
51
|
+
frac(multiply(numDiv, pgcd.toTree({ toTexOptions: { cancel: true } })), multiply(denumDiv, pgcd.toTree({ toTexOptions: { cancel: true } }))).toTex(),
|
|
52
52
|
],
|
|
53
53
|
["", "=", getAnswer(identifiers)],
|
|
54
54
|
])}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/dataRepresentations/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAElC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,sBAAsB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/dataRepresentations/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAElC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,sBAAsB,CAAC;AACrC,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC"}
|
|
@@ -2,4 +2,6 @@ export * from "./tableReading.js";
|
|
|
2
2
|
// export * from "./barChartReading.js";
|
|
3
3
|
export * from "./functionGraphReading.js";
|
|
4
4
|
export * from "./pieChartReading.js";
|
|
5
|
-
|
|
5
|
+
export * from "./testGen.js";
|
|
6
|
+
export * from "./testGenGGB.js";
|
|
7
|
+
export * from "./testGenStudentGGB.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testGen.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/dataRepresentations/testGen.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"testGen.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/dataRepresentations/testGen.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAOrC,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,OAAO,CAAC;CACxB,CAAC;AAoFF,eAAO,MAAM,OAAO,EAAE,QAAQ,CAAC,WAAW,CAgBzC,CAAC"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../exercises/exercise.js";
|
|
2
2
|
import { getDistinctQuestions } from "../../../exercises/utils/getDistinctQuestions.js";
|
|
3
|
+
import { GeogebraConstructor } from "../../../geogebra/geogebraConstructor.js";
|
|
4
|
+
import { round } from "../../../math/utils/round.js";
|
|
3
5
|
import { coinFlip } from "../../../utils/alea/coinFlip.js";
|
|
4
6
|
import { handleVEAError } from "../../../utils/errors/handleVEAError.js";
|
|
5
7
|
const getPropositions = (n, { answer, hasTwoAnswers, rand }) => {
|
|
@@ -8,26 +10,21 @@ const getPropositions = (n, { answer, hasTwoAnswers, rand }) => {
|
|
|
8
10
|
addValidProp(propositions, "vrai", "raw");
|
|
9
11
|
tryToAddWrongProp(propositions, "faux un", "raw");
|
|
10
12
|
tryToAddWrongProp(propositions, "faux deux", "raw");
|
|
11
|
-
|
|
12
|
-
addValidProp(propositions, "vrai deux", "raw");
|
|
13
|
-
}
|
|
14
|
-
else {
|
|
15
|
-
tryToAddWrongProp(propositions, "faux trois", "raw");
|
|
16
|
-
}
|
|
13
|
+
tryToAddWrongProp(propositions, "faux trois", "raw");
|
|
17
14
|
return shuffleProps(propositions, n);
|
|
18
15
|
};
|
|
19
16
|
const getAnswer = (identifiers) => {
|
|
20
|
-
return
|
|
17
|
+
return round(Math.random(), 3).frenchify();
|
|
21
18
|
};
|
|
22
19
|
const getInstruction = (identifiers) => {
|
|
23
|
-
return "Test qcm";
|
|
20
|
+
return "Test générateur free/qcm image/ggb correction";
|
|
24
21
|
};
|
|
25
22
|
const getKeys = (identifiers) => {
|
|
26
23
|
return [];
|
|
27
24
|
};
|
|
28
25
|
const isAnswerValid = (ans, { answer }) => {
|
|
29
26
|
try {
|
|
30
|
-
|
|
27
|
+
return ans === answer;
|
|
31
28
|
}
|
|
32
29
|
catch (err) {
|
|
33
30
|
return handleVEAError(err);
|
|
@@ -37,7 +34,31 @@ const getHint = (identifiers) => {
|
|
|
37
34
|
return "voici l'indice";
|
|
38
35
|
};
|
|
39
36
|
const getCorrection = (identifiers) => {
|
|
40
|
-
|
|
37
|
+
if (coinFlip())
|
|
38
|
+
return `voici la correction et voici des maths
|
|
39
|
+
|
|
40
|
+
$$
|
|
41
|
+
3x+4 = 2
|
|
42
|
+
$$
|
|
43
|
+
|
|
44
|
+
et voici une image
|
|
45
|
+
|
|
46
|
+

|
|
47
|
+
|
|
48
|
+
et du texte après l'image
|
|
49
|
+
|
|
50
|
+
avec des maths aussi $e^{\\pi i} = -1$
|
|
51
|
+
`;
|
|
52
|
+
else
|
|
53
|
+
return `Voici la correction avec du geogebra`;
|
|
54
|
+
};
|
|
55
|
+
const getCorrectionGGBOptions = (identifiers) => {
|
|
56
|
+
const ggb = new GeogebraConstructor({
|
|
57
|
+
commands: ["A(3,5)"],
|
|
58
|
+
});
|
|
59
|
+
return ggb.getOptions({
|
|
60
|
+
coords: [-10, 10, -10, 10],
|
|
61
|
+
});
|
|
41
62
|
};
|
|
42
63
|
const getTestGenQuestion = (ops) => {
|
|
43
64
|
const identifiers = {
|
|
@@ -51,13 +72,14 @@ const getTestGenQuestion = (ops) => {
|
|
|
51
72
|
answerFormat: "tex",
|
|
52
73
|
hint: getHint(identifiers),
|
|
53
74
|
correction: getCorrection(identifiers),
|
|
75
|
+
correctionGgbOptions: getCorrectionGGBOptions(identifiers),
|
|
54
76
|
identifiers,
|
|
55
77
|
};
|
|
56
78
|
return question;
|
|
57
79
|
};
|
|
58
80
|
export const testGen = {
|
|
59
|
-
id: "
|
|
60
|
-
label: "test qcm",
|
|
81
|
+
id: "testImgCorr",
|
|
82
|
+
label: "test free/qcm image/ggb correction",
|
|
61
83
|
isSingleStep: true,
|
|
62
84
|
generator: (nb, opts) => getDistinctQuestions(() => getTestGenQuestion(opts), nb),
|
|
63
85
|
qcmTimer: 60,
|
|
@@ -67,8 +89,6 @@ export const testGen = {
|
|
|
67
89
|
subject: "Mathématiques",
|
|
68
90
|
getInstruction,
|
|
69
91
|
getAnswer,
|
|
70
|
-
isQCM: true,
|
|
71
|
-
answerType: "QCM",
|
|
72
92
|
hasHintAndCorrection: true,
|
|
73
93
|
getHint,
|
|
74
94
|
getCorrection,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"testGenGGB.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/dataRepresentations/testGenGGB.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAOrC,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,OAAO,CAAC;CACxB,CAAC;AA6FF,eAAO,MAAM,UAAU,EAAE,QAAQ,CAAC,WAAW,CAiB5C,CAAC"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../exercises/exercise.js";
|
|
2
|
+
import { getDistinctQuestions } from "../../../exercises/utils/getDistinctQuestions.js";
|
|
3
|
+
import { GeogebraConstructor } from "../../../geogebra/geogebraConstructor.js";
|
|
4
|
+
import { round } from "../../../math/utils/round.js";
|
|
5
|
+
import { coinFlip } from "../../../utils/alea/coinFlip.js";
|
|
6
|
+
import { handleVEAError } from "../../../utils/errors/handleVEAError.js";
|
|
7
|
+
const getPropositions = (n, { answer, hasTwoAnswers, rand }) => {
|
|
8
|
+
const propositions = [];
|
|
9
|
+
// addValidProp(propositions, answer);
|
|
10
|
+
addValidProp(propositions, "vrai", "raw");
|
|
11
|
+
tryToAddWrongProp(propositions, "faux un", "raw");
|
|
12
|
+
tryToAddWrongProp(propositions, "faux deux", "raw");
|
|
13
|
+
tryToAddWrongProp(propositions, "faux trois", "raw");
|
|
14
|
+
return shuffleProps(propositions, n);
|
|
15
|
+
};
|
|
16
|
+
const getAnswer = (identifiers) => {
|
|
17
|
+
return round(Math.random(), 3).frenchify();
|
|
18
|
+
};
|
|
19
|
+
const getInstruction = (identifiers) => {
|
|
20
|
+
return "Test générateur free/qcm image/ggb correction";
|
|
21
|
+
};
|
|
22
|
+
const getKeys = (identifiers) => {
|
|
23
|
+
return [];
|
|
24
|
+
};
|
|
25
|
+
const isAnswerValid = (ans, { answer }) => {
|
|
26
|
+
try {
|
|
27
|
+
return ans === answer;
|
|
28
|
+
}
|
|
29
|
+
catch (err) {
|
|
30
|
+
return handleVEAError(err);
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
const getHint = (identifiers) => {
|
|
34
|
+
return "voici l'indice";
|
|
35
|
+
};
|
|
36
|
+
const getCorrection = (identifiers) => {
|
|
37
|
+
if (coinFlip())
|
|
38
|
+
return `voici la correction et voici des maths
|
|
39
|
+
|
|
40
|
+
$$
|
|
41
|
+
3x+4 = 2
|
|
42
|
+
$$
|
|
43
|
+
|
|
44
|
+
et voici une image
|
|
45
|
+
|
|
46
|
+

|
|
47
|
+
|
|
48
|
+
et du texte après l'image
|
|
49
|
+
|
|
50
|
+
avec des maths aussi $e^{\\pi i} = -1$
|
|
51
|
+
`;
|
|
52
|
+
else
|
|
53
|
+
return `Voici la correction avec du geogebra`;
|
|
54
|
+
};
|
|
55
|
+
const getGGBOptions = (identifiers) => {
|
|
56
|
+
const ggb = new GeogebraConstructor({
|
|
57
|
+
commands: ["A(-3,-5)"],
|
|
58
|
+
});
|
|
59
|
+
return ggb.getOptions({
|
|
60
|
+
coords: [-10, 10, -10, 10],
|
|
61
|
+
});
|
|
62
|
+
};
|
|
63
|
+
const getCorrectionGGBOptions = (identifiers) => {
|
|
64
|
+
const ggb = new GeogebraConstructor({
|
|
65
|
+
commands: ["A(3,5)"],
|
|
66
|
+
});
|
|
67
|
+
return ggb.getOptions({
|
|
68
|
+
coords: [-10, 10, -10, 10],
|
|
69
|
+
});
|
|
70
|
+
};
|
|
71
|
+
const getTestGenQuestion = (ops) => {
|
|
72
|
+
const identifiers = {
|
|
73
|
+
rand: Math.random(),
|
|
74
|
+
hasTwoAnswers: coinFlip(),
|
|
75
|
+
};
|
|
76
|
+
const question = {
|
|
77
|
+
answer: getAnswer(identifiers),
|
|
78
|
+
instruction: getInstruction(identifiers),
|
|
79
|
+
keys: getKeys(identifiers),
|
|
80
|
+
answerFormat: "tex",
|
|
81
|
+
hint: getHint(identifiers),
|
|
82
|
+
ggbOptions: getGGBOptions(identifiers),
|
|
83
|
+
correction: getCorrection(identifiers),
|
|
84
|
+
correctionGgbOptions: getCorrectionGGBOptions(identifiers),
|
|
85
|
+
identifiers,
|
|
86
|
+
};
|
|
87
|
+
return question;
|
|
88
|
+
};
|
|
89
|
+
export const testGenGGB = {
|
|
90
|
+
id: "testImgCorrGGB",
|
|
91
|
+
label: "test ggb image/ggb correction",
|
|
92
|
+
isSingleStep: true,
|
|
93
|
+
generator: (nb, opts) => getDistinctQuestions(() => getTestGenQuestion(opts), nb),
|
|
94
|
+
qcmTimer: 60,
|
|
95
|
+
freeTimer: 60,
|
|
96
|
+
getPropositions,
|
|
97
|
+
isAnswerValid,
|
|
98
|
+
subject: "Mathématiques",
|
|
99
|
+
getInstruction,
|
|
100
|
+
getAnswer,
|
|
101
|
+
hasHintAndCorrection: true,
|
|
102
|
+
hasGeogebra: true,
|
|
103
|
+
getHint,
|
|
104
|
+
getCorrection,
|
|
105
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"testGenStudentGGB.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/dataRepresentations/testGenStudentGGB.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAgBT,MAAM,6BAA6B,CAAC;AAOrC,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,OAAO,CAAC;CACxB,CAAC;AAkGF,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,WAAW,CAkBnD,CAAC"}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../exercises/exercise.js";
|
|
2
|
+
import { getDistinctQuestions } from "../../../exercises/utils/getDistinctQuestions.js";
|
|
3
|
+
import { GeogebraConstructor } from "../../../geogebra/geogebraConstructor.js";
|
|
4
|
+
import { round } from "../../../math/utils/round.js";
|
|
5
|
+
import { coinFlip } from "../../../utils/alea/coinFlip.js";
|
|
6
|
+
import { handleVEAError } from "../../../utils/errors/handleVEAError.js";
|
|
7
|
+
const getPropositions = (n, { answer, hasTwoAnswers, rand }) => {
|
|
8
|
+
const propositions = [];
|
|
9
|
+
// addValidProp(propositions, answer);
|
|
10
|
+
addValidProp(propositions, "vrai", "raw");
|
|
11
|
+
tryToAddWrongProp(propositions, "faux un", "raw");
|
|
12
|
+
tryToAddWrongProp(propositions, "faux deux", "raw");
|
|
13
|
+
tryToAddWrongProp(propositions, "faux trois", "raw");
|
|
14
|
+
return shuffleProps(propositions, n);
|
|
15
|
+
};
|
|
16
|
+
const getAnswer = (identifiers) => {
|
|
17
|
+
return round(Math.random(), 3).frenchify();
|
|
18
|
+
};
|
|
19
|
+
const getInstruction = (identifiers) => {
|
|
20
|
+
return "Test générateur studentGGB image/ggb correction";
|
|
21
|
+
};
|
|
22
|
+
const getKeys = (identifiers) => {
|
|
23
|
+
return [];
|
|
24
|
+
};
|
|
25
|
+
const isAnswerValid = (ans, { answer }) => {
|
|
26
|
+
try {
|
|
27
|
+
throw Error("VEA not implemented");
|
|
28
|
+
}
|
|
29
|
+
catch (err) {
|
|
30
|
+
return handleVEAError(err);
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
const getHint = (identifiers) => {
|
|
34
|
+
return "voici l'indice";
|
|
35
|
+
};
|
|
36
|
+
const getCorrection = (identifiers) => {
|
|
37
|
+
if (coinFlip())
|
|
38
|
+
return `voici la correction et voici des maths
|
|
39
|
+
|
|
40
|
+
$$
|
|
41
|
+
3x+4 = 2
|
|
42
|
+
$$
|
|
43
|
+
|
|
44
|
+
et voici une image
|
|
45
|
+
|
|
46
|
+

|
|
47
|
+
|
|
48
|
+
et du texte après l'image
|
|
49
|
+
|
|
50
|
+
avec des maths aussi $e^{\\pi i} = -1$
|
|
51
|
+
`;
|
|
52
|
+
else
|
|
53
|
+
return `Voici la correction avec du geogebra`;
|
|
54
|
+
};
|
|
55
|
+
const getGGBOptions = (identifiers) => {
|
|
56
|
+
const ggb = new GeogebraConstructor({
|
|
57
|
+
commands: ["A(-3,-5)"],
|
|
58
|
+
});
|
|
59
|
+
return ggb.getOptions({
|
|
60
|
+
coords: [-10, 10, -10, 10],
|
|
61
|
+
});
|
|
62
|
+
};
|
|
63
|
+
const getCorrectionGGBOptions = (identifiers) => {
|
|
64
|
+
const ggb = new GeogebraConstructor({
|
|
65
|
+
commands: ["A(3,5)"],
|
|
66
|
+
});
|
|
67
|
+
return ggb.getOptions({
|
|
68
|
+
coords: [-10, 10, -10, 10],
|
|
69
|
+
});
|
|
70
|
+
};
|
|
71
|
+
const getTestGenQuestion = (ops) => {
|
|
72
|
+
const identifiers = {
|
|
73
|
+
rand: Math.random(),
|
|
74
|
+
hasTwoAnswers: coinFlip(),
|
|
75
|
+
};
|
|
76
|
+
const question = {
|
|
77
|
+
answer: getAnswer(identifiers),
|
|
78
|
+
instruction: getInstruction(identifiers),
|
|
79
|
+
keys: getKeys(identifiers),
|
|
80
|
+
answerFormat: "tex",
|
|
81
|
+
hint: getHint(identifiers),
|
|
82
|
+
studentGgbOptions: getGGBOptions(identifiers),
|
|
83
|
+
correction: getCorrection(identifiers),
|
|
84
|
+
correctionGgbOptions: getCorrectionGGBOptions(identifiers),
|
|
85
|
+
identifiers,
|
|
86
|
+
ggbAnswer: ["A(1,2)"],
|
|
87
|
+
};
|
|
88
|
+
return question;
|
|
89
|
+
};
|
|
90
|
+
const isGGBAnswerValid = (ans, { ggbAnswer }) => {
|
|
91
|
+
return coinFlip();
|
|
92
|
+
};
|
|
93
|
+
export const testGenStudentGGB = {
|
|
94
|
+
id: "testImgCorrStudentGGB",
|
|
95
|
+
label: "test studentGgb image/ggb correction",
|
|
96
|
+
isSingleStep: true,
|
|
97
|
+
generator: (nb, opts) => getDistinctQuestions(() => getTestGenQuestion(opts), nb),
|
|
98
|
+
qcmTimer: 60,
|
|
99
|
+
freeTimer: 60,
|
|
100
|
+
getPropositions,
|
|
101
|
+
isAnswerValid,
|
|
102
|
+
subject: "Mathématiques",
|
|
103
|
+
getInstruction,
|
|
104
|
+
getAnswer,
|
|
105
|
+
hasHintAndCorrection: true,
|
|
106
|
+
getHint,
|
|
107
|
+
getCorrection,
|
|
108
|
+
answerType: "GGB",
|
|
109
|
+
isGGBAnswerValid,
|
|
110
|
+
};
|
package/lib/exercises/math/sequences/arithmetic/arithmeticFindExplictFormulaFirstTermRandom.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"arithmeticFindExplictFormulaFirstTermRandom.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sequences/arithmetic/arithmeticFindExplictFormulaFirstTermRandom.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"arithmeticFindExplictFormulaFirstTermRandom.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sequences/arithmetic/arithmeticFindExplictFormulaFirstTermRandom.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,6BAA6B,CAAC;AAiBrC,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAwHF,eAAO,MAAM,4CAA4C,EAAE,QAAQ,CAAC,WAAW,CAmB5E,CAAC"}
|
package/lib/exercises/math/sequences/arithmetic/arithmeticFindExplictFormulaFirstTermRandom.js
CHANGED
|
@@ -2,21 +2,71 @@ import { addValidProp, tryToAddWrongProp, } from "../../../../exercises/exercise
|
|
|
2
2
|
import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
3
|
import { Polynomial } from "../../../../math/polynomials/polynomial.js";
|
|
4
4
|
import { randint } from "../../../../math/utils/random/randint.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { add } from "../../../../tree/nodes/operators/addNode.js";
|
|
6
|
+
import { multiply, } from "../../../../tree/nodes/operators/multiplyNode.js";
|
|
7
|
+
import { substract } from "../../../../tree/nodes/operators/substractNode.js";
|
|
8
|
+
import { parseAlgebraic } from "../../../../tree/parsers/latexParser.js";
|
|
7
9
|
import { shuffle } from "../../../../utils/alea/shuffle.js";
|
|
10
|
+
import { handleVEAError } from "../../../../utils/errors/handleVEAError.js";
|
|
11
|
+
import { alignTex } from "../../../../utils/latex/alignTex.js";
|
|
12
|
+
const getHint = (identifiers, opts) => {
|
|
13
|
+
const { firstRank, firstValue, reason } = identifiers;
|
|
14
|
+
return `Utilise la formule générale d'une suite arithmétique :
|
|
15
|
+
|
|
16
|
+
$$
|
|
17
|
+
u_n = u_k + (n-k) \\times r
|
|
18
|
+
$$
|
|
19
|
+
|
|
20
|
+
où $r$ la raison et $k$ est un entier.`;
|
|
21
|
+
};
|
|
22
|
+
const getCorrection = (identifiers, opts) => {
|
|
23
|
+
const { firstRank, firstValue, reason } = identifiers;
|
|
24
|
+
const answer = getAnswer(identifiers);
|
|
25
|
+
return `La formule générale d'une suite arithmétique est :
|
|
26
|
+
|
|
27
|
+
$$
|
|
28
|
+
u_n = u_k + (n-k) \\times r
|
|
29
|
+
$$
|
|
30
|
+
|
|
31
|
+
où $r$ la raison et $k$ est un entier.
|
|
32
|
+
|
|
33
|
+
Ici, puisque $u_${firstRank} = ${firstValue}$ et $r = ${reason}$, on a :
|
|
34
|
+
|
|
35
|
+
${alignTex([
|
|
36
|
+
[
|
|
37
|
+
"u_n",
|
|
38
|
+
"=",
|
|
39
|
+
add(firstValue, multiply(substract("n", firstRank), reason)).toTex(),
|
|
40
|
+
],
|
|
41
|
+
["", "=", answer.split("=")[1]],
|
|
42
|
+
])}
|
|
43
|
+
`;
|
|
44
|
+
};
|
|
45
|
+
const getInstruction = (identifiers) => {
|
|
46
|
+
const { firstRank, firstValue, reason } = identifiers;
|
|
47
|
+
return `$(u_n)$ est une suite arithmétique de premier terme $u_{${firstRank}} = ${firstValue}$ et de raison $r = ${reason}$.
|
|
48
|
+
|
|
49
|
+
Donner l'expression de $u_n$ en fonction de $n$.`;
|
|
50
|
+
};
|
|
51
|
+
const getAnswer = (identifiers) => {
|
|
52
|
+
const { firstRank, firstValue, reason } = identifiers;
|
|
53
|
+
const formula = new Polynomial([firstValue - firstRank * reason, reason], "n");
|
|
54
|
+
const answer = "u_n=" + formula.toTex();
|
|
55
|
+
return answer;
|
|
56
|
+
};
|
|
8
57
|
const getArithmeticFindExplicitFormulaFirstTermRandom = () => {
|
|
9
58
|
const firstRank = randint(0, 8);
|
|
10
59
|
const firstValue = randint(-10, 10);
|
|
11
60
|
const reason = randint(-10, 10, [0]);
|
|
12
|
-
const
|
|
13
|
-
const answer = "u_n=" + formula.toTex();
|
|
61
|
+
const identifiers = { firstValue, reason, firstRank };
|
|
14
62
|
const question = {
|
|
15
|
-
instruction:
|
|
16
|
-
answer,
|
|
63
|
+
instruction: getInstruction(identifiers),
|
|
64
|
+
answer: getAnswer(identifiers),
|
|
17
65
|
keys: ["un", "equal", "n"],
|
|
18
66
|
answerFormat: "tex",
|
|
19
|
-
identifiers
|
|
67
|
+
identifiers,
|
|
68
|
+
hint: getHint(identifiers),
|
|
69
|
+
correction: getCorrection(identifiers),
|
|
20
70
|
};
|
|
21
71
|
return question;
|
|
22
72
|
};
|
|
@@ -31,20 +81,25 @@ const getPropositions = (n, { answer, firstValue, reason }) => {
|
|
|
31
81
|
}
|
|
32
82
|
return shuffle(propositions);
|
|
33
83
|
};
|
|
34
|
-
const isAnswerValid = (ans, { reason, firstValue
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
84
|
+
const isAnswerValid = (ans, { answer, reason, firstValue }) => {
|
|
85
|
+
try {
|
|
86
|
+
const formated = ans.replaceAll("u_n", "").replaceAll("=", "");
|
|
87
|
+
const parsed = parseAlgebraic(formated);
|
|
88
|
+
return (parsed
|
|
89
|
+
.simplify({
|
|
90
|
+
towardsDistribute: true,
|
|
91
|
+
forbidFactorize: true,
|
|
92
|
+
})
|
|
93
|
+
.toTex() === answer.split("=")[1]);
|
|
94
|
+
}
|
|
95
|
+
catch (err) {
|
|
96
|
+
return handleVEAError(err);
|
|
97
|
+
}
|
|
41
98
|
};
|
|
42
99
|
export const arithmeticFindExplicitFormulaFirstTermRandom = {
|
|
43
100
|
id: "arithmeticFindExplicitFormulaFirstTermRandom",
|
|
44
101
|
connector: "=",
|
|
45
102
|
label: "Déterminer la formule générale d'une suite arithmétique (premier rang aléatoire)",
|
|
46
|
-
levels: ["1reESM", "1reSpé", "1reTech", "1rePro", "TermTech", "TermPro"],
|
|
47
|
-
sections: ["Suites"],
|
|
48
103
|
isSingleStep: false,
|
|
49
104
|
generator: (nb) => getDistinctQuestions(getArithmeticFindExplicitFormulaFirstTermRandom, nb),
|
|
50
105
|
qcmTimer: 60,
|
|
@@ -52,4 +107,9 @@ export const arithmeticFindExplicitFormulaFirstTermRandom = {
|
|
|
52
107
|
getPropositions,
|
|
53
108
|
isAnswerValid,
|
|
54
109
|
subject: "Mathématiques",
|
|
110
|
+
getAnswer,
|
|
111
|
+
getInstruction,
|
|
112
|
+
getHint,
|
|
113
|
+
getCorrection,
|
|
114
|
+
hasHintAndCorrection: true,
|
|
55
115
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/spaceGeometry/relativePositions/index.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"linesRelativePositions.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/spaceGeometry/relativePositions/linesRelativePositions.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
// import {
|
|
2
|
+
// Exercise,
|
|
3
|
+
// Proposition,
|
|
4
|
+
// QCMGenerator,
|
|
5
|
+
// Question,
|
|
6
|
+
// QuestionGenerator,
|
|
7
|
+
// VEA,
|
|
8
|
+
// addValidProp,
|
|
9
|
+
// shuffleProps,
|
|
10
|
+
// GetAnswer,
|
|
11
|
+
// GetHint,
|
|
12
|
+
// GetCorrection,
|
|
13
|
+
// GetInstruction,
|
|
14
|
+
// GetKeys,
|
|
15
|
+
// } from '../../../../exercises/exercise.js';
|
|
16
|
+
// import { getDistinctQuestions } from '../../../../exercises/utils/getDistinctQuestions.js';
|
|
17
|
+
// import { handleVEAError } from "../../../../utils/errors/handleVEAError.js";
|
|
18
|
+
export {};
|
|
19
|
+
// type Identifiers = {
|
|
20
|
+
// };
|
|
21
|
+
// const getPropositions: QCMGenerator<Identifiers> = (n, { answer }) => {
|
|
22
|
+
// const propositions: Proposition[] = [];
|
|
23
|
+
// addValidProp(propositions, answer);
|
|
24
|
+
// while (propositions.length < n) {
|
|
25
|
+
// throw Error("QCM not implemented")
|
|
26
|
+
// }
|
|
27
|
+
// return shuffleProps(propositions, n);
|
|
28
|
+
// };
|
|
29
|
+
// const getAnswer : GetAnswer<Identifiers> = (identifiers)=>{
|
|
30
|
+
// }
|
|
31
|
+
// const getInstruction : GetInstruction<Identifiers> = (identifiers)=>{
|
|
32
|
+
// }
|
|
33
|
+
// const getHint : GetHint<Identifiers> = (identifiers)=>{
|
|
34
|
+
// }
|
|
35
|
+
// const getCorrection : GetCorrection<Identifiers> = (identifiers)=>{
|
|
36
|
+
// }
|
|
37
|
+
// const getKeys : GetKeys<Identifiers> = (identifiers)=>{
|
|
38
|
+
// return []
|
|
39
|
+
// }
|
|
40
|
+
// const isAnswerValid: VEA<Identifiers> = (ans, {answer})=>{
|
|
41
|
+
// try {
|
|
42
|
+
// throw Error("VEA not implemented")
|
|
43
|
+
// } catch(err){
|
|
44
|
+
// return handleVEAError(err)
|
|
45
|
+
// }
|
|
46
|
+
// }
|
|
47
|
+
// const getLinesRelativePositionsQuestion: QuestionGenerator<Identifiers> = (ops)=>{
|
|
48
|
+
// const identifiers: Identifiers = {}
|
|
49
|
+
// const question: Question<Identifiers> = {
|
|
50
|
+
// answer: getAnswer(identifiers),
|
|
51
|
+
// instruction: getInstruction(identifiers),
|
|
52
|
+
// keys: getKeys(identifiers),
|
|
53
|
+
// answerFormat: 'tex',
|
|
54
|
+
// identifiers,
|
|
55
|
+
// hint: getHint(identifiers),
|
|
56
|
+
// correction: getCorrection(identifiers)
|
|
57
|
+
// };
|
|
58
|
+
// return question;
|
|
59
|
+
// }
|
|
60
|
+
// export const linesRelativePositions: Exercise<Identifiers> = {
|
|
61
|
+
// id: 'linesRelativePositions',
|
|
62
|
+
// connector: "",
|
|
63
|
+
// label: undefined,
|
|
64
|
+
// isSingleStep: true,
|
|
65
|
+
// generator: (nb, opts) => getDistinctQuestions(()=>getLinesRelativePositionsQuestion(opts), nb),
|
|
66
|
+
// qcmTimer: 60,
|
|
67
|
+
// freeTimer: 60,
|
|
68
|
+
// getPropositions,
|
|
69
|
+
// isAnswerValid,
|
|
70
|
+
// subject: "Mathématiques",
|
|
71
|
+
// getInstruction,
|
|
72
|
+
// getHint,
|
|
73
|
+
// getCorrection,
|
|
74
|
+
// getAnswer,
|
|
75
|
+
// };
|
package/lib/index.d.ts
CHANGED
|
@@ -1923,6 +1923,15 @@ declare const mathExercises: (Exercise<{
|
|
|
1923
1923
|
}, {}> | Exercise<{
|
|
1924
1924
|
points: number[][];
|
|
1925
1925
|
labels: string[];
|
|
1926
|
+
}, {}> | Exercise<{
|
|
1927
|
+
rand: number;
|
|
1928
|
+
hasTwoAnswers: boolean;
|
|
1929
|
+
}, {}> | Exercise<{
|
|
1930
|
+
rand: number;
|
|
1931
|
+
hasTwoAnswers: boolean;
|
|
1932
|
+
}, {}> | Exercise<{
|
|
1933
|
+
rand: number;
|
|
1934
|
+
hasTwoAnswers: boolean;
|
|
1926
1935
|
}, {}>)[];
|
|
1927
1936
|
declare const pcExercises: (Exercise<{
|
|
1928
1937
|
numbers: number[];
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAG7D,OAAO,4BAA4B,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAE/D,QAAA,MAAM,aAAa
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAG7D,OAAO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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAA6B,CAAC;AAE/C,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"questionTest.d.ts","sourceRoot":"","sources":["../../src/tests/questionTest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAIjE,eAAO,MAAM,YAAY,QAAS,QAAQ,YAAY,QAAQ;;;
|
|
1
|
+
{"version":3,"file":"questionTest.d.ts","sourceRoot":"","sources":["../../src/tests/questionTest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAIjE,eAAO,MAAM,YAAY,QAAS,QAAQ,YAAY,QAAQ;;;CAoL7D,CAAC"}
|
|
@@ -14,6 +14,11 @@ export const questionTest = (exo, question) => {
|
|
|
14
14
|
if (!question.correction?.length) {
|
|
15
15
|
throw new Error(`exo ${exo.id} has no correction`);
|
|
16
16
|
}
|
|
17
|
+
const imgRegex = /!\[.*?\]\((.*?)\)/g;
|
|
18
|
+
const matches = question.correction.matchAll(imgRegex);
|
|
19
|
+
for (const match of matches) {
|
|
20
|
+
question.correction = question.correction.replace(match[0], ``);
|
|
21
|
+
}
|
|
17
22
|
const formatedCorrection = formatMarkdownToLatex(question.correction);
|
|
18
23
|
if (!latexTester(formatedCorrection)) {
|
|
19
24
|
throw new Error(`exo ${exo.id} has invalid correction`);
|
|
@@ -1,2 +1,8 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export declare class DualReturn<T, U> {
|
|
2
|
+
private defaultValue;
|
|
3
|
+
private additional?;
|
|
4
|
+
constructor(defaultValue: T, additional?: U | undefined);
|
|
5
|
+
valueOf(): T;
|
|
6
|
+
[Symbol.iterator](): Generator<T | (U & ({} | null)), void, unknown>;
|
|
7
|
+
}
|
|
2
8
|
//# sourceMappingURL=dualReturn.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dualReturn.d.ts","sourceRoot":"","sources":["../../../src/utils/iterators/dualReturn.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"dualReturn.d.ts","sourceRoot":"","sources":["../../../src/utils/iterators/dualReturn.ts"],"names":[],"mappings":"AAAA,qBAAa,UAAU,CAAC,CAAC,EAAE,CAAC;IACd,OAAO,CAAC,YAAY;IAAK,OAAO,CAAC,UAAU,CAAC;gBAApC,YAAY,EAAE,CAAC,EAAU,UAAU,CAAC,EAAE,CAAC,YAAA;IAG3D,OAAO;IAKN,CAAC,MAAM,CAAC,QAAQ,CAAC;CAInB"}
|