math-exercises 3.0.91 → 3.0.93

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 (107) hide show
  1. package/lib/exercises/math/calcul/arithmetics/commonDivisorsList.js +1 -1
  2. package/lib/exercises/math/calcul/arithmetics/isMultipleOrDivisor.d.ts.map +1 -1
  3. package/lib/exercises/math/calcul/arithmetics/isMultipleOrDivisor.js +3 -8
  4. package/lib/exercises/math/calcul/arithmetics/ppcmCalcul.d.ts.map +1 -1
  5. package/lib/exercises/math/calcul/arithmetics/ppcmCalcul.js +43 -4
  6. package/lib/exercises/math/calcul/arithmetics/primeNumbers.d.ts.map +1 -1
  7. package/lib/exercises/math/calcul/arithmetics/primeNumbers.js +11 -12
  8. package/lib/exercises/math/calcul/fractions/fractionAndIntegerSum.d.ts.map +1 -1
  9. package/lib/exercises/math/calcul/fractions/fractionAndIntegerSum.js +6 -2
  10. package/lib/exercises/math/calcul/fractions/fractionsMix.d.ts +12 -0
  11. package/lib/exercises/math/calcul/fractions/fractionsMix.d.ts.map +1 -0
  12. package/lib/exercises/math/calcul/fractions/fractionsMix.js +221 -0
  13. package/lib/exercises/math/calcul/fractions/fractionsOperations.js +1 -1
  14. package/lib/exercises/math/calcul/fractions/fractionsSubstraction.js +1 -1
  15. package/lib/exercises/math/calcul/fractions/fractionsSum.d.ts.map +1 -1
  16. package/lib/exercises/math/calcul/fractions/fractionsSum.js +3 -1
  17. package/lib/exercises/math/calcul/fractions/index.d.ts +1 -0
  18. package/lib/exercises/math/calcul/fractions/index.d.ts.map +1 -1
  19. package/lib/exercises/math/calcul/fractions/index.js +1 -0
  20. package/lib/exercises/math/calcul/fractions/simplifyFractionWithPrimeFactorization.d.ts +4 -1
  21. package/lib/exercises/math/calcul/fractions/simplifyFractionWithPrimeFactorization.d.ts.map +1 -1
  22. package/lib/exercises/math/calcul/fractions/simplifyFractionWithPrimeFactorization.js +29 -11
  23. package/lib/exercises/math/calcul/proportionality/scaleCalculation.d.ts.map +1 -1
  24. package/lib/exercises/math/calcul/proportionality/scaleCalculation.js +4 -2
  25. package/lib/exercises/math/calcul/proportionality/scaleUsage.d.ts.map +1 -1
  26. package/lib/exercises/math/calcul/proportionality/scaleUsage.js +6 -4
  27. package/lib/exercises/math/calcul/sign/absoluteNumber.d.ts.map +1 -1
  28. package/lib/exercises/math/calcul/sign/absoluteNumber.js +7 -4
  29. package/lib/exercises/math/calculLitteral/inequations/inequationsSign.d.ts +1 -0
  30. package/lib/exercises/math/calculLitteral/inequations/inequationsSign.d.ts.map +1 -1
  31. package/lib/exercises/math/calculLitteral/inequations/inequationsSign.js +16 -10
  32. package/lib/exercises/math/calculLitteral/inequations/isInequalityTrue.d.ts +1 -0
  33. package/lib/exercises/math/calculLitteral/inequations/isInequalityTrue.d.ts.map +1 -1
  34. package/lib/exercises/math/calculLitteral/inequations/isInequalityTrue.js +36 -11
  35. package/lib/exercises/math/derivation/variations/index.d.ts +1 -0
  36. package/lib/exercises/math/derivation/variations/index.d.ts.map +1 -1
  37. package/lib/exercises/math/derivation/variations/index.js +1 -0
  38. package/lib/exercises/math/derivation/variations/variationArrowAmount.d.ts +10 -0
  39. package/lib/exercises/math/derivation/variations/variationArrowAmount.d.ts.map +1 -0
  40. package/lib/exercises/math/derivation/variations/variationArrowAmount.js +188 -0
  41. package/lib/exercises/math/functions/basics/graphicInequation.d.ts.map +1 -1
  42. package/lib/exercises/math/functions/basics/graphicInequation.js +9 -0
  43. package/lib/exercises/math/functions/basics/graphicInequationAffine.d.ts.map +1 -1
  44. package/lib/exercises/math/functions/basics/graphicInequationAffine.js +28 -6
  45. package/lib/exercises/math/functions/sign/equationFromSignTable.d.ts +11 -0
  46. package/lib/exercises/math/functions/sign/equationFromSignTable.d.ts.map +1 -0
  47. package/lib/exercises/math/functions/sign/equationFromSignTable.js +222 -0
  48. package/lib/exercises/math/functions/sign/index.d.ts +2 -0
  49. package/lib/exercises/math/functions/sign/index.d.ts.map +1 -1
  50. package/lib/exercises/math/functions/sign/index.js +2 -0
  51. package/lib/exercises/math/functions/sign/partialSignTableFromGraph.d.ts +12 -0
  52. package/lib/exercises/math/functions/sign/partialSignTableFromGraph.d.ts.map +1 -0
  53. package/lib/exercises/math/functions/sign/partialSignTableFromGraph.js +152 -0
  54. package/lib/exercises/math/functions/sqrt/squareRootCalculation.d.ts.map +1 -1
  55. package/lib/exercises/math/functions/sqrt/squareRootCalculation.js +3 -1
  56. package/lib/exercises/math/functions/square/squareImageInterval.d.ts.map +1 -1
  57. package/lib/exercises/math/functions/square/squareImageInterval.js +34 -2
  58. package/lib/exercises/math/geometry/vectors/scalarProduct/findCoordinatesToOrthogonalize.js +1 -1
  59. package/lib/exercises/math/geometry/volumes/volumeOfPyramidWithSquareOrRectBase.js +1 -1
  60. package/lib/exercises/math/geometry/volumes/volumeOfPyramidWithTriangleBase.js +1 -1
  61. package/lib/exercises/math/geometry/volumes/volumeOfPyramidWithTriangleRectBase.js +1 -1
  62. package/lib/exercises/math/percent/evolutions/applyPercent.d.ts.map +1 -1
  63. package/lib/exercises/math/percent/evolutions/applyPercent.js +1 -0
  64. package/lib/exercises/math/percent/evolutions/evolutionRateFromValues.d.ts.map +1 -1
  65. package/lib/exercises/math/percent/evolutions/evolutionRateFromValues.js +1 -0
  66. package/lib/exercises/math/percent/evolutions/findEndValueAfterEvolution.d.ts.map +1 -1
  67. package/lib/exercises/math/percent/evolutions/findEndValueAfterEvolution.js +1 -0
  68. package/lib/exercises/math/percent/evolutions/findRightCalculForPriceEvolution.d.ts.map +1 -1
  69. package/lib/exercises/math/percent/evolutions/findRightCalculForPriceEvolution.js +1 -1
  70. package/lib/exercises/math/percent/evolutions/findStartValueAfterEvolution.d.ts.map +1 -1
  71. package/lib/exercises/math/percent/evolutions/findStartValueAfterEvolution.js +1 -0
  72. package/lib/exercises/math/percent/evolutions/globalCM.d.ts.map +1 -1
  73. package/lib/exercises/math/percent/evolutions/globalCM.js +1 -0
  74. package/lib/exercises/math/percent/evolutions/globalPercent.d.ts.map +1 -1
  75. package/lib/exercises/math/percent/evolutions/globalPercent.js +1 -0
  76. package/lib/exercises/math/percent/evolutions/reciprocalPercentage.d.ts.map +1 -1
  77. package/lib/exercises/math/percent/evolutions/reciprocalPercentage.js +1 -0
  78. package/lib/exercises/math/percent/findTVA.d.ts.map +1 -1
  79. package/lib/exercises/math/percent/findTVA.js +1 -0
  80. package/lib/exercises/math/percent/index.d.ts +1 -0
  81. package/lib/exercises/math/percent/index.d.ts.map +1 -1
  82. package/lib/exercises/math/percent/index.js +1 -0
  83. package/lib/exercises/math/percent/percentOfPercent.d.ts.map +1 -1
  84. package/lib/exercises/math/percent/percentOfPercent.js +1 -0
  85. package/lib/exercises/math/percent/percentOfPercentOfNumber.d.ts +9 -0
  86. package/lib/exercises/math/percent/percentOfPercentOfNumber.d.ts.map +1 -0
  87. package/lib/exercises/math/percent/percentOfPercentOfNumber.js +99 -0
  88. package/lib/exercises/math/percent/populationEffectifFromSubPopulation.d.ts.map +1 -1
  89. package/lib/exercises/math/percent/populationEffectifFromSubPopulation.js +1 -0
  90. package/lib/exercises/math/percent/ttcToHT.d.ts.map +1 -1
  91. package/lib/exercises/math/percent/ttcToHT.js +1 -0
  92. package/lib/exercises/math/sets/nameOfNumberSets.d.ts.map +1 -1
  93. package/lib/exercises/math/sets/nameOfNumberSets.js +2 -1
  94. package/lib/exercises/math/sets/subsetsOfKnownSets.d.ts.map +1 -1
  95. package/lib/exercises/math/sets/subsetsOfKnownSets.js +4 -3
  96. package/lib/index.d.ts +33 -1
  97. package/lib/index.d.ts.map +1 -1
  98. package/lib/math/inequations/inequation.d.ts +1 -0
  99. package/lib/math/inequations/inequation.d.ts.map +1 -1
  100. package/lib/math/inequations/inequation.js +21 -0
  101. package/lib/math/numbers/rationals/rational.d.ts +0 -1
  102. package/lib/math/numbers/rationals/rational.d.ts.map +1 -1
  103. package/lib/math/numbers/rationals/rational.js +0 -3
  104. package/lib/tree/parsers/discreteSetParser.d.ts +7 -0
  105. package/lib/tree/parsers/discreteSetParser.d.ts.map +1 -1
  106. package/lib/tree/parsers/discreteSetParser.js +7 -0
  107. package/package.json +1 -1
