math-exercises 2.2.17 → 2.2.18

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 (70) hide show
  1. package/lib/exercises/exercise.d.ts +1 -1
  2. package/lib/exercises/math/calcul/decimals/multiplyDecimalByNegativeTens.d.ts.map +1 -1
  3. package/lib/exercises/math/calcul/decimals/multiplyDecimalByNegativeTens.js +9 -0
  4. package/lib/exercises/math/calcul/decimals/multiplyDecimalByTens.d.ts.map +1 -1
  5. package/lib/exercises/math/calcul/decimals/multiplyDecimalByTens.js +9 -0
  6. package/lib/exercises/math/calcul/operations/expressionNature.d.ts.map +1 -1
  7. package/lib/exercises/math/calcul/operations/expressionNature.js +1 -0
  8. package/lib/exercises/math/calcul/ordering/decimalOrderingNoRelatives.d.ts +9 -0
  9. package/lib/exercises/math/calcul/ordering/decimalOrderingNoRelatives.d.ts.map +1 -0
  10. package/lib/exercises/math/calcul/ordering/decimalOrderingNoRelatives.js +77 -0
  11. package/lib/exercises/math/calcul/ordering/index.d.ts +1 -0
  12. package/lib/exercises/math/calcul/ordering/index.d.ts.map +1 -1
  13. package/lib/exercises/math/calcul/ordering/index.js +1 -0
  14. package/lib/exercises/math/functions/basics/imageFunction.js +1 -1
  15. package/lib/exercises/math/geometry/areas/triangleArea.js +1 -1
  16. package/lib/exercises/math/geometry/cartesian/index.d.ts +1 -0
  17. package/lib/exercises/math/geometry/cartesian/index.d.ts.map +1 -1
  18. package/lib/exercises/math/geometry/cartesian/index.js +2 -0
  19. package/lib/exercises/math/geometry/cartesian/pointCoordinatesNoAxisNumbers.d.ts +8 -0
  20. package/lib/exercises/math/geometry/cartesian/pointCoordinatesNoAxisNumbers.d.ts.map +1 -0
  21. package/lib/exercises/math/geometry/cartesian/pointCoordinatesNoAxisNumbers.js +101 -0
  22. package/lib/exercises/math/geometry/cartesian/pointCoordinatesNoOrthonorm.d.ts +8 -0
  23. package/lib/exercises/math/geometry/cartesian/pointCoordinatesNoOrthonorm.d.ts.map +1 -0
  24. package/lib/exercises/math/geometry/cartesian/pointCoordinatesNoOrthonorm.js +103 -0
  25. package/lib/exercises/math/geometry/vectors/scalarProductViaCos.js +1 -1
  26. package/lib/exercises/math/geometry/vectors/vectorCoordinatesFromTwoPoints.js +1 -1
  27. package/lib/exercises/math/percent/htToTTC.d.ts.map +1 -1
  28. package/lib/exercises/math/percent/htToTTC.js +16 -1
  29. package/lib/exercises/math/percent/ttcToHT.d.ts.map +1 -1
  30. package/lib/exercises/math/percent/ttcToHT.js +16 -1
  31. package/lib/exercises/math/probaStat/stats1var/averageList.d.ts.map +1 -1
  32. package/lib/exercises/math/probaStat/stats1var/averageList.js +21 -0
  33. package/lib/exercises/math/probaStat/stats1var/etendueList.d.ts.map +1 -1
  34. package/lib/exercises/math/probaStat/stats1var/etendueList.js +9 -0
  35. package/lib/exercises/pc/calibrationCurveOfSolution.js +1 -1
  36. package/lib/exercises/pc/chemicalElements/atomicStructureOfNucleus.js +1 -1
  37. package/lib/exercises/pc/chemicalElements/calculateProtonsNumberFromMass.js +1 -1
  38. package/lib/exercises/pc/chemicalElements/findAtomEntitiesNumberFromMass.js +1 -1
  39. package/lib/exercises/pc/chemicalElements/findAtomicStructureElement.js +1 -1
  40. package/lib/exercises/pc/chemicalElements/findValenceElectronsNumberFromElectronicConfiguration.js +1 -1
  41. package/lib/exercises/pc/chemicalElements/findValenceElectronsNumberFromTable.js +1 -1
  42. package/lib/exercises/pc/chemicalElements/identifyRightElectronicConfiguration.js +1 -1
  43. package/lib/exercises/pc/chemicalElements/massOrVolumeProportion.js +1 -1
  44. package/lib/exercises/pc/chemicalReactions/calculateCombustionEnergy.js +1 -1
  45. package/lib/exercises/pc/dosage/beerLambertRandomValue.js +1 -1
  46. package/lib/exercises/pc/energy/energyTransfer.js +1 -1
  47. package/lib/exercises/pc/identifyAtomicMassOrAtomicNb.js +1 -1
  48. package/lib/exercises/pc/mole/molarMass.js +1 -1
  49. package/lib/exercises/pc/mole/moleculeCountFromMassAndAvogadro.js +1 -1
  50. package/lib/exercises/pc/motion/motionReference.js +1 -1
  51. package/lib/geogebra/geogebraConstructor.js +1 -1
  52. package/lib/index.d.ts +7 -0
  53. package/lib/index.d.ts.map +1 -1
  54. package/lib/tree/nodes/inequations/inequationNode.js +1 -1
  55. package/lib/tree/parsers/numberParser.d.ts +2 -0
  56. package/lib/tree/parsers/numberParser.d.ts.map +1 -0
  57. package/lib/tree/parsers/numberParser.js +11 -0
  58. package/lib/utils/strings/isLetter.d.ts +2 -0
  59. package/lib/utils/strings/isLetter.d.ts.map +1 -0
  60. package/lib/utils/strings/isLetter.js +7 -0
  61. package/lib/utils/strings/pluralize.d.ts +2 -0
  62. package/lib/utils/strings/pluralize.d.ts.map +1 -0
  63. package/lib/utils/strings/pluralize.js +12 -0
  64. package/lib/utils/strings/randomLetter.d.ts +2 -0
  65. package/lib/utils/strings/randomLetter.d.ts.map +1 -0
  66. package/lib/utils/strings/randomLetter.js +11 -0
  67. package/lib/utils/strings/requiresApostropheBefore.d.ts +2 -0
  68. package/lib/utils/strings/requiresApostropheBefore.d.ts.map +1 -0
  69. package/lib/utils/strings/requiresApostropheBefore.js +7 -0
  70. package/package.json +1 -1
