math-exercises 3.0.129 → 3.0.131
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/ordering/compareA10N.d.ts +6 -1
- package/lib/exercises/math/calcul/ordering/compareA10N.d.ts.map +1 -1
- package/lib/exercises/math/calcul/ordering/compareA10N.js +56 -49
- package/lib/exercises/math/calcul/ordering/compareABUsingQuotient.js +1 -1
- package/lib/exercises/math/calcul/ordering/compareFracAndDec.d.ts.map +1 -1
- package/lib/exercises/math/calcul/ordering/compareFracAndDec.js +1 -7
- package/lib/exercises/math/calcul/ordering/compareWithSquareRoots.d.ts.map +1 -1
- package/lib/exercises/math/calcul/ordering/compareWithSquareRoots.js +1 -40
- package/lib/exercises/math/calcul/rounding/estimateAroundPow10NTimesAroundPow10N.d.ts.map +1 -1
- package/lib/exercises/math/calcul/rounding/estimateAroundPow10NTimesAroundPow10N.js +1 -15
- package/lib/exercises/math/calcul/rounding/estimatePow10NPlusPow10MinusN.d.ts.map +1 -1
- package/lib/exercises/math/calcul/rounding/estimatePow10NPlusPow10MinusN.js +1 -13
- package/lib/exercises/math/calculLitteral/equation/equationFromProblem.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/equationFromProblem.js +7 -2
- package/lib/exercises/math/calculLitteral/equation/equationWithDistributivity.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/equationWithDistributivity.js +15 -11
- package/lib/exercises/math/calculLitteral/equation/multiplicationEquation.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/multiplicationEquation.js +6 -5
- package/lib/exercises/math/calculLitteral/factorisation/index.d.ts +0 -1
- package/lib/exercises/math/calculLitteral/factorisation/index.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/factorisation/index.js +1 -1
- package/lib/exercises/math/calculLitteral/ordering/compareAMinusB.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/ordering/compareAMinusB.js +1 -4
- package/lib/exercises/math/calculLitteral/simplifying/compareATimes0.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/simplifying/compareATimes0.js +27 -46
- package/lib/exercises/math/calculLitteral/simplifying/compareMinusA.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/simplifying/compareMinusA.js +25 -42
- package/lib/exercises/math/dataRepresentations/barChartInterpreting.d.ts.map +1 -1
- package/lib/exercises/math/dataRepresentations/barChartInterpreting.js +25 -15
- package/lib/exercises/math/dataRepresentations/scatterPlotCommenting.d.ts.map +1 -1
- package/lib/exercises/math/dataRepresentations/scatterPlotCommenting.js +5 -103
- package/lib/exercises/math/geometry/euclidian/pythagoreOrThales.js +2 -2
- package/lib/exercises/math/percent/evolutions/evolutionRateFromValues.d.ts.map +1 -1
- package/lib/exercises/math/percent/evolutions/evolutionRateFromValues.js +29 -16
- package/lib/exercises/math/percent/findProportion.d.ts +1 -5
- package/lib/exercises/math/percent/findProportion.d.ts.map +1 -1
- package/lib/exercises/math/percent/findProportion.js +75 -81
- package/lib/exercises/math/probaStat/randomVariable/randomVariableAverage.js +1 -1
- package/lib/exercises/vea/isNodesEqual.d.ts +3 -0
- package/lib/exercises/vea/isNodesEqual.d.ts.map +1 -0
- package/lib/exercises/vea/isNodesEqual.js +6 -0
- package/lib/exercises/vea/setVEA.d.ts +5 -0
- package/lib/exercises/vea/setVEA.d.ts.map +1 -0
- package/lib/exercises/vea/setVEA.js +25 -0
- package/lib/index.d.ts +7 -18
- package/lib/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compareA10N.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/ordering/compareA10N.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"compareA10N.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/ordering/compareA10N.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAgBT,MAAM,6BAA6B,CAAC;AAkBrC,KAAK,IAAI,GAAG;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAEF,KAAK,IAAI,GAAG;IACV,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,KAAK,EAAE,IAAI,EAAE,CAAC;CACf,CAAC;AA2TF,KAAK,OAAO,GAAG;IACb,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB,CAAC;AAyCF,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAgBtD,CAAC"}
|
|
@@ -6,12 +6,11 @@ import { round } from "../../../../math/utils/round.js";
|
|
|
6
6
|
import { frac } from "../../../../tree/nodes/operators/fractionNode.js";
|
|
7
7
|
import { multiply, } from "../../../../tree/nodes/operators/multiplyNode.js";
|
|
8
8
|
import { power } from "../../../../tree/nodes/operators/powerNode.js";
|
|
9
|
-
import { parseAlgebraic } from "../../../../tree/parsers/latexParser.js";
|
|
10
9
|
import { coinFlip } from "../../../../utils/alea/coinFlip.js";
|
|
11
10
|
import { probaLawFlip } from "../../../../utils/alea/probaLawFlip.js";
|
|
12
11
|
import { random, randomMany } from "../../../../utils/alea/random.js";
|
|
13
12
|
import { shuffle } from "../../../../utils/alea/shuffle.js";
|
|
14
|
-
import {
|
|
13
|
+
import { getAllPicks } from "../../../../utils/arrays/getAllPicks.js";
|
|
15
14
|
const getTexForA10N = (a10N) => {
|
|
16
15
|
const { a, n } = a10N;
|
|
17
16
|
return `${a.frenchify()} \\times 10^{${n}}`;
|
|
@@ -55,12 +54,14 @@ const compareFuncForA10N = (a10N1, a10N2) => {
|
|
|
55
54
|
}
|
|
56
55
|
};
|
|
57
56
|
const getInstruction = (identifiers) => {
|
|
58
|
-
const {
|
|
59
|
-
return `
|
|
57
|
+
const { a10Ns } = identifiers;
|
|
58
|
+
return `Voici une liste de nombres :
|
|
60
59
|
|
|
61
|
-
$$
|
|
62
|
-
|
|
63
|
-
|
|
60
|
+
${a10Ns.map((a10N) => `- $${getTexForA10N(a10N)}$`).join(`
|
|
61
|
+
|
|
62
|
+
`)}
|
|
63
|
+
|
|
64
|
+
Parmi les propositions suivantes, lesquelles sont vraies ?`;
|
|
64
65
|
};
|
|
65
66
|
const getHint = (identifiers) => {
|
|
66
67
|
const { signType } = identifiers;
|
|
@@ -87,15 +88,15 @@ On range les puissances de $10$ en ordre croissant, puis pour chaque puissance d
|
|
|
87
88
|
`;
|
|
88
89
|
};
|
|
89
90
|
const getCorrection = (identifiers) => {
|
|
90
|
-
const { signType,
|
|
91
|
+
const { signType, a10Ns } = identifiers;
|
|
91
92
|
return `Même si on a l'impression que les nombres sont écris en écriture scientifique, ce n'est pas le cas.
|
|
92
93
|
Il faut les convertir en écriture scientifique et utiliser cette écriture pour les ranger dans l'ordre croissant.
|
|
93
94
|
|
|
94
|
-
${
|
|
95
|
-
.map((
|
|
95
|
+
${a10Ns
|
|
96
|
+
.map((a10N) => `
|
|
96
97
|
|
|
97
98
|
$$
|
|
98
|
-
${getTexForA10N(
|
|
99
|
+
${getTexForA10N(a10N)} = ${getSciMultNodeForA10N(a10N).toTex()}
|
|
99
100
|
$$
|
|
100
101
|
|
|
101
102
|
`)
|
|
@@ -104,45 +105,45 @@ $$
|
|
|
104
105
|
${(() => {
|
|
105
106
|
switch (signType) {
|
|
106
107
|
case "positifs": {
|
|
107
|
-
const positive =
|
|
108
|
+
const positive = a10Ns.toSorted(compareFuncForA10N);
|
|
108
109
|
return `Ici, tous les nombres sont positifs, donc
|
|
109
110
|
on range les puissances de $10$ en ordre croissant, puis pour chaque puissance de $10$, les facteurs en ordre croissant.
|
|
110
111
|
C'est un double tri.
|
|
111
112
|
|
|
112
113
|
$$
|
|
113
|
-
${positive.map((
|
|
114
|
+
${positive.map((a10N) => getSciMultNodeForA10N(a10N).toTex()).join("<")}
|
|
114
115
|
$$
|
|
115
116
|
|
|
116
117
|
Conclusion :
|
|
117
118
|
|
|
118
119
|
$$
|
|
119
|
-
${positive.map((
|
|
120
|
+
${positive.map((a10N) => getTexForA10N(a10N)).join("<")}
|
|
120
121
|
$$
|
|
121
122
|
|
|
122
123
|
`;
|
|
123
124
|
}
|
|
124
125
|
case "négatifs": {
|
|
125
|
-
const negative =
|
|
126
|
+
const negative = a10Ns.toSorted(compareFuncForA10N);
|
|
126
127
|
return `Ici, tous les nombres sont négatifs, donc
|
|
127
128
|
on range les puissances de $10$ en ordre décroissant, puis pour chaque puissance de $10$, les facteurs en ordre décroissant.
|
|
128
129
|
C'est un double tri.
|
|
129
130
|
|
|
130
131
|
$$
|
|
131
|
-
${negative.map((
|
|
132
|
+
${negative.map((a10N) => getSciMultNodeForA10N(a10N).toTex()).join("<")}
|
|
132
133
|
$$
|
|
133
134
|
|
|
134
135
|
Conclusion :
|
|
135
136
|
|
|
136
137
|
$$
|
|
137
|
-
${negative.map((
|
|
138
|
+
${negative.map((a10N) => getTexForA10N(a10N)).join("<")}
|
|
138
139
|
$$
|
|
139
140
|
`;
|
|
140
141
|
}
|
|
141
142
|
case "mélange": {
|
|
142
|
-
const positive =
|
|
143
|
+
const positive = a10Ns
|
|
143
144
|
.filter(({ a }) => a >= 0)
|
|
144
145
|
.toSorted(compareFuncForA10N);
|
|
145
|
-
const negative =
|
|
146
|
+
const negative = a10Ns
|
|
146
147
|
.filter(({ a }) => a < 0)
|
|
147
148
|
.toSorted(compareFuncForA10N);
|
|
148
149
|
return `Ici, il y a des nombres négatifs et des nombres positifs.
|
|
@@ -150,20 +151,20 @@ On commence par les négatifs :
|
|
|
150
151
|
on range les puissances de $10$ en ordre décroissant, puis pour chaque puissance de $10$, les facteurs en ordre décroissant.
|
|
151
152
|
|
|
152
153
|
$$
|
|
153
|
-
${negative.map((
|
|
154
|
+
${negative.map((a10N) => getSciMultNodeForA10N(a10N).toTex()).join("<")}
|
|
154
155
|
$$
|
|
155
156
|
|
|
156
157
|
Puis on range les positifs :
|
|
157
158
|
on range les puissances de $10$ en ordre croissant, puis pour chaque puissance de $10$, les facteurs en ordre croissant.
|
|
158
159
|
|
|
159
160
|
$$
|
|
160
|
-
${positive.map((
|
|
161
|
+
${positive.map((a10N) => getSciMultNodeForA10N(a10N).toTex()).join("<")}
|
|
161
162
|
$$
|
|
162
163
|
|
|
163
164
|
Conclusion :
|
|
164
165
|
|
|
165
166
|
$$
|
|
166
|
-
${[...negative, ...positive].map((
|
|
167
|
+
${[...negative, ...positive].map((a10N) => getTexForA10N(a10N)).join("<")}
|
|
167
168
|
$$
|
|
168
169
|
`;
|
|
169
170
|
}
|
|
@@ -174,37 +175,23 @@ $$
|
|
|
174
175
|
const getPropositions = (n, { answer, ...identifiers }) => {
|
|
175
176
|
const { items } = identifiers;
|
|
176
177
|
const propositions = [];
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
178
|
+
items.forEach((item) => {
|
|
179
|
+
if (item.isValid) {
|
|
180
|
+
addValidProp(propositions, item.tex);
|
|
181
|
+
}
|
|
182
|
+
else {
|
|
183
|
+
tryToAddWrongProp(propositions, item.tex);
|
|
184
|
+
}
|
|
184
185
|
});
|
|
185
186
|
return shuffleProps(propositions, n);
|
|
186
187
|
};
|
|
187
|
-
const getAnswer = (identifiers) => {
|
|
188
|
-
const { items } = identifiers;
|
|
189
|
-
const answer = items
|
|
190
|
-
.toSorted(compareFuncForA10N)
|
|
191
|
-
.map((item) => getTexForA10N(item))
|
|
192
|
-
.join("<");
|
|
193
|
-
return answer;
|
|
194
|
-
};
|
|
195
|
-
const isAnswerValid = (ans, { answer, items }) => {
|
|
196
|
-
const nbItems = items.length;
|
|
197
|
-
const [ansNodes, answerNodes] = [ans, answer].map((str) => str.split("<").map((tex) => parseAlgebraic(tex)));
|
|
198
|
-
return (ansNodes.length === nbItems &&
|
|
199
|
-
[...Array(nbItems).keys()].every((i) => ansNodes[i].equals(answerNodes[i])));
|
|
200
|
-
};
|
|
201
188
|
const getKeys = (identifiers) => {
|
|
202
|
-
const {
|
|
189
|
+
const { a10Ns } = identifiers;
|
|
203
190
|
return [
|
|
204
191
|
"sup",
|
|
205
192
|
"inf",
|
|
206
|
-
...
|
|
207
|
-
const tex = getTexForA10N(
|
|
193
|
+
...a10Ns.map((a10N) => {
|
|
194
|
+
const tex = getTexForA10N(a10N);
|
|
208
195
|
return {
|
|
209
196
|
id: "custom",
|
|
210
197
|
label: tex,
|
|
@@ -263,14 +250,34 @@ const getCompareA10NQuestion = (optsIn) => {
|
|
|
263
250
|
arrayOfN.push(random(subPoolOfN) + random([-2, -1, 0, 1, 2]));
|
|
264
251
|
}
|
|
265
252
|
arrayOfN = shuffle(arrayOfN);
|
|
266
|
-
const
|
|
253
|
+
const a10Ns = [...Array(nbItems).keys()].map((i) => {
|
|
267
254
|
return {
|
|
268
255
|
a: arrayOfA[i],
|
|
269
256
|
n: arrayOfN[i],
|
|
270
257
|
};
|
|
271
258
|
});
|
|
259
|
+
const nbTotal = 4;
|
|
260
|
+
const nbValid = randint(1, 4);
|
|
261
|
+
const ascOrderedA10Ns = a10Ns.toSorted(compareFuncForA10N);
|
|
262
|
+
const items = shuffle(shuffle(getAllPicks(ascOrderedA10Ns).filter((arr) => arr.length === 2))
|
|
263
|
+
.slice(0, nbTotal)
|
|
264
|
+
.map(([a10N1, a10N2], i) => {
|
|
265
|
+
if (i < nbValid) {
|
|
266
|
+
return {
|
|
267
|
+
tex: `${getTexForA10N(a10N1)}<${getTexForA10N(a10N2)}`,
|
|
268
|
+
isValid: true,
|
|
269
|
+
};
|
|
270
|
+
}
|
|
271
|
+
else {
|
|
272
|
+
return {
|
|
273
|
+
tex: `${getTexForA10N(a10N2)}<${getTexForA10N(a10N1)}`,
|
|
274
|
+
isValid: false,
|
|
275
|
+
};
|
|
276
|
+
}
|
|
277
|
+
}));
|
|
272
278
|
return getQuestionFromIdentifiers({
|
|
273
279
|
signType,
|
|
280
|
+
a10Ns,
|
|
274
281
|
items,
|
|
275
282
|
});
|
|
276
283
|
};
|
|
@@ -298,7 +305,6 @@ const options = [
|
|
|
298
305
|
];
|
|
299
306
|
const getQuestionFromIdentifiers = (identifiers, opts) => {
|
|
300
307
|
const question = {
|
|
301
|
-
answer: getAnswer(identifiers),
|
|
302
308
|
instruction: getInstruction(identifiers),
|
|
303
309
|
keys: getKeys(identifiers),
|
|
304
310
|
answerFormat: "tex",
|
|
@@ -318,9 +324,10 @@ export const compareA10N = {
|
|
|
318
324
|
qcmTimer: 60,
|
|
319
325
|
freeTimer: 60,
|
|
320
326
|
getPropositions,
|
|
321
|
-
isAnswerValid,
|
|
322
327
|
subject: "Mathématiques",
|
|
323
328
|
maxAllowedQuestions: 30,
|
|
324
329
|
getQuestionFromIdentifiers,
|
|
325
330
|
hasHintAndCorrection: true,
|
|
331
|
+
answerType: "QCM",
|
|
332
|
+
isQCM: true,
|
|
326
333
|
};
|
|
@@ -10,7 +10,7 @@ const getInstruction = (identifiers) => {
|
|
|
10
10
|
const [A, B] = orderedNodeIds.map((nodeIds) => NodeConstructor.fromIdentifiers(nodeIds).toTex());
|
|
11
11
|
return `Sachant que $\\frac{${B}}{${A}} > 1$,
|
|
12
12
|
|
|
13
|
-
comparer $${B}$ et $${A}
|
|
13
|
+
comparer $${B}$ et $${A}$.`;
|
|
14
14
|
};
|
|
15
15
|
const getHint = (identifiers) => {
|
|
16
16
|
const { orderedNodeIds } = identifiers;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compareFracAndDec.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/ordering/compareFracAndDec.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"compareFracAndDec.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/ordering/compareFracAndDec.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAgBT,MAAM,6BAA6B,CAAC;AAIrC,OAAO,EAEL,eAAe,EAChB,MAAM,qCAAqC,CAAC;AAU7C,KAAK,OAAO,GAAG;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,aAAa,EAAE,OAAO,CAAC;CACxB,CAAC;AAEF,KAAK,aAAa,GAAG;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,eAAe,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,KAAK,WAAW,GAAG;IACjB,cAAc,EAAE,aAAa,EAAE,CAAC;IAChC,KAAK,EAAE,OAAO,EAAE,CAAC;CAClB,CAAC;AA6RF,KAAK,OAAO,GAAG;IACb,QAAQ,EAAE,OAAO,CAAC;IAClB,eAAe,EAAE,MAAM,CAAC;IACxB,yBAAyB,EAAE,OAAO,CAAC;CACpC,CAAC;AAuBF,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAgB5D,CAAC"}
|
|
@@ -5,7 +5,6 @@ import { NodeConstructor, } from "../../../../tree/nodes/nodeConstructor.js";
|
|
|
5
5
|
import { frac } from "../../../../tree/nodes/operators/fractionNode.js";
|
|
6
6
|
import { multiply } from "../../../../tree/nodes/operators/multiplyNode.js";
|
|
7
7
|
import { substract } from "../../../../tree/nodes/operators/substractNode.js";
|
|
8
|
-
import { parseAlgebraic } from "../../../../tree/parsers/latexParser.js";
|
|
9
8
|
import { coinFlip } from "../../../../utils/alea/coinFlip.js";
|
|
10
9
|
import { random } from "../../../../utils/alea/random.js";
|
|
11
10
|
import { shuffle } from "../../../../utils/alea/shuffle.js";
|
|
@@ -108,11 +107,6 @@ const getAnswer = (identifiers) => {
|
|
|
108
107
|
const answer = items.find((item) => item.isValidAnswer).tex;
|
|
109
108
|
return answer;
|
|
110
109
|
};
|
|
111
|
-
const isAnswerValid = (ans, { answer }) => {
|
|
112
|
-
const [ansNodes, answerNodes] = [ans, answer].map((str) => str.split(">").map((tex) => parseAlgebraic(tex)));
|
|
113
|
-
return (ansNodes.length === 3 &&
|
|
114
|
-
[0, 1, 2].every((i) => substract(ansNodes[i], answerNodes[i]).evaluate() === 0));
|
|
115
|
-
};
|
|
116
110
|
const getKeys = (identifiers, optsIn) => {
|
|
117
111
|
const { questionParams } = identifiers;
|
|
118
112
|
const opts = Object.assign(optsDefault, optsIn);
|
|
@@ -249,9 +243,9 @@ export const compareFracAndDec = {
|
|
|
249
243
|
qcmTimer: 60,
|
|
250
244
|
freeTimer: 60,
|
|
251
245
|
getPropositions,
|
|
252
|
-
isAnswerValid,
|
|
253
246
|
subject: "Mathématiques",
|
|
254
247
|
maxAllowedQuestions: 30,
|
|
255
248
|
getQuestionFromIdentifiers,
|
|
256
249
|
hasHintAndCorrection: true,
|
|
250
|
+
answerType: "QCU",
|
|
257
251
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compareWithSquareRoots.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/ordering/compareWithSquareRoots.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"compareWithSquareRoots.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/ordering/compareWithSquareRoots.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAMrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,OAAO,CAAC;CAChB,CAAC;AAsIF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,CAexD,CAAC"}
|
|
@@ -1,12 +1,7 @@
|
|
|
1
1
|
import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
|
|
2
2
|
import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
3
|
import { randint } from "../../../../math/utils/random/randint.js";
|
|
4
|
-
import { sqrt } from "../../../../tree/nodes/functions/sqrtNode.js";
|
|
5
|
-
import { add } from "../../../../tree/nodes/operators/addNode.js";
|
|
6
|
-
import { substract } from "../../../../tree/nodes/operators/substractNode.js";
|
|
7
|
-
import { parseAlgebraic } from "../../../../tree/parsers/latexParser.js";
|
|
8
4
|
import { coinFlip } from "../../../../utils/alea/coinFlip.js";
|
|
9
|
-
import { handleVEAError } from "../../../../utils/errors/handleVEAError.js";
|
|
10
5
|
const getInstruction = (identifiers) => {
|
|
11
6
|
const { a, b, isAdd } = identifiers;
|
|
12
7
|
return `Sachant que $\\sqrt{${a}} < \\sqrt{${a + 1}}$,
|
|
@@ -48,44 +43,10 @@ $$
|
|
|
48
43
|
|
|
49
44
|
`;
|
|
50
45
|
};
|
|
51
|
-
const getAnswerNodes = (identifiers) => {
|
|
52
|
-
const { a, b, isAdd } = identifiers;
|
|
53
|
-
const addSub = isAdd ? add : substract;
|
|
54
|
-
const nodeWithA = addSub(b, sqrt(a));
|
|
55
|
-
const nodeWithAPlus1 = addSub(b, sqrt(add(a, 1)));
|
|
56
|
-
return isAdd ? [nodeWithA, nodeWithAPlus1] : [nodeWithAPlus1, nodeWithA];
|
|
57
|
-
};
|
|
58
46
|
const getAnswer = (identifiers) => {
|
|
59
47
|
const { a, b, isAdd } = identifiers;
|
|
60
48
|
return `${b}${isAdd ? "+" : "-"}\\sqrt{${a}}${isAdd ? "<" : ">"}${b}${isAdd ? "+" : "-"}\\sqrt{${a + 1}}`;
|
|
61
49
|
};
|
|
62
|
-
const isAnswerValid = (ans, { answer, ...identifiers }) => {
|
|
63
|
-
function getOrderedNodesFromTex(tex, compSymbol) {
|
|
64
|
-
return tex
|
|
65
|
-
.split(compSymbol)
|
|
66
|
-
.map((str) => parseAlgebraic(str))
|
|
67
|
-
.toSorted(() => (compSymbol === "<" ? +1 : -1));
|
|
68
|
-
}
|
|
69
|
-
try {
|
|
70
|
-
const compSymbol = ans.includes("<")
|
|
71
|
-
? "<"
|
|
72
|
-
: ans.includes(">")
|
|
73
|
-
? ">"
|
|
74
|
-
: undefined;
|
|
75
|
-
if (compSymbol) {
|
|
76
|
-
const [ansNode1, ansNode2] = getOrderedNodesFromTex(ans, compSymbol);
|
|
77
|
-
const [answerNode1, answerNode2] = getAnswerNodes(identifiers);
|
|
78
|
-
return (substract(ansNode1, answerNode1).simplify().evaluate() === 0 &&
|
|
79
|
-
substract(ansNode2, answerNode2).simplify().evaluate() === 0);
|
|
80
|
-
}
|
|
81
|
-
else {
|
|
82
|
-
return false;
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
catch (err) {
|
|
86
|
-
return handleVEAError(err);
|
|
87
|
-
}
|
|
88
|
-
};
|
|
89
50
|
const getPropositions = (nbProps, { answer, ...identifiers }) => {
|
|
90
51
|
const { a, b, isAdd } = identifiers;
|
|
91
52
|
const propositions = [];
|
|
@@ -140,10 +101,10 @@ export const compareWithSquareRoots = {
|
|
|
140
101
|
qcmTimer: 60,
|
|
141
102
|
freeTimer: 60,
|
|
142
103
|
getPropositions,
|
|
143
|
-
isAnswerValid,
|
|
144
104
|
getAnswer,
|
|
145
105
|
subject: "Mathématiques",
|
|
146
106
|
maxAllowedQuestions: 30,
|
|
147
107
|
getQuestionFromIdentifiers,
|
|
148
108
|
hasHintAndCorrection: true,
|
|
109
|
+
answerType: "QCU",
|
|
149
110
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"estimateAroundPow10NTimesAroundPow10N.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/rounding/estimateAroundPow10NTimesAroundPow10N.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"estimateAroundPow10NTimesAroundPow10N.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/rounding/estimateAroundPow10NTimesAroundPow10N.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAarC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAmEF,eAAO,MAAM,qCAAqC,EAAE,QAAQ,CAAC,WAAW,CAmBvE,CAAC"}
|
|
@@ -3,9 +3,7 @@ import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQue
|
|
|
3
3
|
import { randint } from "../../../../math/utils/random/randint.js";
|
|
4
4
|
import { add } from "../../../../tree/nodes/operators/addNode.js";
|
|
5
5
|
import { power } from "../../../../tree/nodes/operators/powerNode.js";
|
|
6
|
-
import { parseAlgebraic } from "../../../../tree/parsers/latexParser.js";
|
|
7
6
|
import { coinFlip } from "../../../../utils/alea/coinFlip.js";
|
|
8
|
-
import { handleVEAError } from "../../../../utils/errors/handleVEAError.js";
|
|
9
7
|
import { toSeperatedThousands } from "../../../../utils/numberPrototype/toSeparatedThousands.js";
|
|
10
8
|
const toPrettyString = (node) => {
|
|
11
9
|
return toSeperatedThousands("" + node.evaluate().toFixed(0));
|
|
@@ -28,18 +26,6 @@ const getAnswer = (identifiers) => {
|
|
|
28
26
|
const { n } = identifiers;
|
|
29
27
|
return `10^{${2 * n}}`;
|
|
30
28
|
};
|
|
31
|
-
const isAnswerValid = (ans, { answer }) => {
|
|
32
|
-
try {
|
|
33
|
-
const ansNode = parseAlgebraic(ans);
|
|
34
|
-
const answerNode = parseAlgebraic(answer);
|
|
35
|
-
return ansNode
|
|
36
|
-
.simplify({ calculatePowers: true })
|
|
37
|
-
.equals(answerNode.simplify({ calculatePowers: true }));
|
|
38
|
-
}
|
|
39
|
-
catch (err) {
|
|
40
|
-
return handleVEAError(err);
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
29
|
const getPropositions = (nbProps, { answer, ...identifiers }) => {
|
|
44
30
|
const { n } = identifiers;
|
|
45
31
|
const propositions = [];
|
|
@@ -74,10 +60,10 @@ export const estimateAroundPow10NTimesAroundPow10N = {
|
|
|
74
60
|
qcmTimer: 60,
|
|
75
61
|
freeTimer: 60,
|
|
76
62
|
getPropositions,
|
|
77
|
-
isAnswerValid,
|
|
78
63
|
getAnswer,
|
|
79
64
|
subject: "Mathématiques",
|
|
80
65
|
maxAllowedQuestions: 30,
|
|
81
66
|
getQuestionFromIdentifiers,
|
|
82
67
|
hasHintAndCorrection: true,
|
|
68
|
+
answerType: "QCU",
|
|
83
69
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"estimatePow10NPlusPow10MinusN.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/rounding/estimatePow10NPlusPow10MinusN.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"estimatePow10NPlusPow10MinusN.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/rounding/estimatePow10NPlusPow10MinusN.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAMrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AA8EF,eAAO,MAAM,6BAA6B,EAAE,QAAQ,CAAC,WAAW,CAmB/D,CAAC"}
|
|
@@ -2,9 +2,7 @@ import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../../exer
|
|
|
2
2
|
import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
3
|
import { randint } from "../../../../math/utils/random/randint.js";
|
|
4
4
|
import { power } from "../../../../tree/nodes/operators/powerNode.js";
|
|
5
|
-
import { parseAlgebraic } from "../../../../tree/parsers/latexParser.js";
|
|
6
5
|
import { random } from "../../../../utils/alea/random.js";
|
|
7
|
-
import { handleVEAError } from "../../../../utils/errors/handleVEAError.js";
|
|
8
6
|
const getInstruction = (identifiers) => {
|
|
9
7
|
const { n, varName } = identifiers;
|
|
10
8
|
const A = varName;
|
|
@@ -34,16 +32,6 @@ const getAnswer = (identifiers) => {
|
|
|
34
32
|
const { n } = identifiers;
|
|
35
33
|
return `10^{${n}}`;
|
|
36
34
|
};
|
|
37
|
-
const isAnswerValid = (ans, { answer }) => {
|
|
38
|
-
try {
|
|
39
|
-
const ansNode = parseAlgebraic(ans);
|
|
40
|
-
const answerNode = parseAlgebraic(answer);
|
|
41
|
-
return ansNode.simplify().equals(answerNode.simplify());
|
|
42
|
-
}
|
|
43
|
-
catch (err) {
|
|
44
|
-
return handleVEAError(err);
|
|
45
|
-
}
|
|
46
|
-
};
|
|
47
35
|
const getPropositions = (nbProps, { answer, ...identifiers }) => {
|
|
48
36
|
const { n } = identifiers;
|
|
49
37
|
const propositions = [];
|
|
@@ -80,10 +68,10 @@ export const estimatePow10NPlusPow10MinusN = {
|
|
|
80
68
|
qcmTimer: 60,
|
|
81
69
|
freeTimer: 60,
|
|
82
70
|
getPropositions,
|
|
83
|
-
isAnswerValid,
|
|
84
71
|
getAnswer,
|
|
85
72
|
subject: "Mathématiques",
|
|
86
73
|
maxAllowedQuestions: 30,
|
|
87
74
|
getQuestionFromIdentifiers,
|
|
88
75
|
hasHintAndCorrection: true,
|
|
76
|
+
answerType: "QCU",
|
|
89
77
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"equationFromProblem.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/equation/equationFromProblem.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAKrC,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAKlE,OAAO,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;
|
|
1
|
+
{"version":3,"file":"equationFromProblem.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/equation/equationFromProblem.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAKrC,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAKlE,OAAO,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AActE,KAAK,WAAW,GAAG;IACjB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,yBAAyB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC;IACzE,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,EAAE,EAAE,CAAC;IAC1B,YAAY,EAAE,eAAe,CAAC;CAC/B,CAAC;AAmrBF,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,WAAW,CAcrD,CAAC"}
|
|
@@ -10,7 +10,6 @@ import { multiply } from "../../../../tree/nodes/operators/multiplyNode.js";
|
|
|
10
10
|
import { substract } from "../../../../tree/nodes/operators/substractNode.js";
|
|
11
11
|
import { random, randomMany } from "../../../../utils/alea/random.js";
|
|
12
12
|
import { isOperatorNode, OperatorIds, } from "../../../../tree/nodes/operators/operatorNode.js";
|
|
13
|
-
import { mdTable } from "../../../../utils/markdown/mdTable.js";
|
|
14
13
|
import { alignTex } from "../../../../utils/latex/alignTex.js";
|
|
15
14
|
class ProblemConstructor {
|
|
16
15
|
static byHydratingSkeleton(skeleton, groupNameToVarNameToValue, mysteryVarPath, shuffleArrays) {
|
|
@@ -291,7 +290,13 @@ const getInstruction = (identifiers) => {
|
|
|
291
290
|
const { problemSkeletonIndex, groupNameToVarNameToValue, mysteryVarPath, shuffleArrays, } = identifiers;
|
|
292
291
|
const skeleton = skeletons[problemSkeletonIndex];
|
|
293
292
|
const problem = ProblemConstructor.byHydratingSkeleton(skeleton, groupNameToVarNameToValue, mysteryVarPath, shuffleArrays);
|
|
294
|
-
return
|
|
293
|
+
return `Voici une situation :
|
|
294
|
+
|
|
295
|
+
$\\ $
|
|
296
|
+
|
|
297
|
+
${problem.frenchStr}
|
|
298
|
+
|
|
299
|
+
$\\ $
|
|
295
300
|
|
|
296
301
|
Parmi les équations suivantes, laquelle modélise cette situation ?`;
|
|
297
302
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"equationWithDistributivity.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/equation/equationWithDistributivity.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAmBT,MAAM,6BAA6B,CAAC;AAmBrC,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;
|
|
1
|
+
{"version":3,"file":"equationWithDistributivity.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/equation/equationWithDistributivity.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAmBT,MAAM,6BAA6B,CAAC;AAmBrC,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAyIF,KAAK,OAAO,GAAG;IACb,gBAAgB,EAAE,OAAO,CAAC;CAC3B,CAAC;AAgEF,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAerE,CAAC"}
|
|
@@ -24,16 +24,15 @@ const getPropositions = (n, { answer }, opts) => {
|
|
|
24
24
|
});
|
|
25
25
|
return shuffleProps(propositions, n);
|
|
26
26
|
};
|
|
27
|
-
const
|
|
27
|
+
const getAnswerNode = (identifiers) => {
|
|
28
28
|
const { type, a, b, c, d, e, f } = identifiers;
|
|
29
|
-
|
|
30
|
-
? frac(substract(multiply(d, f), multiply(a, c)), substract(multiply(a, b), multiply(d, e)))
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
return `x=${sol}`;
|
|
29
|
+
return type
|
|
30
|
+
? frac(substract(multiply(d, f), multiply(a, c)), substract(multiply(a, b), multiply(d, e))).simplify()
|
|
31
|
+
: frac(substract(e, multiply(a, c)), substract(multiply(a, b), d)).simplify();
|
|
32
|
+
};
|
|
33
|
+
const getAnswer = (identifiers) => {
|
|
34
|
+
const answerNode = getAnswerNode(identifiers);
|
|
35
|
+
return `x=${answerNode.toTex()}`;
|
|
37
36
|
};
|
|
38
37
|
const getInstruction = (identifiers) => {
|
|
39
38
|
const { type, a, b, c, d, e, f } = identifiers;
|
|
@@ -100,11 +99,16 @@ $$
|
|
|
100
99
|
const getKeys = () => {
|
|
101
100
|
return ["x", "equal"];
|
|
102
101
|
};
|
|
103
|
-
const isAnswerValid = (ans, { answer }) => {
|
|
102
|
+
const isAnswerValid = (ans, { answer, ...identifiers }) => {
|
|
104
103
|
const parsed = equationSolutionParser(ans);
|
|
105
104
|
if (!parsed)
|
|
106
105
|
return false;
|
|
107
|
-
return `x=${parsed.toTex()}` === answer
|
|
106
|
+
return (`x=${parsed.toTex()}` === answer ||
|
|
107
|
+
(() => {
|
|
108
|
+
const ansNode = parsed;
|
|
109
|
+
const answerNode = getAnswerNode(identifiers);
|
|
110
|
+
return substract(ansNode, answerNode).simplify().evaluate() === 0;
|
|
111
|
+
})());
|
|
108
112
|
};
|
|
109
113
|
const getEquationWithDistributivityQuestion = (opts) => {
|
|
110
114
|
const type = random([0, 1]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"multiplicationEquation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/equation/multiplicationEquation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"multiplicationEquation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/equation/multiplicationEquation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAarC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAkIF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,CAcxD,CAAC"}
|
|
@@ -8,6 +8,8 @@ import { MultiplyNode } from "../../../../tree/nodes/operators/multiplyNode.js";
|
|
|
8
8
|
import { DiscreteSetNode } from "../../../../tree/nodes/sets/discreteSetNode.js";
|
|
9
9
|
import { alignTex } from "../../../../utils/latex/alignTex.js";
|
|
10
10
|
import { shuffle } from "../../../../utils/alea/shuffle.js";
|
|
11
|
+
import { SetVEA } from "../../../../exercises/vea/setVEA.js";
|
|
12
|
+
import { discreteSetParser } from "../../../../tree/parsers/discreteSetParser.js";
|
|
11
13
|
const getStatementNode = (identifiers) => {
|
|
12
14
|
const { a, b, c, d } = identifiers;
|
|
13
15
|
const polynome1 = new Polynomial([b, a]);
|
|
@@ -110,14 +112,13 @@ const getPropositions = (n, { answer }) => {
|
|
|
110
112
|
return shuffle(propositions);
|
|
111
113
|
};
|
|
112
114
|
const isAnswerValid = (ans, { a, b, c, d }) => {
|
|
115
|
+
const parsed = discreteSetParser(ans);
|
|
116
|
+
if (!parsed)
|
|
117
|
+
return false;
|
|
113
118
|
const sol1 = new Rational(-b, a).simplify().toTree();
|
|
114
119
|
const sol2 = new Rational(-d, c).simplify().toTree();
|
|
115
120
|
const sortedSols = -b / a < -d / c ? [sol1, sol2] : [sol2, sol1];
|
|
116
|
-
|
|
117
|
-
opts: { allowFractionToDecimal: true },
|
|
118
|
-
});
|
|
119
|
-
const texs = answer.toAllValidTexs();
|
|
120
|
-
return texs.includes(ans);
|
|
121
|
+
return SetVEA.isArrayOfNodesValid(parsed.elements, sortedSols);
|
|
121
122
|
};
|
|
122
123
|
export const multiplicationEquation = {
|
|
123
124
|
id: "multiplicationEquation",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/factorisation/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qCAAqC,CAAC;AACpD,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/factorisation/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qCAAqC,CAAC;AACpD,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compareAMinusB.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/ordering/compareAMinusB.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"compareAMinusB.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/ordering/compareAMinusB.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAOrC,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB,CAAC;AAqMF,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,WAAW,CAchD,CAAC"}
|
|
@@ -66,9 +66,6 @@ const getAnswer = (identifiers) => {
|
|
|
66
66
|
const { texsAnswer } = identifiers;
|
|
67
67
|
return texsAnswer[0];
|
|
68
68
|
};
|
|
69
|
-
const isAnswerValid = (ans, { texsAnswer }) => {
|
|
70
|
-
return texsAnswer.includes(ans);
|
|
71
|
-
};
|
|
72
69
|
const getCompareAMinusBQuestion = () => {
|
|
73
70
|
const namesPool = ["a", "b", "c", "d", "r", "s", "t", "u", "v"];
|
|
74
71
|
const names = randomMany(namesPool, 2);
|
|
@@ -175,10 +172,10 @@ export const compareAMinusB = {
|
|
|
175
172
|
generator: (nb, opts) => getDistinctQuestions(() => getCompareAMinusBQuestion(opts), nb, 30),
|
|
176
173
|
qcmTimer: 60,
|
|
177
174
|
freeTimer: 60,
|
|
178
|
-
isAnswerValid,
|
|
179
175
|
getPropositions,
|
|
180
176
|
subject: "Mathématiques",
|
|
181
177
|
maxAllowedQuestions: 30,
|
|
182
178
|
getQuestionFromIdentifiers,
|
|
183
179
|
hasHintAndCorrection: true,
|
|
180
|
+
answerType: "QCU",
|
|
184
181
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compareATimes0.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/simplifying/compareATimes0.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAWT,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"compareATimes0.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/simplifying/compareATimes0.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAWT,MAAM,6BAA6B,CAAC;AAKrC,KAAK,IAAI,GAAG;IACV,GAAG,EAAE,MAAM,CAAC;IACZ,aAAa,EAAE,OAAO,CAAC;CACxB,CAAC;AAEF,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,IAAI,EAAE,CAAC;CACf,CAAC;AAqGF,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,WAAW,CAehD,CAAC"}
|