@@ -85,4 +85,5 @@ export const findTVA = {
85
85
  subject: "Mathématiques",
86
86
  getQuestionFromIdentifiers,
87
87
  hasHintAndCorrection: true,
88
+ shouldHaveCalculator: true,
88
89
  };
@@ -10,4 +10,5 @@ export * from "./percentWritings.js";
10
10
  export * from "./evolutions/index.js";
11
11
  export * from "./interests/index.js";
12
12
  export * from "./percentOfPercent.js";
13
+ export * from "./percentOfPercentOfNumber.js";
13
14
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/percent/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,uCAAuC,CAAC;AACtD,cAAc,0CAA0C,CAAC;AACzD,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/percent/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,uCAAuC,CAAC;AACtD,cAAc,0CAA0C,CAAC;AACzD,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,+BAA+B,CAAC"}
@@ -10,3 +10,4 @@ export * from "./percentWritings.js";
10
10
  export * from "./evolutions/index.js";
11
11
  export * from "./interests/index.js";
12
12
  export * from "./percentOfPercent.js";
13
+ export * from "./percentOfPercentOfNumber.js";
@@ -1 +1 @@
1
- {"version":3,"file":"percentOfPercent.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/percent/percentOfPercent.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAUrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA0EF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAkBlD,CAAC"}
1
+ {"version":3,"file":"percentOfPercent.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/percent/percentOfPercent.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAUrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA0EF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAmBlD,CAAC"}
@@ -86,4 +86,5 @@ export const percentOfPercent = {
86
86
  getAnswer,
87
87
  getQuestionFromIdentifiers,
88
88
  hasHintAndCorrection: true,
89
+ shouldHaveCalculator: true,
89
90
  };