@@ -14,7 +14,7 @@ export type Proposition = {
14
14
  export type GeogebraAxisOptions = {
15
15
  steps?: number;
16
16
  hiddden?: boolean;
17
- showNumbers?: boolean;
17
+ hideNumbers?: boolean;
18
18
  label?: string;
19
19
  natural?: boolean;
20
20
  };
@@ -1 +1 @@
1
- {"version":3,"file":"multiplyDecimalByNegativeTens.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/decimals/multiplyDecimalByNegativeTens.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAgDF,eAAO,MAAM,6BAA6B,EAAE,QAAQ,CAAC,WAAW,CAc/D,CAAC"}
1
+ {"version":3,"file":"multiplyDecimalByNegativeTens.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/decimals/multiplyDecimalByNegativeTens.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AA6DF,eAAO,MAAM,6BAA6B,EAAE,QAAQ,CAAC,WAAW,CAe/D,CAAC"}
@@ -6,6 +6,7 @@ const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQ
6
6
  const decimal_1 = require("../../../../math/numbers/decimals/decimal");
7
7
  const randint_1 = require("../../../../math/utils/random/randint");
8
8
  const multiplyNode_1 = require("../../../../tree/nodes/operators/multiplyNode");
9
+ const pluralize_1 = require("../../../../utils/strings/pluralize");
9
10
  const getMultiplyDecimalByNegativeTensQuestion = () => {
10
11
  const dec = decimal_1.DecimalConstructor.random(1, 200, (0, randint_1.randint)(1, 5));
11
12
  const pow = -(0, randint_1.randint)(1, 4);
@@ -18,6 +19,13 @@ const getMultiplyDecimalByNegativeTensQuestion = () => {
18
19
  keys: [],
19
20
  answerFormat: "tex",
20
21
  identifiers: { dec: dec.value, pow },
22
+ hint: `Multiplier par $${factor.frenchify()}$ revient à déplacer la virgule de $${-pow}$ ${(0, pluralize_1.pluralize)("position", -pow)} vers la gauche.`,
23
+ correction: `On déplace la virgule de $${-pow}$ ${(0, pluralize_1.pluralize)("position", -pow)} vers la gauche :
24
+
25
+ $$
26
+ ${statement.toTex()} = ${answer}
27
+ $$
28
+ `,
21
29
  };
22
30
  return question;
23
31
  };
@@ -50,4 +58,5 @@ exports.multiplyDecimalByNegativeTens = {
50
58
  getPropositions,
51
59
  isAnswerValid,
52
60
  subject: "Mathématiques",
61
+ hasHintAndCorrection: true,
53
62
  };
@@ -1 +1 @@
1
- {"version":3,"file":"multiplyDecimalByTens.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/decimals/multiplyDecimalByTens.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AAYlC,KAAK,WAAW,GAAG;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,OAAO,CAAC;CACnB,CAAC;AAsDF,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,WAAW,CAcvD,CAAC"}
1
+ {"version":3,"file":"multiplyDecimalByTens.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/decimals/multiplyDecimalByTens.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AAalC,KAAK,WAAW,GAAG;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,OAAO,CAAC;CACnB,CAAC;AAqEF,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,WAAW,CAevD,CAAC"}
@@ -8,6 +8,7 @@ const randint_1 = require("../../../../math/utils/random/randint");
8
8
  const divideNode_1 = require("../../../../tree/nodes/operators/divideNode");
9
9
  const multiplyNode_1 = require("../../../../tree/nodes/operators/multiplyNode");
10
10
  const coinFlip_1 = require("../../../../utils/coinFlip");
11
+ const pluralize_1 = require("../../../../utils/strings/pluralize");
11
12
  const getMultiplyDecimalByTensQuestion = () => {
12
13
  const dec = decimal_1.DecimalConstructor.random(1, 200, (0, randint_1.randint)(1, 5));
13
14
  const pow = (0, randint_1.randint)(1, 4);
@@ -24,6 +25,13 @@ const getMultiplyDecimalByTensQuestion = () => {
24
25
  keys: [],
25
26
  answerFormat: "tex",
26
27
  identifiers: { dec: dec.value, pow, isDivide },
28
+ hint: `${isDivide ? "Diviser" : "Multiplier"} par $${factor.frenchify()}$ revient à déplacer la virgule de $${pow}$ ${(0, pluralize_1.pluralize)("position", pow)} vers la ${isDivide ? "gauche" : "droite"}.`,
29
+ correction: `On déplace la virgule de $${pow}$ ${(0, pluralize_1.pluralize)("position", pow)} vers la ${isDivide ? "gauche" : "droite"} :
30
+
31
+ $$
32
+ ${statement.toTex()} = ${answer}
33
+ $$
34
+ `,
27
35
  };
28
36
  return question;
29
37
  };
@@ -60,4 +68,5 @@ exports.multiplyDecimalByTens = {
60
68
  getPropositions,
61
69
  isAnswerValid,
62
70
  subject: "Mathématiques",
71
+ hasHintAndCorrection: true,
63
72
  };
@@ -1 +1 @@
1
- {"version":3,"file":"expressionNature.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/operations/expressionNature.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AAalC,KAAK,WAAW,GAAG;IAAE,OAAO,EAAE,GAAG,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAoLnE,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAelD,CAAC"}
1
+ {"version":3,"file":"expressionNature.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/operations/expressionNature.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AAalC,KAAK,WAAW,GAAG;IAAE,OAAO,EAAE,GAAG,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAoLnE,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAgBlD,CAAC"}
@@ -178,4 +178,5 @@ exports.expressionNature = {
178
178
  getPropositions,
179
179
  isAnswerValid,
180
180
  subject: "Mathématiques",
181
+ answerType: "QCU",
181
182
  };
@@ -0,0 +1,9 @@
1
+ import { Exercise } from "../../../../exercises/exercise";
2
+ type Identifiers = {
3
+ type: number;
4
+ a: number;
5
+ b: number;
6
+ };
7
+ export declare const decimalOrderingNoRelatives: Exercise<Identifiers>;
8
+ export {};
9
+ //# sourceMappingURL=decimalOrderingNoRelatives.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"decimalOrderingNoRelatives.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/ordering/decimalOrderingNoRelatives.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AAMlC,KAAK,WAAW,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAgE1D,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,WAAW,CAe5D,CAAC"}
@@ -0,0 +1,77 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.decimalOrderingNoRelatives = void 0;
4
+ const exercise_1 = require("../../../../exercises/exercise");
5
+ const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQuestions");
6
+ const randfloat_1 = require("../../../../math/utils/random/randfloat");
7
+ const randint_1 = require("../../../../math/utils/random/randint");
8
+ const coinFlip_1 = require("../../../../utils/coinFlip");
9
+ const getDecimalOrderingNoRelativesQuestion = () => {
10
+ const type = (0, randint_1.randint)(1, 5);
11
+ let a = 0;
12
+ let b = 0;
13
+ while (b == a) {
14
+ switch (type) {
15
+ case 1:
16
+ //x vs x.y
17
+ a = (0, randint_1.randint)(0, 100);
18
+ b = (0, randfloat_1.randfloat)(Math.floor(a), Math.floor(a) + 1, (0, randint_1.randint)(1, 3));
19
+ break;
20
+ case 2:
21
+ //x.y vs x.y
22
+ a = (0, randfloat_1.randfloat)(0, 100, 1);
23
+ b = (0, randfloat_1.randfloat)(Math.floor(a), Math.floor(a) + 1, 1);
24
+ break;
25
+ case 3:
26
+ //x.yy vs x.yy
27
+ a = (0, randfloat_1.randfloat)(0, 100, 2);
28
+ b = (0, randfloat_1.randfloat)(Math.floor(a), Math.floor(a) + 1, 2);
29
+ break;
30
+ case 4:
31
+ default:
32
+ //x.yy vs x ou x.y
33
+ a = (0, randfloat_1.randfloat)(0, 100, 2);
34
+ b = (0, coinFlip_1.coinFlip)()
35
+ ? Math.floor(a)
36
+ : (0, randfloat_1.randfloat)(Math.floor(a), Math.floor(a) + 1, 1);
37
+ break;
38
+ }
39
+ }
40
+ const answer = a < b ? "<" : a === b ? "=" : ">";
41
+ const question = {
42
+ answer,
43
+ instruction: `Compléter par le bon symbole :
44
+
45
+ $$${a.frenchify()}\\ ...... \\ ${b.frenchify()}$$`,
46
+ keys: [],
47
+ answerFormat: "tex",
48
+ identifiers: { type, a, b },
49
+ };
50
+ return question;
51
+ };
52
+ const getPropositions = (n, { answer }) => {
53
+ const propositions = [];
54
+ (0, exercise_1.addValidProp)(propositions, answer);
55
+ (0, exercise_1.tryToAddWrongProp)(propositions, "<");
56
+ (0, exercise_1.tryToAddWrongProp)(propositions, ">");
57
+ (0, exercise_1.tryToAddWrongProp)(propositions, "=");
58
+ return (0, exercise_1.shuffleProps)(propositions, n);
59
+ };
60
+ const isAnswerValid = (ans, { answer }) => {
61
+ return ans === answer;
62
+ };
63
+ exports.decimalOrderingNoRelatives = {
64
+ id: "decimalOrderingNoRelatives",
65
+ connector: "\\iff",
66
+ label: "Comparer des nombres décimaux (sans relatifs)",
67
+ levels: [],
68
+ isSingleStep: true,
69
+ sections: [],
70
+ generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getDecimalOrderingNoRelativesQuestion, nb),
71
+ qcmTimer: 60,
72
+ freeTimer: 60,
73
+ getPropositions,
74
+ isAnswerValid,
75
+ subject: "Mathématiques",
76
+ answerType: "QCU",
77
+ };
@@ -1,4 +1,5 @@
1
1
  export * from "./integerOrdering";
