math-exercises 2.2.30 → 2.2.31
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/equation/binomialsTrinomialsProposedSolutions.d.ts +4 -1
- package/lib/exercises/math/calculLitteral/equation/binomialsTrinomialsProposedSolutions.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/binomialsTrinomialsProposedSolutions.js +7 -6
- package/lib/index.d.ts +4 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/tree/nodes/equations/equationSolutionNode.d.ts.map +1 -1
- package/lib/tree/nodes/equations/equationSolutionNode.js +1 -0
- package/package.json +1 -1
package/lib/exercises/math/calculLitteral/equation/binomialsTrinomialsProposedSolutions.d.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { Exercise } from "../../../../exercises/exercise";
|
|
2
|
-
type Identifiers = {
|
|
2
|
+
type Identifiers = {
|
|
3
|
+
solutionNodeIds: any;
|
|
4
|
+
equationNodeIds: any;
|
|
5
|
+
};
|
|
3
6
|
export declare const binomialsTrinomialsProposedSolutions: Exercise<Identifiers>;
|
|
4
7
|
export {};
|
|
5
8
|
//# sourceMappingURL=binomialsTrinomialsProposedSolutions.d.ts.map
|
package/lib/exercises/math/calculLitteral/equation/binomialsTrinomialsProposedSolutions.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"binomialsTrinomialsProposedSolutions.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/equation/binomialsTrinomialsProposedSolutions.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAYlC,KAAK,WAAW,GAAG,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"binomialsTrinomialsProposedSolutions.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/equation/binomialsTrinomialsProposedSolutions.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAYlC,KAAK,WAAW,GAAG;IACjB,eAAe,EAAE,GAAG,CAAC;IACrB,eAAe,EAAE,GAAG,CAAC;CACtB,CAAC;AA0EF,eAAO,MAAM,oCAAoC,EAAE,QAAQ,CAAC,WAAW,CActE,CAAC"}
|
|
@@ -35,19 +35,20 @@ const getBinomialsTrinomialsProposedSolutionsQuestion = () => {
|
|
|
35
35
|
? new equalNode_1.EqualNode(trinomial.toTree(), constante.toTree())
|
|
36
36
|
: new equalNode_1.EqualNode(binomial1.toTree(), binomial2.toTree());
|
|
37
37
|
const ans = degree
|
|
38
|
-
? root.toTree()
|
|
39
|
-
: new fractionNode_1.FractionNode(new substractNode_1.SubstractNode(binomial2.b.toTree(), binomial1.b.toTree()), new substractNode_1.SubstractNode(binomial1.a.toTree(), binomial2.a.toTree()))
|
|
40
|
-
.simplify()
|
|
41
|
-
.toTex();
|
|
38
|
+
? root.toTree()
|
|
39
|
+
: new fractionNode_1.FractionNode(new substractNode_1.SubstractNode(binomial2.b.toTree(), binomial1.b.toTree()), new substractNode_1.SubstractNode(binomial1.a.toTree(), binomial2.a.toTree())).simplify();
|
|
42
40
|
const answertype = (0, coinFlip_1.coinFlip)();
|
|
43
|
-
const solution = answertype ? ans : (0, randint_1.randint)(-10, 10);
|
|
41
|
+
const solution = answertype ? ans : (0, randint_1.randint)(-10, 10).toTree();
|
|
44
42
|
const answer = answertype ? "Oui" : "Non";
|
|
45
43
|
const question = {
|
|
46
44
|
answer: answer,
|
|
47
45
|
instruction: `Le nombre $${solution}$ est-il une solution de l'équation $${equation.toTex()}$ ?`,
|
|
48
46
|
keys: [],
|
|
49
47
|
answerFormat: "raw",
|
|
50
|
-
identifiers: {
|
|
48
|
+
identifiers: {
|
|
49
|
+
equationNodeIds: equation.toIdentifiers(),
|
|
50
|
+
solutionNodeIds: solution.toIdentifiers(),
|
|
51
|
+
},
|
|
51
52
|
};
|
|
52
53
|
return question;
|
|
53
54
|
};
|
package/lib/index.d.ts
CHANGED
|
@@ -248,7 +248,10 @@ declare const mathExercises: (import("./exercises/exercise").Exercise<{
|
|
|
248
248
|
randAdd?: number | undefined;
|
|
249
249
|
op2?: string | undefined;
|
|
250
250
|
};
|
|
251
|
-
}> | import("./exercises/exercise").Exercise<{
|
|
251
|
+
}> | import("./exercises/exercise").Exercise<{
|
|
252
|
+
solutionNodeIds: any;
|
|
253
|
+
equationNodeIds: any;
|
|
254
|
+
}> | import("./exercises/exercise").Exercise<{
|
|
252
255
|
a: number;
|
|
253
256
|
b: number;
|
|
254
257
|
}> | import("./exercises/exercise").Exercise<{
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,yBAAyB,CAAC;AAEjC,QAAA,MAAM,aAAa
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,yBAAyB,CAAC;AAEjC,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AAC,EAAE,2BAA2B;IActC,aAAa;;;;;;;;;IAMb,cAAc;IAId,SAAS;
|
|
1
|
+
{"version":3,"file":"equationSolutionNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/equations/equationSolutionNode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D,KAAK,2BAA2B,GAAG;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,WAAW,CAAA;CAAE,CAAC;AAC7E,qBAAa,oBAAqB,YAAW,IAAI;IAC/C,IAAI,EAAE,QAAQ,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,eAAe,CAAC;IAC9B,IAAI,CAAC,EAAE,WAAW,CAAC;gBAEjB,YAAY,EAAE,eAAe,EAC7B,MAAM,CAAC,EAAE,2BAA2B;IActC,aAAa;;;;;;;;;IAMb,cAAc;IAId,SAAS;IAkBT,iBAAiB,CAAC,IAAI,CAAC,EAAE,WAAW;IAQpC,YAAY;IAGZ,QAAQ;IAGR,KAAK;CAGN"}
|
|
@@ -34,6 +34,7 @@ class EquationSolutionNode {
|
|
|
34
34
|
else {
|
|
35
35
|
const solTex = this.solutionsSet.elements.map((e) => e.toTex());
|
|
36
36
|
res.push(solTex.map((e) => `${this.variable}=${e}`).join("\\text{ ou }"));
|
|
37
|
+
res.push(solTex.map((e) => `${this.variable}=${e}`).join(";"));
|
|
37
38
|
if (this.opts?.allowRawRightChildAsSolution) {
|
|
38
39
|
res.push(solTex.join(";"));
|
|
39
40
|
res.push(solTex.join("\\text{ ou }"));
|