math-exercises 3.0.129 → 3.0.130

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.
Files changed (27) hide show
  1. package/lib/exercises/math/calcul/ordering/compareA10N.d.ts +6 -1
  2. package/lib/exercises/math/calcul/ordering/compareA10N.d.ts.map +1 -1
  3. package/lib/exercises/math/calcul/ordering/compareA10N.js +56 -49
  4. package/lib/exercises/math/calcul/ordering/compareABUsingQuotient.js +1 -1
  5. package/lib/exercises/math/calcul/ordering/compareFracAndDec.d.ts.map +1 -1
  6. package/lib/exercises/math/calcul/ordering/compareFracAndDec.js +1 -7
  7. package/lib/exercises/math/calcul/ordering/compareWithSquareRoots.d.ts.map +1 -1
  8. package/lib/exercises/math/calcul/ordering/compareWithSquareRoots.js +1 -40
  9. package/lib/exercises/math/calcul/rounding/estimateAroundPow10NTimesAroundPow10N.d.ts.map +1 -1
  10. package/lib/exercises/math/calcul/rounding/estimateAroundPow10NTimesAroundPow10N.js +1 -15
  11. package/lib/exercises/math/calcul/rounding/estimatePow10NPlusPow10MinusN.d.ts.map +1 -1
  12. package/lib/exercises/math/calcul/rounding/estimatePow10NPlusPow10MinusN.js +1 -13
  13. package/lib/exercises/math/calculLitteral/equation/equationFromProblem.d.ts.map +1 -1
  14. package/lib/exercises/math/calculLitteral/equation/equationFromProblem.js +7 -2
  15. package/lib/exercises/math/calculLitteral/ordering/compareAMinusB.d.ts.map +1 -1
  16. package/lib/exercises/math/calculLitteral/ordering/compareAMinusB.js +1 -4
  17. package/lib/exercises/math/calculLitteral/simplifying/compareATimes0.d.ts.map +1 -1
  18. package/lib/exercises/math/calculLitteral/simplifying/compareATimes0.js +27 -46
  19. package/lib/exercises/math/calculLitteral/simplifying/compareMinusA.d.ts.map +1 -1
  20. package/lib/exercises/math/calculLitteral/simplifying/compareMinusA.js +25 -42
  21. package/lib/exercises/math/dataRepresentations/barChartInterpreting.d.ts.map +1 -1
  22. package/lib/exercises/math/dataRepresentations/barChartInterpreting.js +25 -15
  23. package/lib/exercises/math/dataRepresentations/scatterPlotCommenting.d.ts.map +1 -1
  24. package/lib/exercises/math/dataRepresentations/scatterPlotCommenting.js +5 -103
  25. package/lib/index.d.ts +5 -1
  26. package/lib/index.d.ts.map +1 -1
  27. package/package.json +1 -1
@@ -3,9 +3,14 @@ type A10N = {
3
3
  a: number;
4
4
  n: number;
5
5
  };
6
+ type Item = {
7
+ tex: string;
8
+ isValid: boolean;
9
+ };
6
10
  type Identifiers = {
7
11
  signType: string;
8
- items: A10N[];
12
+ a10Ns: A10N[];
13
+ items: Item[];
9
14
  };