2
2
  export * from "./decimalOrdering";
3
3
  export * from "./framing";
4
+ export * from "./decimalOrderingNoRelatives";
4
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/ordering/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,WAAW,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/ordering/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,WAAW,CAAC;AAC1B,cAAc,8BAA8B,CAAC"}
@@ -17,3 +17,4 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./integerOrdering"), exports);
18
18
  __exportStar(require("./decimalOrdering"), exports);
19
19
  __exportStar(require("./framing"), exports);
20
+ __exportStar(require("./decimalOrderingNoRelatives"), exports);
@@ -19,7 +19,7 @@ const getImageFunction = () => {
19
19
  const flip = (0, coinFlip_1.coinFlip)();
20
20
  const statement = `Soit $f(x) = ${(rand ? polynome1 : polynome2)
21
21
  .toTree()
22
- .toTex()}. Calculer ${flip ? `l'image de $${xValue}$ par $f$.` : `$f(${xValue})$.`}`;
22
+ .toTex()}$. Calculer ${flip ? `l'image de $${xValue}$ par $f$.` : `$f(${xValue})$.`}`;
23
23
  const answer = rand
24
24
  ? polynome1.calculate(xValue) + ""
25
25
  : polynome2.calculate(xValue) + "";
@@ -7,7 +7,7 @@ const geogebraConstructor_1 = require("../../../../geogebra/geogebraConstructor"
7
7
  const triangles_1 = require("../../../../math/geometry/triangles");
8
8
  const rational_1 = require("../../../../math/numbers/rationals/rational");
9
9
  const randint_1 = require("../../../../math/utils/random/randint");
10
- const randomLetter_1 = require("../../../../utils/randomLetter");
10
+ const randomLetter_1 = require("../../../../utils/strings/randomLetter");
11
11
  const shuffle_1 = require("../../../../utils/shuffle");
12
12
  const getTriangleArea = () => {
13
13
  const vertices = [];
@@ -6,4 +6,5 @@ export * from "./directionVector";
6
6
  export * from "./directionVectorEquation";
7
7
  export * from "./drawAlineInGGB";
8
8
  export * from "./placeAPoint";
9
+ export * from "./pointCoordinatesNoAxisNumbers";
9
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/cartesian/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC;AAC3C,cAAc,YAAY,CAAC;AAC3B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/cartesian/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC;AAC3C,cAAc,YAAY,CAAC;AAC3B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,iCAAiC,CAAC"}
@@ -22,3 +22,5 @@ __exportStar(require("./directionVector"), exports);
22
22
  __exportStar(require("./directionVectorEquation"), exports);
23
23
  __exportStar(require("./drawAlineInGGB"), exports);
24
24
  __exportStar(require("./placeAPoint"), exports);
25
+ __exportStar(require("./pointCoordinatesNoAxisNumbers"), exports);
26
+ // export * from "./pointCoordinatesNoOrthonorm";
@@ -0,0 +1,8 @@
1
+ import { Exercise } from "../../../../exercises/exercise";
2
+ type Identifiers = {
3
+ x: number;
4
+ y: number;
5
+ };
6
+ export declare const pointCoordinatesNoAxisNumbers: Exercise<Identifiers>;
7
+ export {};
8
+ //# sourceMappingURL=pointCoordinatesNoAxisNumbers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pointCoordinatesNoAxisNumbers.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/cartesian/pointCoordinatesNoAxisNumbers.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAOlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAwGF,eAAO,MAAM,6BAA6B,EAAE,QAAQ,CAAC,WAAW,CAc/D,CAAC"}
@@ -0,0 +1,101 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.pointCoordinatesNoAxisNumbers = void 0;
4
+ const exercise_1 = require("../../../../exercises/exercise");
5
+ const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQuestions");
6
+ const geogebraConstructor_1 = require("../../../../geogebra/geogebraConstructor");
7
+ const point_1 = require("../../../../math/geometry/point");
8
+ const randint_1 = require("../../../../math/utils/random/randint");
9
+ const getPointCoordinatesNoAxisNumbersQuestion = () => {
10
+ const x = (0, randint_1.randint)(-10, 10);
11
+ const y = (0, randint_1.randint)(-10, 10);
12
+ let xMin = x - 2;
13
+ let xMax = x + 2;
14
+ let yMin = y - 2;
15
+ let yMax = y + 2;
16
+ yMax = yMax < 2 ? 2 : yMax;
17
+ yMin = yMin > -2 ? -2 : yMin;
18
+ xMin = xMin > -2 ? -2 : xMin;
19
+ xMax = xMax < 2 ? 2 : xMax;
20
+ const instruction = `Lire les coordonnées du point $A$ représenté dans le repère ci-dessous : `;
21
+ const commands = [
22
+ `A = (${x}, ${y})`,
23
+ `ShowLabel(A, true)`,
24
+ // `SetPointStyle(A, 0)`,
25
+ `SetPointSize(A, 4)`,
26
+ `SetFixed(A, true)`,
27
+ "O = (0,0)",
28
+ `SetFixed(O, true)`,
29
+ `ShowLabel(O, true)`,
30
+ `SetPointSize(O, 4)`,
31
+ "I = (1,0)",
32
+ `SetFixed(I, true)`,
33
+ `ShowLabel(I, true)`,
34
+ `SetPointSize(I, 4)`,
35
+ "J = (0,1)",
36
+ `SetFixed(J, true)`,
37
+ `ShowLabel(J, true)`,
38
+ `SetPointSize(J, 4)`,
39
+ ];
40
+ const ggb = new geogebraConstructor_1.GeogebraConstructor({
41
+ commands,
42
+ xAxis: {
43
+ hideNumbers: true,
44
+ },
45
+ yAxis: {
46
+ hideNumbers: true,
47
+ },
48
+ });
49
+ const A = new point_1.Point("A", x.toTree(), y.toTree());
50
+ const question = {
51
+ answer: A.toCoords(),
52
+ instruction,
53
+ ggbOptions: ggb.getOptions({
54
+ coords: ggb.getAdaptedCoords({
55
+ xMin,
56
+ xMax,
57
+ yMin,
58
+ yMax,
59
+ forceShowAxes: true,
60
+ }),
61
+ }),
62
+ keys: ["x", "y", "semicolon"],
63
+ answerFormat: "tex",
64
+ identifiers: { x, y },
65
+ };
66
+ return question;
67
+ };
68
+ const getPropositions = (n, { answer, x, y }) => {
69
+ const propositions = [];
70
+ (0, exercise_1.addValidProp)(propositions, answer, "tex");
71
+ const points = [
72
+ new point_1.Point("A", (x + 1).toTree(), (y + 1).toTree()),
73
+ new point_1.Point("A", (x - 1).toTree(), (y - 1).toTree()),
74
+ new point_1.Point("A", (x - 1).toTree(), (y + 1).toTree()),
75
+ new point_1.Point("A", (x + 1).toTree(), (x - 1).toTree()),
76
+ ];
77
+ points.forEach((point) => (0, exercise_1.tryToAddWrongProp)(propositions, point.toCoords()));
78
+ while (propositions.length < n) {
79
+ const wrongAnswer = new point_1.Point("A", (0, randint_1.randint)(-10, 10).toTree(), (0, randint_1.randint)(-10, 10).toTree());
80
+ (0, exercise_1.tryToAddWrongProp)(propositions, wrongAnswer.toCoords(), "tex");
81
+ }
82
+ return (0, exercise_1.shuffleProps)(propositions, n);
83
+ };
84
+ const isAnswerValid = (ans, { answer, x, y }) => {
85
+ const valid = new point_1.Point("A", x.toTree(), y.toTree()).toCoords();
86
+ return ans === valid;
87
+ };
88
+ exports.pointCoordinatesNoAxisNumbers = {
89
+ id: "pointCoordinatesNoAxisNumbers",
90
+ label: "Lire les coordonnées d'un point (sans nombres sur les axes)",
91
+ levels: ["1rePro"],
92
+ isSingleStep: true,
93
+ sections: ["Géométrie cartésienne"],
94
+ generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getPointCoordinatesNoAxisNumbersQuestion, nb),
95
+ qcmTimer: 60,
96
+ freeTimer: 60,
97
+ getPropositions,
98
+ isAnswerValid,
99
+ subject: "Mathématiques",
100
+ hasGeogebra: true,
101
+ };
@@ -0,0 +1,8 @@
1
+ import { Exercise } from "../../../../exercises/exercise";
2
+ type Identifiers = {
3
+ x: number;
4
+ y: number;
5
+ };
6
+ export declare const pointCoordinatesNoOrthonorm: Exercise<Identifiers>;
7
+ export {};
8
+ //# sourceMappingURL=pointCoordinatesNoOrthonorm.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pointCoordinatesNoOrthonorm.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/cartesian/pointCoordinatesNoOrthonorm.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAQlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAyGF,eAAO,MAAM,2BAA2B,EAAE,QAAQ,CAAC,WAAW,CAc7D,CAAC"}
@@ -0,0 +1,103 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.pointCoordinatesNoOrthonorm = void 0;
4
+ const exercise_1 = require("../../../../exercises/exercise");
5
+ const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQuestions");
6
+ const geogebraConstructor_1 = require("../../../../geogebra/geogebraConstructor");
7
+ const point_1 = require("../../../../math/geometry/point");
8
+ const randint_1 = require("../../../../math/utils/random/randint");
9
+ const random_1 = require("../../../../utils/random");
10
+ const getPointCoordinatesNoAxisNumbersQuestion = () => {
11
+ const x = (0, randint_1.randint)(-10, 10);
12
+ const y = (0, randint_1.randint)(-10, 10);
13
+ let xMin = x - 2;
14
+ let xMax = x + 2;
15
+ let yMin = y - 2;
16
+ let yMax = y + 2;
17
+ yMax = yMax < 2 ? 2 : yMax;
18
+ yMin = yMin > -2 ? -2 : yMin;
19
+ xMin = xMin > -2 ? -2 : xMin;
20
+ xMax = xMax < 2 ? 2 : xMax;
21
+ const instruction = `Lire les coordonnées du point $A$ représenté dans le repère ci-dessous : `;
22
+ const commands = [
23
+ `A = (${x}, ${y})`,
24
+ `ShowLabel(A, true)`,
25
+ // `SetPointStyle(A, 0)`,
26
+ `SetPointSize(A, 4)`,
27
+ `SetFixed(A, true)`,
28
+ "O = (0,0)",
29
+ `SetFixed(O, true)`,
30
+ `ShowLabel(O, true)`,
31
+ `SetPointSize(O, 4)`,
32
+ "I = (1,0)",
33
+ `SetFixed(I, true)`,
34
+ `ShowLabel(I, true)`,
35
+ `SetPointSize(I, 4)`,
36
+ "J = (0,1)",
37
+ `SetFixed(J, true)`,
38
+ `ShowLabel(J, true)`,
39
+ `SetPointSize(J, 4)`,
40
+ ];
41
+ const ggb = new geogebraConstructor_1.GeogebraConstructor({
42
+ commands,
43
+ xAxis: {
44
+ hideNumbers: true,
45
+ },
46
+ yAxis: {
47
+ hideNumbers: true,
48
+ },
49
+ lockedAxesRatio: (0, random_1.random)([0.5, 2]),
50
+ });
51
+ const A = new point_1.Point("A", x.toTree(), y.toTree());
52
+ const question = {
53
+ answer: A.toCoords(),
54
+ instruction,
55
+ ggbOptions: ggb.getOptions({
56
+ coords: ggb.getAdaptedCoords({
57
+ xMin,
58
+ xMax,
59
+ yMin,
60
+ yMax,
61
+ forceShowAxes: true,
62
+ }),
63
+ }),
64
+ keys: ["x", "y", "semicolon"],
65
+ answerFormat: "tex",
66
+ identifiers: { x, y },
67
+ };
68
+ return question;
69
+ };
70
+ const getPropositions = (n, { answer, x, y }) => {
71
+ const propositions = [];
72
+ (0, exercise_1.addValidProp)(propositions, answer, "tex");
73
+ const points = [
74
+ new point_1.Point("A", (x + 1).toTree(), (y + 1).toTree()),
75
+ new point_1.Point("A", (x - 1).toTree(), (y - 1).toTree()),
76
+ new point_1.Point("A", (x - 1).toTree(), (y + 1).toTree()),
77
+ new point_1.Point("A", (x + 1).toTree(), (x - 1).toTree()),
78
+ ];
79
+ points.forEach((point) => (0, exercise_1.tryToAddWrongProp)(propositions, point.toCoords()));
80
+ while (propositions.length < n) {
81
+ const wrongAnswer = new point_1.Point("A", (0, randint_1.randint)(-10, 10).toTree(), (0, randint_1.randint)(-10, 10).toTree());
82
+ (0, exercise_1.tryToAddWrongProp)(propositions, wrongAnswer.toCoords(), "tex");
83
+ }
84
+ return (0, exercise_1.shuffleProps)(propositions, n);
85
+ };
86
+ const isAnswerValid = (ans, { answer, x, y }) => {
87
+ const valid = new point_1.Point("A", x.toTree(), y.toTree()).toCoords();
88
+ return ans === valid;
89
+ };
90
+ exports.pointCoordinatesNoOrthonorm = {
91
+ id: "pointCoordinatesNoOrthonorm",
92
+ label: "Lire les coordonnées d'un point (repère non-orthonormé)",
93
+ levels: ["1rePro"],
94
+ isSingleStep: true,
95
+ sections: ["Géométrie cartésienne"],
96
+ generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getPointCoordinatesNoAxisNumbersQuestion, nb),
97
+ qcmTimer: 60,
98
+ freeTimer: 60,
99
+ getPropositions,
100
+ isAnswerValid,
101
+ subject: "Mathématiques",
102
+ hasGeogebra: true,
103
+ };
@@ -8,7 +8,7 @@ const remarkableValues_1 = require("../../../../math/trigonometry/remarkableValu
8
8
  const randint_1 = require("../../../../math/utils/random/randint");
9
9
  const numberNode_1 = require("../../../../tree/nodes/numbers/numberNode");
10
10
  const multiplyNode_1 = require("../../../../tree/nodes/operators/multiplyNode");
11
- const randomLetter_1 = require("../../../../utils/randomLetter");
11
+ const randomLetter_1 = require("../../../../utils/strings/randomLetter");
12
12
  const shuffle_1 = require("../../../../utils/shuffle");
13
13
  //|u| |v| cos(u,v)
14
14
  const getScalarProductViaCosQuestion = () => {
@@ -6,7 +6,7 @@ const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQ
6
6
  const randint_1 = require("../../../../math/utils/random/randint");
7
7
  const substractNode_1 = require("../../../../tree/nodes/operators/substractNode");
8
8
  const alignTex_1 = require("../../../../utils/alignTex");
9
- const randomLetter_1 = require("../../../../utils/randomLetter");
9
+ const randomLetter_1 = require("../../../../utils/strings/randomLetter");
10
10
  const getVectorCoordinatesFromTwoPointsQuestion = () => {
11
11
  const A = [(0, randint_1.randint)(-9, 9), (0, randint_1.randint)(-9, 9)];
12
12
  const B = [(0, randint_1.randint)(-9, 9), (0, randint_1.randint)(-9, 9)];
@@ -1 +1 @@
1
- {"version":3,"file":"htToTTC.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/percent/htToTTC.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AAQlC,KAAK,WAAW,GAAG;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAgCF,eAAO,MAAM,OAAO,EAAE,QAAQ,CAAC,WAAW,CAazC,CAAC"}
1
+ {"version":3,"file":"htToTTC.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/percent/htToTTC.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AAWlC,KAAK,WAAW,GAAG;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AA6CF,eAAO,MAAM,OAAO,EAAE,QAAQ,CAAC,WAAW,CAczC,CAAC"}
@@ -6,6 +6,7 @@ const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQues
6
6
  const randfloat_1 = require("../../../math/utils/random/randfloat");
7
7
  const randint_1 = require("../../../math/utils/random/randint");
8
8
  const round_1 = require("../../../math/utils/round");
9
+ const numberParser_1 = require("../../../tree/parsers/numberParser");
9
10
  const coinFlip_1 = require("../../../utils/coinFlip");
10
11
  const random_1 = require("../../../utils/random");
11
12
  const getHtToTtcQuestion = () => {
@@ -18,6 +19,19 @@ const getHtToTtcQuestion = () => {
18
19
  keys: [],
19
20
  answerFormat: "tex",
20
21
  identifiers: { TVA, ht },
22
+ hint: `Pour augmenter un prix de $t\\%$, on le multiplie par $1 + \\frac{t}{100}$.`,
23
+ correction: `Pour augmenter $${ht.frenchify()}$ de $${TVA.frenchify()}\\%$, on le multiplie par :
24
+
25
+ $$
26
+ 1 + \\frac{${TVA.frenchify()}}{100} = ${(0, round_1.round)(1 + TVA / 100, 3).frenchify()}
27
+ $$
28
+
29
+ Le prix TTC est donc :
30
+
31
+ $$
32
+ ${ht.frenchify()} \\times ${(0, round_1.round)(1 + TVA / 100, 3).frenchify()} = ${answer}
33
+ $$
34
+ `,
21
35
  };
22
36
  return question;
23
37
  };
@@ -32,7 +46,7 @@ const getPropositions = (n, { answer, TVA, ht }) => {
32
46
  return (0, exercise_1.shuffleProps)(propositions, n);
33
47
  };
34
48
  const isAnswerValid = (ans, { answer }) => {
35
- return ans === answer;
49
+ return (0, numberParser_1.numberParser)(ans) === answer;
36
50
  };
37
51
  exports.htToTTC = {
38
52
  id: "htToTTC",
@@ -47,4 +61,5 @@ exports.htToTTC = {
47
61
  getPropositions,
48
62
  isAnswerValid,
49
63
  subject: "Mathématiques",
64
+ hasHintAndCorrection: true,
50
65
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ttcToHT.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/percent/ttcToHT.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AAQlC,KAAK,WAAW,GAAG;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAuCF,eAAO,MAAM,OAAO,EAAE,QAAQ,CAAC,WAAW,CAazC,CAAC"}
1
+ {"version":3,"file":"ttcToHT.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/percent/ttcToHT.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAuDF,eAAO,MAAM,OAAO,EAAE,QAAQ,CAAC,WAAW,CAczC,CAAC"}
@@ -6,6 +6,7 @@ const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQues
6
6
  const randfloat_1 = require("../../../math/utils/random/randfloat");
7
7
  const randint_1 = require("../../../math/utils/random/randint");
8
8
  const round_1 = require("../../../math/utils/round");
9
+ const numberParser_1 = require("../../../tree/parsers/numberParser");
9
10
  const coinFlip_1 = require("../../../utils/coinFlip");
10
11
  const random_1 = require("../../../utils/random");
11
12
  const getTtcToHtQuestion = () => {
@@ -18,6 +19,19 @@ const getTtcToHtQuestion = () => {
18
19
  keys: [],
19
20
  answerFormat: "tex",
20
21
  identifiers: { TTC, TVA },
22
+ hint: `Pour retrouver le prix HT d'un objet après une hausse de $t\\%$, on divise le prix TTC par $1 + \\frac{t}{100}$.`,
23
+ correction: `Pour retrouver le prix HT après une hausse de $${TVA.frenchify()}\\%$, on divise le prix TTC par :
24
+
25
+ $$
26
+ 1 + \\frac{${TVA.frenchify()}}{100} = ${(0, round_1.round)(1 + TVA / 100, 3).frenchify()}
27
+ $$
28
+
29
+ Le prix HT est donc :
30
+
31
+ $$
32
+ ${TTC.frenchify()} \\div ${(0, round_1.round)(1 + TVA / 100, 3).frenchify()} \\approx ${answer}
33
+ $$
34
+ `,
21
35
  };
