math-exercises 3.0.163 → 3.0.165

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 (66) hide show
  1. package/lib/exercises/exercise.d.ts +1 -1
  2. package/lib/exercises/exercise.d.ts.map +1 -1
  3. package/lib/exercises/math/functions/basics/inverseImageFunctionGeogebra.d.ts.map +1 -1
  4. package/lib/exercises/math/functions/basics/inverseImageFunctionGeogebra.js +3 -1
  5. package/lib/exercises/math/functions/trinoms/devForm/variationsFromAlgebricForm.d.ts +6 -2
  6. package/lib/exercises/math/functions/trinoms/devForm/variationsFromAlgebricForm.d.ts.map +1 -1
  7. package/lib/exercises/math/functions/trinoms/devForm/variationsFromAlgebricForm.js +85 -13
  8. package/lib/exercises/math/functions/trinoms/equation/index.d.ts +2 -0
  9. package/lib/exercises/math/functions/trinoms/equation/index.d.ts.map +1 -1
  10. package/lib/exercises/math/functions/trinoms/equation/index.js +2 -0
  11. package/lib/exercises/math/functions/trinoms/equation/solveSecondDegreeEquationByFactorisation.d.ts +4 -1
  12. package/lib/exercises/math/functions/trinoms/equation/solveSecondDegreeEquationByFactorisation.d.ts.map +1 -1
  13. package/lib/exercises/math/functions/trinoms/equation/solveSecondDegreeEquationByFactorisation.js +169 -8
  14. package/lib/exercises/math/functions/trinoms/equation/solveSecondDegreeEquationEqualsC.d.ts +10 -0
  15. package/lib/exercises/math/functions/trinoms/equation/solveSecondDegreeEquationEqualsC.d.ts.map +1 -0
  16. package/lib/exercises/math/functions/trinoms/equation/solveSecondDegreeEquationEqualsC.js +146 -0
  17. package/lib/exercises/math/functions/trinoms/equation/solveSecondDegreeEquationFromCano.d.ts.map +1 -1
  18. package/lib/exercises/math/functions/trinoms/equation/solveSecondDegreeEquationFromCano.js +73 -3
  19. package/lib/exercises/math/functions/trinoms/equation/trinomSelectEquationWithoutDeltaNeeded.d.ts +13 -0
  20. package/lib/exercises/math/functions/trinoms/equation/trinomSelectEquationWithoutDeltaNeeded.d.ts.map +1 -0
  21. package/lib/exercises/math/functions/trinoms/equation/trinomSelectEquationWithoutDeltaNeeded.js +204 -0
  22. package/lib/exercises/math/functions/trinoms/roots/index.d.ts +1 -0
  23. package/lib/exercises/math/functions/trinoms/roots/index.d.ts.map +1 -1
  24. package/lib/exercises/math/functions/trinoms/roots/index.js +1 -0
  25. package/lib/exercises/math/functions/trinoms/roots/rootsFromFactorizedForm.d.ts.map +1 -1
  26. package/lib/exercises/math/functions/trinoms/roots/rootsFromFactorizedForm.js +42 -9
  27. package/lib/exercises/math/functions/trinoms/roots/trinomAlgebraicFormFromRootsAndPoint.d.ts +13 -0
  28. package/lib/exercises/math/functions/trinoms/roots/trinomAlgebraicFormFromRootsAndPoint.d.ts.map +1 -0
  29. package/lib/exercises/math/functions/trinoms/roots/trinomAlgebraicFormFromRootsAndPoint.js +252 -0
  30. package/lib/exercises/math/functions/trinoms/sign/index.d.ts +2 -0
  31. package/lib/exercises/math/functions/trinoms/sign/index.d.ts.map +1 -1
  32. package/lib/exercises/math/functions/trinoms/sign/index.js +2 -0
  33. package/lib/exercises/math/functions/trinoms/sign/parabolaSignTable.d.ts +9 -0
  34. package/lib/exercises/math/functions/trinoms/sign/parabolaSignTable.d.ts.map +1 -0
  35. package/lib/exercises/math/functions/trinoms/sign/parabolaSignTable.js +123 -0
  36. package/lib/exercises/math/functions/trinoms/sign/trinomSignTableFromAlgebraicForm.d.ts +13 -0
  37. package/lib/exercises/math/functions/trinoms/sign/trinomSignTableFromAlgebraicForm.d.ts.map +1 -0
  38. package/lib/exercises/math/functions/trinoms/sign/trinomSignTableFromAlgebraicForm.js +209 -0
  39. package/lib/exercises/math/functions/trinoms/summitAndCanonical/devFormFromSummitAndPoint.d.ts +4 -1
  40. package/lib/exercises/math/functions/trinoms/summitAndCanonical/devFormFromSummitAndPoint.d.ts.map +1 -1
  41. package/lib/exercises/math/functions/trinoms/summitAndCanonical/devFormFromSummitAndPoint.js +70 -46
  42. package/lib/exercises/math/probaStat/index.js +1 -0
  43. package/lib/exercises/math/probaStat/trees/index.d.ts +2 -0
  44. package/lib/exercises/math/probaStat/trees/index.d.ts.map +1 -0
  45. package/lib/exercises/math/probaStat/trees/index.js +1 -0
  46. package/lib/exercises/math/probaStat/trees/treeInInstruction.d.ts +8 -0
  47. package/lib/exercises/math/probaStat/trees/treeInInstruction.d.ts.map +1 -0
  48. package/lib/exercises/math/probaStat/trees/treeInInstruction.js +110 -0
  49. package/lib/exercises/math/sequences/arithmetic/arithmeticVariations.d.ts +13 -0
  50. package/lib/exercises/math/sequences/arithmetic/arithmeticVariations.d.ts.map +1 -0
  51. package/lib/exercises/math/sequences/arithmetic/arithmeticVariations.js +163 -0
  52. package/lib/exercises/math/sequences/arithmetic/index.d.ts +1 -0
  53. package/lib/exercises/math/sequences/arithmetic/index.d.ts.map +1 -1
  54. package/lib/exercises/math/sequences/arithmetic/index.js +1 -0
  55. package/lib/index.d.ts +45 -4
  56. package/lib/index.d.ts.map +1 -1
  57. package/lib/math/polynomials/trinom.d.ts +1 -1
  58. package/lib/math/polynomials/trinom.d.ts.map +1 -1
  59. package/lib/math/polynomials/trinom.js +5 -2
  60. package/lib/tree/nodes/numbers/constantNode.d.ts +1 -0
  61. package/lib/tree/nodes/numbers/constantNode.d.ts.map +1 -1
  62. package/lib/tree/nodes/numbers/constantNode.js +7 -0
  63. package/lib/tree/nodes/numbers/numberNode.d.ts +1 -0
  64. package/lib/tree/nodes/numbers/numberNode.d.ts.map +1 -1
  65. package/lib/tree/nodes/numbers/numberNode.js +7 -0
  66. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { addValidProp, shuffleProps, propWhile, tryToAddWrongProp, } from "../../../../../exercises/exercise.js";