10
15
  type Options = {
11
16
  signTypes: string[];
@@ -1 +1 @@
1
- {"version":3,"file":"compareA10N.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/ordering/compareA10N.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAkBT,MAAM,6BAA6B,CAAC;AAmBrC,KAAK,IAAI,GAAG;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAEF,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,IAAI,EAAE,CAAC;CACf,CAAC;AAwTF,KAAK,OAAO,GAAG;IACb,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB,CAAC;AA0CF,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAetD,CAAC"}
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 { permute } from "../../../../utils/arrays/permutations.js";
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 { items } = identifiers;
59
- return `Ranger par ordre croissant les nombres suivants :
57
+ const { a10Ns } = identifiers;
58
+ return `Voici une liste de nombres :
60
59
 
61
- $$
62
- ${items.map((item) => getTexForA10N(item)).join(" ; ")}
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, items } = identifiers;
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
- ${items
95
- .map((item) => `
95
+ ${a10Ns
96
+ .map((a10N) => `
96
97
 
97
98
  $$
98
- ${getTexForA10N(item)} = ${getSciMultNodeForA10N(item).toTex()}
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 = items.toSorted(compareFuncForA10N);
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((item) => getSciMultNodeForA10N(item).toTex()).join("<")}
114
+ ${positive.map((a10N) => getSciMultNodeForA10N(a10N).toTex()).join("<")}
114
115
  $$
115
116
 
116
117
  Conclusion :
117
118
 
118
119
  $$
119
- ${positive.map((item) => getTexForA10N(item)).join("<")}
120
+ ${positive.map((a10N) => getTexForA10N(a10N)).join("<")}
120
121
  $$
121
122
 
122
123
  `;
123
124
  }
124
125
  case "négatifs": {
125
- const negative = items.toSorted(compareFuncForA10N);
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((item) => getSciMultNodeForA10N(item).toTex()).join("<")}
132
+ ${negative.map((a10N) => getSciMultNodeForA10N(a10N).toTex()).join("<")}
132
133
  $$
133
134
 
134
135
  Conclusion :
135
136
 
136
137
  $$
137
- ${negative.map((item) => getTexForA10N(item)).join("<")}
138
+ ${negative.map((a10N) => getTexForA10N(a10N)).join("<")}
138
139
  $$
139
140
  `;
140
141
  }
141
142
  case "mélange": {
142
- const positive = items
143
+ const positive = a10Ns
143
144
  .filter(({ a }) => a >= 0)
144
145
  .toSorted(compareFuncForA10N);
145
- const negative = items
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((item) => getSciMultNodeForA10N(item).toTex()).join("<")}
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((item) => getSciMultNodeForA10N(item).toTex()).join("<")}
161
+ ${positive.map((a10N) => getSciMultNodeForA10N(a10N).toTex()).join("<")}
161
162
  $$
162
163
 
163
164
  Conclusion :
164
165
 
165
166
  $$
