math-exercises 3.0.59 → 3.0.61
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/calculLitteral/distributivity/doubleDistri.js +3 -3
- package/lib/exercises/math/calculLitteral/systems/basicNiceValuesSystemResolution.js +1 -1
- package/lib/exercises/math/geometry/cartesian/directionVectorEquation.js +5 -5
- package/lib/exercises/math/geometry/lines/directorVectorFromReductEquation.d.ts.map +1 -1
- package/lib/exercises/math/geometry/lines/directorVectorFromReductEquation.js +3 -1
- package/lib/exercises/math/geometry/vectors/alignementViaColinearity.js +2 -2
- package/lib/exercises/math/percent/findProportion.d.ts.map +1 -1
- package/lib/exercises/math/percent/findProportion.js +1 -0
- package/lib/exercises/math/percent/valuePercent.d.ts.map +1 -1
- package/lib/exercises/math/percent/valuePercent.js +1 -0
- package/lib/exercises/math/powers/calculatePower.d.ts.map +1 -1
- package/lib/exercises/math/powers/calculatePower.js +3 -2
- package/package.json +1 -1
|
@@ -62,13 +62,13 @@ const getCorrection = (identifiers) => {
|
|
|
62
62
|
];
|
|
63
63
|
return `
|
|
64
64
|
${alignTex([
|
|
65
|
-
[
|
|
65
|
+
["", statementTex],
|
|
66
|
+
["=", operatorComposition(AddNode, subMultiplications).toTex()],
|
|
66
67
|
[
|
|
67
|
-
"",
|
|
68
68
|
"=",
|
|
69
69
|
operatorComposition(AddNode, subMultiplications.map((e) => e.simplify())).toTex(),
|
|
70
70
|
],
|
|
71
|
-
["
|
|
71
|
+
["=", answer],
|
|
72
72
|
])}
|
|
73
73
|
|
|
74
74
|
`;
|
|
@@ -58,7 +58,7 @@ const getQuestionFromIdentifiers = (identifiers) => {
|
|
|
58
58
|
const question = {
|
|
59
59
|
answer: getAnswer(identifiers),
|
|
60
60
|
instruction: getInstruction(identifiers),
|
|
61
|
-
keys: [],
|
|
61
|
+
keys: ["semicolon"],
|
|
62
62
|
answerFormat: "tex",
|
|
63
63
|
identifiers,
|
|
64
64
|
hint: getHint(identifiers),
|
|
@@ -29,7 +29,7 @@ $$
|
|
|
29
29
|
${equation}
|
|
30
30
|
$$
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
Déterminer les coordonnées d'un vecteur directeur de $d$.`;
|
|
33
33
|
};
|
|
34
34
|
const getKeys = (identifiers) => {
|
|
35
35
|
return ["binom", "semicolon"];
|
|
@@ -94,18 +94,18 @@ const getPropositions = (n, { answer, xValue, yValue }) => {
|
|
|
94
94
|
const wrongAnswer2 = new Vector("v", (xValue + 1).toTree(), (yValue + 1).toTree());
|
|
95
95
|
const wrongAnswer3 = new Vector("v", yValue.toTree(), xValue.toTree());
|
|
96
96
|
if (wrongAnswer1.isColinear(vector) === false) {
|
|
97
|
-
tryToAddWrongProp(propositions, wrongAnswer1.
|
|
97
|
+
tryToAddWrongProp(propositions, wrongAnswer1.toBinomCoords().toTex());
|
|
98
98
|
}
|
|
99
99
|
if (wrongAnswer2.isColinear(vector) === false) {
|
|
100
|
-
tryToAddWrongProp(propositions, wrongAnswer2.
|
|
100
|
+
tryToAddWrongProp(propositions, wrongAnswer2.toBinomCoords().toTex());
|
|
101
101
|
}
|
|
102
102
|
if (wrongAnswer3.isColinear(vector) === false) {
|
|
103
|
-
tryToAddWrongProp(propositions, wrongAnswer3.
|
|
103
|
+
tryToAddWrongProp(propositions, wrongAnswer3.toBinomCoords().toTex());
|
|
104
104
|
}
|
|
105
105
|
while (propositions.length < n) {
|
|
106
106
|
const wrongAnswer = new Vector("v", randint(-5, 5).toTree(), randint(-5, 5).toTree());
|
|
107
107
|
if (wrongAnswer.isColinear(vector) === false) {
|
|
108
|
-
tryToAddWrongProp(propositions, wrongAnswer.
|
|
108
|
+
tryToAddWrongProp(propositions, wrongAnswer.toBinomCoords().toTex());
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
111
|
return shuffleProps(propositions, n);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"directorVectorFromReductEquation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/lines/directorVectorFromReductEquation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAIrC,OAAO,EACL,eAAe,EAEhB,MAAM,qCAAqC,CAAC;AAY7C,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,eAAe,CAAC;IACtB,IAAI,EAAE,eAAe,CAAC;CACvB,CAAC;
|
|
1
|
+
{"version":3,"file":"directorVectorFromReductEquation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/lines/directorVectorFromReductEquation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAIrC,OAAO,EACL,eAAe,EAEhB,MAAM,qCAAqC,CAAC;AAY7C,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,eAAe,CAAC;IACtB,IAAI,EAAE,eAAe,CAAC;CACvB,CAAC;AA0GF,eAAO,MAAM,gCAAgC,EAAE,QAAQ,CAAC,WAAW,CAsBlE,CAAC"}
|
|
@@ -13,7 +13,9 @@ const getEquationTex = (identifiers) => {
|
|
|
13
13
|
const { aIds, bIds } = identifiers;
|
|
14
14
|
const a = reifyAlgebraic(aIds);
|
|
15
15
|
const b = reifyAlgebraic(bIds);
|
|
16
|
-
return `y=${add(multiply(a, "x"), b)
|
|
16
|
+
return `y=${add(multiply(a, "x"), b)
|
|
17
|
+
.simplify({ forbidFactorize: true })
|
|
18
|
+
.toTex()}`;
|
|
17
19
|
};
|
|
18
20
|
const getPropositions = (n, { answer }) => {
|
|
19
21
|
const propositions = [];
|
|
@@ -30,7 +30,7 @@ const getAnswer = (identifiers) => {
|
|
|
30
30
|
return answer;
|
|
31
31
|
};
|
|
32
32
|
const getHint = (identifiers) => {
|
|
33
|
-
return `Les points $A$, $B$
|
|
33
|
+
return `Les points $A$, $B$ et $C$ sont alignés si et seulement si les vecteurs $\\overrightarrow{AB}$ et $\\overrightarrow{AC}$ sont colinéaires.`;
|
|
34
34
|
};
|
|
35
35
|
const getCorrection = (identifiers) => {
|
|
36
36
|
const points = getPoints(identifiers);
|
|
@@ -40,7 +40,7 @@ const getCorrection = (identifiers) => {
|
|
|
40
40
|
const vec2Simp = vec2.simplify();
|
|
41
41
|
const det = vec1Simp.determinant(vec2Simp);
|
|
42
42
|
const isAligned = vec1.isColinear(vec2);
|
|
43
|
-
return `Les points $A$, $B$
|
|
43
|
+
return `Les points $A$, $B$ et $C$ sont alignés si et seulement si les vecteurs $\\overrightarrow{AB}$ et $\\overrightarrow{AC}$ sont colinéaires.
|
|
44
44
|
|
|
45
45
|
On calcule les coordonnées de ces vecteurs :
|
|
46
46
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"findProportion.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/percent/findProportion.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAOrC,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AA0EF,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,WAAW,
|
|
1
|
+
{"version":3,"file":"findProportion.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/percent/findProportion.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAOrC,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AA0EF,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,WAAW,CAoBhD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"valuePercent.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/percent/valuePercent.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAMrC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AA4DF,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,WAAW,
|
|
1
|
+
{"version":3,"file":"valuePercent.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/percent/valuePercent.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAMrC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AA4DF,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,WAAW,CAiB9C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"calculatePower.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/powers/calculatePower.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AASrC,KAAK,WAAW,GAAG;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;
|
|
1
|
+
{"version":3,"file":"calculatePower.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/powers/calculatePower.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AASrC,KAAK,WAAW,GAAG;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAyHF,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,WAAW,CAchD,CAAC"}
|
|
@@ -49,8 +49,9 @@ $$`;
|
|
|
49
49
|
return `On multiplie $${int}$ par lui-même $${power}$ fois :
|
|
50
50
|
|
|
51
51
|
${alignTex([
|
|
52
|
-
[
|
|
53
|
-
["
|
|
52
|
+
["", statement],
|
|
53
|
+
["=", mul.toTex({ forceNoSimplification: true })],
|
|
54
|
+
["=", getAnswer(identifiers)],
|
|
54
55
|
])}
|
|
55
56
|
`;
|
|
56
57
|
};
|