@@ -0,0 +1,9 @@
1
+ import { Exercise } from "../../../exercises/exercise.js";
2
+ type Identifiers = {
3
+ x: number;
4
+ y: number;
5
+ z: number;
6
+ };
7
+ export declare const percentOfPercentOfNumber: Exercise<Identifiers>;
8
+ export {};
9
+ //# sourceMappingURL=percentOfPercentOfNumber.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"percentOfPercentOfNumber.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/percent/percentOfPercentOfNumber.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,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAiFF,eAAO,MAAM,wBAAwB,EAAE,QAAQ,CAAC,WAAW,CAmB1D,CAAC"}
@@ -0,0 +1,99 @@
1
+ import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../exercises/exercise.js";
2
+ import { getDistinctQuestions } from "../../../exercises/utils/getDistinctQuestions.js";
3
+ import { numberVEA } from "../../../exercises/vea/numberVEA.js";
4
+ import { randfloat } from "../../../math/utils/random/randfloat.js";
5
+ import { randint } from "../../../math/utils/random/randint.js";
6
+ import { round } from "../../../math/utils/round.js";
7
+ import { frac } from "../../../tree/nodes/operators/fractionNode.js";
8
+ import { multiply } from "../../../tree/nodes/operators/multiplyNode.js";
9
+ import { handleVEAError } from "../../../utils/errors/handleVEAError.js";
10
+ const getPropositions = (n, { answer }) => {
11
+ const propositions = [];
12
+ addValidProp(propositions, answer);
13
+ while (propositions.length < n) {
14
+ tryToAddWrongProp(propositions, randfloat(1, 100, 4).frenchify());
15
+ }
16
+ return shuffleProps(propositions, n);
17
+ };
18
+ const getAnswer = (identifiers) => {
19
+ const { x, y, z } = identifiers;
20
+ return `${round((x / 100) * (y / 100) * z, 4).frenchify()}`;
21
+ };
22
+ const getInstruction = (identifiers) => {
23
+ const { x, y, z } = identifiers;
24
+ return `Calculer $${x}\\ \\%$ de $${y}\\ \\%$ de $${z}$.`;
25
+ };
26
+ const getHint = (identifiers) => {
27
+ return `Pour calculer $x\\%$ de $y\\%$ d'un nombre, tu peux multiplier ce nombre par les deux pourcentages.`;
28
+ };
29
+ const getCorrection = (identifiers) => {
30
+ const { x, y, z } = identifiers;
31
+ const inter = round((y / 100) * z, 4);
32
+ const answer = getAnswer(identifiers);
33
+ return `On calcule $${y}\\%$ de $${z}$ :
34
+
35
+ $$
36
+ ${multiply(frac(y, 100), z).toTex()} = ${inter.frenchify()}
37
+ $$
38
+
39
+ Puis, on calcule $${x}\\%$ de ce résultat :
40
+
41
+ $$
42
+ ${multiply(frac(x, 100), inter).toTex()} = ${answer}
43
+ $$
44
+
45
+ Ainsi, $${x}\\%$ de $${y}\\%$ de $${z}$ vaut :
46
+
47
+ $$
48
+ ${answer}
49
+ $$
50
+ `;
51
+ };
52
+ const getKeys = (identifiers) => {
53
+ return [];
54
+ };
55
+ const isAnswerValid = (ans, { answer }) => {
56
+ try {
57
+ return numberVEA(ans, answer, 4);
58
+ }
59
+ catch (err) {
60
+ return handleVEAError(err);
61
+ }
62
+ };
63
+ const getPercentOfPercentQuestion = (ops) => {
64
+ const x = randint(1, 100);
65
+ const y = randint(1, 100);
66
+ const z = randint(1, 100);
67
+ const identifiers = { x, y, z };
68
+ return getQuestionFromIdentifiers(identifiers);
69
+ };
70
+ const getQuestionFromIdentifiers = (identifiers) => {
71
+ return {
72
+ answer: getAnswer(identifiers),
73
+ instruction: getInstruction(identifiers),
74
+ keys: getKeys(identifiers),
75
+ answerFormat: "tex",
76
+ identifiers,
77
+ hint: getHint(identifiers),
78
+ correction: getCorrection(identifiers),
79
+ };
80
+ };
81
+ export const percentOfPercentOfNumber = {
82
+ id: "percentOfPercentOfNumber",
83
+ connector: "=",
84
+ label: "Calculer un pourcentage de pourcentage d'un nombre",
85
+ isSingleStep: true,
86
+ generator: (nb, opts) => getDistinctQuestions(() => getPercentOfPercentQuestion(opts), nb),
87
+ qcmTimer: 60,
88
+ freeTimer: 60,
89
+ getPropositions,
90
+ isAnswerValid,
91
+ subject: "Mathématiques",
92
+ getInstruction,
93
+ getHint,
94
+ getCorrection,
95
+ getAnswer,
96
+ getQuestionFromIdentifiers,
97
+ hasHintAndCorrection: true,
98
+ shouldHaveCalculator: true,
99
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"populationEffectifFromSubPopulation.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/percent/populationEffectifFromSubPopulation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAmBT,MAAM,6BAA6B,CAAC;AASrC,KAAK,WAAW,GAAG;IACjB,qBAAqB,EAAE,MAAM,CAAC;IAC9B,oBAAoB,EAAE,MAAM,CAAC;IAC7B,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAsJF,eAAO,MAAM,mCAAmC,EAAE,QAAQ,CAAC,WAAW,CAgBrE,CAAC"}
1
+ {"version":3,"file":"populationEffectifFromSubPopulation.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/percent/populationEffectifFromSubPopulation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAmBT,MAAM,6BAA6B,CAAC;AASrC,KAAK,WAAW,GAAG;IACjB,qBAAqB,EAAE,MAAM,CAAC;IAC9B,oBAAoB,EAAE,MAAM,CAAC;IAC7B,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAsJF,eAAO,MAAM,mCAAmC,EAAE,QAAQ,CAAC,WAAW,CAiBrE,CAAC"}
@@ -125,4 +125,5 @@ export const populationEffectifFromSubPopulation = {
125
125
  subject: "Mathématiques",
126
126
  getQuestionFromIdentifiers,
127
127
  hasHintAndCorrection: true,
128
+ shouldHaveCalculator: true,
128
129
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ttcToHT.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/percent/ttcToHT.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AASrC,KAAK,WAAW,GAAG;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAmFF,eAAO,MAAM,OAAO,EAAE,QAAQ,CAAC,WAAW,CAezC,CAAC"}
1
+ {"version":3,"file":"ttcToHT.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/percent/ttcToHT.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AASrC,KAAK,WAAW,GAAG;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAmFF,eAAO,MAAM,OAAO,EAAE,QAAQ,CAAC,WAAW,CAgBzC,CAAC"}
@@ -80,4 +80,5 @@ export const ttcToHT = {
80
80
  subject: "Mathématiques",
81
81
  hasHintAndCorrection: true,
82
82
  getQuestionFromIdentifiers,
83
+ shouldHaveCalculator: true,
83
84
  };
@@ -1 +1 @@
1
- {"version":3,"file":"nameOfNumberSets.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/sets/nameOfNumberSets.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAMrC,KAAK,WAAW,GAAG;IACjB,uBAAuB,EAAE,OAAO,CAAC;IACjC,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAgJF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAgBlD,CAAC"}
1
+ {"version":3,"file":"nameOfNumberSets.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/sets/nameOfNumberSets.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAMrC,KAAK,WAAW,GAAG;IACjB,uBAAuB,EAAE,OAAO,CAAC;IACjC,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAgJF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAiBlD,CAAC"}
@@ -112,8 +112,9 @@ export const nameOfNumberSets = {
112
112
  label: "Nommer les ensembles des nombres",
113
113
  answerType: "QCU",
114
114
  isSingleStep: true,
115
- generator: (nb, opts) => getDistinctQuestions(() => getNameOfNumberSetsQuestion(opts), 5),
115
+ generator: (nb, opts) => getDistinctQuestions(() => getNameOfNumberSetsQuestion(opts), nb, 5),
116
116
  qcmTimer: 60,
117
+ maxAllowedQuestions: 5,
117
118
  freeTimer: 60,
118
119
  getPropositions,
119
120
  isAnswerValid,
@@ -1 +1 @@
1
- {"version":3,"file":"subsetsOfKnownSets.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/sets/subsetsOfKnownSets.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,6BAA6B,CAAC;AAIrC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAiGF,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,WAAW,CAiBpD,CAAC"}
1
+ {"version":3,"file":"subsetsOfKnownSets.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/sets/subsetsOfKnownSets.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,6BAA6B,CAAC;AAIrC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAiGF,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,WAAW,CAkBpD,CAAC"}
@@ -64,8 +64,8 @@ $$`
64
64
  : `On a donc $${caseToTex(set)} \\subset ${caseToTex(subset)}$, mais $${caseToTex(subset)} \\not\\subset ${caseToTex(set)}$. `}`;
65
65
  };
66
66
  const getSubsetsOfKnownSetsQuestion = (ops) => {
67
- const subset = randint(0, 6);
68
- const set = randint(0, 6, [subset]);
67
+ const subset = randint(0, 5);
68
+ const set = randint(0, 5, [subset]);
69
69
  const identifiers = { subset, set };
70
70
  return getQuestionFromIdentifiers(identifiers);
71
71
  };
@@ -85,7 +85,7 @@ export const subsetsOfKnownSets = {
85
85
  label: "Inclusions des ensembles de nombres",
86
86
  answerType: "QCU",
87
87
  isSingleStep: true,
88
- generator: (nb, opts) => getDistinctQuestions(() => getSubsetsOfKnownSetsQuestion(opts), nb),
88
+ generator: (nb, opts) => getDistinctQuestions(() => getSubsetsOfKnownSetsQuestion(opts), nb, 15),
89
89
  qcmTimer: 60,
90
90
  freeTimer: 60,
91
91
  getPropositions,
@@ -94,6 +94,7 @@ export const subsetsOfKnownSets = {
94
94
  getHint,
95
95
  getCorrection,
96
96
  getAnswer,
97
+ maxAllowedQuestions: 15,
97
98
  getQuestionFromIdentifiers,
98
99
  hasHintAndCorrection: true,
99
100
  };
package/lib/index.d.ts CHANGED
@@ -119,7 +119,9 @@ declare const mathExercises: (Exercise<{
119
119
  }, {}> | Exercise<{
120
120
  num: number;
121
121
  denum: number;
122
- }, {}> | Exercise<{
122
+ }, {
123
+ withoutGivenPrimeFactors?: boolean;
124
+ }> | Exercise<{
123
125
  num: number;
124
126
  denum: number;
125
127
  leadingPart: number;
@@ -165,6 +167,13 @@ declare const mathExercises: (Exercise<{
165
167
  }, {}> | Exercise<{
166
168
  expr: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
167
169
  x: number;
170
+ }, {}> | Exercise<{
171
+ type: number;
172
+ a: number;
173
+ b: number;
174
+ c: number;
175
+ d: number;
176
+ e: number;
168
177
  }, {}> | Exercise<{
169
178
  numbers: number[];
170
179
  }, {}> | Exercise<{
@@ -491,6 +500,7 @@ declare const mathExercises: (Exercise<{
491
500
  a: number;
492
501
  lt: boolean;
493
502
  b: number;
503
+ isStrict: boolean;
494
504
  }, {}> | Exercise<{
495
505
  aLimit: number;
496
506
  bLimit: number;
@@ -507,6 +517,7 @@ declare const mathExercises: (Exercise<{
507
517
  left: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
508
518
  right: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
509
519
  inequalitySign: boolean;
520
+ isStrict: boolean;
510
521
  }, {}> | Exercise<{
511
522
  rand: boolean;
512
523
  poly1: number[];
@@ -735,6 +746,11 @@ declare const mathExercises: (Exercise<{
735
746
  coin: number;
736
747
  racine1: number;
737
748
  racine2: number;
749
+ }, {}> | Exercise<{
750
+ a: number;
751
+ b: number;
752
+ c: number;
753
+ d: number;
738
754
  }, {}> | Exercise<{
739
755
  coeffs: number[];
740
756
  }, {}> | Exercise<{
@@ -1153,6 +1169,18 @@ declare const mathExercises: (Exercise<{
1153
1169
  x1: number;
1154
1170
  x2: number;
1155
1171
  x3: number;
1172
+ }, {}> | Exercise<{
1173
+ signs: string[];
1174
+ xs: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers[];
1175
+ type: number;
1176
+ ineqSymbol?: string;
1177
+ }, {}> | Exercise<{
1178
+ initTable: string[][];
1179
+ a: number;
1180
+ x1: number;
1181
+ x2: number;
1182
+ x3: number;
1183
+ lineAsked: number;
1156
1184
  }, {}> | Exercise<{
1157
1185
  xValues: number[];
1158
1186
  yValues: number[];
@@ -1753,6 +1781,10 @@ declare const mathExercises: (Exercise<{
1753
1781
  }> | Exercise<{
1754
1782
  x: number;
1755
1783
  y: number;
1784
+ }, {}> | Exercise<{
1785
+ x: number;
1786
+ y: number;
1787
+ z: number;
1756
1788
  }, {}> | Exercise<{
1757
1789
  int: number;
1758
1790
  power: 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;AAE/D,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAA+B,CAAC;AACnD,QAAA,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAA6B,CAAC;AAE/C,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAE,cAAc,EAAE,CAAC"}
@@ -12,5 +12,6 @@ export declare class InequationSymbol {
12
12
  toReversed: () => InequationSymbol;
13
13
  toStrictnessToggled: () => InequationSymbol;
14
14
  strictnessToggled: () => InegalitySymbols;
15
+ toWord: (isPlural?: boolean, isFeminine?: boolean) => string;
15
16
  }
16
17
  //# sourceMappingURL=inequation.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"inequation.d.ts","sourceRoot":"","sources":["../../../src/math/inequations/inequation.ts"],"names":[],"mappings":"AACA,MAAM,MAAM,gBAAgB,GAAG,GAAG,GAAG,GAAG,GAAG,MAAM,GAAG,MAAM,CAAC;AAE3D,8BAAsB,2BAA2B;IAC/C,MAAM,CAAC,MAAM;IAGb,MAAM,CAAC,YAAY;CAGpB;AACD,qBAAa,gBAAgB;IAC3B,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,gBAAgB,CAAC;gBACb,MAAM,EAAE,gBAAgB;IAKpC,QAAQ,QAAO,gBAAgB,CAW7B;IACF,UAAU,yBAER;IACF,mBAAmB,yBAEjB;IACF,iBAAiB,QAAO,gBAAgB,CAWtC;CACH"}
1
+ {"version":3,"file":"inequation.d.ts","sourceRoot":"","sources":["../../../src/math/inequations/inequation.ts"],"names":[],"mappings":"AACA,MAAM,MAAM,gBAAgB,GAAG,GAAG,GAAG,GAAG,GAAG,MAAM,GAAG,MAAM,CAAC;AAE3D,8BAAsB,2BAA2B;IAC/C,MAAM,CAAC,MAAM;IAGb,MAAM,CAAC,YAAY;CAGpB;AACD,qBAAa,gBAAgB;IAC3B,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,gBAAgB,CAAC;gBACb,MAAM,EAAE,gBAAgB;IAKpC,QAAQ,QAAO,gBAAgB,CAW7B;IACF,UAAU,yBAER;IACF,mBAAmB,yBAEjB;IACF,iBAAiB,QAAO,gBAAgB,CAWtC;IACF,MAAM,uDAoBJ;CACH"}
@@ -46,4 +46,25 @@ export class InequationSymbol {
46
46
  return "<";
47
47
  }
48
48
  };
49
+ toWord = (isPlural = false, isFeminine = false) => {
50
+ const s = isPlural ? "s" : "";
51
+ const e = isFeminine ? "e" : "";
52
+ const egalWord = isPlural
53
+ ? isFeminine
54
+ ? "égales"
55
+ : "égaux"
56
+ : isFeminine
57
+ ? "égale"
58
+ : "égal";
59
+ switch (this.symbol) {
60
+ case "<":
61
+ return `strictement inférieur${e}${s}`;
62
+ case ">":
63
+ return `strictement supérieur${e}${s}`;
64
+ case "\\ge":
65
+ return `supérieur${e}${s} ou ${egalWord}`;
66
+ case "\\le":
67
+ return `inférieur${e}${s} ou ${egalWord}`;
68
+ }
69
+ };
49
70
  }
@@ -25,7 +25,6 @@ export declare class Rational implements Nombre {
25
25
  constructor(numerator: number, denumerator: number);
26
26
  toArray(): number[];
27
27
  equals(n: Nombre): boolean;
28
- toTex(): string;
29
28
  add(nb: Nombre): Nombre;
30
29
  multiply(nb: Nombre): Rational | Integer;
31
30
  reverse(shouldSimplify: boolean): Nombre;
@@ -1 +1 @@
1
- {"version":3,"file":"rational.d.ts","sourceRoot":"","sources":["../../../../src/math/numbers/rationals/rational.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAElE,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAQvD,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhD,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAElD,8BAAsB,mBAAmB;IACvC;;OAEG;IACH,MAAM,CAAC,kBAAkB,CAAC,MAAM,GAAE,MAAW;IAW7C,MAAM,CAAC,kBAAkB,CACvB,GAAG,GAAE,MAAW,EAChB,EAAE,UAAkB,EAAE,GAAE;QAAE,UAAU,CAAC,EAAE,OAAO,CAAA;KAAO;IASvD,MAAM,CAAC,uBAAuB,CAAC,QAAQ,GAAE,MAAW;IAKpD,MAAM,CAAC,0BAA0B,CAAC,GAAG,GAAE,MAAW;IAQlD,MAAM,CAAC,kBAAkB,CAAC,GAAG,GAAE,MAAW;IAO1C,MAAM,CAAC,aAAa,CAAC,GAAG,GAAE,MAAW;CAOtC;AAED,qBAAa,QAAS,YAAW,MAAM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A0B,CAAC,GAAG,GAAE,MAAW;IAQlD,MAAM,CAAC,kBAAkB,CAAC,GAAG,GAAE,MAAW;IAO1C,MAAM,CAAC,aAAa,CAAC,GAAG,GAAE,MAAW;CAOtC;AAED,qBAAa,QAAS,YAAW,MAAM;IACrC,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,OAAO,CAAC;IACtB,IAAI,EAAE,UAAU,CAAC;gBAEL,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM;IAYlD,OAAO;IAGP,MAAM,CAAC,CAAC,EAAE,MAAM;IAIhB,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM;IAkBvB,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO;IAgBxC,OAAO,CAAC,cAAc,EAAE,OAAO,GAAG,MAAM;IAIxC,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM;IAgB1B,QAAQ,IAAI,QAAQ;IAIpB,MAAM,CAAC,IAAI,CAAC,EAAE,WAAW,GAAG,aAAa;IAgBzC,cAAc;IAId,QAAQ,IAAI,OAAO,GAAG,QAAQ;CAqB/B"}
@@ -84,9 +84,6 @@ export class Rational {
84
84
  equals(n) {
85
85
  return this.value === n.value;
86
86
  }
87
- toTex() {
88
- return `${this.num < 0 ? "-" : ""}\\frac{${this.num < 0 ? -this.num : this.num}}{${this.denum}}`;
89
- }
90
87
  add(nb) {
91
88
  switch (nb.type) {
92
89
  case NumberType.Integer: {
@@ -1,3 +1,10 @@
1
1
  import { DiscreteSetNode } from "../nodes/sets/discreteSetNode.js";
2
+ /**
3
+ *
4
+ * @param str réponse de l'élève
5
+ * @returns un DiscretSetNode composé des éléments de la rpéonse
6
+ * false si la réponse n'est pas parsable en ensemble
7
+ * accepte les valeurs isolées
8
+ */
2
9
  export declare const discreteSetParser: (str: string) => false | DiscreteSetNode;
3
10
  //# sourceMappingURL=discreteSetParser.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"discreteSetParser.d.ts","sourceRoot":"","sources":["../../../src/tree/parsers/discreteSetParser.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAY,MAAM,kCAAkC,CAAC;AAI7E,eAAO,MAAM,iBAAiB,QAAS,MAAM,4BAkB5C,CAAC"}
1
+ {"version":3,"file":"discreteSetParser.d.ts","sourceRoot":"","sources":["../../../src/tree/parsers/discreteSetParser.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAY,MAAM,kCAAkC,CAAC;AAI7E;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,QAAS,MAAM,4BAkB5C,CAAC"}
@@ -1,6 +1,13 @@
1
1
  import { handleVEAError } from "../../utils/errors/handleVEAError.js";
2
2
  import { DiscreteSetNode, EmptySet } from "../nodes/sets/discreteSetNode.js";
3
3
  import { parseAlgebraic } from "./latexParser.js";
4
+ /**
5
+ *
6
+ * @param str réponse de l'élève
7
+ * @returns un DiscretSetNode composé des éléments de la rpéonse
8
+ * false si la réponse n'est pas parsable en ensemble
9
+ * accepte les valeurs isolées
10
+ */
4
11
  export const discreteSetParser = (str) => {
5
12
  try {
6
13
  const formated = str
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "math-exercises",
3
3
  "type": "module",
4
- "version": "3.0.91",
4
+ "version": "3.0.93",
5
5
  "description": "Math exercises generator for middle school and high school",
6
6
  "main": "lib/index.js",
7
7
  "files": [