math-exercises 2.2.75 → 2.2.76
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/functions/absolute/absolueValueInequationsSup.js +1 -1
- package/lib/exercises/math/functions/basics/graphicInequation.js +6 -6
- package/lib/exercises/math/functions/basics/graphicInequationAffine.js +1 -1
- package/lib/exercises/math/functions/basics/twoFunctionsInequation.js +6 -6
- package/lib/tree/nodes/inequations/inequationSolutionNode.js +1 -1
- package/lib/tree/nodes/sets/unionIntervalNode.js +1 -1
- package/package.json +1 -1
|
@@ -84,7 +84,7 @@ const getAbsolueValueInequationsSupQuestion = (ops) => {
|
|
|
84
84
|
exports.absolueValueInequationsSup = {
|
|
85
85
|
id: "absolueValueInequationsSup",
|
|
86
86
|
connector: "\\iff",
|
|
87
|
-
label: "Résoudre une inéquation avec valeur absolue du type $|ax+b| > c",
|
|
87
|
+
label: "Résoudre une inéquation avec valeur absolue du type $|ax+b| > c$",
|
|
88
88
|
isSingleStep: true,
|
|
89
89
|
generator: (nb, opts) => (0, getDistinctQuestions_1.getDistinctQuestions)(() => getAbsolueValueInequationsSupQuestion(opts), nb),
|
|
90
90
|
qcmTimer: 60,
|
|
@@ -76,8 +76,8 @@ const getGraphicInequationQuestion = () => {
|
|
|
76
76
|
const yMax = Math.max(...splinePoints.map((point) => point[1]));
|
|
77
77
|
const intervalsNodes = intervals.map((i) => new intervalNode_1.IntervalNode(new numberNode_1.NumberNode(i.a), new numberNode_1.NumberNode(i.b), i.closure));
|
|
78
78
|
const answer = intervalsNodes.length === 1
|
|
79
|
-
? `S
|
|
80
|
-
: `S
|
|
79
|
+
? `S=\\ ${intervalsNodes[0].toTex()}`
|
|
80
|
+
: `S=\\ ${new unionIntervalNode_1.UnionIntervalNode(intervalsNodes).toTex()}`;
|
|
81
81
|
const commands = [
|
|
82
82
|
`S =Spline(${splinePoints
|
|
83
83
|
.map((point) => `(${point[0]},${point[1]})`)
|
|
@@ -121,20 +121,20 @@ const getPropositions = (n, { answer, intervals, splinePoints, yValue }) => {
|
|
|
121
121
|
(0, exercise_1.tryToAddWrongProp)(propositions, `S=\\varnothing`);
|
|
122
122
|
if (intervals.length === 1) {
|
|
123
123
|
const interval = new intervalNode_1.IntervalNode(intervals[0].a.toTree(), intervals[0].b.toTree(), intervals[0].closure);
|
|
124
|
-
(0, exercise_1.tryToAddWrongProp)(propositions, `S
|
|
124
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, `S=\\ ${interval.toRandomDifferentClosure().toTex()}`);
|
|
125
125
|
}
|
|
126
126
|
else if (intervals.length === 2) {
|
|
127
127
|
const rightIntervals = intervals.map((i) => new intervalNode_1.IntervalNode(i.a.toTree(), i.b.toTree(), i.closure));
|
|
128
128
|
const fakeIntervals = intervals.map((i) => new intervalNode_1.IntervalNode(i.a.toTree(), i.b.toTree(), i.closure));
|
|
129
|
-
(0, exercise_1.tryToAddWrongProp)(propositions, `S
|
|
130
|
-
(0, exercise_1.tryToAddWrongProp)(propositions, `S
|
|
129
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, `S=\\ ${rightIntervals[(0, coinFlip_1.coinFlip)() ? 0 : 1].toTex()}`);
|
|
130
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, `S=\\ ${new unionIntervalNode_1.UnionIntervalNode(fakeIntervals.map((i) => i.toRandomDifferentClosure())).toTex()}`);
|
|
131
131
|
}
|
|
132
132
|
while (propositions.length < n) {
|
|
133
133
|
let a = (0, randint_1.randint)(splinePoints[0][0], splinePoints[splinePoints.length - 1][0] + 1);
|
|
134
134
|
let b = (0, randint_1.randint)(splinePoints[0][0], splinePoints[splinePoints.length - 1][0] + 1, [a]);
|
|
135
135
|
if (a > b)
|
|
136
136
|
[a, b] = [b, a];
|
|
137
|
-
(0, exercise_1.tryToAddWrongProp)(propositions, `S
|
|
137
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, `S=\\ ${new intervalNode_1.IntervalNode(new numberNode_1.NumberNode(a), new numberNode_1.NumberNode(b), closure_1.ClosureType.FF).toTex()}`);
|
|
138
138
|
}
|
|
139
139
|
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
140
140
|
};
|
|
@@ -76,7 +76,7 @@ const getKeys = (identifiers) => {
|
|
|
76
76
|
};
|
|
77
77
|
const isAnswerValid = (ans, { answer }) => {
|
|
78
78
|
const inter = answer;
|
|
79
|
-
return ans === inter || ans === "S
|
|
79
|
+
return ans === inter || ans === "S=\\ " + inter;
|
|
80
80
|
throw Error("VEA not implemented");
|
|
81
81
|
};
|
|
82
82
|
const getGraphicInequationAffineQuestion = (opts) => {
|
|
@@ -108,8 +108,8 @@ const getTwoFunctionsInequationQuestion = () => {
|
|
|
108
108
|
const ggb = new geogebraConstructor_1.GeogebraConstructor({ commands });
|
|
109
109
|
const intervalsNodes = intervals.map((i) => new intervalNode_1.IntervalNode(new numberNode_1.NumberNode(i.a), new numberNode_1.NumberNode(i.b), i.closure));
|
|
110
110
|
const answer = intervalsNodes.length === 1
|
|
111
|
-
? `S
|
|
112
|
-
: `S
|
|
111
|
+
? `S=\\ ${intervalsNodes[0].toTex()}`
|
|
112
|
+
: `S=\\ ${new unionIntervalNode_1.UnionIntervalNode(intervalsNodes).toTex()}`;
|
|
113
113
|
const question = {
|
|
114
114
|
answer,
|
|
115
115
|
instruction: `Déterminer graphiquement les solutions de l'inéquation $f(x) ${ineq.symbol} g(x)$ où $f$ et $g$ sont les fonctions représentées ci-dessous.`,
|
|
@@ -145,13 +145,13 @@ const getPropositions = (n, { answer, intervals, fSplinePoints, ineqSymbol }) =>
|
|
|
145
145
|
(0, exercise_1.tryToAddWrongProp)(propositions, `S=\\varnothing`);
|
|
146
146
|
if (intervals.length === 1) {
|
|
147
147
|
const interval = new intervalNode_1.IntervalNode(intervals[0].a.toTree(), intervals[0].b.toTree(), intervals[0].closure);
|
|
148
|
-
(0, exercise_1.tryToAddWrongProp)(propositions, `S
|
|
148
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, `S=\\ ${interval.toRandomDifferentClosure().toTex()}`);
|
|
149
149
|
}
|
|
150
150
|
else {
|
|
151
151
|
const rightIntervals = intervals.map((i) => new intervalNode_1.IntervalNode(i.a.toTree(), i.b.toTree(), i.closure));
|
|
152
152
|
const fakeIntervals = intervals.map((i) => new intervalNode_1.IntervalNode(i.a.toTree(), i.b.toTree(), i.closure));
|
|
153
|
-
(0, exercise_1.tryToAddWrongProp)(propositions, `S
|
|
154
|
-
(0, exercise_1.tryToAddWrongProp)(propositions, `S
|
|
153
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, `S=\\ ${rightIntervals[(0, coinFlip_1.coinFlip)() ? 0 : 1].toTex()}`);
|
|
154
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, `S=\\ ${new unionIntervalNode_1.UnionIntervalNode(fakeIntervals.map((i) => i.toRandomDifferentClosure())).toTex()}`);
|
|
155
155
|
}
|
|
156
156
|
while (propositions.length < n) {
|
|
157
157
|
const isStrict = ineqSymbol === "<" || ineqSymbol === ">";
|
|
@@ -159,7 +159,7 @@ const getPropositions = (n, { answer, intervals, fSplinePoints, ineqSymbol }) =>
|
|
|
159
159
|
const x2 = (0, randint_1.randint)(x1 + 1, x1 + 5);
|
|
160
160
|
const x3 = (0, randint_1.randint)(x2 + 3, x2 + 6);
|
|
161
161
|
const x4 = (0, randint_1.randint)(x3 + 1, x3 + 3);
|
|
162
|
-
(0, exercise_1.tryToAddWrongProp)(propositions, `S
|
|
162
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, `S=\\ ${new unionIntervalNode_1.UnionIntervalNode([
|
|
163
163
|
new intervalNode_1.IntervalNode(x1.toTree(), x2.toTree(), isStrict ? closure_1.ClosureType.FO : closure_1.ClosureType.FF),
|
|
164
164
|
new intervalNode_1.IntervalNode(x3.toTree(), x4.toTree(), isStrict ? closure_1.ClosureType.OF : closure_1.ClosureType.FF),
|
|
165
165
|
]).toTex()}`);
|