math-exercises 3.0.104 → 3.0.105

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.
@@ -1 +1 @@
1
- {"version":3,"file":"ballsBasicProbas.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/basicProbas/ballsBasicProbas.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAUrC,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;CACzB,CAAC;AAoGF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAclD,CAAC"}
1
+ {"version":3,"file":"ballsBasicProbas.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/basicProbas/ballsBasicProbas.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAUrC,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;CACzB,CAAC;AAwGF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAclD,CAAC"}
@@ -11,7 +11,7 @@ pluralize;
11
11
  const getInstruction = (identifiers) => {
12
12
  const { repartitions, colorAskedIndex } = identifiers;
13
13
  const colorAsked = colors[colorAskedIndex];
14
- const counts = repartitions.map((count, index) => `$${count}$ ${pluralize("boule", count)} ${colors[index]}`);
14
+ const counts = repartitions.map((count, index) => `$${count}$ ${pluralize("boule", count)} ${pluralize(colors[index], count)}`);
15
15
  return `Dans un sac, il y a ${counts[0]}, ${counts[1]} et ${counts[2]}.
16
16
 
17
17
  Quelle est la probabilité de tirer une boule ${colorAsked} ?`;
@@ -31,7 +31,7 @@ const getCorrection = (identifiers) => {
31
31
  const { repartitions, colorAskedIndex } = identifiers;
32
32
  const nbColorAsked = repartitions[colorAskedIndex];
33
33
  const total = repartitions.reduce((acc, curr) => (acc += curr), 0);
34
- return `Puisque toutes les boules ont la même chance d'être tirée, la probabilité d'obtenir une boule ${colors[colorAskedIndex]} est le nombre de boules ${colors[colorAskedIndex]} divisé par le nombre total de boules, c'est à dire :
34
+ return `Puisque toutes les boules ont la même chance d'être tirée, la probabilité d'obtenir une boule ${colors[colorAskedIndex]} est le nombre de boules ${pluralize(colors[colorAskedIndex], repartitions[colorAskedIndex])} divisé par le nombre total de boules, c'est à dire :
35
35
 
36
36
  $$
37
37
  ${frac(nbColorAsked, total).toSimplificationTex()}
@@ -259,7 +259,7 @@ export const probaFromTableNoContext = {
259
259
  connector: "=",
260
260
  label: "Utiliser un tableau à double entrée pour calculer une probabilité (sans contexte)",
261
261
  isSingleStep: true,
262
- generator: (nb) => getDistinctQuestions(getProbaFromTableNoContextQuestion, nb),
262
+ generator: (nb, opts) => getDistinctQuestions(() => getProbaFromTableNoContextQuestion(opts), nb),
263
263
  qcmTimer: 60,
264
264
  freeTimer: 60,
265
265
  getPropositions,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "math-exercises",
3
3
  "type": "module",
4
- "version": "3.0.104",
4
+ "version": "3.0.105",
5
5
  "description": "Math exercises generator for middle school and high school",
6
6
  "main": "lib/index.js",
7
7
  "files": [