1
+ import { addValidProp, shuffleProps, propWhile, tryToAddWrongProp, GeneratorOptionTarget, GeneratorOptionType, } from "../../../../../exercises/exercise.js";
2
2
  import { getDistinctQuestions } from "../../../../../exercises/utils/getDistinctQuestions.js";
3
3
  import { Point, PointConstructor, } from "../../../../../math/geometry/point.js";
4
4
  import { randint } from "../../../../../math/utils/random/randint.js";
@@ -10,7 +10,7 @@ import { substract } from "../../../../../tree/nodes/operators/substractNode.js"
10
10
  import { parseAlgebraic } from "../../../../../tree/parsers/latexParser.js";
11
11
  import { handleVEAError } from "../../../../../utils/errors/handleVEAError.js";
12
12
  import { alignTex } from "../../../../../utils/latex/alignTex.js";
13
- const getPropositions = (n, { answer }) => {
13
+ const getPropositions = (n, { answer }, opts) => {
14
14
  const propositions = [];
15
15
  addValidProp(propositions, answer);
16
16
  propWhile(propositions, n, () => {
@@ -23,27 +23,30 @@ const getPropositions = (n, { answer }) => {
23
23
  pointIds: point.toIdentifiers(),
24
24
  summitIds: summit.toIdentifiers(),
25
25
  };
26
- tryToAddWrongProp(propositions, getAnswer(fakeIds));
26
+ tryToAddWrongProp(propositions, getAnswer(fakeIds, opts));
27
27
  });
28
28
  return shuffleProps(propositions, n);
29
29
  };
30
- const getAnswer = (identifiers) => {
30
+ const getAnswerNode = (identifiers, opts) => {
31
31
  const { pointIds, summitIds } = identifiers;
32
32
  const point = PointConstructor.fromIdentifiers(pointIds);
33
33
  const summit = PointConstructor.fromIdentifiers(summitIds);
34
34
  const a = frac(substract(point.y, summit.y), square(substract(point.x, summit.x))).simplify();
35
- const cano = add(multiply(a, square(substract("x", summit.x))), summit.y);
36
- return cano
37
- .simplify({ towardsDistribute: true, forbidFactorize: true })
38
- .toTex();
35
+ const cano = add(multiply(a, square(substract("x", summit.x).simplify())), summit.y);
36
+ if (opts?.expectedForm === "Forme canonique")
37
+ return cano;
38
+ return cano.simplify({ towardsDistribute: true, forbidFactorize: true });
39
39
  };
40
- const getInstruction = (identifiers) => {
40
+ const getAnswer = (identifiers, opts) => {
41
+ return getAnswerNode(identifiers, opts).toTex();
42
+ };
43
+ const getInstruction = (identifiers, opts) => {
41
44
  const { pointIds, summitIds } = identifiers;
42
45
  const point = PointConstructor.fromIdentifiers(pointIds);
43
46
  const summit = PointConstructor.fromIdentifiers(summitIds);
44
47
  return `On considère une fonction polynôme du second degré $f$. Sa parabole passe par le point $${point.toTexWithCoords()}$, et son sommet est $${summit.toTexWithCoords()}$.
45
48
 
46
- Déterminer la forme développée de $f$.`;
49
+ Déterminer la forme ${opts?.expectedForm === "Forme canonique" ? "canonique" : "développée"} de $f$.`;
47
50
  };
48
51
  const getHint = (identifiers) => {
49
52
  return `La forme canonique d'une fonction polynôme du second degré $f$ est :
@@ -56,7 +59,7 @@ où $\\alpha$ est l'abscisse du sommet de la parabole, et $\\beta$ son ordonnée
56
59
 
57
60
  Utilise cette formule ici, puis le fait que le point $${PointConstructor.fromIdentifiers(identifiers.pointIds).toTexWithCoords()}$ est un point de la parabole pour déterminer $a$.`;
58
61
  };
59
- const getCorrection = (identifiers) => {
62
+ const getCorrection = (identifiers, opts) => {
60
63
  const { pointIds, summitIds } = identifiers;
61
64
  const point = PointConstructor.fromIdentifiers(pointIds);
62
65
  const summit = PointConstructor.fromIdentifiers(summitIds);
@@ -88,49 +91,59 @@ ${alignTex([
88
91
  ["a", "=", a.simplify().toTex()],
89
92
  ])}
90
93
 
91
- Il ne reste plus qu'à développer la forme canonique de $f$ :
94
+ ${opts?.expectedForm === "Forme canonique"
95
+ ? `La forme canonique de $f$ est donc :
96
+
97
+ $$
98
+ f(x) = ${getAnswer(identifiers, opts)}
99
+ $$`
100
+ : `Il ne reste plus qu'à développer la forme canonique de $f$ :
92
101
 
93
102
  ${alignTex([
94
- [
95
- "f(x)",
96
- "=",
97
- add(multiply(a, square(substract("x", alpha))), beta)
98
- .simplify()
99
- .toTex(),
100
- ],
101
- [
102
- "",
103
- "=",
104
- add(multiply(a, square(substract("x", alpha)).simplify({
105
- towardsDistribute: true,
106
- forbidFactorize: true,
107
- })), beta).toTex(),
108
- ],
109
- [
110
- "",
111
- "=",
112
- add(multiply(a, square(substract("x", alpha))), beta)
113
- .simplify({ towardsDistribute: true, forbidFactorize: true })
114
- .toTex(),
115
- ],
116
- ])}
117
- `;
103
+ [
104
+ "f(x)",
105
+ "=",
106
+ add(multiply(a, square(substract("x", alpha))), beta)
107
+ .simplify()
108
+ .toTex(),
109
+ ],
110
+ [
111
+ "",
112
+ "=",
113
+ add(multiply(a, square(substract("x", alpha)).simplify({
114
+ towardsDistribute: true,
115
+ forbidFactorize: true,
116
+ })), beta).toTex(),
117
+ ],
118
+ [
119
+ "",
120
+ "=",
121
+ add(multiply(a, square(substract("x", alpha))), beta)
122
+ .simplify({ towardsDistribute: true, forbidFactorize: true })
123
+ .toTex(),
124
+ ],
125
+ ])}
126
+ `}`;
118
127
  };
119
128
  const getKeys = () => {
120
129
  return ["xsquare", "x"];
121
130
  };
122
- const isAnswerValid = (ans, { answer }) => {
131
+ const isAnswerValid = (ans, { answer, ...identifiers }, opts) => {
123
132
  try {
124
133
  const parsed = parseAlgebraic(ans);
134
+ const ansNode = getAnswerNode(identifiers, opts);
125
135
  return (parsed
126
136
  .simplify({ towardsDistribute: true, forbidFactorize: true })
127
- .toTex() === answer);
137
+ .toTex() ===
138
+ ansNode
139
+ .simplify({ towardsDistribute: true, forbidFactorize: true })
140
+ .toTex());
128
141
  }
129
142
  catch (err) {
130
143
  return handleVEAError(err);
131
144
  }
132
145
  };
133
- const getDevFormFromSummitAndPointQuestion = () => {
146
+ const getDevFormFromSummitAndPointQuestion = (opts) => {
134
147
  const summit = PointConstructor.random("S");
135
148
  const a = randint(-10, 10, [0]);
136
149
  const pointX = randint(-10, 10, [summit.x.evaluate()]);
@@ -140,23 +153,33 @@ const getDevFormFromSummitAndPointQuestion = () => {
140
153
  pointIds: point.toIdentifiers(),
141
154
  summitIds: summit.toIdentifiers(),
142
155
  };
143
- return getQuestionFromIdentifiers(identifiers);
156
+ return getQuestionFromIdentifiers(identifiers, opts);
144
157
  };
145
- const getQuestionFromIdentifiers = (identifiers) => {
158
+ const getQuestionFromIdentifiers = (identifiers, opts) => {
146
159
  return {
147
- answer: getAnswer(identifiers),
148
- instruction: getInstruction(identifiers),
160
+ answer: getAnswer(identifiers, opts),
161
+ instruction: getInstruction(identifiers, opts),
149
162
  keys: getKeys(identifiers),
150
163
  answerFormat: "tex",
151
164
  identifiers,
152
- hint: getHint(identifiers),
153
- correction: getCorrection(identifiers),
165
+ hint: getHint(identifiers, opts),
166
+ correction: getCorrection(identifiers, opts),
154
167
  };
155
168
  };
169
+ const options = [
170
+ {
171
+ id: "expectedForm",
172
+ label: "Forme attendue",
173
+ target: GeneratorOptionTarget.answer,
174
+ type: GeneratorOptionType.select,
175
+ values: ["Forme développée", "Forme canonique"],
176
+ defaultValue: "Forme développée",
177
+ },
178
+ ];
156
179
  export const devFormFromSummitAndPoint = {
157
180
  id: "devFormFromSummitAndPoint",
158
181
  connector: "=",
159
- label: "Déterminer la forme développée d'un trinôme en connaissant un point et le sommet de la parabole",
182
+ label: "Déterminer l'expression algébrique d'un trinôme en connaissant un point et le sommet de la parabole",
160
183
  isSingleStep: true,
161
184
  generator: (nb, opts) => getDistinctQuestions(() => getDevFormFromSummitAndPointQuestion(opts), nb),
162
185
  qcmTimer: 60,
@@ -169,5 +192,6 @@ export const devFormFromSummitAndPoint = {
169
192
  getCorrection,
170
193
  getAnswer,
171
194
  getQuestionFromIdentifiers,
195
+ options,
172
196
  hasHintAndCorrection: true,
173
197
  };
@@ -16,3 +16,4 @@ export * from "./basicProbas/index.js";
16
16
  export * from "./probaAsSumOfProbas.js";
17
17
  export * from "./conditionalProbaWriteFromFrench.js";
18
18
  export * from "./twoStepExperiments/index.js";
19
+ // export * from "./trees/index.js";
@@ -0,0 +1,2 @@
1
+ export * from "./treeInInstruction.js";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/trees/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC"}
@@ -0,0 +1 @@
1
+ export * from "./treeInInstruction.js";
@@ -0,0 +1,8 @@
1
+ import { Exercise } from "../../../../exercises/exercise.js";
2
+ type TreeDiagram = string[][][][];
3
+ type Identifiers = {
4
+ tree: TreeDiagram;
5
+ };
6
+ export declare const treeInInstruction: Exercise<Identifiers>;
7
+ export {};
8
+ //# sourceMappingURL=treeInInstruction.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"treeInInstruction.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/trees/treeInInstruction.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAQrC,KAAK,WAAW,GAAG,MAAM,EAAE,EAAE,EAAE,EAAE,CAAC;AAClC,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,WAAW,CAAC;CACnB,CAAC;AAiGF,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,WAAW,CAkBnD,CAAC"}
@@ -0,0 +1,110 @@
1
+ import { addValidProp, shuffleProps, propWhile, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
2
+ import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
3
+ import { RationalConstructor } from "../../../../math/numbers/rationals/rational.js";
4
+ import { randfloat } from "../../../../math/utils/random/randfloat.js";
5
+ import { randint } from "../../../../math/utils/random/randint.js";
6
+ import { coinFlip } from "../../../../utils/alea/coinFlip.js";
7
+ import { handleVEAError } from "../../../../utils/errors/handleVEAError.js";
8
+ const getPropositions = (n, { answer }) => {
9
+ const propositions = [];
10
+ addValidProp(propositions, answer);
11
+ propWhile(propositions, n, () => {
12
+ tryToAddWrongProp(propositions, randint(-10, 10) + "");
13
+ });
14
+ return shuffleProps(propositions, n);
15
+ };
16
+ const getAnswer = () => {
17
+ return "prout";
18
+ };
19
+ const getInstruction = (identifiers) => {
20
+ const { tree } = identifiers;
21
+ return `Bla bla bla voici un arbre de proba :
22
+
23
+ <svg id="treeDiagram">${JSON.stringify(tree)}</svg>
24
+
25
+ Comment ça va ajd ?`;
26
+ };
27
+ const getHint = () => {
28
+ return `indice`;
29
+ };
30
+ const getCorrection = () => {
31
+ return `correction`;
32
+ };
33
+ const getKeys = () => {
34
+ return [];
35
+ };
36
+ const isAnswerValid = () => {
37
+ try {
38
+ return coinFlip();
39
+ }
40
+ catch (err) {
41
+ return handleVEAError(err);
42
+ }
43
+ };
44
+ const getTreeInInstructionQuestion = () => {
45
+ const steps = randint(2, 4);
46
+ const randomBlock = () => {
47
+ const branches = randint(2, 4);
48
+ const isDecimal = coinFlip();
49
+ const value = () => {
50
+ return isDecimal
51
+ ? randfloat(0.1, 1, 2)
52
+ : RationalConstructor.randomIrreductibleProba().toTree().toTex();
53
+ };
54
+ const res = [
55
+ [`£${value()}£`, "£A£"],
56
+ [`£${value()}£`, "£B£"],
57
+ ];
58
+ if (branches === 3)
59
+ res.push([`£${value()}£`, "£C£"]);
60
+ return res;
61
+ };
62
+ const firstBlock = randomBlock();
63
+ const firstBlockLength = firstBlock.length;
64
+ const tree = [[firstBlock], []];
65
+ for (let i = 0; i < firstBlockLength; i++) {
66
+ tree[1].push(randomBlock());
67
+ }
68
+ if (steps === 3) {
69
+ tree.push([]);
70
+ tree[1].forEach((block) => {
71
+ const length = block.length;
72
+ for (let i = 0; i < length; i++) {
73
+ tree[2].push(randomBlock());
74
+ }
75
+ });
76
+ }
77
+ const identifiers = {
78
+ tree,
79
+ };
80
+ return getQuestionFromIdentifiers(identifiers);
81
+ };
82
+ const getQuestionFromIdentifiers = (identifiers) => {
83
+ return {
84
+ answer: getAnswer(identifiers),
85
+ instruction: getInstruction(identifiers),
86
+ keys: getKeys(identifiers),
87
+ answerFormat: "tex",
88
+ identifiers,
89
+ hint: getHint(identifiers),
90
+ correction: getCorrection(identifiers),
91
+ };
92
+ };
93
+ export const treeInInstruction = {
94
+ id: "treeInInstruction",
95
+ connector: "=",
96
+ label: "Test arbre in instruction",
97
+ isSingleStep: true,
98
+ generator: (nb, opts) => getDistinctQuestions(() => getTreeInInstructionQuestion(opts), nb),
99
+ qcmTimer: 60,
100
+ freeTimer: 60,
101
+ getPropositions,
102
+ isAnswerValid,
103
+ subject: "Mathématiques",
104
+ getInstruction,
105
+ getHint,
106
+ getCorrection,
107
+ getAnswer,
108
+ getQuestionFromIdentifiers,
109
+ hasHintAndCorrection: true,
110
+ };
@@ -0,0 +1,13 @@
1
+ import { Exercise } from "../../../../exercises/exercise.js";
2
+ type Identifiers = {
3
+ firstRank: number;
4
+ firstTerm: number;
5
+ reason: number;
6
+ form: "explicit" | "recu" | "termAndReason";
7
+ };
8
+ type Options = {
9
+ forms: string[];
10
+ };
11
+ export declare const arithmeticVariations: Exercise<Identifiers, Options>;
12
+ export {};
13
+ //# sourceMappingURL=arithmeticVariations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"arithmeticVariations.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sequences/arithmetic/arithmeticVariations.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAOrC,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,UAAU,GAAG,MAAM,GAAG,eAAe,CAAC;CAC7C,CAAC;AA+HF,KAAK,OAAO,GAAG;IACb,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB,CAAC;AAoBF,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CA8B/D,CAAC"}
@@ -0,0 +1,163 @@
1
+ import { addValidProp, shuffleProps, tryToAddWrongProp, GeneratorOptionTarget, GeneratorOptionType, } from "../../../../exercises/exercise.js";
2
+ import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
3
+ import { randint } from "../../../../math/utils/random/randint.js";
4
+ import { add } from "../../../../tree/nodes/operators/addNode.js";
5
+ import { multiply } from "../../../../tree/nodes/operators/multiplyNode.js";
6
+ import { random } from "../../../../utils/alea/random.js";
7
+ const getPropositions = (n, { answer }) => {
8
+ const propositions = [];
9
+ addValidProp(propositions, answer, "raw");
10
+ tryToAddWrongProp(propositions, "Strictement croissante", "raw");
11
+ tryToAddWrongProp(propositions, "Strictement décroissante", "raw");
12
+ tryToAddWrongProp(propositions, "Constante", "raw");
13
+ tryToAddWrongProp(propositions, "Non monotone", "raw");
14
+ return shuffleProps(propositions, n);
15
+ };
16
+ const getAnswer = (identifiers) => {
17
+ const { reason } = identifiers;
18
+ return reason > 0 ? "Strictement croissante" : "Strictement décroissante";
19
+ };
20
+ const getInstruction = (identifiers) => {
21
+ const { firstRank, firstTerm, form, reason } = identifiers;
22
+ const def = form === "explicit"
23
+ ? `, pour tout $n\\geq ${firstRank}$ :
24
+
25
+ $$
26
+ u_n = ${add(firstTerm, multiply(reason, "n"))
27
+ .simplify({ forbidFactorize: true })
28
+ .toTex()}
29
+ $$`
30
+ : form === "recu"
31
+ ? ` :
32
+
33
+ $$
34
+ \\left\\{\\begin{matrix}
35
+ u_{${firstRank}} = ${firstTerm} \\\\
36
+ u_{n+1} = ${add("u_n", reason).toTex()} \\text{ pour }n\\geq ${firstRank}
37
+ \\end{matrix}\\right.
38
+ $$
39
+
40
+ `
41
+ : ` son premier terme $u_{${firstRank}} = ${firstTerm}$ et sa raison $r = ${reason}$.`;
42
+ return `On considère une suite arithmétique $u$, définie par${def}
43
+
44
+ Quel est le sens de variation de $u$ ?
45
+ `;
46
+ };
47
+ const getHint = () => {
48
+ return `Une suite arithmétique de raison $r$ est :
49
+
50
+ - strictement croissante si $r>0$;
51
+ - strictement décroissante si $r<0$;
52
+ - constante si $r = 0$.`;
53
+ };
54
+ const getCorrection = (identifiers) => {
55
+ const { reason, firstTerm, form } = identifiers;
56
+ const sign = reason > 0 ? "positive" : "négative";
57
+ const way = reason > 0 ? "croissante" : "décroissante";
58
+ if (form === "explicit") {
59
+ return `Puisque la formule explicite de $u$ est :
60
+
61
+ $$
62
+ u_n = ${add(firstTerm, multiply(reason, "n"))
63
+ .simplify({ forbidFactorize: true })
64
+ .toTex()}
65
+ $$
66
+
67
+ alors $u$ est une suite de premier terme $${firstTerm}$ et de raison $${reason}$.
68
+
69
+ Puisque la raison $${reason}$ est strictement ${sign}, alors $u$ est strictement ${way}.`;
70
+ }
71
+ if (form === "recu") {
72
+ return `La suite $u$ est définie par une formule de récurrence :
73
+
74
+ $$
75
+ u_{n+1} = ${add("u_n", reason).toTex()}
76
+ $$
77
+
78
+ La raison de la suite $u$ est donc $${reason}$.
79
+
80
+ Puisque la raison $${reason}$ est strictement ${sign}, alors $u$ est strictement ${way}.`;
81
+ }
82
+ return `Puisque la raison $${reason}$ de la suite $u$ est strictement ${sign}, alors $u$ est strictement ${way}.`;
83
+ };
84
+ const getArithmeticVariationsQuestion = (opts) => {
85
+ const form = opts?.forms
86
+ ? random(opts.forms)
87
+ : random([
88
+ "Formule explicite",
89
+ "Formule de récurrence",
90
+ "Premier terme et raison",
91
+ ]);
92
+ const firstRank = random([0, 1]);
93
+ const firstTerm = randint(-9, 10);
94
+ const reason = randint(-9, 10, [0]);
95
+ const identifiers = {
96
+ form: form === "Formule explicite"
97
+ ? "explicit"
98
+ : form === "Formule de récurrence"
99
+ ? "recu"
100
+ : "termAndReason",
101
+ firstRank,
102
+ firstTerm,
103
+ reason,
104
+ };
105
+ return getQuestionFromIdentifiers(identifiers);
106
+ };
107
+ const getQuestionFromIdentifiers = (identifiers) => {
108
+ return {
109
+ answer: getAnswer(identifiers),
110
+ instruction: getInstruction(identifiers),
111
+ answerFormat: "raw",
112
+ identifiers,
113
+ hint: getHint(identifiers),
114
+ correction: getCorrection(identifiers),
115
+ };
116
+ };
117
+ const options = [
118
+ {
119
+ id: "forms",
120
+ label: "Type de définition de la suite",
121
+ target: GeneratorOptionTarget.generation,
122
+ type: GeneratorOptionType.multiselect,
123
+ values: [
124
+ "Formule explicite",
125
+ "Formule de récurrence",
126
+ "Premier terme et raison",
127
+ ],
128
+ defaultValue: [
129
+ "Formule explicite",
130
+ "Formule de récurrence",
131
+ "Premier terme et raison",
132
+ ],
133
+ },
134
+ ];
135
+ export const arithmeticVariations = {
136
+ id: "arithmeticVariations",
137
+ label: "Déterminer le sens de variation d'une suite arithmétique",
138
+ isSingleStep: true,
139
+ generator: (nb, opts) => getDistinctQuestions(() => getArithmeticVariationsQuestion(opts), nb),
140
+ qcmTimer: 60,
141
+ freeTimer: 60,
142
+ getPropositions,
143
+ subject: "Mathématiques",
144
+ getInstruction,
145
+ getHint,
146
+ getCorrection,
147
+ getAnswer,
148
+ getQuestionFromIdentifiers,
149
+ hasHintAndCorrection: true,
150
+ answerType: "QCU",
151
+ options,
152
+ validateOptions: (opts) => {
153
+ return opts.forms.length > 0
154
+ ? {
155
+ message: "OK",
156
+ valid: true,
157
+ }
158
+ : {
159
+ message: "Veuillez choisir au moins un type de définition de la suite.",
160
+ valid: false,
161
+ };
162
+ },
163
+ };
@@ -17,4 +17,5 @@ export * from "./arithmeticFindRandomTermFromTwoTerms.js";
17
17
  export * from "./arithmeticFindTerm.js";
18
18
  export * from "./arithmeticFindTermFirstRankOne.js";
19
19
  export * from "./arithmeticFindAntecedent.js";
20
+ export * from "./arithmeticVariations.js";
20
21
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sequences/arithmetic/index.ts"],"names":[],"mappings":"AAAA,cAAc,qCAAqC,CAAC;AAEpD,cAAc,oCAAoC,CAAC;AACnD,cAAc,gDAAgD,CAAC;AAE/D,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uCAAuC,CAAC;AACtD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,uBAAuB,CAAC;AACtC,cAAc,wCAAwC,CAAC;AACvD,cAAc,oCAAoC,CAAC;AACnD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,mCAAmC,CAAC;AAClD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,mDAAmD,CAAC;AAClE,cAAc,sCAAsC,CAAC;AACrD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,yBAAyB,CAAC;AACxC,cAAc,qCAAqC,CAAC;AACpD,cAAc,+BAA+B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sequences/arithmetic/index.ts"],"names":[],"mappings":"AAAA,cAAc,qCAAqC,CAAC;AAEpD,cAAc,oCAAoC,CAAC;AACnD,cAAc,gDAAgD,CAAC;AAE/D,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uCAAuC,CAAC;AACtD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,uBAAuB,CAAC;AACtC,cAAc,wCAAwC,CAAC;AACvD,cAAc,oCAAoC,CAAC;AACnD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,mCAAmC,CAAC;AAClD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,mDAAmD,CAAC;AAClE,cAAc,sCAAsC,CAAC;AACrD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,yBAAyB,CAAC;AACxC,cAAc,qCAAqC,CAAC;AACpD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,2BAA2B,CAAC"}
@@ -17,3 +17,4 @@ export * from "./arithmeticFindRandomTermFromTwoTerms.js";
17
17
  export * from "./arithmeticFindTerm.js";
18
18
  export * from "./arithmeticFindTermFirstRankOne.js";
19
19
  export * from "./arithmeticFindAntecedent.js";
20
+ export * from "./arithmeticVariations.js";
package/lib/index.d.ts CHANGED
@@ -1346,8 +1346,11 @@ declare const mathExercises: (Exercise<{
1346
1346
  a: number;
1347
1347
  b: number;
1348
1348
  c: number;
1349
- isDevForm: boolean;
1350
- }, Record<string, string | boolean | string[]>> | Exercise<{
1349
+ isDevForm?: boolean;
1350
+ form?: "cano" | "dev" | "facto";
1351
+ }, {
1352
+ form: string[];
1353
+ }> | Exercise<{
1351
1354
  a: number;
1352
1355
  b: number;
1353
1356
  c: number;
@@ -1360,8 +1363,21 @@ declare const mathExercises: (Exercise<{
1360
1363
  a: number;
1361
1364
  b: number;
1362
1365
  type: number;
1363
- }, Record<string, string | boolean | string[]>> | Exercise<{
1366
+ }, {
1367
+ factoType: string[];
1368
+ }> | Exercise<{
1364
1369
  coeffs: number[];
1370
+ }, Record<string, string | boolean | string[]>> | Exercise<{
1371
+ equations: {
1372
+ a: number;
1373
+ b: number;
1374
+ c: number;
1375
+ form: "dev" | "cano" | "facto";
1376
+ }[];
1377
+ }, Record<string, string | boolean | string[]>> | Exercise<{
1378
+ aIds: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
1379
+ bIds: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
1380
+ cIds: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
1365
1381
  }, Record<string, string | boolean | string[]>> | Exercise<{
1366
1382
  roots: number[];
1367
1383
  a: number;
@@ -1397,12 +1413,28 @@ declare const mathExercises: (Exercise<{
1397
1413
  }> | Exercise<{
1398
1414
  trinomIdentifiers: import("./tree/nodes/polynomials/trinomNode.js").TrinomNodeIdentifiers;
1399
1415
  }, Record<string, string | boolean | string[]>> | Exercise<{
1416
+ rootsIds: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers[];
1417
+ pointIds: import("./math/geometry/point.js").PointIdentifiers;
1418
+ }, {
1419
+ expectedForm: string;
1420
+ }> | Exercise<{
1400
1421
  trinomCoeffs: number[];
1401
1422
  isAskingPositive: boolean;
1402
1423
  }, Record<string, string | boolean | string[]>> | Exercise<{
1403
1424
  trinomCoeffs: number[];
1404
1425
  isAskingPositive: boolean;
1405
1426
  isStrict: boolean;
1427
+ }, Record<string, string | boolean | string[]>> | Exercise<{
1428
+ a: number;
1429
+ b: number;
1430
+ c: number;
1431
+ form: "dev" | "cano" | "facto";
1432
+ }, {
1433
+ givenForm: string;
1434
+ }> | Exercise<{
1435
+ a: number;
1436
+ b: number;
1437
+ c: number;
1406
1438
  }, Record<string, string | boolean | string[]>> | Exercise<{
1407
1439
  param: string;
1408
1440
  coeffs: number[];
@@ -1442,7 +1474,9 @@ declare const mathExercises: (Exercise<{
1442
1474
  }, Record<string, string | boolean | string[]>> | Exercise<{
1443
1475
  summitIds: import("./math/geometry/point.js").PointIdentifiers;
1444
1476
  pointIds: import("./math/geometry/point.js").PointIdentifiers;
1445
- }, Record<string, string | boolean | string[]>> | Exercise<{
1477
+ }, {
1478
+ expectedForm: string;
1479
+ }> | Exercise<{
1446
1480
  type: number;
1447
1481
  points: number[][];
1448
1482
  }, Record<string, string | boolean | string[]>> | Exercise<{
@@ -3101,6 +3135,13 @@ declare const mathExercises: (Exercise<{
3101
3135
  b: number;
3102
3136
  n: number;
3103
3137
  }, Record<string, string | boolean | string[]>> | Exercise<{
3138
+ firstRank: number;
3139
+ firstTerm: number;
3140
+ reason: number;
3141
+ form: "explicit" | "recu" | "termAndReason";
3142
+ }, {
3143
+ forms: string[];
3144
+ }> | Exercise<{
3104
3145
  firstValue: number;
3105
3146
  reason: number;
3106
3147
  askedRank: 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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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kDAA6B,CAAC;AAE/C,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAE,cAAc,EAAE,CAAC"}
@@ -46,7 +46,7 @@ export declare abstract class TrinomConstructor {
46
46
  excludes?: number[];
47
47
  }): Trinom;
48
48
  static randomNiceRoots(nbOfRoots?: number): Trinom;
49
- static randomNiceRootsAndSummit(): Trinom;
49
+ static randomNiceRootsAndSummit(nbOfRoots?: number): Trinom;
50
50
  static fromCoeffs(coeffs: number[]): Trinom;
51
51
  static fromRoots(roots: number[], a: number): Trinom;
52
52
  static fromAlphaBeta(params: {