166
- ${[...negative, ...positive].map((item) => getTexForA10N(item)).join("<")}
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
- addValidProp(propositions, answer);
178
- permute(items)
179
- .slice(0, 5)
180
- .forEach((permutedItems) => {
181
- const arrayOfTex = permutedItems.map((item) => getTexForA10N(item));
182
- tryToAddWrongProp(propositions, arrayOfTex.join("<"));
183
- tryToAddWrongProp(propositions, arrayOfTex.join(">"));
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 { items } = identifiers;
189
+ const { a10Ns } = identifiers;
203
190
  return [
204
191
  "sup",
205
192
  "inf",
206
- ...items.map((item) => {
207
- const tex = getTexForA10N(item);
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 items = [...Array(nbItems).keys()].map((i) => {
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,EAiBT,MAAM,6BAA6B,CAAC;AAIrC,OAAO,EAEL,eAAe,EAChB,MAAM,qCAAqC,CAAC;AAW7C,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;AA0SF,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"}
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,EAeT,MAAM,6BAA6B,CAAC;AAWrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,OAAO,CAAC;CAChB,CAAC;AA+KF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,CAexD,CAAC"}
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,EAcT,MAAM,6BAA6B,CAAC;AAerC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA+EF,eAAO,MAAM,qCAAqC,EAAE,QAAQ,CAAC,WAAW,CAmBvE,CAAC"}
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,EAcT,MAAM,6BAA6B,CAAC;AAQrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAwFF,eAAO,MAAM,6BAA6B,EAAE,QAAQ,CAAC,WAAW,CAmB/D,CAAC"}
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;AAetE,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;AA6qBF,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,WAAW,CAcrD,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 `${mdTable([[""], [problem.frenchStr]])}
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":"compareAMinusB.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/ordering/compareAMinusB.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,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;AAyMF,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,WAAW,CAchD,CAAC"}
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;AAMrC,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;AAwHF,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,WAAW,CAehD,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"}
@@ -2,11 +2,10 @@ import { addValidProp, tryToAddWrongProp, } from "../../../../exercises/exercise
2
2
  import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
3
3
  import { probaLawFlip } from "../../../../utils/alea/probaLawFlip.js";
4
4
  import { shuffle } from "../../../../utils/alea/shuffle.js";
5
- import { permute } from "../../../../utils/arrays/permutations.js";
6
5
  const getInstruction = () => {
7
- return `Soit a un nombre non nul.
6
+ return `Soit $a$ un nombre non nul.
8
7
 
9
- Parmi les propositions suivantes, lesquelles sont vraies ?`;
8
+ Parmi les propositions suivantes, lesquelles sont égales à $0$ ?`;
10
9
  };
11
10
  const getHint = () => {
12
11
  return `$0$ divisé par un nombre non nul donne $0$.
@@ -17,19 +16,7 @@ const getCorrection = () => {
17
16
  return `
18
17
 
19
18
  $$
20
- 0 \\times a = 0
21
- $$
22
-
23
- et
24
-
25
- $$
26
- \\frac{0}{a} = 0
27
- $$
28
-
29
- donc
30
-
31
- $$
32
- 0 \\times a = \\frac{0}{a} = 0
19
+ 0 = 0 \\times a = a \\times 0 = \\frac{0}{a} = a + (-a)
33
20
  $$
34
21
 
35
22
  `;
@@ -39,10 +26,10 @@ const getPropositions = (_, { answer, ...identifiers }) => {
39
26
  const propositions = [];
40
27
  items.forEach((item) => {
41
28
  if (item.isValidAnswer) {
42
- addValidProp(propositions, item.tex, "raw");
29
+ addValidProp(propositions, item.tex);
43
30
  }
44
31
  else {
45
- tryToAddWrongProp(propositions, item.tex, "raw");
32
+ tryToAddWrongProp(propositions, item.tex);
46
33
  }
47
34
  });
48
35
  return propositions;
@@ -56,35 +43,29 @@ const getCompareATimes0Question = () => {
56
43
  [4, 0.02],
57
44
  ]);
58
45
  const nbInvalid = nbTotal - nbValid;
59
- const arrayOfTex = [`0 \\times a`, `\\frac{0}{a}`, `0`];
60
- const permutations = permute(arrayOfTex);
61
- const validItems = permutations.flatMap(([tex1, tex2, tex3]) => {
62
- return [
63
- `$${[tex1, tex2, tex3].join("=")}$`,
64
- `$${tex1}=${tex2}$ et $${tex2}=${tex3}$`,
65
- ].map((tex) => {
66
- return {
67
- tex,
68
- isValidAnswer: true,
69
- };
70
- });
46
+ const validItems = [
47
+ `0 \\times a`,
48
+ `a \\times 0`,
49
+ `\\frac{0}{a}`,
50
+ `a + (-a)`,
51
+ ].map((tex) => {
52
+ return {
53
+ tex,
54
+ isValidAnswer: true,
55
+ };
71
56
  });
72
- const invalidItems = permutations.flatMap(([tex1, tex2, tex3]) => {
73
- return [
74
- `$${tex1}>${tex2}$ et $${tex2}=${tex3}$`,
75
- `$${tex1}=${tex2}$ et $${tex2}>${tex3}$`,
76
- ...(tex3 === `\\frac{0}{a}`
77
- ? [`$${tex1}=${tex2}$ et $${tex3}$ n'existe pas`]
78
- : []),
79
- ...(tex1 === `\\frac{0}{a}`
80
- ? [`$${tex1}$ n'existe pas et $${tex2}=${tex3}$`]
81
- : []),
82
- ].map((tex) => {
83
- return {
84
- tex,
85
- isValidAnswer: false,
86
- };
87
- });
57
+ const invalidItems = [
58
+ `a \\times (-a)`,
59
+ `(-a) \\times a`,
60
+ `\\frac{a}{a}`,
61
+ `\\frac{a}{-a}`,
62
+ `a - (-a)`,
63
+ `a + (a)`,
64
+ ].map((tex) => {
65
+ return {
66
+ tex,
67
+ isValidAnswer: false,
68
+ };
88
69
  });
89
70
  const items = shuffle([
90
71
  ...shuffle(validItems).slice(0, nbValid),
@@ -1 +1 @@
1
- {"version":3,"file":"compareMinusA.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/simplifying/compareMinusA.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAWT,MAAM,6BAA6B,CAAC;AAMrC,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;AAkHF,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,WAAW,CAe/C,CAAC"}
1
+ {"version":3,"file":"compareMinusA.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/simplifying/compareMinusA.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;AAiGF,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,WAAW,CAe/C,CAAC"}
@@ -2,11 +2,10 @@ import { addValidProp, tryToAddWrongProp, } from "../../../../exercises/exercise
2
2
  import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
3
3
  import { probaLawFlip } from "../../../../utils/alea/probaLawFlip.js";
4
4
  import { shuffle } from "../../../../utils/alea/shuffle.js";
5
- import { permute } from "../../../../utils/arrays/permutations.js";
6
5
  const getInstruction = () => {
7
- return `Soit a un nombre non nul.
6
+ return `Soit $a$ un nombre non nul.
8
7
 
9
- Parmi les propositions suivantes, lesquelles sont vraies ?`;
8
+ Parmi les propositions suivantes, lesquelles sont égales à $-a$ ?`;
10
9
  };
11
10
  const getHint = () => {
12
11
  return "La règle des signes est la même pour une multiplication et pour une division.";
@@ -15,19 +14,7 @@ const getCorrection = () => {
15
14
  return `
16
15
 
17
16
  $$
18
- (−1) \\times a = -a
19
- $$
20
-
21
- et
22
-
23
- $$
24
- \\frac{a}{-1} = -a
25
- $$
26
-
27
- donc
28
-
29
- $$
30
- (−1) \\times a = \\frac{a}{-1} = -a
17
+ -a = (−1) \\times a = a \\times (−1) = \\frac{a}{-1} = -\\frac{a}{1}
31
18
  $$
32
19
 
33
20
  `;
@@ -37,10 +24,10 @@ const getPropositions = (_, { answer, ...identifiers }) => {
37
24
  const propositions = [];
38
25
  items.forEach((item) => {
39
26
  if (item.isValidAnswer) {
40
- addValidProp(propositions, item.tex, "raw");
27
+ addValidProp(propositions, item.tex);
41
28
  }
42
29
  else {
43
- tryToAddWrongProp(propositions, item.tex, "raw");
30
+ tryToAddWrongProp(propositions, item.tex);
44
31
  }
45
32
  });
46
33
  return propositions;
@@ -54,31 +41,27 @@ const getCompareMinusAQuestion = () => {
54
41
  [4, 0.02],
55
42
  ]);
56
43
  const nbInvalid = nbTotal - nbValid;
57
- const arrayOfTex = [`(−1) \\times a`, `\\frac{a}{-1}`, `-a`];
58
- const permutations = permute(arrayOfTex);
59
- const validItems = permutations.flatMap(([tex1, tex2, tex3]) => {
60
- return [
61
- `$${[tex1, tex2, tex3].join("=")}$`,
62
- `$${tex1}=${tex2}$ et $${tex2}=${tex3}$`,
63
- ].map((tex) => {
64
- return {
65
- tex,
66
- isValidAnswer: true,
67
- };
68
- });
44
+ const validItems = [
45
+ `(-1) \\times a`,
46
+ `\\frac{a}{-1}`,
47
+ `a \\times (-1)`,
48
+ `-\\frac{a}{1}`,
49
+ ].map((tex) => {
50
+ return {
51
+ tex,
52
+ isValidAnswer: true,
53
+ };
69
54
  });
70
- const invalidItems = permutations.flatMap(([tex1, tex2, tex3]) => {
71
- return [
72
- `$${tex1}>${tex2}$ et $${tex2}=${tex3}$`,
73
- `$${tex1}<${tex2}$ et $${tex2}=${tex3}$`,
74
- `$${tex1}=${tex2}$ et $${tex2}>${tex3}$`,
75
- `$${tex1}=${tex2}$ et $${tex2}<${tex3}$`,
76
- ].map((tex) => {
77
- return {
78
- tex,
79
- isValidAnswer: false,
80
- };
81
- });
55
+ const invalidItems = [
56
+ `(-1) \\times (-a)`,
57
+ `\\frac{-a}{-1}`,
58
+ `(-a) \\times (-1)`,
59
+ `-\\frac{-a}{1}`,
60
+ ].map((tex) => {
61
+ return {
62
+ tex,
63
+ isValidAnswer: false,
64
+ };
82
65
  });
83
66
  const items = shuffle([
84
67
  ...shuffle(validItems).slice(0, nbValid),
@@ -1 +1 @@
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;AAWrC,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;AAktBF,KAAK,OAAO,GAAG;IACb,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAsBF,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAgB/D,CAAC"}
1
+ {"version":3,"file":"barChartInterpreting.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/dataRepresentations/barChartInterpreting.ts"],"names":[],"mappings":"AAAA,OAAO,EAYL,QAAQ,EAKT,MAAM,6BAA6B,CAAC;AAWrC,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;AA8tBF,KAAK,OAAO,GAAG;IACb,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAsBF,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAe/D,CAAC"}
@@ -1,4 +1,4 @@
1
- import { addValidProp, shuffleProps, tryToAddWrongProp, GeneratorOptionTarget, GeneratorOptionType, } from "../../../exercises/exercise.js";
1
+ import { addValidProp, 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
4
  import { blueMain, greenMain, orange, red } from "../../../geogebra/colors.js";
@@ -207,28 +207,36 @@ const getAnswer = (identifiers) => {
207
207
  return getAnswerBar(barChart, itemAsked).props.label;
208
208
  }
209
209
  };
210
- const getPropositions = (n, { answer, ...identifiers }) => {
210
+ const getPropositions = (_, { answer, ...identifiers }) => {
211
211
  const { barChart, itemAsked } = identifiers;
212
212
  const propositions = [];
213
213
  switch (itemAsked.type) {
214
214
  case "categoryForX":
215
215
  {
216
- addValidProp(propositions, answer, "raw");
217
216
  barChart.categories.forEach((categ) => {
218
- tryToAddWrongProp(propositions, categ.props.name, "raw");
217
+ if (categ.props.name === answer) {
218
+ addValidProp(propositions, categ.props.name, "raw");
219
+ }
220
+ else {
221
+ tryToAddWrongProp(propositions, categ.props.name, "raw");
222
+ }
219
223
  });
220
224
  }
221
225
  break;
222
226
  case "xForCategory":
223
227
  {
224
- addValidProp(propositions, answer, "raw");
225
228
  barChart.bars.forEach((bar) => {
226
- tryToAddWrongProp(propositions, bar.props.label, "raw");
229
+ if (bar.props.label === answer) {
230
+ addValidProp(propositions, bar.props.label, "raw");
231
+ }
232
+ else {
233
+ tryToAddWrongProp(propositions, bar.props.label, "raw");
234
+ }
227
235
  });
228
236
  }
229
237
  break;
230
238
  }
231
- return shuffleProps(propositions, n);
239
+ return propositions;
232
240
  };
233
241
  const getHint = (identifiers) => {
234
242
  const { barChart, itemAsked } = identifiers;
@@ -345,21 +353,24 @@ const getGGBOptionsVertStacked = (identifiers) => {
345
353
  max: xMin + barWidth,
346
354
  };
347
355
  }
348
- function getYRangeForCategory(barIndex, categIndex) {
356
+ function getYRangeForCategory(barIndex, categIndex, isTopToBottom = true) {
349
357
  const slice = barChart.bars[barIndex].data.slice(0, categIndex);
350
358
  const yMinForCateg = slice.reduce((acc, data) => acc + data, 0);
351
359
  const yMaxForCateg = yMinForCateg + barChart.bars[barIndex].data[categIndex];
352
360
  return {
353
- min: yMinForCateg,
354
- max: yMaxForCateg,
361
+ min: isTopToBottom
362
+ ? arrayOfBarHeights[barIndex] - yMinForCateg
363
+ : yMinForCateg,
364
+ max: isTopToBottom
365
+ ? arrayOfBarHeights[barIndex] - yMaxForCateg
366
+ : yMaxForCateg,
355
367
  };
356
368
  }
357
369
  function createCommandsForBar(barChart, barIndex) {
358
370
  //const bar = barChart.bars[barIndex];
359
- const categoriesReversed = barChart.categories.toReversed();
360
- const commands = categoriesReversed.flatMap((categ, categIndex) => {
371
+ const commands = barChart.categories.flatMap((categ, categIndex) => {
361
372
  const xRange = getXRangeForBarIndex(barIndex);
362
- const yRange = getYRangeForCategory(barIndex, categIndex);
373
+ const yRange = getYRangeForCategory(barIndex, categIndex, true);
363
374
  const style = categ.style;
364
375
  const B = `B_{${barIndex}${categIndex}}`;
365
376
  const barChartCommand = [
@@ -528,6 +539,5 @@ export const barChartInterpreting = {
528
539
  subject: "Mathématiques",
529
540
  getQuestionFromIdentifiers,
530
541
  hasGeogebra: true,
531
- answerType: "QCM",
532
- isQCM: true,
542
+ answerType: "QCU",
533
543
  };
@@ -1 +1 @@
1
- {"version":3,"file":"scatterPlotCommenting.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/dataRepresentations/scatterPlotCommenting.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAGrC,OAAO,EAGL,sBAAsB,EACvB,MAAM,oCAAoC,CAAC;AAK5C,KAAK,WAAW,GAAG;IACjB,sBAAsB,EAAE,sBAAsB,CAAC;IAC/C,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC;AAkZF,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,WAAW,CAiBvD,CAAC"}
1
+ {"version":3,"file":"scatterPlotCommenting.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/dataRepresentations/scatterPlotCommenting.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAGrC,OAAO,EAGL,sBAAsB,EACvB,MAAM,oCAAoC,CAAC;AAK5C,KAAK,WAAW,GAAG;IACjB,sBAAsB,EAAE,sBAAsB,CAAC;IAC/C,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC;AAmQF,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,WAAW,CAgBvD,CAAC"}
@@ -60,22 +60,6 @@ il y a des pays avec un taux de chômage faible et une croissance forte,
60
60
  il y a des pays avec un taux de chômage fort et une croissance faible,
61
61
  il y a des pays avec un taux de chômage fort et une croissance forte.
62
62
  `;
63
- }
64
- case "increasingThenDecreasing": {
65
- const [pointLowX, pointHighX] = cloudPoints.points.toSorted((p1, p2) => p1.x.evaluate() - p2.x.evaluate());
66
- return `En particulier :
67
-
68
- Le pays ${pointLowX.name} a un faible taux de chômage et une faible croissance du PIB.
69
-
70
- Le pays ${pointHighX.name} a un fort taux de chômage et une faible croissance du PIB.`;
71
- }
72
- case "decreasingThenIncreasing": {
73
- const [pointLowX, pointHighX] = cloudPoints.points.toSorted((p1, p2) => p1.x.evaluate() - p2.x.evaluate());
74
- return `En particulier :
75
-
76
- Le pays ${pointLowX.name} a un faible taux de chômage et une forte croissance du PIB.
77
-
78
- Le pays ${pointHighX.name} a un fort taux de chômage et une forte croissance du PIB.`;
79
63
  }
80
64
  default:
81
65
  return ``;
@@ -85,25 +69,15 @@ Le pays ${pointHighX.name} a un fort taux de chômage et une forte croissance du
85
69
  const propsForEvolutionType = {
86
70
  increasing: [
87
71
  `Plus le taux de chômage est élevé et plus la croissance du PIB est élevée.`,
88
- `Si le taux de chômage est faible alors la croissance du PIB est faible.`,
89
- `Si le taux de chômage est élevé alors la croissance du PIB est élevée.`,
90
72
  ],
91
73
  decreasing: [
92
74
  `Plus le taux de chômage est élevé et plus la croissance du PIB est faible.`,
93
- `Si le taux de chômage est faible alors la croissance du PIB est élevée.`,
94
- `Si le taux de chômage est élevé alors la croissance du PIB est faible.`,
95
75
  ],
96
76
  unpredictible: [
97
77
  `Il n'y a aucun lien entre le taux de chômage et la croissance du PIB.`,
98
78
  ],
99
- increasingThenDecreasing: [
100
- `Si le taux de chômage est faible alors la croissance du PIB est faible.`,
101
- `Si le taux de chômage est élevé alors la croissance du PIB est faible.`,
102
- ],
103
- decreasingThenIncreasing: [
104
- `Si le taux de chômage est faible alors la croissance du PIB est élevée.`,
105
- `Si le taux de chômage est élevé alors la croissance du PIB est élevée.`,
106
- ],
79
+ increasingThenDecreasing: [],
80
+ decreasingThenIncreasing: [],
107
81
  };
108
82
  const getPropositions = (n, { evolutionType }) => {
109
83
  const propositions = [];
@@ -114,14 +88,7 @@ const getPropositions = (n, { evolutionType }) => {
114
88
  });
115
89
  const invalidProps = [
116
90
  ...Object.values(propsForEvolutionType).flatMap((props) => props),
117
- ]
118
- .filter((prop) => !allValidProps.includes(prop))
119
- //prevent confusion
120
- .filter((prop) => evolutionType === "increasingThenDecreasing" ||
121
- evolutionType === "decreasingThenIncreasing"
122
- ? prop !==
123
- `Il n'y a aucun lien entre le taux de chômage et la croissance du PIB.`
124
- : true);
91
+ ].filter((prop) => !allValidProps.includes(prop));
125
92
  invalidProps.forEach((str) => {
126
93
  tryToAddWrongProp(propositions, str, "raw");
127
94
  });
@@ -170,13 +137,7 @@ const getScatterPlotCommentingQuestion = () => {
170
137
  const nbCountries = 6;
171
138
  const countriesPicked = randomMany(countries, nbCountries);
172
139
  const boxFull = { xMin: 3, xMax: 13, yMin: 0, yMax: 4 };
173
- const evolutionType = random([
174
- "increasing",
175
- "decreasing",
176
- "unpredictible",
177
- "increasingThenDecreasing",
178
- "decreasingThenIncreasing",
179
- ]);
140
+ const evolutionType = random(["increasing", "decreasing", "unpredictible"]);
180
141
  let cloudPointsWithEvoBoxed;
181
142
  switch (evolutionType) {
182
143
  case "increasing":
@@ -210,64 +171,6 @@ const getScatterPlotCommentingQuestion = () => {
210
171
  ]), boxFull);
211
172
  }
212
173
  break;
213
- case "increasingThenDecreasing":
214
- {
215
- const nbCountriesIncr = Math.floor(nbCountries / 2);
216
- const nbCountriesDecr = nbCountries - nbCountriesIncr;
217
- const cloudPointsIncr = CloudPointsConstructor.cloudPointsByReboxingCloudPoints(CloudPointsConstructor.randomWithEvolutionType(nbCountriesIncr, "increasing"), {
218
- xMin: 0,
219
- xMax: 0.5,
220
- yMin: 0,
221
- yMax: 1,
222
- });
223
- const cloudPointsDecr = CloudPointsConstructor.cloudPointsByReboxingCloudPoints(CloudPointsConstructor.randomWithEvolutionType(nbCountriesDecr, "decreasing"), {
224
- xMin: 0.5,
225
- xMax: 1,
226
- yMin: 0,
227
- yMax: 1,
228
- });
229
- const boxLow = {
230
- xMin: boxFull.xMin,
231
- xMax: boxFull.xMax,
232
- yMin: boxFull.yMin,
233
- yMax: ((boxFull.yMin + boxFull.yMax) * 1) / 3,
234
- };
235
- cloudPointsWithEvoBoxed =
236
- CloudPointsConstructor.cloudPointsByReboxingCloudPoints(new CloudPoints([
237
- ...cloudPointsIncr.points,
238
- ...cloudPointsDecr.points,
239
- ]), boxLow);
240
- }
241
- break;
242
- case "decreasingThenIncreasing":
243
- {
244
- const nbCountriesDecr = Math.floor(nbCountries / 2);
245
- const nbCountriesIncr = nbCountries - nbCountriesDecr;
246
- const cloudPointsDecr = CloudPointsConstructor.cloudPointsByReboxingCloudPoints(CloudPointsConstructor.randomWithEvolutionType(nbCountriesDecr, "decreasing"), {
247
- xMin: 0,
248
- xMax: 0.5,
249
- yMin: 0,
250
- yMax: 1,
251
- });
252
- const cloudPointsIncr = CloudPointsConstructor.cloudPointsByReboxingCloudPoints(CloudPointsConstructor.randomWithEvolutionType(nbCountriesIncr, "increasing"), {
253
- xMin: 0.5,
254
- xMax: 1,
255
- yMin: 0,
256
- yMax: 1,
257
- });
258
- const boxHigh = {
259
- xMin: boxFull.xMin,
260
- xMax: boxFull.xMax,
261
- yMin: ((boxFull.yMin + boxFull.yMax) * 2) / 3,
262
- yMax: boxFull.yMax,
263
- };
264
- cloudPointsWithEvoBoxed =
265
- CloudPointsConstructor.cloudPointsByReboxingCloudPoints(new CloudPoints([
266
- ...cloudPointsIncr.points,
267
- ...cloudPointsDecr.points,
268
- ]), boxHigh);
269
- }
270
- break;
271
174
  }
272
175
  const namedPoints = cloudPointsWithEvoBoxed.points.map((point, i) => new Point(countriesPicked[i], point.x, point.y));
273
176
  const cloudPointsNamed = new CloudPoints(namedPoints);
@@ -303,6 +206,5 @@ export const scatterPlotCommenting = {
303
206
  subject: "Mathématiques",
304
207
  getQuestionFromIdentifiers,
305
208
  hasHintAndCorrection: true,
306
- answerType: "QCM",
307
- isQCM: true,
209
+ answerType: "QCU",
308
210
  };
package/lib/index.d.ts CHANGED
@@ -292,10 +292,14 @@ declare const mathExercises: (Exercise<{
292
292
  isAllowingNegativeNumbers: boolean;
293
293
  }, string | number | boolean | string[] | number[] | boolean[]> | Exercise<{
294
294
  signType: string;
295
- items: {
295
+ a10Ns: {
296
296
  a: number;
297
297
  n: number;
298
298
  }[];
299
+ items: {
300
+ tex: string;
301
+ isValid: boolean;
302
+ }[];
299
303
  }, {
300
304
  signTypes: string[];
301
305
  nbCollisions: number[];
@@ -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;AAC7D,OAAO,KAAK,aAAa,MAAM,2BAA2B,CAAC;AAE3D,OAAO,4BAA4B,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kEAA6B,CAAC;AAE/C,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAE,cAAc,EAAE,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "math-exercises",
3
3
  "type": "module",
4
- "version": "3.0.129",
4
+ "version": "3.0.130",
5
5
  "description": "Math exercises generator for middle school and high school",
6
6
  "main": "lib/index.js",
7
7
  "files": [