22
36
  return question;
23
37
  };
@@ -32,7 +46,7 @@ const getPropositions = (n, { answer, TTC, TVA }) => {
32
46
  return (0, exercise_1.shuffleProps)(propositions, n);
33
47
  };
34
48
  const isAnswerValid = (ans, { answer }) => {
35
- return ans === answer;
49
+ return (0, numberParser_1.numberParser)(ans) === answer;
36
50
  };
37
51
  exports.ttcToHT = {
38
52
  id: "ttcToHT",
@@ -47,4 +61,5 @@ exports.ttcToHT = {
47
61
  getPropositions,
48
62
  isAnswerValid,
49
63
  subject: "Mathématiques",
64
+ hasHintAndCorrection: true,
50
65
  };
@@ -1 +1 @@
1
- {"version":3,"file":"averageList.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/stats1var/averageList.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AAOlC,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB,CAAC;AA4CF,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAC,WAAW,CAa7C,CAAC"}
1
+ {"version":3,"file":"averageList.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/stats1var/averageList.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB,CAAC;AAmEF,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAC,WAAW,CAc7C,CAAC"}
@@ -6,6 +6,8 @@ const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQ
6
6
  const randfloat_1 = require("../../../../math/utils/random/randfloat");
7
7
  const randint_1 = require("../../../../math/utils/random/randint");
8
8
  const round_1 = require("../../../../math/utils/round");
9
+ const addNode_1 = require("../../../../tree/nodes/operators/addNode");
10
+ const operatorComposition_1 = require("../../../../tree/utilities/operatorComposition");
9
11
  const average_1 = require("../../../../utils/average");
10
12
  const getAverageListQuestion = () => {
11
13
  let randomValues = [];
@@ -13,7 +15,9 @@ const getAverageListQuestion = () => {
13
15
  for (let i = 0; i < length; i++)
14
16
  randomValues.push((0, randint_1.randint)(1, 20));
15
17
  const sortedValues = randomValues.sort((a, b) => a - b);
18
+ const avg = (0, average_1.average)(sortedValues);
16
19
  const answer = (0, round_1.round)((0, average_1.average)(sortedValues), 2).frenchify();
20
+ const hasRounded = avg.frenchify() !== answer;
17
21
  const question = {
18
22
  answer,
19
23
  instruction: `On considère la liste suivante : $${randomValues.join(";\\ ")}.$
@@ -21,6 +25,22 @@ const getAverageListQuestion = () => {
21
25
  keys: [],
22
26
  answerFormat: "tex",
23
27
  identifiers: { sortedValues },
28
+ hint: "La moyenne d'une liste de valeurs est la somme de ses valeurs divisé par le nombre de valeurs.",
29
+ correction: `
30
+ On additionne toutes les valeurs :
31
+
32
+ $$
33
+ ${(0, operatorComposition_1.operatorComposition)(addNode_1.AddNode, sortedValues.map((e) => e.toTree())).toTex()} = ${sortedValues.reduce((acc, curr) => acc + curr)}
34
+ $$
35
+
36
+ puis on divise par le nombre de valeurs :
37
+
38
+ $$
39
+ ${sortedValues.reduce((acc, curr) => acc + curr)}\\div ${sortedValues.length} ${hasRounded ? "\\approx" : "="} ${answer}
40
+ $$
41
+
42
+ La moyenne ${hasRounded ? "arrondie au centième" : ""} est donc $${answer}$.
43
+ `,
24
44
  };
25
45
  return question;
26
46
  };
@@ -49,4 +69,5 @@ exports.averageList = {
49
69
  getPropositions,
50
70
  isAnswerValid,
51
71
  subject: "Mathématiques",
72
+ hasHintAndCorrection: true,
52
73
  };
@@ -1 +1 @@
1
- {"version":3,"file":"etendueList.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/stats1var/etendueList.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AAIlC,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB,CAAC;AA2CF,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAC,WAAW,CAa7C,CAAC"}
1
+ {"version":3,"file":"etendueList.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/stats1var/etendueList.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AAIlC,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB,CAAC;AAmDF,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAC,WAAW,CAc7C,CAAC"}
@@ -18,6 +18,14 @@ const getEtendueListQuestion = () => {
18
18
  keys: [],
19
19
  answerFormat: "tex",
20
20
  identifiers: { sortedValues },
21
+ hint: "L'étendue d'une liste de valeurs est la différence entre la valeur maximale et la valeur minimale.",
22
+ correction: `
23
+ On calcule la différence entre la valeur maximale et la valeur minimale :
24
+
25
+ $$
26
+ ${sortedValues[sortedValues.length - 1]} - ${sortedValues[0]} = ${answer}
27
+ $$
28
+ `,
21
29
  };
22
30
  return question;
23
31
  };
@@ -46,4 +54,5 @@ exports.etendueList = {
46
54
  getPropositions,
47
55
  isAnswerValid,
48
56
  subject: "Mathématiques",
57
+ hasHintAndCorrection: true,
49
58
  };
@@ -7,7 +7,7 @@ const randint_1 = require("../../math/utils/random/randint");
7
7
  const molecule_1 = require("../../pc/constants/molecularChemistry/molecule");
8
8
  const arrayEqual_1 = require("../../utils/arrayEqual");
9
9
  const random_1 = require("../../utils/random");
10
- const requiresApostropheBefore_1 = require("../../utils/requiresApostropheBefore");
10
+ const requiresApostropheBefore_1 = require("../../utils/strings/requiresApostropheBefore");
11
11
  const getPointFromGGB_1 = require("../utils/geogebra/getPointFromGGB");
12
12
  const isGGBPoint_1 = require("../utils/geogebra/isGGBPoint");
13
13
  const toolBarConstructor_1 = require("../utils/geogebra/toolBarConstructor");
@@ -7,7 +7,7 @@ const randint_1 = require("../../../math/utils/random/randint");
7
7
  const round_1 = require("../../../math/utils/round");
8
8
  const atome_1 = require("../../../pc/constants/molecularChemistry/atome");
9
9
  const random_1 = require("../../../utils/random");
10
- const requiresApostropheBefore_1 = require("../../../utils/requiresApostropheBefore");
10
+ const requiresApostropheBefore_1 = require("../../../utils/strings/requiresApostropheBefore");
11
11
  const getAtomicStructureOfNucleusQuestion = () => {
12
12
  const atom = (0, random_1.random)(atome_1.atomes.slice(0, 50));
13
13
  const mass = (0, round_1.round)(atom.masseAtomique, 0);
@@ -8,7 +8,7 @@ const round_1 = require("../../../math/utils/round");
8
8
  const atoms_1 = require("../../../pc/constants/molecularChemistry/atoms");
9
9
  const atome_1 = require("../../../pc/constants/molecularChemistry/atome");
10
10
  const random_1 = require("../../../utils/random");
11
- const requiresApostropheBefore_1 = require("../../../utils/requiresApostropheBefore");
11
+ const requiresApostropheBefore_1 = require("../../../utils/strings/requiresApostropheBefore");
12
12
  const randint_1 = require("../../../math/utils/random/randint");
13
13
  const getCalculateProtonsNumberFromMassQuestion = () => {
14
14
  const atom = (0, random_1.random)(atome_1.atomes.slice(0, 50));
@@ -10,7 +10,7 @@ const atoms_1 = require("../../../pc/constants/molecularChemistry/atoms");
10
10
  const measure_1 = require("../../../pc/measure/measure");
11
11
  const atome_1 = require("../../../pc/constants/molecularChemistry/atome");
12
12
  const random_1 = require("../../../utils/random");
13
- const requiresApostropheBefore_1 = require("../../../utils/requiresApostropheBefore");
13
+ const requiresApostropheBefore_1 = require("../../../utils/strings/requiresApostropheBefore");
14
14
  const massUnits_1 = require("../../../pc/units/massUnits");
15
15
  const getFindAtomEntitiesNumberFromMassQuestion = () => {
16
16
  const atom = (0, random_1.random)(atome_1.atomes.slice(5, 30));
@@ -7,7 +7,7 @@ const randint_1 = require("../../../math/utils/random/randint");
7
7
  const round_1 = require("../../../math/utils/round");
8
8
  const atome_1 = require("../../../pc/constants/molecularChemistry/atome");
9
9
  const random_1 = require("../../../utils/random");
10
- const requiresApostropheBefore_1 = require("../../../utils/requiresApostropheBefore");
10
+ const requiresApostropheBefore_1 = require("../../../utils/strings/requiresApostropheBefore");
11
11
  const possibleElements = [
12
12
  "proton",
13
13
  "neutron",
@@ -8,7 +8,7 @@ const getElectronicConfigurationFromShells_1 = require("../../../exercises/utils
8
8
  const randint_1 = require("../../../math/utils/random/randint");
9
9
  const atome_1 = require("../../../pc/constants/molecularChemistry/atome");
10
10
  const random_1 = require("../../../utils/random");
11
- const requiresApostropheBefore_1 = require("../../../utils/requiresApostropheBefore");
11
+ const requiresApostropheBefore_1 = require("../../../utils/strings/requiresApostropheBefore");
12
12
  const getFindValenceElectronsNumberFromElectronicConfigurationQuestion = () => {
13
13
  const atom = (0, random_1.random)((0, getAtoms_1.getAtoms)(3));
14
14
  const configurationTex = (0, getElectronicConfigurationFromShells_1.getElectronicConfigurationFromShells)(atom.electronsShells);
@@ -7,7 +7,7 @@ const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQues
7
7
  const randint_1 = require("../../../math/utils/random/randint");
8
8
  const atome_1 = require("../../../pc/constants/molecularChemistry/atome");
9
9
  const random_1 = require("../../../utils/random");
10
- const requiresApostropheBefore_1 = require("../../../utils/requiresApostropheBefore");
10
+ const requiresApostropheBefore_1 = require("../../../utils/strings/requiresApostropheBefore");
11
11
  const getFindValenceElectronsNumberFromTableQuestion = () => {
12
12
  const atom = (0, random_1.random)((0, getAtoms_1.getAtoms)(3));
13
13
  const instruction = `
@@ -7,7 +7,7 @@ const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQues
7
7
  const getElectronicConfigurationFromShells_1 = require("../../../exercises/utils/getElectronicConfigurationFromShells");
8
8
  const atome_1 = require("../../../pc/constants/molecularChemistry/atome");
9
9
  const random_1 = require("../../../utils/random");
10
- const requiresApostropheBefore_1 = require("../../../utils/requiresApostropheBefore");
10
+ const requiresApostropheBefore_1 = require("../../../utils/strings/requiresApostropheBefore");
11
11
  const getIdentifyRightElectronicConfigurationQuestion = () => {
12
12
  const atom = (0, random_1.random)((0, getAtoms_1.getAtoms)(3).slice(2));
13
13
  const question = {
@@ -7,7 +7,7 @@ const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQues
7
7
  const random_1 = require("../../../utils/random");
8
8
  const molecule_1 = require("../../../pc/constants/molecularChemistry/molecule");
9
9
  const randfloat_1 = require("../../../math/utils/random/randfloat");
10
- const requiresApostropheBefore_1 = require("../../../utils/requiresApostropheBefore");
10
+ const requiresApostropheBefore_1 = require("../../../utils/strings/requiresApostropheBefore");
11
11
  const coinFlip_1 = require("../../../utils/coinFlip");
12
12
  const round_1 = require("../../../math/utils/round");
13
13
  const getMassOrVolumeProportionQuestion = () => {
@@ -6,7 +6,7 @@ const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQues
6
6
  const randint_1 = require("../../../math/utils/random/randint");
7
7
  const round_1 = require("../../../math/utils/round");
8
8
  const random_1 = require("../../../utils/random");
9
- const requiresApostropheBefore_1 = require("../../../utils/requiresApostropheBefore");
9
+ const requiresApostropheBefore_1 = require("../../../utils/strings/requiresApostropheBefore");
10
10
  const combustibles = [
11
11
  { name: "bois", value: 15 },
12
12
  { name: "éthanol", value: 29 },
@@ -6,7 +6,7 @@ const exercise_1 = require("../../../exercises/exercise");
6
6
  const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
7
7
  const round_1 = require("../../../math/utils/round");
8
8
  const random_1 = require("../../../utils/random");
9
- const requiresApostropheBefore_1 = require("../../../utils/requiresApostropheBefore");
9
+ const requiresApostropheBefore_1 = require("../../../utils/strings/requiresApostropheBefore");
10
10
  const randfloat_1 = require("../../../math/utils/random/randfloat");
11
11
  const randint_1 = require("../../../math/utils/random/randint");
12
12
  const molecule_1 = require("../../../pc/constants/molecularChemistry/molecule");
@@ -6,7 +6,7 @@ const exercise_1 = require("../../../exercises/exercise");
6
6
  const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
7
7
  const randfloat_1 = require("../../../math/utils/random/randfloat");
8
8
  const round_1 = require("../../../math/utils/round");
9
- const requiresApostropheBefore_1 = require("../../../utils/requiresApostropheBefore");
9
+ const requiresApostropheBefore_1 = require("../../../utils/strings/requiresApostropheBefore");
10
10
  const substances = [
11
11
  { name: "eau", latentHeat: 334 }, // kJ/kg for melting ice
12
12
  { name: "fer", latentHeat: 276 }, // kJ/kg for melting iron
@@ -7,7 +7,7 @@ const randint_1 = require("../../math/utils/random/randint");
7
7
  const round_1 = require("../../math/utils/round");
8
8
  const coinFlip_1 = require("../../utils/coinFlip");
9
9
  const random_1 = require("../../utils/random");
10
- const requiresApostropheBefore_1 = require("../../utils/requiresApostropheBefore");
10
+ const requiresApostropheBefore_1 = require("../../utils/strings/requiresApostropheBefore");
11
11
  const getAtoms_1 = require("../utils/getAtoms");
12
12
  const getIdentifyAtomicMassOrAtomicNbQuestion = () => {
13
13
  const exo = generateExercise();
@@ -7,7 +7,7 @@ const randfloat_1 = require("../../../math/utils/random/randfloat");
7
7
  const round_1 = require("../../../math/utils/round");
8
8
  const molecule_1 = require("../../../pc/constants/molecularChemistry/molecule");
9
9
  const random_1 = require("../../../utils/random");
10
- const requiresApostropheBefore_1 = require("../../../utils/requiresApostropheBefore");
10
+ const requiresApostropheBefore_1 = require("../../../utils/strings/requiresApostropheBefore");
11
11
  const getMolarMassQuestion = () => {
12
12
  const molecule = (0, random_1.random)(molecule_1.molecules.slice(0, 50).filter((m) => m.atoms.length > 1));
13
13
  const article = (0, requiresApostropheBefore_1.requiresApostropheBefore)(molecule.name) ? "de l'" : "du ";
@@ -9,7 +9,7 @@ const molecule_1 = require("../../../pc/constants/molecularChemistry/molecule");
9
9
  const random_1 = require("../../../utils/random");
10
10
  const randint_1 = require("../../../math/utils/random/randint");
11
11
  const atoms_1 = require("../../../pc/constants/molecularChemistry/atoms");
12
- const requiresApostropheBefore_1 = require("../../../utils/requiresApostropheBefore");
12
+ const requiresApostropheBefore_1 = require("../../../utils/strings/requiresApostropheBefore");
13
13
  const getMoleculeCountFromMassAndAvogadroQuestion = () => {
14
14
  const molecule = (0, random_1.random)(molecule_1.molecules);
15
15
  const sampleMass = (0, randfloat_1.randfloat)(0.1, 2, 2); // Sample mass in grams
@@ -5,7 +5,7 @@ const exercise_1 = require("../../../exercises/exercise");
5
5
  const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
6
6
  const randint_1 = require("../../../math/utils/random/randint");
7
7
  const coinFlip_1 = require("../../../utils/coinFlip");
8
- const requiresApostropheBefore_1 = require("../../../utils/requiresApostropheBefore");
8
+ const requiresApostropheBefore_1 = require("../../../utils/strings/requiresApostropheBefore");
9
9
  const situations = [
10
10
  {
11
11
  object1: "avion de chasse",
@@ -18,7 +18,7 @@ class GeogebraConstructor {
18
18
  this.yAxis = options?.yAxis;
19
19
  }
20
20
  getAdaptedCoords({ xMin, xMax, yMin, yMax, zMin, zMax, forceShowAxes, }) {
21
- const showAxes = forceShowAxes ?? this.hideAxes ? false : true;
21
+ const showAxes = forceShowAxes ?? (this.hideAxes ? false : true);
22
22
  const xDelta = xMax - xMin;
23
23
  const yDelta = yMax - yMin;
24
24
  if (this.is3D && zMin !== undefined && zMax !== undefined) {
package/lib/index.d.ts CHANGED
@@ -149,6 +149,10 @@ declare const mathExercises: (import("./exercises/exercise").Exercise<{
149
149
  nbIds: any;
150
150
  nbValue: number;
151
151
  pow: number;
152
+ }> | import("./exercises/exercise").Exercise<{
153
+ type: number;
154
+ a: number;
155
+ b: number;
152
156
  }> | import("./exercises/exercise").Exercise<{
153
157
  dec: number;
154
158
  pow: number;
@@ -808,6 +812,9 @@ declare const mathExercises: (import("./exercises/exercise").Exercise<{
808
812
  }> | import("./exercises/exercise").Exercise<{
809
813
  x: number;
810
814
  y: number;
815
+ }> | import("./exercises/exercise").Exercise<{
816
+ x: number;
817
+ y: number;
811
818
  }> | import("./exercises/exercise").Exercise<{
812
819
  coin: boolean;
813
820
  radius: number;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAaA,OAAO,yBAAyB,CAAC;AAEjC,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAA+B,CAAC;AACnD,QAAA,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAA6B,CAAC;AAE/C,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAaA,OAAO,yBAAyB,CAAC;AAEjC,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAA+B,CAAC;AACnD,QAAA,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAA6B,CAAC;AAE/C,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,CAAC"}
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.InequationNode = void 0;
4
4
  const inequation_1 = require("../../../math/inequations/inequation");
5
5
  const cartesianProducts_1 = require("../../../utils/cartesianProducts");
6
- const isLetter_1 = require("../../../utils/isLetter");
6
+ const isLetter_1 = require("../../../utils/strings/isLetter");
7
7
  const node_1 = require("../node");
8
8
  const infiniteNode_1 = require("../numbers/infiniteNode");
9
9
  const closure_1 = require("../sets/closure");
@@ -0,0 +1,2 @@
1
+ export declare const numberParser: (ans: string) => string | false;
2
+ //# sourceMappingURL=numberParser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"numberParser.d.ts","sourceRoot":"","sources":["../../../src/tree/parsers/numberParser.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,YAAY,QAAS,MAAM,mBAIvC,CAAC"}
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.numberParser = void 0;
4
+ //to use when the answer is a pure number (int / float etc)
5
+ const numberParser = (ans) => {
6
+ const nb = ans.unfrenchify();
7
+ if (isNaN(nb))
8
+ return false;
9
+ return nb.frenchify();
10
+ };
11
+ exports.numberParser = numberParser;
@@ -0,0 +1,2 @@
1
+ export declare const isLetter: (str: string) => false | RegExpMatchArray | null;
2
+ //# sourceMappingURL=isLetter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isLetter.d.ts","sourceRoot":"","sources":["../../../src/utils/strings/isLetter.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ,QAAS,MAAM,oCAEnC,CAAC"}
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isLetter = void 0;
4
+ const isLetter = (str) => {
5
+ return str.length === 1 && str.match(/[a-z]/i);
6
+ };
7
+ exports.isLetter = isLetter;
@@ -0,0 +1,2 @@
1
+ export declare const pluralize: (word: string, count: number, suffix?: string) => string;
2
+ //# sourceMappingURL=pluralize.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pluralize.d.ts","sourceRoot":"","sources":["../../../src/utils/strings/pluralize.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS,SAAU,MAAM,SAAS,MAAM,4BAMpD,CAAC"}
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.pluralize = void 0;
4
+ const pluralize = (word, count, suffix = "s") => {
5
+ if (count > 1) {
6
+ return word + suffix;
7
+ }
8
+ else {
9
+ return word;
10
+ }
11
+ };
12
+ exports.pluralize = pluralize;
@@ -0,0 +1,2 @@
1
+ export declare const randomLetter: (isMaj?: boolean, excludes?: string[]) => string;
2
+ //# sourceMappingURL=randomLetter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"randomLetter.d.ts","sourceRoot":"","sources":["../../../src/utils/strings/randomLetter.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,WAChB,OAAO,aACJ,MAAM,EAAE,WASnB,CAAC"}
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.randomLetter = void 0;
4
+ const randomLetter = (isMaj = false, excludes = []) => {
5
+ let letter = "";
6
+ do {
7
+ letter = String.fromCharCode((isMaj ? 65 : 97) + Math.floor(Math.random() * 26));
8
+ } while (excludes.includes(letter));
9
+ return letter;
10
+ };
11
+ exports.randomLetter = randomLetter;
@@ -0,0 +1,2 @@
1
+ export declare const requiresApostropheBefore: (string: string) => RegExpMatchArray | null;
2
+ //# sourceMappingURL=requiresApostropheBefore.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"requiresApostropheBefore.d.ts","sourceRoot":"","sources":["../../../src/utils/strings/requiresApostropheBefore.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,wBAAwB,WAAY,MAAM,4BAEtD,CAAC"}
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.requiresApostropheBefore = void 0;
4
+ const requiresApostropheBefore = (string) => {
5
+ return string[0].toLowerCase().match(/[a,e,i,o,u,y,h,é,è]/);
6
+ };
7
+ exports.requiresApostropheBefore = requiresApostropheBefore;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "math-exercises",
3
- "version": "2.2.17",
3
+ "version": "2.2.18",
4
4
  "description": "Math exercises generator for middle school and high school",
5
5
  "main": "lib/index.js",
6
6
  "files": [