math-exercises 2.2.85 → 2.2.86
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/percent/averageEvolutionRate.d.ts.map +1 -1
- package/lib/exercises/math/percent/averageEvolutionRate.js +4 -0
- package/lib/exercises/math/sets/intervals/inequalityToInterval.d.ts.map +1 -1
- package/lib/exercises/math/sets/intervals/inequalityToInterval.js +14 -5
- package/lib/exercises/math/sets/intervals/intervalToInequality.d.ts.map +1 -1
- package/lib/exercises/math/sets/intervals/intervalToInequality.js +2 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"averageEvolutionRate.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/percent/averageEvolutionRate.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,QAAQ,EAYT,MAAM,gBAAgB,CAAC;AAGxB,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAgGF,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,WAAW,
|
|
1
|
+
{"version":3,"file":"averageEvolutionRate.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/percent/averageEvolutionRate.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,QAAQ,EAYT,MAAM,gBAAgB,CAAC;AAGxB,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAgGF,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,WAAW,CAkBtD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inequalityToInterval.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sets/intervals/inequalityToInterval.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"inequalityToInterval.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sets/intervals/inequalityToInterval.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,0BAA0B,CAAC;AAQlC,OAAO,EAGL,uBAAuB,EACxB,MAAM,oCAAoC,CAAC;AAI5C,KAAK,WAAW,GAAG;IAIjB,mBAAmB,EAAE,uBAAuB,CAAC;CAC9C,CAAC;AAwGF,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,WAAW,CAiBtD,CAAC"}
|
|
@@ -26,17 +26,24 @@ const rebuildIdentifiers = (oldIds) => {
|
|
|
26
26
|
const interval = new intervalNode_1.IntervalNode(a, b, closure);
|
|
27
27
|
return { intervalIdentifiers: interval.toIdentifiers() };
|
|
28
28
|
};
|
|
29
|
-
const
|
|
30
|
-
const interval = intervalNode_1.IntervalNodeConstructor.
|
|
29
|
+
const getInstruction = (identifiers) => {
|
|
30
|
+
const interval = intervalNode_1.IntervalNodeConstructor.fromIdentifiers(identifiers.intervalIdentifiers);
|
|
31
31
|
const inequality = interval.toInequality();
|
|
32
|
+
return `Soit $${inequality.toTex()}$. Traduire cette inégalité en appartenance à un intervalle.`;
|
|
33
|
+
};
|
|
34
|
+
const getAnswer = (identifiers) => {
|
|
35
|
+
const interval = intervalNode_1.IntervalNodeConstructor.fromIdentifiers(identifiers.intervalIdentifiers);
|
|
32
36
|
const answer = `x\\in\\ ${interval.toTex()}`;
|
|
33
|
-
|
|
37
|
+
return answer;
|
|
38
|
+
};
|
|
39
|
+
const getInequalityToIntervalQuestion = () => {
|
|
40
|
+
const interval = intervalNode_1.IntervalNodeConstructor.random();
|
|
34
41
|
const identifiers = {
|
|
35
42
|
intervalIdentifiers: interval.toIdentifiers(),
|
|
36
43
|
};
|
|
37
44
|
const question = {
|
|
38
|
-
answer,
|
|
39
|
-
instruction:
|
|
45
|
+
answer: getAnswer(identifiers),
|
|
46
|
+
instruction: getInstruction(identifiers),
|
|
40
47
|
keys: [
|
|
41
48
|
"x",
|
|
42
49
|
"belongs",
|
|
@@ -89,4 +96,6 @@ exports.inequalityToInterval = {
|
|
|
89
96
|
isAnswerValid,
|
|
90
97
|
subject: "Mathématiques",
|
|
91
98
|
rebuildIdentifiers,
|
|
99
|
+
getAnswer,
|
|
100
|
+
getInstruction,
|
|
92
101
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"intervalToInequality.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sets/intervals/intervalToInequality.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,0BAA0B,CAAC;AAWlC,OAAO,EAGL,uBAAuB,EACxB,MAAM,oCAAoC,CAAC;AAK5C,KAAK,WAAW,GAAG;IAIjB,mBAAmB,EAAE,uBAAuB,CAAC;CAC9C,CAAC;AAsFF,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,WAAW,
|
|
1
|
+
{"version":3,"file":"intervalToInequality.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sets/intervals/intervalToInequality.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,0BAA0B,CAAC;AAWlC,OAAO,EAGL,uBAAuB,EACxB,MAAM,oCAAoC,CAAC;AAK5C,KAAK,WAAW,GAAG;IAIjB,mBAAmB,EAAE,uBAAuB,CAAC;CAC9C,CAAC;AAsFF,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,WAAW,CAiBtD,CAAC"}
|