math-exercises 3.0.76 → 3.0.77
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/compareInverseValues.d.ts +10 -0
- package/lib/exercises/math/calcul/arithmetics/compareInverseValues.d.ts.map +1 -0
- package/lib/exercises/math/calcul/arithmetics/compareInverseValues.js +136 -0
- package/lib/exercises/math/calcul/arithmetics/compareSquaredValues.d.ts +9 -0
- package/lib/exercises/math/calcul/arithmetics/compareSquaredValues.d.ts.map +1 -0
- package/lib/exercises/math/calcul/arithmetics/compareSquaredValues.js +143 -0
- package/lib/exercises/math/calcul/arithmetics/index.d.ts +2 -0
- package/lib/exercises/math/calcul/arithmetics/index.d.ts.map +1 -1
- package/lib/exercises/math/calcul/arithmetics/index.js +2 -0
- package/lib/exercises/math/functions/cube/compareCubeValues.d.ts +8 -0
- package/lib/exercises/math/functions/cube/compareCubeValues.d.ts.map +1 -0
- package/lib/exercises/math/functions/cube/compareCubeValues.js +113 -0
- package/lib/exercises/math/functions/cube/index.d.ts +1 -0
- package/lib/exercises/math/functions/cube/index.d.ts.map +1 -1
- package/lib/exercises/math/functions/cube/index.js +1 -0
- package/lib/exercises/math/functions/index.d.ts +1 -0
- package/lib/exercises/math/functions/index.d.ts.map +1 -1
- package/lib/exercises/math/functions/index.js +1 -0
- package/lib/exercises/math/functions/sqrt/compareSqrtValues.d.ts +8 -0
- package/lib/exercises/math/functions/sqrt/compareSqrtValues.d.ts.map +1 -0
- package/lib/exercises/math/functions/sqrt/compareSqrtValues.js +83 -0
- package/lib/exercises/math/functions/sqrt/index.d.ts +2 -0
- package/lib/exercises/math/functions/sqrt/index.d.ts.map +1 -0
- package/lib/exercises/math/functions/sqrt/index.js +1 -0
- package/lib/exercises/math/geometry/cartesian/placeAbscissOnLine.d.ts.map +1 -1
- package/lib/exercises/math/geometry/cartesian/placeAbscissOnLine.js +26 -1
- package/lib/exercises/math/geometry/euclidian/pythagoreOrThales.d.ts.map +1 -1
- package/lib/exercises/math/geometry/euclidian/pythagoreOrThales.js +47 -13
- package/lib/exercises/math/geometry/lines/linesRelativePositions.d.ts.map +1 -1
- package/lib/exercises/math/geometry/lines/linesRelativePositions.js +29 -5
- package/lib/exercises/math/probaStat/calculateMeanFromFrequencies.d.ts +8 -0
- package/lib/exercises/math/probaStat/calculateMeanFromFrequencies.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/calculateMeanFromFrequencies.js +108 -0
- package/lib/exercises/math/probaStat/getComplementaryProbability.d.ts +7 -0
- package/lib/exercises/math/probaStat/getComplementaryProbability.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/getComplementaryProbability.js +90 -0
- package/lib/exercises/math/probaStat/getMissingProbabilityValue.d.ts +9 -0
- package/lib/exercises/math/probaStat/getMissingProbabilityValue.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/getMissingProbabilityValue.js +109 -0
- package/lib/exercises/math/probaStat/index.d.ts +4 -0
- package/lib/exercises/math/probaStat/index.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/index.js +4 -0
- package/lib/exercises/math/probaStat/unionIntersectionProba.d.ts +11 -0
- package/lib/exercises/math/probaStat/unionIntersectionProba.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/unionIntersectionProba.js +164 -0
- package/lib/exercises/math/python/conditionIfElifElse.d.ts +9 -0
- package/lib/exercises/math/python/conditionIfElifElse.d.ts.map +1 -0
- package/lib/exercises/math/python/conditionIfElifElse.js +121 -0
- package/lib/exercises/math/python/index.d.ts +1 -0
- package/lib/exercises/math/python/index.d.ts.map +1 -1
- package/lib/exercises/math/python/index.js +1 -0
- package/lib/exercises/math/python/pyNestedForLoopExercise.d.ts.map +1 -1
- package/lib/exercises/math/python/pyNestedForLoopExercise.js +26 -10
- package/lib/exercises/math/python/pyWhileLoop1Exercise.d.ts +0 -1
- package/lib/exercises/math/python/pyWhileLoop1Exercise.d.ts.map +1 -1
- package/lib/exercises/math/python/pyWhileLoop1Exercise.js +54 -31
- package/lib/exercises/math/python/pythonFunctionTrinom.d.ts.map +1 -1
- package/lib/exercises/math/python/pythonFunctionTrinom.js +23 -1
- package/lib/exercises/math/python/whileLoop.js +2 -2
- package/lib/exercises/math/python/whileLoopCount.js +1 -1
- package/lib/exercises/math/sequences/explicitFormulaUsage.js +3 -3
- package/lib/exercises/math/sequences/genericSequenceVariations.js +2 -2
- package/lib/exercises/math/sets/index.d.ts +1 -0
- package/lib/exercises/math/sets/index.d.ts.map +1 -1
- package/lib/exercises/math/sets/index.js +1 -0
- package/lib/exercises/math/sets/nameOfNumberSets.d.ts +8 -0
- package/lib/exercises/math/sets/nameOfNumberSets.d.ts.map +1 -0
- package/lib/exercises/math/sets/nameOfNumberSets.js +125 -0
- package/lib/index.d.ts +40 -6
- package/lib/index.d.ts.map +1 -1
- package/lib/latexTester.d.ts.map +1 -1
- package/lib/latexTester.js +23 -7
- package/package.json +1 -1
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Exercise } from "../../../../exercises/exercise.js";
|
|
2
|
+
import { NodeIdentifiers } from "../../../../tree/nodes/nodeConstructor.js";
|
|
3
|
+
type Identifiers = {
|
|
4
|
+
a: NodeIdentifiers;
|
|
5
|
+
b: NodeIdentifiers;
|
|
6
|
+
isMinusInside: boolean;
|
|
7
|
+
};
|
|
8
|
+
export declare const compareInverseValues: Exercise<Identifiers>;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=compareInverseValues.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compareInverseValues.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/arithmetics/compareInverseValues.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAMrC,OAAO,EACL,eAAe,EAEhB,MAAM,qCAAqC,CAAC;AAM7C,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,eAAe,CAAC;IACnB,CAAC,EAAE,eAAe,CAAC;IACnB,aAAa,EAAE,OAAO,CAAC;CACxB,CAAC;AAuIF,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,WAAW,CAkBtD,CAAC"}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
|
|
2
|
+
import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
|
+
import { randfloat } from "../../../../math/utils/random/randfloat.js";
|
|
4
|
+
import { randint } from "../../../../math/utils/random/randint.js";
|
|
5
|
+
import { reifyAlgebraic, } from "../../../../tree/nodes/nodeConstructor.js";
|
|
6
|
+
import { frac } from "../../../../tree/nodes/operators/fractionNode.js";
|
|
7
|
+
import { coinFlip } from "../../../../utils/alea/coinFlip.js";
|
|
8
|
+
import { handleVEAError } from "../../../../utils/errors/handleVEAError.js";
|
|
9
|
+
const getPropositions = (n, { answer }) => {
|
|
10
|
+
const propositions = [];
|
|
11
|
+
const symbols = ["<", "=", ">"];
|
|
12
|
+
addValidProp(propositions, answer);
|
|
13
|
+
const remaining = symbols.filter((s) => s !== answer);
|
|
14
|
+
for (const sym of remaining) {
|
|
15
|
+
tryToAddWrongProp(propositions, sym);
|
|
16
|
+
}
|
|
17
|
+
return shuffleProps(propositions, n);
|
|
18
|
+
};
|
|
19
|
+
const getAnswer = ({ a, b }) => {
|
|
20
|
+
const aNode = reifyAlgebraic(a);
|
|
21
|
+
const bNode = reifyAlgebraic(b);
|
|
22
|
+
const aVal = aNode.simplify().evaluate();
|
|
23
|
+
const bVal = bNode.simplify().evaluate();
|
|
24
|
+
return aVal === bVal ? "=" : aVal < bVal ? ">" : "<";
|
|
25
|
+
};
|
|
26
|
+
const getInstruction = ({ a, b, isMinusInside, }) => {
|
|
27
|
+
const aNode = reifyAlgebraic(a);
|
|
28
|
+
const bNode = reifyAlgebraic(b);
|
|
29
|
+
return `Compléter par le bon symbole :
|
|
30
|
+
|
|
31
|
+
$$
|
|
32
|
+
${frac(1, aNode).toTex({
|
|
33
|
+
allowMinusAnywhereInFraction: isMinusInside,
|
|
34
|
+
})}\\ \\ldots \\ ${frac(1, bNode).toTex({
|
|
35
|
+
allowMinusAnywhereInFraction: isMinusInside,
|
|
36
|
+
})}
|
|
37
|
+
$$`;
|
|
38
|
+
};
|
|
39
|
+
const getHint = ({ a, b }) => {
|
|
40
|
+
return `Si $a$ et $b$ sont deux nombres non nuls et de même signe, alors la fonction inverse ne conserve pas l'ordre :
|
|
41
|
+
|
|
42
|
+
- $\\frac{1}{a} < \\frac{1}{b}$ si et seulement si $a>b$ ;
|
|
43
|
+
- $\\frac{1}{a} > \\frac{1}{b}$ si et seulement si $a<b$ ;
|
|
44
|
+
- $\\frac{1}{a} = \\frac{1}{b}$ si et seulement si $a=b$ ; `;
|
|
45
|
+
};
|
|
46
|
+
const getCorrection = (identifiers) => {
|
|
47
|
+
const { a, b, isMinusInside } = identifiers;
|
|
48
|
+
const aNode = reifyAlgebraic(a);
|
|
49
|
+
const bNode = reifyAlgebraic(b);
|
|
50
|
+
const aVal = aNode.simplify().evaluate();
|
|
51
|
+
const bVal = bNode.simplify().evaluate();
|
|
52
|
+
const signe = aVal < bVal ? "<" : aVal > bVal ? ">" : "=";
|
|
53
|
+
const answer = getAnswer(identifiers);
|
|
54
|
+
// return aVal === bVal ? "=" : aVal < bVal ? ">" : "<";
|
|
55
|
+
return `Puisque $${aNode.toTex()} ${signe} ${bNode.toTex()}$, et puisque ce sont deux nombres de même signe, leurs inverses sont dans l'ordre contraire :
|
|
56
|
+
|
|
57
|
+
$$
|
|
58
|
+
${frac(1, aNode).toTex({
|
|
59
|
+
allowMinusAnywhereInFraction: isMinusInside,
|
|
60
|
+
})} ${answer} ${frac(1, bNode).toTex({
|
|
61
|
+
allowMinusAnywhereInFraction: isMinusInside,
|
|
62
|
+
})}
|
|
63
|
+
$$
|
|
64
|
+
`;
|
|
65
|
+
};
|
|
66
|
+
const getKeys = () => [];
|
|
67
|
+
const isAnswerValid = (ans, { answer }) => {
|
|
68
|
+
try {
|
|
69
|
+
return ans === answer;
|
|
70
|
+
}
|
|
71
|
+
catch (err) {
|
|
72
|
+
return handleVEAError(err);
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
function randBetween(isInteger, min, max, roundTo, excludes) {
|
|
76
|
+
if (isInteger) {
|
|
77
|
+
return randint(min, max, excludes);
|
|
78
|
+
}
|
|
79
|
+
else {
|
|
80
|
+
return randfloat(min, max, roundTo, excludes);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
const getCompareInverseValuesQuestion = () => {
|
|
84
|
+
const min = 2;
|
|
85
|
+
const max = 50;
|
|
86
|
+
const roundTo = 2;
|
|
87
|
+
const isInteger = coinFlip();
|
|
88
|
+
let x;
|
|
89
|
+
let y;
|
|
90
|
+
if (coinFlip()) {
|
|
91
|
+
// tous deux positifs
|
|
92
|
+
x = randBetween(isInteger, min, max, roundTo);
|
|
93
|
+
y = randBetween(isInteger, min, max, roundTo, [x]);
|
|
94
|
+
}
|
|
95
|
+
else {
|
|
96
|
+
// tous deux négatifs
|
|
97
|
+
x = -randBetween(isInteger, min, max, roundTo);
|
|
98
|
+
y = -randBetween(isInteger, min, max, roundTo, [Math.abs(x)]);
|
|
99
|
+
}
|
|
100
|
+
const isMinusOutside = coinFlip();
|
|
101
|
+
const identifiers = {
|
|
102
|
+
a: x.toTree().toIdentifiers(),
|
|
103
|
+
b: y.toTree().toIdentifiers(),
|
|
104
|
+
isMinusInside: coinFlip(),
|
|
105
|
+
};
|
|
106
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
107
|
+
};
|
|
108
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
109
|
+
return {
|
|
110
|
+
answer: getAnswer(identifiers),
|
|
111
|
+
instruction: getInstruction(identifiers),
|
|
112
|
+
keys: getKeys(identifiers),
|
|
113
|
+
answerFormat: "tex",
|
|
114
|
+
identifiers,
|
|
115
|
+
hint: getHint(identifiers),
|
|
116
|
+
correction: getCorrection(identifiers),
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
export const compareInverseValues = {
|
|
120
|
+
id: "compareInverseValues",
|
|
121
|
+
label: "Comparer des inverses",
|
|
122
|
+
isSingleStep: true,
|
|
123
|
+
generator: (nb, opts) => getDistinctQuestions(() => getCompareInverseValuesQuestion(opts), nb),
|
|
124
|
+
qcmTimer: 60,
|
|
125
|
+
freeTimer: 60,
|
|
126
|
+
getPropositions,
|
|
127
|
+
isAnswerValid,
|
|
128
|
+
subject: "Mathématiques",
|
|
129
|
+
getInstruction,
|
|
130
|
+
getHint,
|
|
131
|
+
getCorrection,
|
|
132
|
+
getAnswer,
|
|
133
|
+
getQuestionFromIdentifiers,
|
|
134
|
+
hasHintAndCorrection: true,
|
|
135
|
+
answerType: "QCU",
|
|
136
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Exercise } from "../../../../exercises/exercise.js";
|
|
2
|
+
import { NodeIdentifiers } from "../../../../tree/nodes/nodeConstructor.js";
|
|
3
|
+
type Identifiers = {
|
|
4
|
+
a: NodeIdentifiers;
|
|
5
|
+
b: NodeIdentifiers;
|
|
6
|
+
};
|
|
7
|
+
export declare const compareSquaredValues: Exercise<Identifiers>;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=compareSquaredValues.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compareSquaredValues.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/arithmetics/compareSquaredValues.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAKrC,OAAO,EACL,eAAe,EAEhB,MAAM,qCAAqC,CAAC;AAK7C,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,eAAe,CAAC;IACnB,CAAC,EAAE,eAAe,CAAC;CACpB,CAAC;AAkJF,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,WAAW,CAkBtD,CAAC"}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
|
|
2
|
+
import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
|
+
import { randfloat } from "../../../../math/utils/random/randfloat.js";
|
|
4
|
+
import { randint } from "../../../../math/utils/random/randint.js";
|
|
5
|
+
import { reifyAlgebraic, } from "../../../../tree/nodes/nodeConstructor.js";
|
|
6
|
+
import { square } from "../../../../tree/nodes/operators/powerNode.js";
|
|
7
|
+
import { coinFlip } from "../../../../utils/alea/coinFlip.js";
|
|
8
|
+
import { handleVEAError } from "../../../../utils/errors/handleVEAError.js";
|
|
9
|
+
const getPropositions = (n, { answer }) => {
|
|
10
|
+
const propositions = [];
|
|
11
|
+
const symbols = ["<", "=", ">"];
|
|
12
|
+
addValidProp(propositions, answer);
|
|
13
|
+
let remaining = symbols.filter((s) => s !== answer);
|
|
14
|
+
while (remaining.length > 0) {
|
|
15
|
+
tryToAddWrongProp(propositions, remaining[remaining.length - 1]);
|
|
16
|
+
remaining.pop();
|
|
17
|
+
}
|
|
18
|
+
return shuffleProps(propositions, n);
|
|
19
|
+
};
|
|
20
|
+
const getAnswer = (identifiers) => {
|
|
21
|
+
const { a, b } = identifiers;
|
|
22
|
+
const aNode = square(reifyAlgebraic(a));
|
|
23
|
+
const bNode = square(reifyAlgebraic(b));
|
|
24
|
+
const aValue = aNode.simplify({ calculatePowers: true }).evaluate();
|
|
25
|
+
const bValue = bNode.simplify({ calculatePowers: true }).evaluate();
|
|
26
|
+
const res = aValue === bValue ? "=" : aValue < bValue ? "<" : ">";
|
|
27
|
+
return res;
|
|
28
|
+
};
|
|
29
|
+
const getInstruction = (identifiers) => {
|
|
30
|
+
const { a, b } = identifiers;
|
|
31
|
+
const aNode = square(reifyAlgebraic(a));
|
|
32
|
+
const bNode = square(reifyAlgebraic(b));
|
|
33
|
+
return `Compléter par le bon symbole :
|
|
34
|
+
|
|
35
|
+
$$
|
|
36
|
+
${aNode.toTex()} \\ \\ldots \\ ${bNode.toTex()}
|
|
37
|
+
$$`;
|
|
38
|
+
};
|
|
39
|
+
const getHint = (identifiers) => {
|
|
40
|
+
const { a, b } = identifiers;
|
|
41
|
+
const aNode = reifyAlgebraic(a);
|
|
42
|
+
const bNode = reifyAlgebraic(b);
|
|
43
|
+
return `Pour tous nombres $a$ et $b$ tels que $a<b$ :
|
|
44
|
+
|
|
45
|
+
- Si $a$ et $b$ sont positifs, alors $a^2 <b^2$ ;
|
|
46
|
+
- Si $a$ et $b$ sont négatifs, alors $a^2 > b^2$.`;
|
|
47
|
+
};
|
|
48
|
+
const getCorrection = (identifiers) => {
|
|
49
|
+
const { a, b } = identifiers;
|
|
50
|
+
const aNode = reifyAlgebraic(a);
|
|
51
|
+
const bNode = reifyAlgebraic(b);
|
|
52
|
+
const simplifiedA = aNode.simplify({
|
|
53
|
+
calculatePowers: true,
|
|
54
|
+
});
|
|
55
|
+
const simplifiedB = bNode.simplify({ calculatePowers: true });
|
|
56
|
+
const valueA = simplifiedA.evaluate();
|
|
57
|
+
const valueB = simplifiedB.evaluate();
|
|
58
|
+
const sign = valueA < 0 ? "négatif" : "positif";
|
|
59
|
+
const symbol = valueA < valueB ? "<" : valueA > valueB ? ">" : "=";
|
|
60
|
+
const answer = getAnswer(identifiers);
|
|
61
|
+
return `Puisque $${aNode.toTex()}$ et $${bNode.toTex()}$ sont ${sign}s, et puisque $${aNode.toTex()} ${symbol} ${bNode.toTex()}$, on a :
|
|
62
|
+
|
|
63
|
+
$$
|
|
64
|
+
${square(aNode).toTex()} ${answer} ${square(bNode).toTex()}
|
|
65
|
+
$$
|
|
66
|
+
|
|
67
|
+
`;
|
|
68
|
+
};
|
|
69
|
+
const getKeys = (identifiers) => {
|
|
70
|
+
return [];
|
|
71
|
+
};
|
|
72
|
+
const isAnswerValid = (ans, { answer }) => {
|
|
73
|
+
try {
|
|
74
|
+
throw Error("VEA not implemented");
|
|
75
|
+
}
|
|
76
|
+
catch (err) {
|
|
77
|
+
return handleVEAError(err);
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
const randCase = () => Math.floor(Math.random() * 2);
|
|
81
|
+
function randBetween(isInteger, min, max, roundTo, excludes) {
|
|
82
|
+
if (isInteger) {
|
|
83
|
+
return randint(min, max, excludes);
|
|
84
|
+
}
|
|
85
|
+
else {
|
|
86
|
+
return randfloat(min, max, roundTo, excludes);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
const getCompareSquaredValuesQuestion = (ops) => {
|
|
90
|
+
const min = 0;
|
|
91
|
+
const max = 50;
|
|
92
|
+
const roundTo = 2;
|
|
93
|
+
const caseType = randCase();
|
|
94
|
+
const isInteger = coinFlip();
|
|
95
|
+
let a;
|
|
96
|
+
let b;
|
|
97
|
+
switch (caseType) {
|
|
98
|
+
case 0:
|
|
99
|
+
// tous deux positifs
|
|
100
|
+
a = randBetween(isInteger, min, max, roundTo);
|
|
101
|
+
b = randBetween(isInteger, min, max, roundTo, [a]);
|
|
102
|
+
break;
|
|
103
|
+
case 1:
|
|
104
|
+
// tous deux négatifs
|
|
105
|
+
a = -randBetween(isInteger, min, max, roundTo);
|
|
106
|
+
b = -randBetween(isInteger, min, max, roundTo, [-a]);
|
|
107
|
+
break;
|
|
108
|
+
}
|
|
109
|
+
const identifiers = {
|
|
110
|
+
a: a.toTree().toIdentifiers(),
|
|
111
|
+
b: b.toTree().toIdentifiers(),
|
|
112
|
+
};
|
|
113
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
114
|
+
};
|
|
115
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
116
|
+
return {
|
|
117
|
+
answer: getAnswer(identifiers),
|
|
118
|
+
instruction: getInstruction(identifiers),
|
|
119
|
+
keys: getKeys(identifiers),
|
|
120
|
+
answerFormat: "tex",
|
|
121
|
+
identifiers,
|
|
122
|
+
hint: getHint(identifiers),
|
|
123
|
+
correction: getCorrection(identifiers),
|
|
124
|
+
};
|
|
125
|
+
};
|
|
126
|
+
export const compareSquaredValues = {
|
|
127
|
+
id: "compareSquaredValues",
|
|
128
|
+
label: "Comparer des nombres élevés au carré",
|
|
129
|
+
isSingleStep: true,
|
|
130
|
+
generator: (nb, opts) => getDistinctQuestions(() => getCompareSquaredValuesQuestion(opts), nb),
|
|
131
|
+
qcmTimer: 60,
|
|
132
|
+
freeTimer: 60,
|
|
133
|
+
getPropositions,
|
|
134
|
+
isAnswerValid,
|
|
135
|
+
subject: "Mathématiques",
|
|
136
|
+
getInstruction,
|
|
137
|
+
getHint,
|
|
138
|
+
getCorrection,
|
|
139
|
+
getAnswer,
|
|
140
|
+
getQuestionFromIdentifiers,
|
|
141
|
+
hasHintAndCorrection: true,
|
|
142
|
+
answerType: "QCU",
|
|
143
|
+
};
|
|
@@ -17,5 +17,7 @@ export * from "./isPointOnReciprocalFunction.js";
|
|
|
17
17
|
export * from "./isPointOnFunction.js";
|
|
18
18
|
export * from "./whichMultipleAmI.js";
|
|
19
19
|
export * from "./isMultipleOrDivisor.js";
|
|
20
|
+
export * from "./compareInverseValues.js";
|
|
20
21
|
export * from "./calculateDistanceBetweenNumbers.js";
|
|
22
|
+
export * from "./compareSquaredValues.js";
|
|
21
23
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/arithmetics/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iCAAiC,CAAC;AAChD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,kCAAkC,CAAC;AACjD,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,sCAAsC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/arithmetics/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iCAAiC,CAAC;AAChD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,kCAAkC,CAAC;AACjD,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,sCAAsC,CAAC;AACrD,cAAc,2BAA2B,CAAC"}
|
|
@@ -17,4 +17,6 @@ export * from "./isPointOnReciprocalFunction.js";
|
|
|
17
17
|
export * from "./isPointOnFunction.js";
|
|
18
18
|
export * from "./whichMultipleAmI.js";
|
|
19
19
|
export * from "./isMultipleOrDivisor.js";
|
|
20
|
+
export * from "./compareInverseValues.js";
|
|
20
21
|
export * from "./calculateDistanceBetweenNumbers.js";
|
|
22
|
+
export * from "./compareSquaredValues.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compareCubeValues.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/cube/compareCubeValues.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,6BAA6B,CAAC;AAOrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAuGF,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,WAAW,CAiBnD,CAAC"}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
|
|
2
|
+
import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
|
+
import { randfloat } from "../../../../math/utils/random/randfloat.js";
|
|
4
|
+
import { randint } from "../../../../math/utils/random/randint.js";
|
|
5
|
+
import { power } from "../../../../tree/nodes/operators/powerNode.js";
|
|
6
|
+
import { coinFlip } from "../../../../utils/alea/coinFlip.js";
|
|
7
|
+
const getPropositions = (n, { answer, a, b }) => {
|
|
8
|
+
const propositions = [];
|
|
9
|
+
addValidProp(propositions, answer);
|
|
10
|
+
tryToAddWrongProp(propositions, `>`);
|
|
11
|
+
tryToAddWrongProp(propositions, `<`);
|
|
12
|
+
tryToAddWrongProp(propositions, `=`);
|
|
13
|
+
return shuffleProps(propositions, n);
|
|
14
|
+
};
|
|
15
|
+
const getAnswer = (identifiers) => {
|
|
16
|
+
const { a, b } = identifiers;
|
|
17
|
+
if (a > b) {
|
|
18
|
+
return `>`;
|
|
19
|
+
}
|
|
20
|
+
else if (a < b) {
|
|
21
|
+
return `<`;
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
return `=`;
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
const getInstruction = (identifiers) => {
|
|
28
|
+
const { a, b } = identifiers;
|
|
29
|
+
return `Compléter par le bon symbole :
|
|
30
|
+
|
|
31
|
+
$$
|
|
32
|
+
${power(a, 3).toTex()}\\ \\ldots \\ ${power(b, 3).toTex()}
|
|
33
|
+
$$`;
|
|
34
|
+
};
|
|
35
|
+
const getHint = (identifiers) => {
|
|
36
|
+
return `La fonction cube conserve l'ordre : pour tous $a$ et $b$ réels,
|
|
37
|
+
|
|
38
|
+
- $a^3 > b^3$ si et seulement si $a > b$ ;
|
|
39
|
+
|
|
40
|
+
- $a^3 < b^3$ si et seulement si $a < b$ ;
|
|
41
|
+
|
|
42
|
+
- $a^3 = b^3$ si et seulement si $a = b$.`;
|
|
43
|
+
};
|
|
44
|
+
const getCorrection = (identifiers) => {
|
|
45
|
+
const { a, b } = identifiers;
|
|
46
|
+
const signe = a < b ? "<" : a > b ? ">" : "=";
|
|
47
|
+
return `La fonction cube conserve l'ordre.
|
|
48
|
+
|
|
49
|
+
Puisque $${a.frenchify()} ${signe} ${b.frenchify()}$, alors $${power(a, 3).toTex()} ${getAnswer(identifiers)} ${power(b, 3).toTex()}$.`;
|
|
50
|
+
};
|
|
51
|
+
const getCompareCubeValuesQuestion = (ops) => {
|
|
52
|
+
const randomNumberOrDecimal = (min, max, excl) => {
|
|
53
|
+
const isDecimal = coinFlip();
|
|
54
|
+
return isDecimal ? randfloat(min, max, 2, excl) : randint(min, max, excl);
|
|
55
|
+
};
|
|
56
|
+
let a = null;
|
|
57
|
+
let b = null;
|
|
58
|
+
const bound = 10;
|
|
59
|
+
switch (randint(0, 3)) {
|
|
60
|
+
case 0:
|
|
61
|
+
a = randomNumberOrDecimal(0, bound);
|
|
62
|
+
b = randomNumberOrDecimal(0, bound, [a]);
|
|
63
|
+
break;
|
|
64
|
+
case 1:
|
|
65
|
+
a = randomNumberOrDecimal(-bound, 0);
|
|
66
|
+
b = randomNumberOrDecimal(-bound, 0, [a]);
|
|
67
|
+
break;
|
|
68
|
+
case 2:
|
|
69
|
+
default:
|
|
70
|
+
if (coinFlip()) {
|
|
71
|
+
a = randomNumberOrDecimal(-bound, 0);
|
|
72
|
+
b = randomNumberOrDecimal(0, bound);
|
|
73
|
+
}
|
|
74
|
+
else {
|
|
75
|
+
a = randomNumberOrDecimal(0, bound);
|
|
76
|
+
b = randomNumberOrDecimal(-bound, 0);
|
|
77
|
+
}
|
|
78
|
+
break;
|
|
79
|
+
}
|
|
80
|
+
const identifiers = {
|
|
81
|
+
a,
|
|
82
|
+
b,
|
|
83
|
+
};
|
|
84
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
85
|
+
};
|
|
86
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
87
|
+
return {
|
|
88
|
+
answer: getAnswer(identifiers),
|
|
89
|
+
instruction: getInstruction(identifiers),
|
|
90
|
+
keys: [],
|
|
91
|
+
answerFormat: "tex",
|
|
92
|
+
identifiers,
|
|
93
|
+
hint: getHint(identifiers),
|
|
94
|
+
correction: getCorrection(identifiers),
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
export const compareCubeValues = {
|
|
98
|
+
id: "compareCubeValues",
|
|
99
|
+
label: "Comparer des nombres élevés au cube",
|
|
100
|
+
answerType: "QCU",
|
|
101
|
+
isSingleStep: true,
|
|
102
|
+
generator: (nb, opts) => getDistinctQuestions(() => getCompareCubeValuesQuestion(opts), nb),
|
|
103
|
+
qcmTimer: 60,
|
|
104
|
+
freeTimer: 60,
|
|
105
|
+
getPropositions,
|
|
106
|
+
subject: "Mathématiques",
|
|
107
|
+
getInstruction,
|
|
108
|
+
getHint,
|
|
109
|
+
getCorrection,
|
|
110
|
+
getAnswer,
|
|
111
|
+
getQuestionFromIdentifiers,
|
|
112
|
+
hasHintAndCorrection: true,
|
|
113
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/cube/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/cube/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/functions/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/functions/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,iBAAiB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compareSqrtValues.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/sqrt/compareSqrtValues.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,6BAA6B,CAAC;AAOrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA2EF,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,WAAW,CAiBnD,CAAC"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
|
|
2
|
+
import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
|
+
import { randfloat } from "../../../../math/utils/random/randfloat.js";
|
|
4
|
+
import { randint } from "../../../../math/utils/random/randint.js";
|
|
5
|
+
import { sqrt } from "../../../../tree/nodes/functions/sqrtNode.js";
|
|
6
|
+
import { coinFlip } from "../../../../utils/alea/coinFlip.js";
|
|
7
|
+
const getPropositions = (n, { answer, a, b }) => {
|
|
8
|
+
const propositions = [];
|
|
9
|
+
addValidProp(propositions, answer);
|
|
10
|
+
tryToAddWrongProp(propositions, `>`);
|
|
11
|
+
tryToAddWrongProp(propositions, `<`);
|
|
12
|
+
tryToAddWrongProp(propositions, `=`);
|
|
13
|
+
return shuffleProps(propositions, n);
|
|
14
|
+
};
|
|
15
|
+
const getAnswer = (identifiers) => {
|
|
16
|
+
const { a, b } = identifiers;
|
|
17
|
+
const signe = a > b ? ">" : a < b ? "<" : "=";
|
|
18
|
+
return `${signe}`;
|
|
19
|
+
};
|
|
20
|
+
const getInstruction = (identifiers) => {
|
|
21
|
+
const { a, b } = identifiers;
|
|
22
|
+
return `Compléter par le bon symbole :
|
|
23
|
+
|
|
24
|
+
$$
|
|
25
|
+
${sqrt(a).toTex()} \\ \\ldots \\ ${sqrt(b).toTex()}
|
|
26
|
+
$$`;
|
|
27
|
+
};
|
|
28
|
+
const getHint = (identifiers) => {
|
|
29
|
+
return `La racine carré conserve l'ordre : pour tous $a$ et $b$ positifs,
|
|
30
|
+
|
|
31
|
+
- $a > b \\iff ${sqrt("a").toTex()} > ${sqrt("b").toTex()}$
|
|
32
|
+
- $a < b \\iff ${sqrt("a").toTex()} < ${sqrt("b").toTex()}$
|
|
33
|
+
- $a = b \\iff ${sqrt("a").toTex()} = ${sqrt("b").toTex()}$`;
|
|
34
|
+
};
|
|
35
|
+
const getCorrection = (identifiers) => {
|
|
36
|
+
const { a, b } = identifiers;
|
|
37
|
+
const signe = a > b ? ">" : a < b ? "<" : "=";
|
|
38
|
+
return `La racine carrée conserve l'ordre.
|
|
39
|
+
|
|
40
|
+
Puisque $${a.frenchify()} ${signe} ${b.frenchify()}$, alors $${sqrt(a).toTex()} ${signe} ${sqrt(b).toTex()}$.`;
|
|
41
|
+
};
|
|
42
|
+
const getCompareSqrtValuesQuestion = (ops) => {
|
|
43
|
+
const randomNumberOrDecimal = (min, max, excl) => {
|
|
44
|
+
const isDecimal = coinFlip();
|
|
45
|
+
return isDecimal ? randfloat(min, max, 2, excl) : randint(min, max, excl);
|
|
46
|
+
};
|
|
47
|
+
const bound = 10;
|
|
48
|
+
const a = randomNumberOrDecimal(0, bound);
|
|
49
|
+
const b = randomNumberOrDecimal(0, bound, [a]);
|
|
50
|
+
const identifiers = {
|
|
51
|
+
a,
|
|
52
|
+
b,
|
|
53
|
+
};
|
|
54
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
55
|
+
};
|
|
56
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
57
|
+
return {
|
|
58
|
+
answer: getAnswer(identifiers),
|
|
59
|
+
instruction: getInstruction(identifiers),
|
|
60
|
+
keys: [],
|
|
61
|
+
answerFormat: "tex",
|
|
62
|
+
identifiers,
|
|
63
|
+
hint: getHint(identifiers),
|
|
64
|
+
correction: getCorrection(identifiers),
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
export const compareSqrtValues = {
|
|
68
|
+
id: "compareSqrtValues",
|
|
69
|
+
label: "Comparer des racines carrés",
|
|
70
|
+
answerType: "QCU",
|
|
71
|
+
isSingleStep: true,
|
|
72
|
+
generator: (nb, opts) => getDistinctQuestions(() => getCompareSqrtValuesQuestion(opts), nb),
|
|
73
|
+
qcmTimer: 60,
|
|
74
|
+
freeTimer: 60,
|
|
75
|
+
getPropositions,
|
|
76
|
+
subject: "Mathématiques",
|
|
77
|
+
getInstruction,
|
|
78
|
+
getHint,
|
|
79
|
+
getCorrection,
|
|
80
|
+
getAnswer,
|
|
81
|
+
getQuestionFromIdentifiers,
|
|
82
|
+
hasHintAndCorrection: true,
|
|
83
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/sqrt/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./compareSqrtValues.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"placeAbscissOnLine.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/cartesian/placeAbscissOnLine.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,6BAA6B,CAAC;AAOrC,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"placeAbscissOnLine.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/cartesian/placeAbscissOnLine.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,6BAA6B,CAAC;AAOrC,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAa1D,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,UAAU,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAsKF,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,WAAW,CAgBpD,CAAC"}
|
|
@@ -9,8 +9,10 @@ import { randfloat } from "../../../../math/utils/random/randfloat.js";
|
|
|
9
9
|
import { randint } from "../../../../math/utils/random/randint.js";
|
|
10
10
|
import { round } from "../../../../math/utils/round.js";
|
|
11
11
|
import { FractionNode } from "../../../../tree/nodes/operators/fractionNode.js";
|
|
12
|
-
import { MultiplyNode } from "../../../../tree/nodes/operators/multiplyNode.js";
|
|
12
|
+
import { multiply, MultiplyNode, } from "../../../../tree/nodes/operators/multiplyNode.js";
|
|
13
|
+
import { parseAlgebraic } from "../../../../tree/parsers/latexParser.js";
|
|
13
14
|
import { random } from "../../../../utils/alea/random.js";
|
|
15
|
+
import { pluralize } from "../../../../utils/strings/pluralize.js";
|
|
14
16
|
const getInstruction = ({ abscissTex }) => {
|
|
15
17
|
return `Placer le point d'abscisse $${abscissTex}$ sur la droite graduée ci-dessous :`;
|
|
16
18
|
};
|
|
@@ -108,6 +110,28 @@ const getPlaceAbscissOnLineQuestion = () => {
|
|
|
108
110
|
};
|
|
109
111
|
return getQuestionFromIdentifiers(identifiers);
|
|
110
112
|
};
|
|
113
|
+
const getHint = (identifiers) => {
|
|
114
|
+
const { absciss, axisUnit, oneUnitTex, abscissType, abscissTex, coeff } = identifiers;
|
|
115
|
+
return `Il faut compter le nombre de graduations entre les points $O$ et $A$. Puis on utilise le fait qu'une graduation vaut $${oneUnitTex}$.
|
|
116
|
+
|
|
117
|
+
D'autre part, si $A$ est placé à gauche de $O$, alors son abscisse est négative.`;
|
|
118
|
+
};
|
|
119
|
+
const getCorrection = (identifiers) => {
|
|
120
|
+
const { absciss, axisUnit, oneUnitTex, abscissType, abscissTex, coeff } = identifiers;
|
|
121
|
+
const absCoeff = Math.abs(coeff);
|
|
122
|
+
const oneUnitNode = parseAlgebraic(oneUnitTex);
|
|
123
|
+
return `Il y a $${absCoeff}$ ${pluralize("graduation", absCoeff)} entre $O$ et $A$. Puisqu'une graduation vaut $${oneUnitTex}$, cela représente un écart de :
|
|
124
|
+
|
|
125
|
+
$$
|
|
126
|
+
${multiply(absCoeff, oneUnitNode).toTex({
|
|
127
|
+
forceNoSimplification: true,
|
|
128
|
+
})} = ${multiply(absCoeff, oneUnitNode).simplify().toTex()}
|
|
129
|
+
$$
|
|
130
|
+
|
|
131
|
+
${coeff < 0
|
|
132
|
+
? `Puisque $A$ est placé à gauche du point $O$, son abscisse est négative. L'abscisse du point $A$ est donc $${abscissTex}$.`
|
|
133
|
+
: `L'abscisse du point $A$ est donc $${abscissTex}$.`}`;
|
|
134
|
+
};
|
|
111
135
|
const getQuestionFromIdentifiers = (identifiers) => {
|
|
112
136
|
const question = {
|
|
113
137
|
ggbAnswer: getGGBAnswer(identifiers),
|
|
@@ -133,4 +157,5 @@ export const placeAbscissOnLine = {
|
|
|
133
157
|
getStudentGGBOptions,
|
|
134
158
|
answerType: "GGB",
|
|
135
159
|
getQuestionFromIdentifiers,
|
|
160
|
+
// hasHintAndCorrection: true,
|
|
136
161
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pythagoreOrThales.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/euclidian/pythagoreOrThales.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAmBT,MAAM,6BAA6B,CAAC;AAKrC,OAAO,EAGL,gBAAgB,EACjB,MAAM,8BAA8B,CAAC;AAkBtC,KAAK,WAAW,GAAG;IACjB,cAAc,EAAE,OAAO,CAAC;IACxB,eAAe,EAAE,OAAO,CAAC;IAEzB,iBAAiB,EAAE,gBAAgB,EAAE,CAAC;IACtC,OAAO,EAAE,MAAM,EAAE,CAAC;CAQnB,CAAC;
|
|
1
|
+
{"version":3,"file":"pythagoreOrThales.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/euclidian/pythagoreOrThales.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAmBT,MAAM,6BAA6B,CAAC;AAKrC,OAAO,EAGL,gBAAgB,EACjB,MAAM,8BAA8B,CAAC;AAkBtC,KAAK,WAAW,GAAG;IACjB,cAAc,EAAE,OAAO,CAAC;IACxB,eAAe,EAAE,OAAO,CAAC;IAEzB,iBAAiB,EAAE,gBAAgB,EAAE,CAAC;IACtC,OAAO,EAAE,MAAM,EAAE,CAAC;CAQnB,CAAC;AA4RF,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,WAAW,CAuBnD,CAAC"}
|