math-exercises 1.3.61 → 1.3.64
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/calcul/arithmetics/primeNumbers.js +1 -1
- package/lib/exercises/calcul/fractions/fractionAndIntegerDivision.d.ts.map +1 -1
- package/lib/exercises/calcul/fractions/fractionAndIntegerDivision.js +8 -2
- package/lib/exercises/calcul/fractions/fractionAndIntegerProduct.d.ts.map +1 -1
- package/lib/exercises/calcul/fractions/fractionAndIntegerProduct.js +8 -2
- package/lib/exercises/calcul/fractions/fractionAndIntegerSum.d.ts.map +1 -1
- package/lib/exercises/calcul/fractions/fractionAndIntegerSum.js +13 -1
- package/lib/exercises/calcul/fractions/fractionsDivision.d.ts.map +1 -1
- package/lib/exercises/calcul/fractions/fractionsDivision.js +7 -1
- package/lib/exercises/calcul/fractions/fractionsProduct.d.ts.map +1 -1
- package/lib/exercises/calcul/fractions/fractionsSum.d.ts.map +1 -1
- package/lib/exercises/calcul/fractions/fractionsSum.js +7 -1
- package/lib/exercises/calculLitteral/equation/equationSimpleSquare.js +2 -2
- package/lib/exercises/calculLitteral/equation/expEquation.js +2 -2
- package/lib/exercises/calculLitteral/equation/fractionEquation.js +4 -4
- package/lib/exercises/calculLitteral/equation/logEquation.js +2 -2
- package/lib/exercises/calculLitteral/equation/multiplicationEquation.js +3 -3
- package/lib/exercises/calculLitteral/inequations/firstDegreeInequationsType0.js +3 -3
- package/lib/exercises/calculLitteral/inequations/firstDegreeInequationsType1.js +3 -3
- package/lib/exercises/calculLitteral/inequations/firstDegreeInequationsType2.js +3 -3
- package/lib/exercises/calculLitteral/inequations/firstDegreeInequationsType3.js +3 -3
- package/lib/exercises/calculLitteral/simplifying/expSimplifiying.js +2 -2
- package/lib/exercises/derivation/derivative/expDerivativeOne.js +2 -2
- package/lib/exercises/derivation/derivative/expDerivativeThree.js +2 -2
- package/lib/exercises/derivation/derivative/expDerivativeTwo.js +2 -2
- package/lib/exercises/derivation/derivative/thirdDegreeFunctionVariation.js +1 -1
- package/lib/exercises/equaDiff/equaDiffGeneralForme.js +2 -2
- package/lib/exercises/equaDiff/equaDiffGeneralFormeWithIC.js +2 -2
- package/lib/exercises/exercise.d.ts +2 -1
- package/lib/exercises/exercise.d.ts.map +1 -1
- package/lib/exercises/exercises.d.ts.map +1 -1
- package/lib/exercises/exercises.js +9 -0
- package/lib/exercises/functions/basics/inverseImageFunctionGeogebra.js +1 -1
- package/lib/exercises/functions/cube/cubicEquation.js +3 -3
- package/lib/exercises/functions/trinoms/rootsFromFactorizedForm.js +5 -5
- package/lib/exercises/geometry/euclidean/pythagore.js +1 -1
- package/lib/exercises/geometry/euclidean/thales.js +2 -2
- package/lib/exercises/percent/globalPercent.js +1 -1
- package/lib/exercises/percent/reciprocalPercentage.js +1 -1
- package/lib/exercises/primitve/constantPrimitive.js +1 -1
- package/lib/exercises/primitve/exponentialPrimitive.js +3 -3
- package/lib/exercises/primitve/logarithmePrimitive.js +1 -1
- package/lib/exercises/primitve/sinCosPrimitive.js +1 -1
- package/lib/exercises/sets/intervals/inequalityToInterval.d.ts +4 -0
- package/lib/exercises/sets/intervals/inequalityToInterval.d.ts.map +1 -0
- package/lib/exercises/sets/intervals/inequalityToInterval.js +136 -0
- package/lib/exercises/sets/intervals/intervalBelonging.d.ts +4 -0
- package/lib/exercises/sets/intervals/intervalBelonging.d.ts.map +1 -0
- package/lib/exercises/sets/intervals/intervalBelonging.js +69 -0
- package/lib/exercises/sets/intervals/intervalsIntersection.d.ts +4 -0
- package/lib/exercises/sets/intervals/intervalsIntersection.d.ts.map +1 -0
- package/lib/exercises/sets/intervals/intervalsIntersection.js +67 -0
- package/lib/exercises/sets/intervals/intervalsUnion.d.ts +4 -0
- package/lib/exercises/sets/intervals/intervalsUnion.d.ts.map +1 -0
- package/lib/exercises/sets/intervals/intervalsUnion.js +66 -0
- package/lib/exercises/sets/setBelonging.d.ts +4 -0
- package/lib/exercises/sets/setBelonging.d.ts.map +1 -0
- package/lib/exercises/sets/setBelonging.js +89 -0
- package/lib/exercises/squareRoots/squareRootEquation.js +4 -4
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -2
- package/lib/math/geometry/droite.js +1 -1
- package/lib/math/geometry/point.js +1 -1
- package/lib/math/geometry/triangles.js +4 -4
- package/lib/math/polynomials/affine.d.ts.map +1 -1
- package/lib/math/polynomials/affine.js +2 -0
- package/lib/math/polynomials/polynomial.js +1 -2
- package/lib/math/polynomials/trinom.d.ts.map +1 -1
- package/lib/math/polynomials/trinom.js +9 -3
- package/lib/math/sets/intervals/intervals.d.ts +14 -0
- package/lib/math/sets/intervals/intervals.d.ts.map +1 -1
- package/lib/math/sets/intervals/intervals.js +156 -13
- package/lib/math/sets/mathSet.d.ts +5 -4
- package/lib/math/sets/mathSet.d.ts.map +1 -1
- package/lib/math/sets/mathSet.js +1 -0
- package/lib/math/sets/mathSetInterface.d.ts +2 -1
- package/lib/math/sets/mathSetInterface.d.ts.map +1 -1
- package/lib/server.js +4 -5
- package/lib/tree/nodes/functions/expNode.d.ts.map +1 -1
- package/lib/tree/nodes/functions/expNode.js +5 -1
- package/lib/tree/nodes/functions/oppositeNode.js +1 -1
- package/lib/tree/nodes/operators/addNode.js +1 -1
- package/lib/tree/nodes/operators/divideNode.js +3 -2
- package/lib/tree/nodes/operators/equalNode.js +1 -1
- package/lib/tree/nodes/operators/multiplyNode.js +4 -3
- package/lib/tree/nodes/operators/powerNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/powerNode.js +7 -3
- package/lib/tree/nodes/operators/substractNode.js +1 -1
- package/package.json +2 -2
|
@@ -42,7 +42,7 @@ function getPrimeNumbers() {
|
|
|
42
42
|
}
|
|
43
43
|
const prod = prodNumbers(choosenNumbers);
|
|
44
44
|
choosenNumbers = choosenNumbers.sort((a, b) => a - b);
|
|
45
|
-
let answer = `${prod}
|
|
45
|
+
let answer = `${prod}=${choosenNumbers[0]}`;
|
|
46
46
|
for (let i = 1; i < choosenNumbers.length; i++) {
|
|
47
47
|
answer += `\\times` + choosenNumbers[i];
|
|
48
48
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fractionAndIntegerDivision.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calcul/fractions/fractionAndIntegerDivision.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAe,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAU3E,eAAO,MAAM,0BAA0B,EAAE,QAYxC,CAAC;AAEF,wBAAgB,6BAA6B,IAAI,QAAQ,
|
|
1
|
+
{"version":3,"file":"fractionAndIntegerDivision.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calcul/fractions/fractionAndIntegerDivision.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAe,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAU3E,eAAO,MAAM,0BAA0B,EAAE,QAYxC,CAAC;AAEF,wBAAgB,6BAA6B,IAAI,QAAQ,CA+DxD"}
|
|
@@ -24,8 +24,8 @@ exports.fractionAndIntegerDivision = {
|
|
|
24
24
|
};
|
|
25
25
|
function getFractionAndIntegerDivision() {
|
|
26
26
|
const rational = rational_1.RationalConstructor.randomIrreductible();
|
|
27
|
-
const integer = new integer_1.Integer((0, randint_1.randint)(-10, 11, [0]));
|
|
28
27
|
const integerFirst = (0, coinFlip_1.coinFlip)();
|
|
28
|
+
const integer = integerFirst ? new integer_1.Integer((0, randint_1.randint)(-10, 11, [0])) : new integer_1.Integer((0, randint_1.randint)(-10, 11, [0, 1]));
|
|
29
29
|
const statementTree = integerFirst
|
|
30
30
|
? new divideNode_1.DivideNode(integer.toTree(), rational.toTree())
|
|
31
31
|
: new divideNode_1.DivideNode(rational.toTree(), integer.toTree());
|
|
@@ -38,7 +38,13 @@ function getFractionAndIntegerDivision() {
|
|
|
38
38
|
isRightAnswer: true,
|
|
39
39
|
format: 'tex',
|
|
40
40
|
});
|
|
41
|
-
|
|
41
|
+
res.push({
|
|
42
|
+
id: (0, uuid_1.v4)() + '',
|
|
43
|
+
statement: !integerFirst ? integer.divide(rational).toTree().toTex() : rational.divide(integer).toTree().toTex(),
|
|
44
|
+
isRightAnswer: false,
|
|
45
|
+
format: 'tex',
|
|
46
|
+
});
|
|
47
|
+
for (let i = 0; i < n - 2; i++) {
|
|
42
48
|
let isDuplicate;
|
|
43
49
|
let proposition;
|
|
44
50
|
do {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fractionAndIntegerProduct.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calcul/fractions/fractionAndIntegerProduct.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAe,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAS3E,eAAO,MAAM,yBAAyB,EAAE,QAYvC,CAAC;AAEF,wBAAgB,4BAA4B,IAAI,QAAQ,
|
|
1
|
+
{"version":3,"file":"fractionAndIntegerProduct.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calcul/fractions/fractionAndIntegerProduct.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAe,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAS3E,eAAO,MAAM,yBAAyB,EAAE,QAYvC,CAAC;AAEF,wBAAgB,4BAA4B,IAAI,QAAQ,CAuDvD"}
|
|
@@ -23,7 +23,7 @@ exports.fractionAndIntegerProduct = {
|
|
|
23
23
|
};
|
|
24
24
|
function getFractionAndIntegerProduct() {
|
|
25
25
|
const rational = rational_1.RationalConstructor.randomIrreductible();
|
|
26
|
-
const integer = new integer_1.Integer((0, randint_1.randint)(-10, 11, [0]));
|
|
26
|
+
const integer = new integer_1.Integer((0, randint_1.randint)(-10, 11, [0, 1]));
|
|
27
27
|
const statementTree = new multiplyNode_1.MultiplyNode(rational.toTree(), integer.toTree());
|
|
28
28
|
statementTree.shuffle();
|
|
29
29
|
const answerTree = rational.multiply(integer).toTree();
|
|
@@ -35,7 +35,13 @@ function getFractionAndIntegerProduct() {
|
|
|
35
35
|
isRightAnswer: true,
|
|
36
36
|
format: 'tex',
|
|
37
37
|
});
|
|
38
|
-
|
|
38
|
+
res.push({
|
|
39
|
+
id: (0, uuid_1.v4)() + '',
|
|
40
|
+
statement: new rational_1.Rational(integer.value * rational.num, integer.value * rational.denum).toTex(),
|
|
41
|
+
isRightAnswer: false,
|
|
42
|
+
format: 'tex',
|
|
43
|
+
});
|
|
44
|
+
for (let i = 0; i < n - 2; i++) {
|
|
39
45
|
let isDuplicate;
|
|
40
46
|
let proposition;
|
|
41
47
|
do {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fractionAndIntegerSum.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calcul/fractions/fractionAndIntegerSum.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAe,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAS3E,eAAO,MAAM,qBAAqB,EAAE,QAYnC,CAAC;AAEF,wBAAgB,wBAAwB,IAAI,QAAQ,
|
|
1
|
+
{"version":3,"file":"fractionAndIntegerSum.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calcul/fractions/fractionAndIntegerSum.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAe,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAS3E,eAAO,MAAM,qBAAqB,EAAE,QAYnC,CAAC;AAEF,wBAAgB,wBAAwB,IAAI,QAAQ,CA6DnD"}
|
|
@@ -35,7 +35,19 @@ function getFractionAndIntegerSum() {
|
|
|
35
35
|
isRightAnswer: true,
|
|
36
36
|
format: 'tex',
|
|
37
37
|
});
|
|
38
|
-
|
|
38
|
+
res.push({
|
|
39
|
+
id: (0, uuid_1.v4)() + '',
|
|
40
|
+
statement: new rational_1.Rational(integer.value + rational.num, rational.denum).toTex(),
|
|
41
|
+
isRightAnswer: false,
|
|
42
|
+
format: 'tex',
|
|
43
|
+
});
|
|
44
|
+
res.push({
|
|
45
|
+
id: (0, uuid_1.v4)() + '',
|
|
46
|
+
statement: new rational_1.Rational(integer.value + rational.num, integer.value + rational.denum).toTex(),
|
|
47
|
+
isRightAnswer: false,
|
|
48
|
+
format: 'tex',
|
|
49
|
+
});
|
|
50
|
+
for (let i = 0; i < n - 3; i++) {
|
|
39
51
|
let isDuplicate;
|
|
40
52
|
let proposition;
|
|
41
53
|
do {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fractionsDivision.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calcul/fractions/fractionsDivision.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAe,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAO3E,eAAO,MAAM,iBAAiB,EAAE,QAY/B,CAAC;AAEF,wBAAgB,oBAAoB,IAAI,QAAQ,
|
|
1
|
+
{"version":3,"file":"fractionsDivision.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calcul/fractions/fractionsDivision.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAe,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAO3E,eAAO,MAAM,iBAAiB,EAAE,QAY/B,CAAC;AAEF,wBAAgB,oBAAoB,IAAI,QAAQ,CAqD/C"}
|
|
@@ -32,7 +32,13 @@ function getFractionsDivision() {
|
|
|
32
32
|
isRightAnswer: true,
|
|
33
33
|
format: 'tex',
|
|
34
34
|
});
|
|
35
|
-
|
|
35
|
+
res.push({
|
|
36
|
+
id: (0, uuid_1.v4)() + '',
|
|
37
|
+
statement: rational.multiply(rational2).toTree().toTex(),
|
|
38
|
+
isRightAnswer: false,
|
|
39
|
+
format: 'tex',
|
|
40
|
+
});
|
|
41
|
+
for (let i = 0; i < n - 2; i++) {
|
|
36
42
|
let isDuplicate;
|
|
37
43
|
let proposition;
|
|
38
44
|
do {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fractionsProduct.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calcul/fractions/fractionsProduct.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAe,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAO3E,eAAO,MAAM,gBAAgB,EAAE,QAY9B,CAAC;AAEF,wBAAgB,mBAAmB,IAAI,QAAQ,
|
|
1
|
+
{"version":3,"file":"fractionsProduct.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calcul/fractions/fractionsProduct.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAe,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAO3E,eAAO,MAAM,gBAAgB,EAAE,QAY9B,CAAC;AAEF,wBAAgB,mBAAmB,IAAI,QAAQ,CA8C9C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fractionsSum.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calcul/fractions/fractionsSum.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAe,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAO3E,eAAO,MAAM,YAAY,EAAE,QAY1B,CAAC;AAEF,wBAAgB,eAAe,IAAI,QAAQ,
|
|
1
|
+
{"version":3,"file":"fractionsSum.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calcul/fractions/fractionsSum.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAe,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAO3E,eAAO,MAAM,YAAY,EAAE,QAY1B,CAAC;AAEF,wBAAgB,eAAe,IAAI,QAAQ,CAsD1C"}
|
|
@@ -32,7 +32,13 @@ function getFractionsSum() {
|
|
|
32
32
|
isRightAnswer: true,
|
|
33
33
|
format: 'tex',
|
|
34
34
|
});
|
|
35
|
-
|
|
35
|
+
propositions.push({
|
|
36
|
+
id: (0, uuid_1.v4)(),
|
|
37
|
+
statement: new rational_1.Rational(rational.num + rational2.num, rational.denum + rational2.denum).toTex(),
|
|
38
|
+
isRightAnswer: false,
|
|
39
|
+
format: 'tex',
|
|
40
|
+
});
|
|
41
|
+
for (let i = 0; i < n - 2; i++) {
|
|
36
42
|
let isDuplicate;
|
|
37
43
|
let proposition;
|
|
38
44
|
do {
|
|
@@ -43,11 +43,11 @@ function getEquationSimpleSquare() {
|
|
|
43
43
|
if (randNbr < 0)
|
|
44
44
|
answer = `S=\\emptyset`;
|
|
45
45
|
else if (ans === Math.floor(ans))
|
|
46
|
-
answer = `S=\\left\\{
|
|
46
|
+
answer = `S=\\left\\{-${ans};${ans}\\right\\}`;
|
|
47
47
|
else {
|
|
48
48
|
const factor = higherFactor(randNbr);
|
|
49
49
|
const radicand = randNbr / factor ** 2;
|
|
50
|
-
answer = `S=\\left\\{
|
|
50
|
+
answer = `S=\\left\\{-${factor === 1 ? '' : factor}\\sqrt{${radicand}};${factor === 1 ? '' : factor}\\sqrt{${radicand}}\\right\\}`;
|
|
51
51
|
}
|
|
52
52
|
const getPropositions = (n) => {
|
|
53
53
|
const res = [];
|
|
@@ -22,7 +22,7 @@ exports.expEquation = {
|
|
|
22
22
|
sections: ['Exponentielle'],
|
|
23
23
|
isSingleStep: false,
|
|
24
24
|
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getExpEquation, nb),
|
|
25
|
-
keys: ['exp', 'ln'],
|
|
25
|
+
keys: ['x', 'equal', 'epower', 'exp', 'ln'],
|
|
26
26
|
qcmTimer: 60,
|
|
27
27
|
freeTimer: 60,
|
|
28
28
|
};
|
|
@@ -60,7 +60,7 @@ function getExpEquation() {
|
|
|
60
60
|
const question = {
|
|
61
61
|
instruction: `Résoudre l'équation $${equation.toTex()}$.`,
|
|
62
62
|
answer: answer.toTex(),
|
|
63
|
-
keys: ['exp', 'ln'],
|
|
63
|
+
keys: ['x', 'equal', 'epower', 'exp', 'ln'],
|
|
64
64
|
getPropositions,
|
|
65
65
|
answerFormat: 'tex',
|
|
66
66
|
};
|
|
@@ -31,8 +31,8 @@ function getFractionEquation() {
|
|
|
31
31
|
const polynome1 = new polynomial_1.Polynomial([b, a]);
|
|
32
32
|
const polynome2 = new polynomial_1.Polynomial([d, c]);
|
|
33
33
|
const answer = -d / c === -b / a
|
|
34
|
-
? `S
|
|
35
|
-
: `S
|
|
34
|
+
? `S=\\emptyset`
|
|
35
|
+
: `S=\\left\\{${(0, simplify_1.simplifyNode)(new fractionNode_1.FractionNode(new numberNode_1.NumberNode(-b), new numberNode_1.NumberNode(a))).toTex()}\\right\\}`;
|
|
36
36
|
const getPropositions = (n) => {
|
|
37
37
|
const res = [];
|
|
38
38
|
res.push({
|
|
@@ -50,8 +50,8 @@ function getFractionEquation() {
|
|
|
50
50
|
const c = (0, randint_1.randint)(-9, 10, [0]);
|
|
51
51
|
const d = (0, randint_1.randint)(-9, 10, [0]);
|
|
52
52
|
const wrongAnswer = -d / c === -b / a
|
|
53
|
-
? `S
|
|
54
|
-
: `S
|
|
53
|
+
? `S=\\emptyset`
|
|
54
|
+
: `S=\\left\\{${(0, simplify_1.simplifyNode)(new fractionNode_1.FractionNode(new numberNode_1.NumberNode(-b), new numberNode_1.NumberNode(a))).toTex()}\\right\\}`;
|
|
55
55
|
proposition = {
|
|
56
56
|
id: (0, uuid_1.v4)() + '',
|
|
57
57
|
statement: wrongAnswer,
|
|
@@ -22,7 +22,7 @@ exports.logEquation = {
|
|
|
22
22
|
sections: ['Logarithme népérien'],
|
|
23
23
|
isSingleStep: false,
|
|
24
24
|
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getLnEquation, nb),
|
|
25
|
-
keys: ['ln', 'exp'],
|
|
25
|
+
keys: ['x', 'equal', 'ln', 'epower', 'exp'],
|
|
26
26
|
qcmTimer: 60,
|
|
27
27
|
freeTimer: 60,
|
|
28
28
|
};
|
|
@@ -60,7 +60,7 @@ function getLnEquation() {
|
|
|
60
60
|
const question = {
|
|
61
61
|
instruction: `Résoudre l'équation $${equation.toTex()}$.`,
|
|
62
62
|
answer: answer.toTex(),
|
|
63
|
-
keys: ['ln', 'exp'],
|
|
63
|
+
keys: ['x', 'equal', 'ln', 'epower', 'exp'],
|
|
64
64
|
getPropositions,
|
|
65
65
|
answerFormat: 'tex',
|
|
66
66
|
};
|
|
@@ -33,7 +33,7 @@ function getMultiplicationEquation() {
|
|
|
33
33
|
} while (a / c === b / d);
|
|
34
34
|
const polynome1 = new polynomial_1.Polynomial([b, a]);
|
|
35
35
|
const polynome2 = new polynomial_1.Polynomial([d, c]);
|
|
36
|
-
const answer = `S
|
|
36
|
+
const answer = `S=\\left\\{${(0, simplify_1.simplifyNode)(new fractionNode_1.FractionNode(new numberNode_1.NumberNode(-b), new numberNode_1.NumberNode(a))).toTex()};${(0, simplify_1.simplifyNode)(new fractionNode_1.FractionNode(new numberNode_1.NumberNode(-d), new numberNode_1.NumberNode(c))).toTex()}\\right\\}`;
|
|
37
37
|
const getPropositions = (n) => {
|
|
38
38
|
const res = [];
|
|
39
39
|
res.push({
|
|
@@ -54,7 +54,7 @@ function getMultiplicationEquation() {
|
|
|
54
54
|
} while (a / c === b / d);
|
|
55
55
|
const polynome1 = new polynomial_1.Polynomial([b, a]);
|
|
56
56
|
const polynome2 = new polynomial_1.Polynomial([d, c]);
|
|
57
|
-
const wrongAnswer = `S
|
|
57
|
+
const wrongAnswer = `S=\\left\\{${(0, simplify_1.simplifyNode)(new fractionNode_1.FractionNode(new numberNode_1.NumberNode(-b), new numberNode_1.NumberNode(a))).toTex()};${(0, simplify_1.simplifyNode)(new fractionNode_1.FractionNode(new numberNode_1.NumberNode(-d), new numberNode_1.NumberNode(c))).toTex()}\\right\\}`;
|
|
58
58
|
proposition = {
|
|
59
59
|
id: (0, uuid_1.v4)() + '',
|
|
60
60
|
statement: wrongAnswer,
|
|
@@ -69,7 +69,7 @@ function getMultiplicationEquation() {
|
|
|
69
69
|
};
|
|
70
70
|
const question = {
|
|
71
71
|
startStatement: `(${polynome1.toTex()})(${polynome2.toTex()}) = 0`,
|
|
72
|
-
answer: `S
|
|
72
|
+
answer: `S=\\left\\{${(0, simplify_1.simplifyNode)(new fractionNode_1.FractionNode(new numberNode_1.NumberNode(-b), new numberNode_1.NumberNode(a))).toTex()};${(0, simplify_1.simplifyNode)(new fractionNode_1.FractionNode(new numberNode_1.NumberNode(-d), new numberNode_1.NumberNode(c))).toTex()}\\right\\}`,
|
|
73
73
|
keys: ['x', 'S', 'equal', 'lbrace', 'rbrace', 'semicolon', 'ou'],
|
|
74
74
|
getPropositions,
|
|
75
75
|
answerFormat: 'tex',
|
|
@@ -24,9 +24,9 @@ function getFirstDegreeInequationsQuestion() {
|
|
|
24
24
|
const affine = new affine_1.Affine(1, (0, randint_1.randint)(-10, 11));
|
|
25
25
|
const c = (0, randint_1.randint)(-10, 11);
|
|
26
26
|
const result = c - affine.b;
|
|
27
|
-
const ineqType = (0, random_1.random)(['\\
|
|
28
|
-
const invIneqType = ineqType === '<' ? '>' : ineqType === '>' ? '<' : ineqType === '\\
|
|
29
|
-
const answer = `x
|
|
27
|
+
const ineqType = (0, random_1.random)(['\\le', '<', '\\ge', '>']);
|
|
28
|
+
const invIneqType = ineqType === '<' ? '>' : ineqType === '>' ? '<' : ineqType === '\\le' ? '\\ge' : '\\le';
|
|
29
|
+
const answer = `x${ineqType}${result}`;
|
|
30
30
|
const getPropositions = (n) => {
|
|
31
31
|
const res = [];
|
|
32
32
|
res.push({
|
|
@@ -25,9 +25,9 @@ function getFirstDegreeInequationsQuestion() {
|
|
|
25
25
|
const affine = new affine_1.Affine((0, randint_1.randint)(-10, 10, [0, 1]), 0);
|
|
26
26
|
const b = (0, randint_1.randint)(-10, 11);
|
|
27
27
|
const result = new rational_1.Rational(b, affine.a).simplify().toTree().toTex();
|
|
28
|
-
const ineqType = (0, random_1.random)(['\\
|
|
29
|
-
const invIneqType = ineqType === '<' ? '>' : ineqType === '>' ? '<' : ineqType === '\\
|
|
30
|
-
const answer = `x
|
|
28
|
+
const ineqType = (0, random_1.random)(['\\le', '<', '\\ge', '>']);
|
|
29
|
+
const invIneqType = ineqType === '<' ? '>' : ineqType === '>' ? '<' : ineqType === '\\le' ? '\\ge' : '\\le';
|
|
30
|
+
const answer = `x${affine.a > 0 ? ineqType : invIneqType}${result}`;
|
|
31
31
|
const getPropositions = (n) => {
|
|
32
32
|
const res = [];
|
|
33
33
|
res.push({
|
|
@@ -25,9 +25,9 @@ function getFirstDegreeInequationsQuestion() {
|
|
|
25
25
|
const affine = new affine_1.Affine((0, randint_1.randint)(-10, 10, [0, 1]), (0, randint_1.randint)(-10, 10, [0]));
|
|
26
26
|
const c = (0, randint_1.randint)(-10, 11);
|
|
27
27
|
const result = new rational_1.Rational(c - affine.b, affine.a).simplify().toTree().toTex();
|
|
28
|
-
const ineqType = (0, random_1.random)(['\\
|
|
29
|
-
const invIneqType = ineqType === '<' ? '>' : ineqType === '>' ? '<' : ineqType === '\\
|
|
30
|
-
const answer = `x
|
|
28
|
+
const ineqType = (0, random_1.random)(['\\le', '<', '\\ge', '>']);
|
|
29
|
+
const invIneqType = ineqType === '<' ? '>' : ineqType === '>' ? '<' : ineqType === '\\le' ? '\\ge' : '\\le';
|
|
30
|
+
const answer = `x${affine.a > 0 ? ineqType : invIneqType}${result}`;
|
|
31
31
|
const getPropositions = (n) => {
|
|
32
32
|
const res = [];
|
|
33
33
|
res.push({
|
|
@@ -26,9 +26,9 @@ function getFirstDegreeInequationsQuestion() {
|
|
|
26
26
|
const affine2 = new affine_1.Affine((0, randint_1.randint)(-10, 10, [0, affine1.a]), (0, randint_1.randint)(-10, 10));
|
|
27
27
|
const result = new rational_1.Rational(affine2.b - affine1.b, affine1.a - affine2.a).simplify().toTree().toTex();
|
|
28
28
|
const coeff = affine1.a - affine2.a;
|
|
29
|
-
const ineqType = (0, random_1.random)(['\\
|
|
30
|
-
const invIneqType = ineqType === '<' ? '>' : ineqType === '>' ? '<' : ineqType === '\\
|
|
31
|
-
const answer = `x
|
|
29
|
+
const ineqType = (0, random_1.random)(['\\le', '<', '\\ge', '>']);
|
|
30
|
+
const invIneqType = ineqType === '<' ? '>' : ineqType === '>' ? '<' : ineqType === '\\le' ? '\\ge' : '\\le';
|
|
31
|
+
const answer = `x${coeff > 0 ? ineqType : invIneqType}${result}`;
|
|
32
32
|
const getPropositions = (n) => {
|
|
33
33
|
const res = [];
|
|
34
34
|
res.push({
|
|
@@ -21,7 +21,7 @@ exports.expSimplifiying = {
|
|
|
21
21
|
sections: ['Exponentielle'],
|
|
22
22
|
isSingleStep: false,
|
|
23
23
|
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getExpSimplifiying, nb),
|
|
24
|
-
keys: ['exp'],
|
|
24
|
+
keys: ['x', 'epower', 'exp'],
|
|
25
25
|
qcmTimer: 60,
|
|
26
26
|
freeTimer: 60,
|
|
27
27
|
};
|
|
@@ -89,7 +89,7 @@ function getExpSimplifiying() {
|
|
|
89
89
|
const question = {
|
|
90
90
|
instruction: `Simplifier l'expression $${expression.toTex()}$.`,
|
|
91
91
|
answer: simplifiedExpression.toTex(),
|
|
92
|
-
keys: ['exp'],
|
|
92
|
+
keys: ['x', 'epower', 'exp'],
|
|
93
93
|
getPropositions,
|
|
94
94
|
answerFormat: 'tex',
|
|
95
95
|
};
|
|
@@ -19,7 +19,7 @@ exports.expDerivativeOne = {
|
|
|
19
19
|
sections: ['Dérivation', 'Exponentielle'],
|
|
20
20
|
isSingleStep: false,
|
|
21
21
|
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getExpDerivative, nb),
|
|
22
|
-
keys: ['exp'],
|
|
22
|
+
keys: ['x', 'epower', 'exp'],
|
|
23
23
|
qcmTimer: 60,
|
|
24
24
|
freeTimer: 60,
|
|
25
25
|
};
|
|
@@ -58,7 +58,7 @@ function getExpDerivative() {
|
|
|
58
58
|
instruction: `Déterminer la dérivée de la fonction $f(x) = ${myfunction.toTex()}$.`,
|
|
59
59
|
startStatement: "f'(x)",
|
|
60
60
|
answer: derivative.toTex(),
|
|
61
|
-
keys: ['exp'],
|
|
61
|
+
keys: ['x', 'epower', 'exp'],
|
|
62
62
|
getPropositions,
|
|
63
63
|
answerFormat: 'tex',
|
|
64
64
|
};
|
|
@@ -18,7 +18,7 @@ exports.expDerivativeThree = {
|
|
|
18
18
|
sections: ['Dérivation', 'Exponentielle'],
|
|
19
19
|
isSingleStep: false,
|
|
20
20
|
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getExpDerivativeThree, nb),
|
|
21
|
-
keys: ['exp'],
|
|
21
|
+
keys: ['x', 'epower', 'exp'],
|
|
22
22
|
qcmTimer: 60,
|
|
23
23
|
freeTimer: 60,
|
|
24
24
|
};
|
|
@@ -57,7 +57,7 @@ function getExpDerivativeThree() {
|
|
|
57
57
|
instruction: `Déterminer la dérivée de la fonction $f(x) = ${myfunction.toTex()}$.`,
|
|
58
58
|
startStatement: "f'(x)",
|
|
59
59
|
answer: derivative.toTex(),
|
|
60
|
-
keys: ['exp'],
|
|
60
|
+
keys: ['x', 'epower', 'exp'],
|
|
61
61
|
getPropositions,
|
|
62
62
|
answerFormat: 'tex',
|
|
63
63
|
};
|
|
@@ -20,7 +20,7 @@ exports.expDerivativeTwo = {
|
|
|
20
20
|
sections: ['Dérivation', 'Exponentielle'],
|
|
21
21
|
isSingleStep: false,
|
|
22
22
|
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getExpDerivative, nb),
|
|
23
|
-
keys: ['exp'],
|
|
23
|
+
keys: ['x', 'epower', 'exp'],
|
|
24
24
|
qcmTimer: 60,
|
|
25
25
|
freeTimer: 60,
|
|
26
26
|
};
|
|
@@ -58,7 +58,7 @@ function getExpDerivative() {
|
|
|
58
58
|
instruction: `Déterminer la dérivée de la fonction $f(x) = ${myfunction.toTex()}$.`,
|
|
59
59
|
startStatement: "f'(x)",
|
|
60
60
|
answer: derivative.toTex(),
|
|
61
|
-
keys: ['exp'],
|
|
61
|
+
keys: ['x', 'epower', 'exp'],
|
|
62
62
|
getPropositions,
|
|
63
63
|
answerFormat: 'tex',
|
|
64
64
|
};
|
|
@@ -32,7 +32,7 @@ function getThirdDegreeFunctionVariation() {
|
|
|
32
32
|
(coin < 0 ? 'négative ?' : 'positive ?');
|
|
33
33
|
const answer = coin * a < 0
|
|
34
34
|
? `\\left[${racine1};${racine2}\\right]`
|
|
35
|
-
: `\\left]-\\infty;${racine1}\\right]
|
|
35
|
+
: `\\left]-\\infty;${racine1}\\right]\\cup\\left[${racine2};+\\infty\\right[`;
|
|
36
36
|
const getPropositions = (n) => {
|
|
37
37
|
const res = [];
|
|
38
38
|
res.push({
|
|
@@ -21,7 +21,7 @@ exports.exponentialDifferentialEquation = {
|
|
|
21
21
|
sections: ['Équations différentielles'],
|
|
22
22
|
isSingleStep: false,
|
|
23
23
|
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getExponentialEquation, nb),
|
|
24
|
-
keys: ['x', 'y', 'exp', 'C', 'equal'],
|
|
24
|
+
keys: ['x', 'y', 'epower', 'exp', 'C', 'equal'],
|
|
25
25
|
qcmTimer: 60,
|
|
26
26
|
freeTimer: 60,
|
|
27
27
|
};
|
|
@@ -59,7 +59,7 @@ function getExponentialEquation() {
|
|
|
59
59
|
instruction: `Résoudre l'équation différentielle suivante : $y' = ${myEquation.toTex()}$.`,
|
|
60
60
|
startStatement: `y(x)`,
|
|
61
61
|
answer: myAnswer.toTex(),
|
|
62
|
-
keys: ['x', 'y', 'exp', 'C', 'equal'],
|
|
62
|
+
keys: ['x', 'y', 'epower', 'exp', 'C', 'equal'],
|
|
63
63
|
getPropositions,
|
|
64
64
|
answerFormat: 'tex',
|
|
65
65
|
};
|
|
@@ -21,7 +21,7 @@ exports.exponentialDifferentialEquationWithIC = {
|
|
|
21
21
|
sections: ['Équations différentielles'],
|
|
22
22
|
isSingleStep: false,
|
|
23
23
|
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(solveExponentialEquationWithIC, nb),
|
|
24
|
-
keys: ['x', 'y', 'exp', 'equal'],
|
|
24
|
+
keys: ['x', 'y', 'epower', 'exp', 'equal'],
|
|
25
25
|
qcmTimer: 60,
|
|
26
26
|
freeTimer: 60,
|
|
27
27
|
};
|
|
@@ -73,7 +73,7 @@ function solveExponentialEquationWithIC() {
|
|
|
73
73
|
instruction: `Résoudre l'équation différentielle suivante avec la condition initiale $y(0) = ${initialY}$ : $y' = ${myEquation.toTex()}$.`,
|
|
74
74
|
startStatement: `y(x)`,
|
|
75
75
|
answer: myAnswer.toTex(),
|
|
76
|
-
keys: ['x', 'y', 'exp', 'equal'],
|
|
76
|
+
keys: ['x', 'y', 'epower', 'exp', 'equal'],
|
|
77
77
|
getPropositions,
|
|
78
78
|
answerFormat: 'tex',
|
|
79
79
|
};
|
|
@@ -15,6 +15,7 @@ export interface Question {
|
|
|
15
15
|
commands?: string[];
|
|
16
16
|
coords?: number[];
|
|
17
17
|
options?: any;
|
|
18
|
+
divisionFormat?: 'fraction' | 'obelus';
|
|
18
19
|
getPropositions: (n: number) => Proposition[];
|
|
19
20
|
}
|
|
20
21
|
export interface Exercise {
|
|
@@ -32,5 +33,5 @@ export interface Exercise {
|
|
|
32
33
|
freeTimer: number;
|
|
33
34
|
}
|
|
34
35
|
export type MathLevel = '6ème' | '5ème' | '4ème' | '3ème' | '2nde' | '1reTech' | '1reESM' | '1reSpé' | 'TermSpé' | 'TermTech' | 'MathExp' | 'MathComp' | 'CAP' | '2ndPro' | '1rePro' | 'TermPro';
|
|
35
|
-
export type MathSection = 'Arithmétique' | 'Calcul littéral' | 'Calculs' | 'Conversions' | 'Dérivation' | 'Droites' | 'Équations' | 'Équations différentielles' | 'Exponentielle' | 'Fonction cube' | 'Fonction inverse' | 'Fonctions' | 'Fonctions affines' | 'Fonctions de référence' | 'Fractions' | 'Géométrie cartésienne' | 'Géométrie euclidienne' | 'Inéquations' | 'Intégration' | '
|
|
36
|
+
export type MathSection = 'Arithmétique' | 'Calcul littéral' | 'Calculs' | 'Conversions' | 'Dérivation' | 'Droites' | 'Ensembles et intervalles' | 'Équations' | 'Équations différentielles' | 'Exponentielle' | 'Fonction cube' | 'Fonction inverse' | 'Fonctions' | 'Fonctions affines' | 'Fonctions de référence' | 'Fractions' | 'Géométrie cartésienne' | 'Géométrie euclidienne' | 'Inéquations' | 'Intégration' | 'Limites' | 'Logarithme népérien' | 'Nombres complexes' | 'Pourcentages' | 'Primitives' | 'Probabilités' | 'Proportionnalité' | 'Puissances' | 'Racines carrées' | 'Second degré' | 'Statistiques' | 'Suites' | 'Trigonométrie' | 'Vecteurs';
|
|
36
37
|
//# sourceMappingURL=exercise.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exercise.d.ts","sourceRoot":"","sources":["../../src/exercises/exercise.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAE5C,MAAM,MAAM,gBAAgB,GAAG,EAAE,CAAC;AAElC,MAAM,MAAM,WAAW,GAAG;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,OAAO,CAAC;IACvB,MAAM,EAAE,KAAK,GAAG,KAAK,CAAC;CACvB,CAAC;AACF,MAAM,WAAW,QAAQ;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,KAAK,GAAG,KAAK,CAAC;IAC5B,IAAI,CAAC,EAAE,KAAK,EAAE,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,CAAC,EAAE,GAAG,CAAC;IACd,eAAe,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,WAAW,EAAE,CAAC;CAC/C;AAED,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,OAAO,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,WAAW,EAAE,CAAC;IACxB,MAAM,EAAE,SAAS,EAAE,CAAC;IACpB,SAAS,CAAC,EAAE,GAAG,GAAG,OAAO,GAAG,UAAU,CAAC;IACvC,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,SAAS,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,gBAAgB,GAAG,QAAQ,EAAE,CAAC;IAC9D,UAAU,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,MAAM,SAAS,GACjB,MAAM,GACN,MAAM,GACN,MAAM,GACN,MAAM,GACN,MAAM,GACN,SAAS,GACT,QAAQ,GACR,QAAQ,GACR,SAAS,GACT,UAAU,GACV,SAAS,GACT,UAAU,GACV,KAAK,GACL,QAAQ,GACR,QAAQ,GACR,SAAS,CAAC;AAEd,MAAM,MAAM,WAAW,GACnB,cAAc,GACd,iBAAiB,GACjB,SAAS,GACT,aAAa,GACb,YAAY,GACZ,SAAS,GACT,WAAW,GACX,2BAA2B,GAC3B,eAAe,GACf,eAAe,GACf,kBAAkB,GAClB,WAAW,GACX,mBAAmB,GACnB,wBAAwB,GACxB,WAAW,GACX,uBAAuB,GACvB,uBAAuB,GACvB,aAAa,GACb,aAAa,GACb,
|
|
1
|
+
{"version":3,"file":"exercise.d.ts","sourceRoot":"","sources":["../../src/exercises/exercise.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAE5C,MAAM,MAAM,gBAAgB,GAAG,EAAE,CAAC;AAElC,MAAM,MAAM,WAAW,GAAG;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,OAAO,CAAC;IACvB,MAAM,EAAE,KAAK,GAAG,KAAK,CAAC;CACvB,CAAC;AACF,MAAM,WAAW,QAAQ;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,KAAK,GAAG,KAAK,CAAC;IAC5B,IAAI,CAAC,EAAE,KAAK,EAAE,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,CAAC,EAAE,GAAG,CAAC;IACd,cAAc,CAAC,EAAE,UAAU,GAAG,QAAQ,CAAC;IACvC,eAAe,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,WAAW,EAAE,CAAC;CAC/C;AAED,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,OAAO,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,WAAW,EAAE,CAAC;IACxB,MAAM,EAAE,SAAS,EAAE,CAAC;IACpB,SAAS,CAAC,EAAE,GAAG,GAAG,OAAO,GAAG,UAAU,CAAC;IACvC,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,SAAS,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,gBAAgB,GAAG,QAAQ,EAAE,CAAC;IAC9D,UAAU,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,MAAM,SAAS,GACjB,MAAM,GACN,MAAM,GACN,MAAM,GACN,MAAM,GACN,MAAM,GACN,SAAS,GACT,QAAQ,GACR,QAAQ,GACR,SAAS,GACT,UAAU,GACV,SAAS,GACT,UAAU,GACV,KAAK,GACL,QAAQ,GACR,QAAQ,GACR,SAAS,CAAC;AAEd,MAAM,MAAM,WAAW,GACnB,cAAc,GACd,iBAAiB,GACjB,SAAS,GACT,aAAa,GACb,YAAY,GACZ,SAAS,GACT,0BAA0B,GAC1B,WAAW,GACX,2BAA2B,GAC3B,eAAe,GACf,eAAe,GACf,kBAAkB,GAClB,WAAW,GACX,mBAAmB,GACnB,wBAAwB,GACxB,WAAW,GACX,uBAAuB,GACvB,uBAAuB,GACvB,aAAa,GACb,aAAa,GACb,SAAS,GACT,qBAAqB,GACrB,mBAAmB,GACnB,cAAc,GACd,YAAY,GACZ,cAAc,GACd,kBAAkB,GAClB,YAAY,GACZ,iBAAiB,GACjB,cAAc,GACd,cAAc,GACd,QAAQ,GACR,eAAe,GACf,UAAU,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exercises.d.ts","sourceRoot":"","sources":["../../src/exercises/exercises.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"exercises.d.ts","sourceRoot":"","sources":["../../src/exercises/exercises.ts"],"names":[],"mappings":"AA+KA,eAAO,MAAM,SAAS,iCA8PrB,CAAC"}
|
|
@@ -161,6 +161,10 @@ const firstDegreeInequationsType0_1 = require("./calculLitteral/inequations/firs
|
|
|
161
161
|
const chasles_1 = require("./geometry/vectors/chasles");
|
|
162
162
|
const rootsFromFactorizedForm_1 = require("./functions/trinoms/rootsFromFactorizedForm");
|
|
163
163
|
const rootsFromDevForm_1 = require("./functions/trinoms/rootsFromDevForm");
|
|
164
|
+
const inequalityToInterval_1 = require("./sets/intervals/inequalityToInterval");
|
|
165
|
+
const setBelonging_1 = require("./sets/setBelonging");
|
|
166
|
+
const intervalsUnion_1 = require("./sets/intervals/intervalsUnion");
|
|
167
|
+
const intervalsIntersection_1 = require("./sets/intervals/intervalsIntersection");
|
|
164
168
|
exports.exercises = [
|
|
165
169
|
/**
|
|
166
170
|
* calcul litteral
|
|
@@ -387,4 +391,9 @@ exports.exercises = [
|
|
|
387
391
|
inverseComplex_1.inverseComplex,
|
|
388
392
|
divideComplex_1.divideComplex,
|
|
389
393
|
conjugateDivideComplex_1.conjugateDivideComplex,
|
|
394
|
+
/**sets */
|
|
395
|
+
inequalityToInterval_1.inequalityToInterval,
|
|
396
|
+
setBelonging_1.setBelonging,
|
|
397
|
+
intervalsUnion_1.intervalsUnion,
|
|
398
|
+
intervalsIntersection_1.intervalsIntersection,
|
|
390
399
|
];
|
|
@@ -47,7 +47,7 @@ function getInverseImageFunctionGeogebra() {
|
|
|
47
47
|
const answer = rand
|
|
48
48
|
? xValue
|
|
49
49
|
: roots.length === 2
|
|
50
|
-
? `\\{${(0, round_1.round)(roots[0], 1)};${(0, round_1.round)(roots[1], 1)}
|
|
50
|
+
? `\\{${(0, round_1.round)(roots[0], 1)};${(0, round_1.round)(roots[1], 1)}\\}`
|
|
51
51
|
: roots.length === 1
|
|
52
52
|
? roots[0]
|
|
53
53
|
: `\\emptyset`;
|
|
@@ -20,7 +20,7 @@ exports.cubicEquation = {
|
|
|
20
20
|
function getCubicEquationQuestion() {
|
|
21
21
|
const x = (0, randint_1.randint)(-10, 11);
|
|
22
22
|
const k = x ** 3;
|
|
23
|
-
const answer = `S
|
|
23
|
+
const answer = `S=\\{${x}\\}`;
|
|
24
24
|
const getPropositions = (n) => {
|
|
25
25
|
const res = [];
|
|
26
26
|
res.push({
|
|
@@ -32,7 +32,7 @@ function getCubicEquationQuestion() {
|
|
|
32
32
|
if (x ** 3 !== k ** 3) {
|
|
33
33
|
res.push({
|
|
34
34
|
id: (0, uuid_1.v4)(),
|
|
35
|
-
statement: `S
|
|
35
|
+
statement: `S=\\{${k ** 3}\\}`,
|
|
36
36
|
isRightAnswer: true,
|
|
37
37
|
format: 'tex',
|
|
38
38
|
});
|
|
@@ -45,7 +45,7 @@ function getCubicEquationQuestion() {
|
|
|
45
45
|
const wrongAnswer = (0, randint_1.randint)(-10, 11) + '';
|
|
46
46
|
proposition = {
|
|
47
47
|
id: (0, uuid_1.v4)() + ``,
|
|
48
|
-
statement: `S
|
|
48
|
+
statement: `S=\\{${wrongAnswer}\\}`,
|
|
49
49
|
isRightAnswer: false,
|
|
50
50
|
format: 'tex',
|
|
51
51
|
};
|
|
@@ -35,7 +35,7 @@ function getRootsFromFactorizedFormQuestion() {
|
|
|
35
35
|
if (roots.length === 1 && roots[0] !== 0) {
|
|
36
36
|
res.push({
|
|
37
37
|
id: (0, uuid_1.v4)(),
|
|
38
|
-
statement: `S
|
|
38
|
+
statement: `S=\\{${new oppositeNode_1.OppositeNode(new numberNode_1.NumberNode(roots[0]))}\\}`,
|
|
39
39
|
isRightAnswer: false,
|
|
40
40
|
format: 'tex',
|
|
41
41
|
});
|
|
@@ -43,7 +43,7 @@ function getRootsFromFactorizedFormQuestion() {
|
|
|
43
43
|
if (roots.length === 2 && roots[0] !== 0) {
|
|
44
44
|
res.push({
|
|
45
45
|
id: (0, uuid_1.v4)(),
|
|
46
|
-
statement: `S
|
|
46
|
+
statement: `S=\\{${new oppositeNode_1.OppositeNode(new numberNode_1.NumberNode(roots[0])).toTex()};${roots[1]}\\}`,
|
|
47
47
|
isRightAnswer: false,
|
|
48
48
|
format: 'tex',
|
|
49
49
|
});
|
|
@@ -51,7 +51,7 @@ function getRootsFromFactorizedFormQuestion() {
|
|
|
51
51
|
if (roots.length === 2 && roots[1] !== 0) {
|
|
52
52
|
res.push({
|
|
53
53
|
id: (0, uuid_1.v4)(),
|
|
54
|
-
statement: `S
|
|
54
|
+
statement: `S=\\{${roots[0]};${new oppositeNode_1.OppositeNode(new numberNode_1.NumberNode(roots[1])).toTex()}\\}`,
|
|
55
55
|
isRightAnswer: false,
|
|
56
56
|
format: 'tex',
|
|
57
57
|
});
|
|
@@ -59,7 +59,7 @@ function getRootsFromFactorizedFormQuestion() {
|
|
|
59
59
|
if (roots.length === 2 && roots[0] !== 0 && roots[1] !== 0) {
|
|
60
60
|
res.push({
|
|
61
61
|
id: (0, uuid_1.v4)(),
|
|
62
|
-
statement: `S
|
|
62
|
+
statement: `S=\\{${new oppositeNode_1.OppositeNode(new numberNode_1.NumberNode(roots[0])).toTex()};${new oppositeNode_1.OppositeNode(new numberNode_1.NumberNode(roots[1])).toTex()}\\}`,
|
|
63
63
|
isRightAnswer: false,
|
|
64
64
|
format: 'tex',
|
|
65
65
|
});
|
|
@@ -69,7 +69,7 @@ function getRootsFromFactorizedFormQuestion() {
|
|
|
69
69
|
let isDuplicate;
|
|
70
70
|
let proposition;
|
|
71
71
|
do {
|
|
72
|
-
const wrongAnswer = `S
|
|
72
|
+
const wrongAnswer = `S=\\{${(0, randint_1.randint)(-10, 11)};${(0, randint_1.randint)(-10, 11)}\\}`;
|
|
73
73
|
proposition = {
|
|
74
74
|
id: (0, uuid_1.v4)() + ``,
|
|
75
75
|
statement: wrongAnswer,
|
|
@@ -76,7 +76,7 @@ function getPythagore() {
|
|
|
76
76
|
return (0, shuffle_1.shuffle)(res);
|
|
77
77
|
};
|
|
78
78
|
const question = {
|
|
79
|
-
answer: `${triangle.getSideAName()}^2
|
|
79
|
+
answer: `${triangle.getSideAName()}^2=${triangle.getSideBName()}^2+${triangle.getSideCName()}^2`,
|
|
80
80
|
keys: [...vertices, 'equal'],
|
|
81
81
|
commands: triangle.generateCommands({}),
|
|
82
82
|
coords: triangle.generateCoords(),
|
|
@@ -101,8 +101,8 @@ function getThales() {
|
|
|
101
101
|
};
|
|
102
102
|
const question = {
|
|
103
103
|
instruction: `En utilisant le théoreme de Thalès, Écrire l'égalité des quotients sachant que :$\\\\$ (${vertices[3]}${vertices[4]})//(${vertices[1]}${vertices[2]})`,
|
|
104
|
-
answer: `\\frac{${vertices[0]}${vertices[3]}}{${vertices[0]}${vertices[1]}}
|
|
105
|
-
\\frac{${vertices[0]}${vertices[4]}}{${vertices[0]}${vertices[2]}}
|
|
104
|
+
answer: `\\frac{${vertices[0]}${vertices[3]}}{${vertices[0]}${vertices[1]}}=
|
|
105
|
+
\\frac{${vertices[0]}${vertices[4]}}{${vertices[0]}${vertices[2]}}=
|
|
106
106
|
\\frac{${vertices[3]}${vertices[4]}}{${vertices[1]}${vertices[2]}}`,
|
|
107
107
|
keys: [...vertices, 'equal'],
|
|
108
108
|
commands,
|
|
@@ -37,7 +37,7 @@ function getGlobalPercentQuestion() {
|
|
|
37
37
|
}
|
|
38
38
|
ans = (0, mathjs_1.round)((ans - 1) * 100, 2);
|
|
39
39
|
instruction += ". \nDéterminer le taux d'évolution global du prix de cet article.";
|
|
40
|
-
const answer = `${ans}
|
|
40
|
+
const answer = `${ans}\\%`;
|
|
41
41
|
const getPropositions = (n) => {
|
|
42
42
|
const res = [];
|
|
43
43
|
res.push({
|
|
@@ -57,7 +57,7 @@ function getReciprocalPercentageQuestion() {
|
|
|
57
57
|
};
|
|
58
58
|
const question = {
|
|
59
59
|
instruction,
|
|
60
|
-
answer: `${ans > 0 ? '+' + (0, mathjs_1.round)(ans, 2) : (0, mathjs_1.round)(ans, 2)}
|
|
60
|
+
answer: `${ans > 0 ? '+' + (0, mathjs_1.round)(ans, 2) : (0, mathjs_1.round)(ans, 2)}\\%`,
|
|
61
61
|
keys: ['percent'],
|
|
62
62
|
getPropositions,
|
|
63
63
|
answerFormat: 'tex',
|