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.
- package/lib/exercises/math/calcul/arithmetics/commonDivisorsList.js +1 -1
- package/lib/exercises/math/calcul/arithmetics/isMultipleOrDivisor.d.ts.map +1 -1
- package/lib/exercises/math/calcul/arithmetics/isMultipleOrDivisor.js +3 -8
- package/lib/exercises/math/calcul/arithmetics/ppcmCalcul.d.ts.map +1 -1
- package/lib/exercises/math/calcul/arithmetics/ppcmCalcul.js +43 -4
- package/lib/exercises/math/calcul/arithmetics/primeNumbers.d.ts.map +1 -1
- package/lib/exercises/math/calcul/arithmetics/primeNumbers.js +11 -12
- package/lib/exercises/math/calcul/fractions/fractionAndIntegerSum.d.ts.map +1 -1
- package/lib/exercises/math/calcul/fractions/fractionAndIntegerSum.js +6 -2
- package/lib/exercises/math/calcul/fractions/fractionsMix.d.ts +12 -0
- package/lib/exercises/math/calcul/fractions/fractionsMix.d.ts.map +1 -0
- package/lib/exercises/math/calcul/fractions/fractionsMix.js +221 -0
- package/lib/exercises/math/calcul/fractions/fractionsOperations.js +1 -1
- package/lib/exercises/math/calcul/fractions/fractionsSubstraction.js +1 -1
- package/lib/exercises/math/calcul/fractions/fractionsSum.d.ts.map +1 -1
- package/lib/exercises/math/calcul/fractions/fractionsSum.js +3 -1
- package/lib/exercises/math/calcul/fractions/index.d.ts +1 -0
- package/lib/exercises/math/calcul/fractions/index.d.ts.map +1 -1
- package/lib/exercises/math/calcul/fractions/index.js +1 -0
- package/lib/exercises/math/calcul/fractions/simplifyFractionWithPrimeFactorization.d.ts +4 -1
- package/lib/exercises/math/calcul/fractions/simplifyFractionWithPrimeFactorization.d.ts.map +1 -1
- package/lib/exercises/math/calcul/fractions/simplifyFractionWithPrimeFactorization.js +29 -11
- package/lib/exercises/math/calcul/proportionality/scaleCalculation.d.ts.map +1 -1
- package/lib/exercises/math/calcul/proportionality/scaleCalculation.js +4 -2
- package/lib/exercises/math/calcul/proportionality/scaleUsage.d.ts.map +1 -1
- package/lib/exercises/math/calcul/proportionality/scaleUsage.js +6 -4
- package/lib/exercises/math/calcul/sign/absoluteNumber.d.ts.map +1 -1
- package/lib/exercises/math/calcul/sign/absoluteNumber.js +7 -4
- package/lib/exercises/math/calculLitteral/inequations/inequationsSign.d.ts +1 -0
- package/lib/exercises/math/calculLitteral/inequations/inequationsSign.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/inequations/inequationsSign.js +16 -10
- package/lib/exercises/math/calculLitteral/inequations/isInequalityTrue.d.ts +1 -0
- package/lib/exercises/math/calculLitteral/inequations/isInequalityTrue.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/inequations/isInequalityTrue.js +36 -11
- package/lib/exercises/math/derivation/variations/index.d.ts +1 -0
- package/lib/exercises/math/derivation/variations/index.d.ts.map +1 -1
- package/lib/exercises/math/derivation/variations/index.js +1 -0
- package/lib/exercises/math/derivation/variations/variationArrowAmount.d.ts +10 -0
- package/lib/exercises/math/derivation/variations/variationArrowAmount.d.ts.map +1 -0
- package/lib/exercises/math/derivation/variations/variationArrowAmount.js +188 -0
- package/lib/exercises/math/functions/basics/graphicInequation.d.ts.map +1 -1
- package/lib/exercises/math/functions/basics/graphicInequation.js +9 -0
- package/lib/exercises/math/functions/basics/graphicInequationAffine.d.ts.map +1 -1
- package/lib/exercises/math/functions/basics/graphicInequationAffine.js +28 -6
- package/lib/exercises/math/functions/sign/equationFromSignTable.d.ts +11 -0
- package/lib/exercises/math/functions/sign/equationFromSignTable.d.ts.map +1 -0
- package/lib/exercises/math/functions/sign/equationFromSignTable.js +222 -0
- package/lib/exercises/math/functions/sign/index.d.ts +2 -0
- package/lib/exercises/math/functions/sign/index.d.ts.map +1 -1
- package/lib/exercises/math/functions/sign/index.js +2 -0
- package/lib/exercises/math/functions/sign/partialSignTableFromGraph.d.ts +12 -0
- package/lib/exercises/math/functions/sign/partialSignTableFromGraph.d.ts.map +1 -0
- package/lib/exercises/math/functions/sign/partialSignTableFromGraph.js +152 -0
- package/lib/exercises/math/functions/sqrt/squareRootCalculation.d.ts.map +1 -1
- package/lib/exercises/math/functions/sqrt/squareRootCalculation.js +3 -1
- package/lib/exercises/math/functions/square/squareImageInterval.d.ts.map +1 -1
- package/lib/exercises/math/functions/square/squareImageInterval.js +34 -2
- package/lib/exercises/math/geometry/vectors/scalarProduct/findCoordinatesToOrthogonalize.js +1 -1
- package/lib/exercises/math/geometry/volumes/volumeOfPyramidWithSquareOrRectBase.js +1 -1
- package/lib/exercises/math/geometry/volumes/volumeOfPyramidWithTriangleBase.js +1 -1
- package/lib/exercises/math/geometry/volumes/volumeOfPyramidWithTriangleRectBase.js +1 -1
- package/lib/exercises/math/percent/evolutions/applyPercent.d.ts.map +1 -1
- package/lib/exercises/math/percent/evolutions/applyPercent.js +1 -0
- package/lib/exercises/math/percent/evolutions/evolutionRateFromValues.d.ts.map +1 -1
- package/lib/exercises/math/percent/evolutions/evolutionRateFromValues.js +1 -0
- package/lib/exercises/math/percent/evolutions/findEndValueAfterEvolution.d.ts.map +1 -1
- package/lib/exercises/math/percent/evolutions/findEndValueAfterEvolution.js +1 -0
- package/lib/exercises/math/percent/evolutions/findRightCalculForPriceEvolution.d.ts.map +1 -1
- package/lib/exercises/math/percent/evolutions/findRightCalculForPriceEvolution.js +1 -1
- package/lib/exercises/math/percent/evolutions/findStartValueAfterEvolution.d.ts.map +1 -1
- package/lib/exercises/math/percent/evolutions/findStartValueAfterEvolution.js +1 -0
- package/lib/exercises/math/percent/evolutions/globalCM.d.ts.map +1 -1
- package/lib/exercises/math/percent/evolutions/globalCM.js +1 -0
- package/lib/exercises/math/percent/evolutions/globalPercent.d.ts.map +1 -1
- package/lib/exercises/math/percent/evolutions/globalPercent.js +1 -0
- package/lib/exercises/math/percent/evolutions/reciprocalPercentage.d.ts.map +1 -1
- package/lib/exercises/math/percent/evolutions/reciprocalPercentage.js +1 -0
- package/lib/exercises/math/percent/findTVA.d.ts.map +1 -1
- package/lib/exercises/math/percent/findTVA.js +1 -0
- package/lib/exercises/math/percent/index.d.ts +1 -0
- package/lib/exercises/math/percent/index.d.ts.map +1 -1
- package/lib/exercises/math/percent/index.js +1 -0
- package/lib/exercises/math/percent/percentOfPercent.d.ts.map +1 -1
- package/lib/exercises/math/percent/percentOfPercent.js +1 -0
- package/lib/exercises/math/percent/percentOfPercentOfNumber.d.ts +9 -0
- package/lib/exercises/math/percent/percentOfPercentOfNumber.d.ts.map +1 -0
- package/lib/exercises/math/percent/percentOfPercentOfNumber.js +99 -0
- package/lib/exercises/math/percent/populationEffectifFromSubPopulation.d.ts.map +1 -1
- package/lib/exercises/math/percent/populationEffectifFromSubPopulation.js +1 -0
- package/lib/exercises/math/percent/ttcToHT.d.ts.map +1 -1
- package/lib/exercises/math/percent/ttcToHT.js +1 -0
- package/lib/exercises/math/sets/nameOfNumberSets.d.ts.map +1 -1
- package/lib/exercises/math/sets/nameOfNumberSets.js +2 -1
- package/lib/exercises/math/sets/subsetsOfKnownSets.d.ts.map +1 -1
- package/lib/exercises/math/sets/subsetsOfKnownSets.js +4 -3
- package/lib/index.d.ts +33 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/math/inequations/inequation.d.ts +1 -0
- package/lib/math/inequations/inequation.d.ts.map +1 -1
- package/lib/math/inequations/inequation.js +21 -0
- package/lib/math/numbers/rationals/rational.d.ts +0 -1
- package/lib/math/numbers/rationals/rational.d.ts.map +1 -1
- package/lib/math/numbers/rationals/rational.js +0 -3
- package/lib/tree/parsers/discreteSetParser.d.ts +7 -0
- package/lib/tree/parsers/discreteSetParser.d.ts.map +1 -1
- package/lib/tree/parsers/discreteSetParser.js +7 -0
- package/package.json +1 -1
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
|
|
2
|
+
import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
|
+
import { InequationSymbol, InequationSymbolConstructor, } from "../../../../math/inequations/inequation.js";
|
|
4
|
+
import { randint } from "../../../../math/utils/random/randint.js";
|
|
5
|
+
import { EquationSolutionNode } from "../../../../tree/nodes/equations/equationSolutionNode.js";
|
|
6
|
+
import { InequationSolutionNode } from "../../../../tree/nodes/inequations/inequationSolutionNode.js";
|
|
7
|
+
import { reifyAlgebraic, } from "../../../../tree/nodes/nodeConstructor.js";
|
|
8
|
+
import { MinusInfinityNode, PlusInfinityNode, } from "../../../../tree/nodes/numbers/infiniteNode.js";
|
|
9
|
+
import { ClosureType } from "../../../../tree/nodes/sets/closure.js";
|
|
10
|
+
import { DiscreteSetNode } from "../../../../tree/nodes/sets/discreteSetNode.js";
|
|
11
|
+
import { IntervalNode } from "../../../../tree/nodes/sets/intervalNode.js";
|
|
12
|
+
import { UnionIntervalNode } from "../../../../tree/nodes/sets/unionIntervalNode.js";
|
|
13
|
+
import { discreteSetParser } from "../../../../tree/parsers/discreteSetParser.js";
|
|
14
|
+
import { unionIntervalParser } from "../../../../tree/parsers/unionIntervalParser.js";
|
|
15
|
+
import { coinFlip } from "../../../../utils/alea/coinFlip.js";
|
|
16
|
+
import { handleVEAError } from "../../../../utils/errors/handleVEAError.js";
|
|
17
|
+
const getPropositions = (n, { answer, signs, type, xs, ineqSymbol }) => {
|
|
18
|
+
const propositions = [];
|
|
19
|
+
addValidProp(propositions, answer);
|
|
20
|
+
while (propositions.length < n) {
|
|
21
|
+
if (type === 0) {
|
|
22
|
+
const root1 = randint(-10, 10);
|
|
23
|
+
const root2 = randint(-10, 10, [root1]);
|
|
24
|
+
tryToAddWrongProp(propositions, new EquationSolutionNode(new DiscreteSetNode([root1.toTree(), root2.toTree()])).toTex());
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
tryToAddWrongProp(propositions, getAnswer({ signs, type, xs, ineqSymbol: "<" }));
|
|
28
|
+
tryToAddWrongProp(propositions, getAnswer({ signs, type, xs, ineqSymbol: "\\le" }));
|
|
29
|
+
tryToAddWrongProp(propositions, getAnswer({ signs, type, xs, ineqSymbol: "\\ge" }));
|
|
30
|
+
tryToAddWrongProp(propositions, getAnswer({ signs, type, xs, ineqSymbol: ">" }));
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
return shuffleProps(propositions, n);
|
|
34
|
+
};
|
|
35
|
+
const getIntervalsSolution = (identifiers) => {
|
|
36
|
+
const { signs, type, xs, ineqSymbol } = identifiers;
|
|
37
|
+
const inequation = new InequationSymbol(ineqSymbol);
|
|
38
|
+
const xNodes = xs.map((e) => reifyAlgebraic(e));
|
|
39
|
+
const isSup = inequation.isSup;
|
|
40
|
+
const isStrict = inequation.isStrict;
|
|
41
|
+
if (isSup) {
|
|
42
|
+
if (signs[0] === "+") {
|
|
43
|
+
return [
|
|
44
|
+
new IntervalNode(xNodes[0], xNodes[1], isStrict ? ClosureType.OO : ClosureType.OF),
|
|
45
|
+
new IntervalNode(xNodes[2], xNodes[3], isStrict ? ClosureType.OO : ClosureType.FO),
|
|
46
|
+
];
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
return [
|
|
50
|
+
new IntervalNode(xNodes[1], xNodes[2], isStrict ? ClosureType.OO : ClosureType.FF),
|
|
51
|
+
];
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
else {
|
|
55
|
+
if (signs[0] === "-") {
|
|
56
|
+
return [
|
|
57
|
+
new IntervalNode(xNodes[0], xNodes[1], isStrict ? ClosureType.OO : ClosureType.OF),
|
|
58
|
+
new IntervalNode(xNodes[2], xNodes[3], isStrict ? ClosureType.OO : ClosureType.FO),
|
|
59
|
+
];
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
return [
|
|
63
|
+
new IntervalNode(xNodes[1], xNodes[2], isStrict ? ClosureType.OO : ClosureType.FF),
|
|
64
|
+
];
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
const getAnswerNode = (identifiers) => {
|
|
69
|
+
const { xs, signs, type, ineqSymbol } = identifiers;
|
|
70
|
+
const xNodes = xs.map((e) => reifyAlgebraic(e));
|
|
71
|
+
if (type === 0) {
|
|
72
|
+
return new EquationSolutionNode(new DiscreteSetNode([xNodes[1], xNodes[2]]));
|
|
73
|
+
}
|
|
74
|
+
else {
|
|
75
|
+
const intervals = getIntervalsSolution(identifiers);
|
|
76
|
+
if (intervals?.length === 1) {
|
|
77
|
+
return new InequationSolutionNode(intervals[0]);
|
|
78
|
+
}
|
|
79
|
+
else
|
|
80
|
+
return new InequationSolutionNode(new UnionIntervalNode(intervals));
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
const getAnswer = (identifiers) => {
|
|
84
|
+
return getAnswerNode(identifiers).toTex();
|
|
85
|
+
};
|
|
86
|
+
const getInstruction = (identifiers) => {
|
|
87
|
+
const { xs, signs, type, ineqSymbol } = identifiers;
|
|
88
|
+
const firstRow = [];
|
|
89
|
+
for (let i = 0; i < xs.length; i++) {
|
|
90
|
+
firstRow.push(`${reifyAlgebraic(xs[i]).toTex()}`);
|
|
91
|
+
i < xs.length - 1 && firstRow.push(`\\ `);
|
|
92
|
+
}
|
|
93
|
+
const secondRow = ["\\ ", ...signs, "\\ "];
|
|
94
|
+
const table = [
|
|
95
|
+
[`x`, ...firstRow],
|
|
96
|
+
[`f(x)`, ...secondRow],
|
|
97
|
+
];
|
|
98
|
+
const sign = type === 0 ? "=" : ineqSymbol;
|
|
99
|
+
return `On considère le tableau de signes suivant d'une fonction $f$ :
|
|
100
|
+
|
|
101
|
+
<svg id="signTable">${JSON.stringify(table)}</svg>
|
|
102
|
+
|
|
103
|
+
Résoudre :
|
|
104
|
+
|
|
105
|
+
$$
|
|
106
|
+
f(x) ${sign} 0
|
|
107
|
+
$$`;
|
|
108
|
+
};
|
|
109
|
+
const getHint = (identifiers) => {
|
|
110
|
+
const { xs, signs, type, ineqSymbol } = identifiers;
|
|
111
|
+
if (type === 0) {
|
|
112
|
+
return `Quelles sont les valeurs de $x$ telles que $f(x)=0$ ?`;
|
|
113
|
+
}
|
|
114
|
+
const inequation = new InequationSymbol(ineqSymbol);
|
|
115
|
+
const word = inequation.isSup
|
|
116
|
+
? inequation.isStrict
|
|
117
|
+
? "strictement positive"
|
|
118
|
+
: "positive"
|
|
119
|
+
: inequation.isStrict
|
|
120
|
+
? "strictement négative"
|
|
121
|
+
: "négative";
|
|
122
|
+
return `Quel est l'ensemble des valeurs de $x$ telles que $f(x)$ est ${word} ?`;
|
|
123
|
+
};
|
|
124
|
+
const getCorrection = (identifiers) => {
|
|
125
|
+
const { xs, signs, type, ineqSymbol } = identifiers;
|
|
126
|
+
const xNodes = xs.map((e) => reifyAlgebraic(e));
|
|
127
|
+
if (type === 0) {
|
|
128
|
+
return `D'après le tableau de signes de $f$, les antécédents de $0$ par $f$ sont $${xNodes[1].toTex()}$ et $${xNodes[2].toTex()}$.
|
|
129
|
+
|
|
130
|
+
L'ensemble des solutions de $f(x)=0$ est donc :
|
|
131
|
+
|
|
132
|
+
$$
|
|
133
|
+
${getAnswer(identifiers)}
|
|
134
|
+
$$`;
|
|
135
|
+
}
|
|
136
|
+
const inequation = new InequationSymbol(ineqSymbol);
|
|
137
|
+
const word = inequation.isSup
|
|
138
|
+
? inequation.isStrict
|
|
139
|
+
? "strictement positive"
|
|
140
|
+
: "positive"
|
|
141
|
+
: inequation.isStrict
|
|
142
|
+
? "strictement négative"
|
|
143
|
+
: "négative";
|
|
144
|
+
const intervals = getIntervalsSolution(identifiers);
|
|
145
|
+
return `D'après le tableau de signes de $f$, $f(x)$ est ${word} pour $x$ appartenant à l'intervalle $${intervals[0].toTex()}$ ${intervals.length > 1 ? `ou à l'intervalle $${intervals[1].toTex()}$` : ""}.
|
|
146
|
+
|
|
147
|
+
L'ensemble des solutions de $f(x)${ineqSymbol} 0$ est donc :
|
|
148
|
+
|
|
149
|
+
$$
|
|
150
|
+
${getAnswer(identifiers)}
|
|
151
|
+
$$`;
|
|
152
|
+
};
|
|
153
|
+
const getReadSignTableQuestion = (ops) => {
|
|
154
|
+
const a = randint(-10, 0);
|
|
155
|
+
const b = randint(0, 10);
|
|
156
|
+
const xs = [MinusInfinityNode, a.toTree(), b.toTree(), PlusInfinityNode];
|
|
157
|
+
const signs = coinFlip()
|
|
158
|
+
? ["+", "0", "-", "0", "+"]
|
|
159
|
+
: ["-", "0", "+", "0", "-"];
|
|
160
|
+
const type = randint(0, 2);
|
|
161
|
+
const ineqSymbol = InequationSymbolConstructor.randomSymbol();
|
|
162
|
+
const identifiers = {
|
|
163
|
+
type,
|
|
164
|
+
ineqSymbol,
|
|
165
|
+
xs: xs.map((e) => e.toIdentifiers()),
|
|
166
|
+
signs,
|
|
167
|
+
};
|
|
168
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
169
|
+
};
|
|
170
|
+
const isAnswerValid = (ans, { answer, ...identifiers }) => {
|
|
171
|
+
try {
|
|
172
|
+
if (identifiers.type === 0) {
|
|
173
|
+
const parsed = discreteSetParser(ans);
|
|
174
|
+
if (!parsed)
|
|
175
|
+
return false;
|
|
176
|
+
return "S=" + parsed.simplify().toTex() === answer;
|
|
177
|
+
}
|
|
178
|
+
else {
|
|
179
|
+
const parsed = unionIntervalParser(ans.replaceAll("S", "").replaceAll("=", ""));
|
|
180
|
+
if (!parsed)
|
|
181
|
+
return false;
|
|
182
|
+
return "S=\\ " + parsed.simplify().toTex() === answer;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
catch (err) {
|
|
186
|
+
return handleVEAError(err);
|
|
187
|
+
}
|
|
188
|
+
};
|
|
189
|
+
const getKeys = (identifiers) => {
|
|
190
|
+
if (identifiers.type === 0)
|
|
191
|
+
return ["S", "equal", "lbrace", "semicolon", "rbrace", "infty"];
|
|
192
|
+
else
|
|
193
|
+
return ["S", "equal", "lbracket", "semicolon", "rbracket", "cup", "infty"];
|
|
194
|
+
};
|
|
195
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
196
|
+
return {
|
|
197
|
+
answer: getAnswer(identifiers),
|
|
198
|
+
instruction: getInstruction(identifiers),
|
|
199
|
+
answerFormat: "raw",
|
|
200
|
+
identifiers,
|
|
201
|
+
hint: getHint(identifiers),
|
|
202
|
+
correction: getCorrection(identifiers),
|
|
203
|
+
keys: getKeys(identifiers),
|
|
204
|
+
};
|
|
205
|
+
};
|
|
206
|
+
export const equationFromSignTable = {
|
|
207
|
+
id: "equationFromSignTable",
|
|
208
|
+
label: "Utiliser le tableau de signes d'une fonction pour résoudre une (in)équation",
|
|
209
|
+
isSingleStep: true,
|
|
210
|
+
generator: (nb, opts) => getDistinctQuestions(() => getReadSignTableQuestion(opts), nb),
|
|
211
|
+
qcmTimer: 60,
|
|
212
|
+
freeTimer: 60,
|
|
213
|
+
getPropositions,
|
|
214
|
+
subject: "Mathématiques",
|
|
215
|
+
getInstruction,
|
|
216
|
+
getHint,
|
|
217
|
+
getCorrection,
|
|
218
|
+
getAnswer,
|
|
219
|
+
getQuestionFromIdentifiers,
|
|
220
|
+
isAnswerValid,
|
|
221
|
+
hasHintAndCorrection: true,
|
|
222
|
+
};
|
|
@@ -3,4 +3,6 @@ export * from "./affineSignTable.js";
|
|
|
3
3
|
export * from "./affineProductSignTable.js";
|
|
4
4
|
export * from "./readSignTable.js";
|
|
5
5
|
export * from "./signTableFromGraph.js";
|
|
6
|
+
export * from "./equationFromSignTable.js";
|
|
7
|
+
export * from "./partialSignTableFromGraph.js";
|
|
6
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/sign/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/sign/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gCAAgC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Exercise } from "../../../../exercises/exercise.js";
|
|
2
|
+
type Identifiers = {
|
|
3
|
+
initTable: string[][];
|
|
4
|
+
a: number;
|
|
5
|
+
x1: number;
|
|
6
|
+
x2: number;
|
|
7
|
+
x3: number;
|
|
8
|
+
lineAsked: number;
|
|
9
|
+
};
|
|
10
|
+
export declare const partialSignTableFromGraph: Exercise<Identifiers>;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=partialSignTableFromGraph.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"partialSignTableFromGraph.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/sign/partialSignTableFromGraph.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAkBT,MAAM,6BAA6B,CAAC;AAOrC,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,MAAM,EAAE,EAAE,CAAC;IACtB,CAAC,EAAE,MAAM,CAAC;IACV,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAqJF,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,WAAW,CAoB3D,CAAC"}
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
|
|
2
|
+
import { GeogebraConstructor } from "../../../../geogebra/geogebraConstructor.js";
|
|
3
|
+
import { randfloat } from "../../../../math/utils/random/randfloat.js";
|
|
4
|
+
import { randint } from "../../../../math/utils/random/randint.js";
|
|
5
|
+
import { handleVEAError } from "../../../../utils/errors/handleVEAError.js";
|
|
6
|
+
const getInstruction = (identifiers) => {
|
|
7
|
+
return `On donne la représentation graphique d'une fonction $f$ définie sur $\\mathbb{R}$.
|
|
8
|
+
|
|
9
|
+
Compléter le tableau de signes de $f$.`;
|
|
10
|
+
};
|
|
11
|
+
const getHint = (identifiers) => {
|
|
12
|
+
return `La fonction est définie sur $\\mathbb{R}$, donc les valeurs de $x$ vont de $-\\infty$ à $+\\infty$.
|
|
13
|
+
|
|
14
|
+
Repère ensuite les points de la courbe à l'intersection de l'axe des abscisses. Dans la première ligne du tableau, il faut mettre les abscisses de ces points, et dans la deuxième ligne, le signe de $f(x)$.`;
|
|
15
|
+
};
|
|
16
|
+
const getCorrection = (identifiers) => {
|
|
17
|
+
const { a, x1, x2, x3 } = identifiers;
|
|
18
|
+
const signs = a > 0
|
|
19
|
+
? ["négatif", "positif", "négatif", "positif"]
|
|
20
|
+
: ["positif", "négatif", "positif", "négatif"];
|
|
21
|
+
return `On lit graphiquement que $f(x)$ s'annule pour les valeurs de $x$ suivantes : $${x1}$, $${x2}$ et $${x3}$.
|
|
22
|
+
|
|
23
|
+
De plus, $f(x)$ est ${signs[0]} pour $x \\in ]-\\infty;${x1}]$, puis ${signs[1]} pour $x \\in [${x1}, ${x2}]$, puis ${signs[2]} pour $x \\in [${x2}, ${x3}]$, et enfin ${signs[3]} pour $x \\in [${x3}, +\\infty[$.`;
|
|
24
|
+
};
|
|
25
|
+
const getGGBOptions = (identifiers) => {
|
|
26
|
+
const { a, x1, x2, x3 } = identifiers;
|
|
27
|
+
const ggb = new GeogebraConstructor({
|
|
28
|
+
commands: [`f(x) = ${a}*(x-${x1})*(x-${x2})*(x-${x3})`],
|
|
29
|
+
lockedAxesRatio: false,
|
|
30
|
+
gridDistance: false,
|
|
31
|
+
xAxis: {
|
|
32
|
+
steps: 1,
|
|
33
|
+
},
|
|
34
|
+
});
|
|
35
|
+
const func = (x) => a * (x - x1) * (x - x2) * (x - x3);
|
|
36
|
+
const xMin = Math.min(x1, x2, x3);
|
|
37
|
+
const xMax = Math.max(x1, x2, x3);
|
|
38
|
+
const root1 = (2 * (x1 + x2 + x3) -
|
|
39
|
+
Math.sqrt(4 * (x1 + x2 + x3) ** 2 - 12 * (x1 * x2 + x1 * x3 + x2 * x3))) /
|
|
40
|
+
6;
|
|
41
|
+
const root2 = (2 * (x1 + x2 + x3) +
|
|
42
|
+
Math.sqrt(4 * (x1 + x2 + x3) ** 2 - 12 * (x1 * x2 + x1 * x3 + x2 * x3))) /
|
|
43
|
+
6;
|
|
44
|
+
const [fx1, fx2] = [func(root1), func(root2)];
|
|
45
|
+
const yMin = Math.min(fx1, fx2);
|
|
46
|
+
const yMax = Math.max(fx1, fx2);
|
|
47
|
+
return ggb.getOptions({
|
|
48
|
+
coords: [xMin - 2, xMax + 2, yMin - 2, yMax + 2],
|
|
49
|
+
});
|
|
50
|
+
};
|
|
51
|
+
const getKeys = (identifiers) => {
|
|
52
|
+
return ["infty"];
|
|
53
|
+
};
|
|
54
|
+
const getFirstLine = (x1, x2, x3) => {
|
|
55
|
+
return [
|
|
56
|
+
"$x$",
|
|
57
|
+
"-\\infty",
|
|
58
|
+
"\\ ",
|
|
59
|
+
x1.frenchify(),
|
|
60
|
+
"\\ ",
|
|
61
|
+
x2.frenchify(),
|
|
62
|
+
"\\ ",
|
|
63
|
+
x3.frenchify(),
|
|
64
|
+
"\\ ",
|
|
65
|
+
"+\\infty",
|
|
66
|
+
];
|
|
67
|
+
};
|
|
68
|
+
const getSecondLine = (a) => {
|
|
69
|
+
const signs = a > 0 ? ["-", "+", "-", "+"] : ["+", "-", "+", "-"];
|
|
70
|
+
return [
|
|
71
|
+
"$f(x)$",
|
|
72
|
+
"\\ ",
|
|
73
|
+
signs[0],
|
|
74
|
+
"0",
|
|
75
|
+
signs[1],
|
|
76
|
+
"0",
|
|
77
|
+
signs[2],
|
|
78
|
+
"0",
|
|
79
|
+
signs[3],
|
|
80
|
+
"\\ ",
|
|
81
|
+
];
|
|
82
|
+
};
|
|
83
|
+
const getAnswerTable = (identifiers) => {
|
|
84
|
+
return [
|
|
85
|
+
getFirstLine(identifiers.x1, identifiers.x2, identifiers.x3),
|
|
86
|
+
getSecondLine(identifiers.a),
|
|
87
|
+
];
|
|
88
|
+
};
|
|
89
|
+
const isAnswerTableValid = (ans, { answerTable }) => {
|
|
90
|
+
try {
|
|
91
|
+
return ans.every((row, i) => row.every((cell, j) => cell === answerTable[i][j]));
|
|
92
|
+
}
|
|
93
|
+
catch (err) {
|
|
94
|
+
return handleVEAError(err);
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
const getSignTableFromGraphQuestion = (opts) => {
|
|
98
|
+
let x1 = randint(-9, 10);
|
|
99
|
+
let x2 = randint(-9, 10, [x1]);
|
|
100
|
+
let x3 = randint(-9, 10, [x1, x2]);
|
|
101
|
+
const sorted = [x1, x2, x3].sort((a, b) => a - b);
|
|
102
|
+
const a = randfloat(-1, 1, 4, [0]);
|
|
103
|
+
const lineAsked = randint(0, 2);
|
|
104
|
+
const identifiers = {
|
|
105
|
+
a,
|
|
106
|
+
lineAsked,
|
|
107
|
+
x1: sorted[0],
|
|
108
|
+
x2: sorted[1],
|
|
109
|
+
x3: sorted[2],
|
|
110
|
+
initTable: [
|
|
111
|
+
lineAsked === 0
|
|
112
|
+
? ["$x$", "", "\\ ", "", "\\ ", "", "\\ ", "", "\\ ", ""]
|
|
113
|
+
: getFirstLine(sorted[0], sorted[1], sorted[2]),
|
|
114
|
+
lineAsked === 1
|
|
115
|
+
? ["$f(x)$", "\\ ", "", "", "", "", "", "", "", "\\ "]
|
|
116
|
+
: getSecondLine(a),
|
|
117
|
+
],
|
|
118
|
+
};
|
|
119
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
120
|
+
};
|
|
121
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
122
|
+
return {
|
|
123
|
+
answerTable: getAnswerTable(identifiers),
|
|
124
|
+
instruction: getInstruction(identifiers),
|
|
125
|
+
keys: getKeys(identifiers),
|
|
126
|
+
answerFormat: "tex",
|
|
127
|
+
identifiers,
|
|
128
|
+
hint: getHint(identifiers),
|
|
129
|
+
correction: getCorrection(identifiers),
|
|
130
|
+
ggbOptions: getGGBOptions(identifiers),
|
|
131
|
+
initTable: identifiers.initTable,
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
export const partialSignTableFromGraph = {
|
|
135
|
+
id: "partialSignTableFromGraph",
|
|
136
|
+
label: "Compléter le tableau de signes d'une fonction à partir de sa représentation graphique",
|
|
137
|
+
isSingleStep: true,
|
|
138
|
+
generator: (nb, opts) => getDistinctQuestions(() => getSignTableFromGraphQuestion(opts), nb),
|
|
139
|
+
qcmTimer: 60,
|
|
140
|
+
freeTimer: 60,
|
|
141
|
+
isAnswerTableValid,
|
|
142
|
+
subject: "Mathématiques",
|
|
143
|
+
getHint,
|
|
144
|
+
getCorrection,
|
|
145
|
+
getInstruction,
|
|
146
|
+
getAnswerTable,
|
|
147
|
+
getGGBOptions,
|
|
148
|
+
hasGeogebra: true,
|
|
149
|
+
getQuestionFromIdentifiers,
|
|
150
|
+
answerType: "signTable",
|
|
151
|
+
hasHintAndCorrection: true,
|
|
152
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"squareRootCalculation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/sqrt/squareRootCalculation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAIrC,OAAO,EACL,eAAe,EAEhB,MAAM,qCAAqC,CAAC;AAS7C,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,eAAe,CAAC;CACpB,CAAC;
|
|
1
|
+
{"version":3,"file":"squareRootCalculation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/sqrt/squareRootCalculation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAIrC,OAAO,EACL,eAAe,EAEhB,MAAM,qCAAqC,CAAC;AAS7C,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,eAAe,CAAC;CACpB,CAAC;AAoGF,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,WAAW,CAmBvD,CAAC"}
|
|
@@ -35,7 +35,9 @@ const getAnswer = (identifiers) => {
|
|
|
35
35
|
const getInstruction = (identifiers) => {
|
|
36
36
|
const { x } = identifiers;
|
|
37
37
|
const sqrtExpression = sqrt(reifyAlgebraic(x));
|
|
38
|
-
return `
|
|
38
|
+
return `Donner le nombre entier correspondant :
|
|
39
|
+
|
|
40
|
+
$${sqrtExpression.toTex()}$`;
|
|
39
41
|
};
|
|
40
42
|
const getHint = (identifiers) => {
|
|
41
43
|
const { x } = identifiers;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"squareImageInterval.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/square/squareImageInterval.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAKrC,OAAO,EAAW,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAMxE,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,OAAO,EAAE,WAAW,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;
|
|
1
|
+
{"version":3,"file":"squareImageInterval.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/square/squareImageInterval.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAKrC,OAAO,EAAW,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAMxE,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,OAAO,EAAE,WAAW,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AA6LF,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,WAAW,CAarD,CAAC"}
|
|
@@ -57,7 +57,11 @@ const getInstruction = (identifiers) => {
|
|
|
57
57
|
.toTex();
|
|
58
58
|
break;
|
|
59
59
|
}
|
|
60
|
-
return `Soit $x$ un nombre réel tel que
|
|
60
|
+
return `Soit $x$ un nombre réel tel que :
|
|
61
|
+
|
|
62
|
+
$$
|
|
63
|
+
${instruction}
|
|
64
|
+
$$
|
|
61
65
|
|
|
62
66
|
À quel intervalle appartient $x^2$ ?`;
|
|
63
67
|
};
|
|
@@ -92,7 +96,32 @@ const getHint = (identifiers) => {
|
|
|
92
96
|
return ``;
|
|
93
97
|
};
|
|
94
98
|
const getCorrection = (identifiers) => {
|
|
95
|
-
|
|
99
|
+
const { a, b, closure, type } = identifiers;
|
|
100
|
+
const interval = new IntervalNode(a.toTree(), b.toTree(), closure);
|
|
101
|
+
if (type === 1) {
|
|
102
|
+
return `Sur l'intervalle $${interval.toTex()}$, la fonction carré est croissante.
|
|
103
|
+
|
|
104
|
+
Puisque $${a}^2 = ${a ** 2}$ et $${b}^2 = ${b ** 2}$, on a donc :
|
|
105
|
+
|
|
106
|
+
$$
|
|
107
|
+
x^2 \\in ${getAnswer(identifiers).toTree().toTex()}
|
|
108
|
+
$$`;
|
|
109
|
+
}
|
|
110
|
+
else if (type === 2) {
|
|
111
|
+
return `Sur l'intervalle $${interval.toTex()}$, la fonction carré est décroissante.
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
Puisque $${a}^2 = ${a ** 2}$ et $${b}^2 = ${b ** 2}$, on a donc :
|
|
115
|
+
|
|
116
|
+
$$
|
|
117
|
+
x^2 \\in ${getAnswer(identifiers).toTree().toTex()}
|
|
118
|
+
$$`;
|
|
119
|
+
}
|
|
120
|
+
else {
|
|
121
|
+
return `Puisque $x$ peut valoir $0$, la valeur minimale de $x^2$ est $0^2 = 0$.
|
|
122
|
+
|
|
123
|
+
`;
|
|
124
|
+
}
|
|
96
125
|
};
|
|
97
126
|
const getQuestionFromIdentifiers = (identifiers) => {
|
|
98
127
|
const question = {
|
|
@@ -101,6 +130,8 @@ const getQuestionFromIdentifiers = (identifiers) => {
|
|
|
101
130
|
keys: ["lbracket", "semicolon", "rbracket"],
|
|
102
131
|
answerFormat: "tex",
|
|
103
132
|
identifiers,
|
|
133
|
+
// hint: getHint(identifiers),
|
|
134
|
+
// correction: getCorrection(identifiers),
|
|
104
135
|
};
|
|
105
136
|
return question;
|
|
106
137
|
};
|
|
@@ -140,4 +171,5 @@ export const squareImageInterval = {
|
|
|
140
171
|
isAnswerValid,
|
|
141
172
|
subject: "Mathématiques",
|
|
142
173
|
getQuestionFromIdentifiers,
|
|
174
|
+
// hasHintAndCorrection: true,
|
|
143
175
|
};
|
|
@@ -11,7 +11,7 @@ const getPropositions = (n, { answer }) => {
|
|
|
11
11
|
const propositions = [];
|
|
12
12
|
addValidProp(propositions, answer);
|
|
13
13
|
while (propositions.length < n) {
|
|
14
|
-
tryToAddWrongProp(propositions, RationalConstructor.randomIrreductible().toTex());
|
|
14
|
+
tryToAddWrongProp(propositions, RationalConstructor.randomIrreductible().toTree().toTex());
|
|
15
15
|
}
|
|
16
16
|
return shuffleProps(propositions, n);
|
|
17
17
|
};
|
|
@@ -147,7 +147,7 @@ const getPropositions = (n, { answer, h, baseOfPyramid }) => {
|
|
|
147
147
|
while (propositions.length < n) {
|
|
148
148
|
random = isNumberNode(volume)
|
|
149
149
|
? randint(volume.value - 5, volume.value + 5, [volume.value]).toTree()
|
|
150
|
-
: RationalConstructor.randomIrreductible();
|
|
150
|
+
: RationalConstructor.randomIrreductible().toTree();
|
|
151
151
|
tryToAddWrongProp(propositions, random.toTex());
|
|
152
152
|
}
|
|
153
153
|
return shuffleProps(propositions, n);
|
|
@@ -137,7 +137,7 @@ const getPropositions = (n, { answer, baseOfPyramidSides, h }) => {
|
|
|
137
137
|
while (propositions.length < n) {
|
|
138
138
|
random = isNumberNode(volume)
|
|
139
139
|
? randint(volume.value - 5, volume.value + 5, [volume.value]).toTree()
|
|
140
|
-
: RationalConstructor.randomIrreductible();
|
|
140
|
+
: RationalConstructor.randomIrreductible().toTree();
|
|
141
141
|
tryToAddWrongProp(propositions, random.toTex());
|
|
142
142
|
}
|
|
143
143
|
return shuffleProps(propositions, n);
|
|
@@ -136,7 +136,7 @@ const getPropositions = (n, { answer, baseOfPyramidSides, h }) => {
|
|
|
136
136
|
while (propositions.length < n) {
|
|
137
137
|
random = isNumberNode(volume)
|
|
138
138
|
? randint(volume.value - 5, volume.value + 5, [volume.value]).toTree()
|
|
139
|
-
: RationalConstructor.randomIrreductible();
|
|
139
|
+
: RationalConstructor.randomIrreductible().toTree();
|
|
140
140
|
tryToAddWrongProp(propositions, random.toTex());
|
|
141
141
|
}
|
|
142
142
|
return shuffleProps(propositions, n);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"applyPercent.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/percent/evolutions/applyPercent.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,QAAQ,EAcT,MAAM,sBAAsB,CAAC;AAG9B,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,OAAO,CAAC;CACf,CAAC;AAqHF,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,WAAW,
|
|
1
|
+
{"version":3,"file":"applyPercent.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/percent/evolutions/applyPercent.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,QAAQ,EAcT,MAAM,sBAAsB,CAAC;AAG9B,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,OAAO,CAAC;CACf,CAAC;AAqHF,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,WAAW,CAc9C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evolutionRateFromValues.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/percent/evolutions/evolutionRateFromValues.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAmBT,MAAM,6BAA6B,CAAC;AAUrC,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAyGF,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,WAAW,
|
|
1
|
+
{"version":3,"file":"evolutionRateFromValues.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/percent/evolutions/evolutionRateFromValues.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAmBT,MAAM,6BAA6B,CAAC;AAUrC,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAyGF,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,WAAW,CAgBzD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"findEndValueAfterEvolution.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/percent/evolutions/findEndValueAfterEvolution.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAmBT,MAAM,6BAA6B,CAAC;AASrC,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAiGF,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,WAAW,
|
|
1
|
+
{"version":3,"file":"findEndValueAfterEvolution.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/percent/evolutions/findEndValueAfterEvolution.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAmBT,MAAM,6BAA6B,CAAC;AASrC,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAiGF,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,WAAW,CAiB5D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"findRightCalculForPriceEvolution.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/percent/evolutions/findRightCalculForPriceEvolution.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAWrC,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,EAAE,OAAO,CAAC;CAC3B,CAAC;
|
|
1
|
+
{"version":3,"file":"findRightCalculForPriceEvolution.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/percent/evolutions/findRightCalculForPriceEvolution.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAWrC,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,EAAE,OAAO,CAAC;CAC3B,CAAC;AAsLF,eAAO,MAAM,gCAAgC,EAAE,QAAQ,CAAC,WAAW,CAelE,CAAC"}
|
|
@@ -14,7 +14,7 @@ const getPropositions = (n, { answer, evolution, price, type }) => {
|
|
|
14
14
|
if (evolution > 0) {
|
|
15
15
|
tryToAddWrongProp(propositions, multiply(price, add(1, frac(Math.abs(evolution), 100))).toTex());
|
|
16
16
|
tryToAddWrongProp(propositions, multiply(price, Math.abs(evolution) / 100).toTex());
|
|
17
|
-
tryToAddWrongProp(propositions, divide(price, Math.abs(evolution)).toTex());
|
|
17
|
+
tryToAddWrongProp(propositions, divide(price, Math.abs(evolution) / 100).toTex());
|
|
18
18
|
tryToAddWrongProp(propositions, divide(price, add(1, frac(Math.abs(evolution), 100))).toTex());
|
|
19
19
|
}
|
|
20
20
|
else {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"findStartValueAfterEvolution.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/percent/evolutions/findStartValueAfterEvolution.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAmBT,MAAM,6BAA6B,CAAC;AAOrC,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAiGF,eAAO,MAAM,4BAA4B,EAAE,QAAQ,CAAC,WAAW,
|
|
1
|
+
{"version":3,"file":"findStartValueAfterEvolution.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/percent/evolutions/findStartValueAfterEvolution.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAmBT,MAAM,6BAA6B,CAAC;AAOrC,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAiGF,eAAO,MAAM,4BAA4B,EAAE,QAAQ,CAAC,WAAW,CAiB9D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"globalCM.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/percent/evolutions/globalCM.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AASrC,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB,CAAC;AAoFF,eAAO,MAAM,QAAQ,EAAE,QAAQ,CAAC,WAAW,
|
|
1
|
+
{"version":3,"file":"globalCM.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/percent/evolutions/globalCM.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AASrC,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB,CAAC;AAoFF,eAAO,MAAM,QAAQ,EAAE,QAAQ,CAAC,WAAW,CAoB1C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"globalPercent.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/percent/evolutions/globalPercent.ts"],"names":[],"mappings":"AACA,OAAO,EACL,QAAQ,EAaT,MAAM,sBAAsB,CAAC;AAO9B,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB,CAAC;AA4GF,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,WAAW,
|
|
1
|
+
{"version":3,"file":"globalPercent.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/percent/evolutions/globalPercent.ts"],"names":[],"mappings":"AACA,OAAO,EACL,QAAQ,EAaT,MAAM,sBAAsB,CAAC;AAO9B,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB,CAAC;AA4GF,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,WAAW,CAe/C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reciprocalPercentage.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/percent/evolutions/reciprocalPercentage.ts"],"names":[],"mappings":"AACA,OAAO,EACL,QAAQ,EAaT,MAAM,sBAAsB,CAAC;AAM9B,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,OAAO,CAAC;CACf,CAAC;AA6HF,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,WAAW,
|
|
1
|
+
{"version":3,"file":"reciprocalPercentage.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/percent/evolutions/reciprocalPercentage.ts"],"names":[],"mappings":"AACA,OAAO,EACL,QAAQ,EAaT,MAAM,sBAAsB,CAAC;AAM9B,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,OAAO,CAAC;CACf,CAAC;AA6HF,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,WAAW,CAetD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"findTVA.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/percent/findTVA.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAUrC,KAAK,WAAW,GAAG;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AA4EF,eAAO,MAAM,OAAO,EAAE,QAAQ,CAAC,WAAW,
|
|
1
|
+
{"version":3,"file":"findTVA.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/percent/findTVA.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAUrC,KAAK,WAAW,GAAG;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AA4EF,eAAO,MAAM,OAAO,EAAE,QAAQ,CAAC,WAAW,CAezC,CAAC"}
|