math-exercises 2.1.18 → 2.1.19
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/conversion/capacityConversion.d.ts.map +1 -1
- package/lib/exercises/math/conversion/capacityConversion.js +1 -2
- package/lib/exercises/math/functions/integral/integralFractions.d.ts.map +1 -1
- package/lib/exercises/math/functions/integral/integralFractions.js +2 -1
- package/lib/exercises/math/percent/isTableProportional.d.ts.map +1 -1
- package/lib/exercises/math/percent/isTableProportional.js +4 -4
- package/lib/exercises/math/trigonometry/arcValue.js +2 -2
- package/lib/exercises/math/trigonometry/calculateCosSinAndTan.d.ts +1 -0
- package/lib/exercises/math/trigonometry/calculateCosSinAndTan.d.ts.map +1 -1
- package/lib/exercises/math/trigonometry/calculateCosSinAndTan.js +4 -4
- package/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capacityConversion.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/conversion/capacityConversion.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,QAAQ,EAQT,MAAM,gBAAgB,CAAC;AAGxB,KAAK,WAAW,GAAG;IACjB,eAAe,EAAE,MAAM,CAAC;IACxB,0BAA0B,EAAE,MAAM,CAAC;IACnC,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC;
|
|
1
|
+
{"version":3,"file":"capacityConversion.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/conversion/capacityConversion.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,QAAQ,EAQT,MAAM,gBAAgB,CAAC;AAGxB,KAAK,WAAW,GAAG;IACjB,eAAe,EAAE,MAAM,CAAC;IACxB,0BAA0B,EAAE,MAAM,CAAC;IACnC,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC;AAwDF,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,WAAW,CAcpD,CAAC"}
|
|
@@ -33,9 +33,8 @@ const getPropositions = (n, { answer, randomCapacity, randomUnitIndex, randomUni
|
|
|
33
33
|
(0, exercise_1.addValidProp)(propositions, answer);
|
|
34
34
|
const capacityDecimal = new decimal_1.Decimal(randomCapacity);
|
|
35
35
|
while (propositions.length < n) {
|
|
36
|
-
console.log("capactiy conv qcm");
|
|
37
36
|
const wrongAnswer = capacityDecimal
|
|
38
|
-
.multiplyByPowerOfTen((0, randint_1.randint)(-
|
|
37
|
+
.multiplyByPowerOfTen((0, randint_1.randint)(-4, 5, [randomUnitIndex - randomUnitInstructionIndex]))
|
|
39
38
|
.value.toString()
|
|
40
39
|
.replace(".", ",");
|
|
41
40
|
(0, exercise_1.tryToAddWrongProp)(propositions, wrongAnswer);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"integralFractions.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/integral/integralFractions.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAclC,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;
|
|
1
|
+
{"version":3,"file":"integralFractions.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/integral/integralFractions.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAclC,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAgMF,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,WAAW,CAanD,CAAC"}
|
|
@@ -35,7 +35,8 @@ const getIntegralFractionsQuestion = () => {
|
|
|
35
35
|
lowerBound = (0, randint_1.randint)(-5, 5, [0]);
|
|
36
36
|
upperBound = (0, randint_1.randint)(-5, 5, [0]);
|
|
37
37
|
}
|
|
38
|
-
} while (doesTrinomialVanishInInterval(trinomial, lowerBound, upperBound)
|
|
38
|
+
} while (doesTrinomialVanishInInterval(trinomial, lowerBound, upperBound) ||
|
|
39
|
+
affine.calculate(lowerBound) === 0);
|
|
39
40
|
const fraction = questionType === "Trinomial"
|
|
40
41
|
? new fractionNode_1.FractionNode(affine.toTree(), trinomial.toTree())
|
|
41
42
|
: new fractionNode_1.FractionNode(affine.coefficients[1].toTree(), affine.toTree());
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isTableProportional.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/percent/isTableProportional.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAKlC,KAAK,WAAW,GAAG,EAAE,CAAC;AAkEtB,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,WAAW,
|
|
1
|
+
{"version":3,"file":"isTableProportional.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/percent/isTableProportional.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAKlC,KAAK,WAAW,GAAG,EAAE,CAAC;AAkEtB,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,WAAW,CAcrD,CAAC"}
|
|
@@ -9,7 +9,7 @@ const getIsTableProportionalQuestion = () => {
|
|
|
9
9
|
const table = generateTable();
|
|
10
10
|
const question = {
|
|
11
11
|
answer: table.coeff ? "Oui" : "Non",
|
|
12
|
-
instruction: `On
|
|
12
|
+
instruction: `On considère le tableau ci-dessous. Est-ce un tableau de proportionnalité ?${table.table}`,
|
|
13
13
|
keys: [],
|
|
14
14
|
answerFormat: "raw",
|
|
15
15
|
style: { tableHasNoHeader: true },
|
|
@@ -22,7 +22,7 @@ const getPropositions = (n, { answer }) => {
|
|
|
22
22
|
(0, exercise_1.addValidProp)(propositions, answer, "raw");
|
|
23
23
|
(0, exercise_1.tryToAddWrongProp)(propositions, "Oui", "raw");
|
|
24
24
|
(0, exercise_1.tryToAddWrongProp)(propositions, "Non", "raw");
|
|
25
|
-
(0, exercise_1.tryToAddWrongProp)(propositions, "On peut pas savoir", "raw");
|
|
25
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, "On ne peut pas savoir", "raw");
|
|
26
26
|
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
27
27
|
};
|
|
28
28
|
const isAnswerValid = (ans, { answer }) => {
|
|
@@ -47,7 +47,7 @@ const generateTable = () => {
|
|
|
47
47
|
};
|
|
48
48
|
const generateYValues = (xValues) => {
|
|
49
49
|
const flip = (0, coinFlip_1.coinFlip)();
|
|
50
|
-
const coeff = (0, randint_1.randint)(
|
|
50
|
+
const coeff = (0, randint_1.randint)(2, 6);
|
|
51
51
|
return flip
|
|
52
52
|
? {
|
|
53
53
|
values: xValues.map((value) => value * (0, randint_1.randint)(2, 5)),
|
|
@@ -59,7 +59,7 @@ const generateYValues = (xValues) => {
|
|
|
59
59
|
};
|
|
60
60
|
exports.isTableProportional = {
|
|
61
61
|
id: "isVTableProportional",
|
|
62
|
-
label: "Reconnaître
|
|
62
|
+
label: "Reconnaître un tableau de proportionnalité",
|
|
63
63
|
levels: ["5ème"],
|
|
64
64
|
isSingleStep: true,
|
|
65
65
|
sections: ["Proportionnalité"],
|
|
@@ -41,7 +41,7 @@ const getArcValueQuestion = () => {
|
|
|
41
41
|
: selectedFunction === "cos"
|
|
42
42
|
? new cosNode_1.CosNode(new variableNode_1.VariableNode("\\theta"))
|
|
43
43
|
: new tanNode_1.TanNode(new variableNode_1.VariableNode("\\theta"));
|
|
44
|
-
const instruction = `Quelle est la valeur en degrés de l'angle $\\theta$
|
|
44
|
+
const instruction = `Quelle est la valeur en degrés de l'angle $\\theta$ sachant que $${trigNode.toTex()} = ${trigValue.frenchify()}$ ? Arrondir à l'unité.`;
|
|
45
45
|
const answer = (0, round_1.round)(angleInDegrees, 0).toTree().toTex();
|
|
46
46
|
const question = {
|
|
47
47
|
answer: answer,
|
|
@@ -65,7 +65,7 @@ const isAnswerValid = (ans, { answer }) => {
|
|
|
65
65
|
};
|
|
66
66
|
exports.arcValue = {
|
|
67
67
|
id: "arcValue",
|
|
68
|
-
label: "Calculer
|
|
68
|
+
label: "Calculer un angle via son cosinus/sinus/tangente",
|
|
69
69
|
levels: ["1reSpé"],
|
|
70
70
|
isSingleStep: true,
|
|
71
71
|
sections: ["Trigonométrie"],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"calculateCosSinAndTan.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/trigonometry/calculateCosSinAndTan.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"calculateCosSinAndTan.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/trigonometry/calculateCosSinAndTan.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AA0DF,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,WAAW,CAavD,CAAC"}
|
|
@@ -13,13 +13,13 @@ const random_1 = require("../../../utils/random");
|
|
|
13
13
|
const trigo = ["sin", "tan", "cos"];
|
|
14
14
|
const getCalculateCosSinAndTanQuestion = () => {
|
|
15
15
|
const trigoFunct = (0, random_1.random)(trigo);
|
|
16
|
-
const degree = (0, randint_1.randint)(1,
|
|
16
|
+
const degree = (0, randint_1.randint)(1, 180);
|
|
17
17
|
const question = {
|
|
18
18
|
answer: getCorrectAnswer(degree, trigoFunct),
|
|
19
|
-
instruction: `Calculer
|
|
19
|
+
instruction: `Calculer $\\${trigoFunct}(${new degree_1.DegreeNode(degree).toTex()})$, arrondir le résultat au dixième.`,
|
|
20
20
|
keys: [],
|
|
21
21
|
answerFormat: "tex",
|
|
22
|
-
identifiers: { degree },
|
|
22
|
+
identifiers: { degree, trigoFunct },
|
|
23
23
|
};
|
|
24
24
|
return question;
|
|
25
25
|
};
|
|
@@ -58,7 +58,7 @@ const getCorrectAnswer = (degree, trigoFunct) => {
|
|
|
58
58
|
};
|
|
59
59
|
exports.calculateCosSinAndTan = {
|
|
60
60
|
id: "calculateCosSinAndTan",
|
|
61
|
-
label: "
|
|
61
|
+
label: "Calculer le cosinus/sinus/tangente d'un angle en degrés",
|
|
62
62
|
levels: ["3ème"],
|
|
63
63
|
isSingleStep: true,
|
|
64
64
|
sections: ["Trigonométrie"],
|
package/lib/index.d.ts
CHANGED
|
@@ -1284,6 +1284,7 @@ declare const mathExercises: (import("./exercises/exercise").Exercise<{
|
|
|
1284
1284
|
angleInDegrees: number;
|
|
1285
1285
|
}> | import("./exercises/exercise").Exercise<{
|
|
1286
1286
|
degree: number;
|
|
1287
|
+
trigoFunct: string;
|
|
1287
1288
|
}> | import("./exercises/exercise").Exercise<{
|
|
1288
1289
|
exercise: {
|
|
1289
1290
|
a: number;
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAG3D,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,MAAM,EAAE,MAAM,aAAa,CAAC;QAC5B,SAAS,EAAE,MAAM,MAAM,CAAC;QACxB,YAAY,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,KAAK,aAAa,CAAC;KACpD;CACF;AAcD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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