math-exercises 1.4.3 → 1.4.5
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/addAndSub.d.ts.map +1 -1
- package/lib/exercises/calcul/addAndSub.js +2 -1
- package/lib/exercises/calcul/addAndSubWithoutRelatives.d.ts.map +1 -1
- package/lib/exercises/calcul/addAndSubWithoutRelatives.js +2 -1
- package/lib/exercises/calcul/arithmetics/primeNumbers.d.ts.map +1 -1
- package/lib/exercises/calcul/arithmetics/primeNumbers.js +2 -1
- package/lib/exercises/calcul/fractions/fractionAndIntegerDivision.js +2 -2
- package/lib/exercises/calcul/fractions/fractionAndIntegerProduct.js +2 -2
- package/lib/exercises/calcul/fractions/fractionAndIntegerSum.js +2 -2
- package/lib/exercises/calcul/fractions/fractionToPercentToDecimal.js +1 -1
- package/lib/exercises/calcul/fractions/fractionsDivision.js +2 -2
- package/lib/exercises/calcul/fractions/fractionsProduct.d.ts.map +1 -1
- package/lib/exercises/calcul/fractions/fractionsProduct.js +2 -1
- package/lib/exercises/calcul/fractions/fractionsSum.d.ts.map +1 -1
- package/lib/exercises/calcul/fractions/fractionsSum.js +2 -1
- package/lib/exercises/calcul/fractions/simplifyFraction.d.ts.map +1 -1
- package/lib/exercises/calcul/fractions/simplifyFraction.js +2 -1
- package/lib/exercises/calcul/mentalCaluls.ts/mentalAddAndSub.d.ts.map +1 -1
- package/lib/exercises/calcul/mentalCaluls.ts/mentalAddAndSub.js +2 -1
- package/lib/exercises/calcul/mentalCaluls.ts/mentalDivisions.d.ts.map +1 -1
- package/lib/exercises/calcul/mentalCaluls.ts/mentalDivisions.js +2 -1
- package/lib/exercises/calcul/mentalCaluls.ts/mentalMultiplications.d.ts.map +1 -1
- package/lib/exercises/calcul/mentalCaluls.ts/mentalMultiplications.js +2 -1
- package/lib/exercises/calcul/operations/operationsPriorities.d.ts.map +1 -1
- package/lib/exercises/calcul/operations/operationsPriorities.js +2 -1
- package/lib/exercises/calcul/operations/operationsPrioritiesWithoutRelative.d.ts.map +1 -1
- package/lib/exercises/calcul/operations/operationsPrioritiesWithoutRelative.js +2 -1
- package/lib/exercises/calcul/rounding/rounding.js +5 -5
- package/lib/exercises/calculLitteral/distributivity/doubleDistributivity.d.ts.map +1 -1
- package/lib/exercises/calculLitteral/distributivity/doubleDistributivity.js +2 -1
- package/lib/exercises/calculLitteral/distributivity/firstIdentity.d.ts.map +1 -1
- package/lib/exercises/calculLitteral/distributivity/firstIdentity.js +2 -1
- package/lib/exercises/calculLitteral/distributivity/secondIdentity.d.ts.map +1 -1
- package/lib/exercises/calculLitteral/distributivity/secondIdentity.js +2 -1
- package/lib/exercises/calculLitteral/distributivity/simpleDistributivity.d.ts.map +1 -1
- package/lib/exercises/calculLitteral/distributivity/simpleDistributivity.js +2 -1
- package/lib/exercises/calculLitteral/distributivity/thirdIdentity.d.ts.map +1 -1
- package/lib/exercises/calculLitteral/distributivity/thirdIdentity.js +2 -1
- package/lib/exercises/calculLitteral/equation/equationType1Exercise.d.ts.map +1 -1
- package/lib/exercises/calculLitteral/equation/equationType1Exercise.js +3 -2
- package/lib/exercises/calculLitteral/equation/equationType2Exercise.d.ts.map +1 -1
- package/lib/exercises/calculLitteral/equation/equationType2Exercise.js +2 -1
- package/lib/exercises/calculLitteral/equation/equationType3Exercise.d.ts.map +1 -1
- package/lib/exercises/calculLitteral/equation/equationType3Exercise.js +2 -1
- package/lib/exercises/calculLitteral/equation/equationType4Exercise.d.ts.map +1 -1
- package/lib/exercises/calculLitteral/equation/equationType4Exercise.js +2 -1
- package/lib/exercises/calculLitteral/equation/fractionEquation.d.ts.map +1 -1
- package/lib/exercises/calculLitteral/equation/fractionEquation.js +2 -1
- package/lib/exercises/calculLitteral/equation/multiplicationEquation.d.ts.map +1 -1
- package/lib/exercises/calculLitteral/equation/multiplicationEquation.js +2 -1
- package/lib/exercises/calculLitteral/factorisation/factoIdRmq1.d.ts.map +1 -1
- package/lib/exercises/calculLitteral/factorisation/factoIdRmq1.js +2 -1
- package/lib/exercises/calculLitteral/factorisation/factoIdRmq2.d.ts.map +1 -1
- package/lib/exercises/calculLitteral/factorisation/factoIdRmq2.js +2 -1
- package/lib/exercises/calculLitteral/factorisation/factoIdRmq3.d.ts.map +1 -1
- package/lib/exercises/calculLitteral/factorisation/factoIdRmq3.js +2 -1
- package/lib/exercises/calculLitteral/factorisation/factoType1Exercise.d.ts.map +1 -1
- package/lib/exercises/calculLitteral/factorisation/factoType1Exercise.js +2 -1
- package/lib/exercises/calculLitteral/simplifying/reduceExpression.d.ts.map +1 -1
- package/lib/exercises/calculLitteral/simplifying/reduceExpression.js +2 -1
- package/lib/exercises/exercise.d.ts +2 -2
- package/lib/exercises/exercise.d.ts.map +1 -1
- package/lib/exercises/exercises.d.ts +2 -1
- package/lib/exercises/exercises.d.ts.map +1 -1
- package/lib/exercises/exercises.js +16 -2
- package/lib/exercises/functions/affines/leadingCoefficient.d.ts.map +1 -1
- package/lib/exercises/functions/affines/leadingCoefficient.js +2 -1
- package/lib/exercises/geometry/euclidean/pythagore.d.ts.map +1 -1
- package/lib/exercises/geometry/euclidean/pythagore.js +2 -1
- package/lib/exercises/limits/polynomLimit.d.ts +4 -0
- package/lib/exercises/limits/polynomLimit.d.ts.map +1 -0
- package/lib/exercises/limits/polynomLimit.js +66 -0
- package/lib/exercises/limits/polynomLimitNoFI.d.ts +4 -0
- package/lib/exercises/limits/polynomLimitNoFI.d.ts.map +1 -0
- package/lib/exercises/limits/polynomLimitNoFI.js +67 -0
- package/lib/exercises/limits/rationalFracForbiddenValueLimit.d.ts +4 -0
- package/lib/exercises/limits/rationalFracForbiddenValueLimit.d.ts.map +1 -0
- package/lib/exercises/limits/rationalFracForbiddenValueLimit.js +82 -0
- package/lib/exercises/limits/rationalFracLimit.d.ts +4 -0
- package/lib/exercises/limits/rationalFracLimit.d.ts.map +1 -0
- package/lib/exercises/limits/rationalFracLimit.js +84 -0
- package/lib/exercises/limits/sequencePolynomProductLimit.js +1 -1
- package/lib/exercises/powers/calculateNegativePower.d.ts +4 -0
- package/lib/exercises/powers/calculateNegativePower.d.ts.map +1 -0
- package/lib/exercises/powers/calculateNegativePower.js +76 -0
- package/lib/exercises/powers/calculatePower.d.ts +4 -0
- package/lib/exercises/powers/calculatePower.d.ts.map +1 -0
- package/lib/exercises/powers/calculatePower.js +80 -0
- package/lib/exercises/powers/decimalToScientific.d.ts +4 -0
- package/lib/exercises/powers/decimalToScientific.d.ts.map +1 -0
- package/lib/exercises/powers/decimalToScientific.js +90 -0
- package/lib/exercises/powers/powerDefinition.d.ts +4 -0
- package/lib/exercises/powers/powerDefinition.d.ts.map +1 -0
- package/lib/exercises/powers/powerDefinition.js +69 -0
- package/lib/exercises/powers/powersDivision.d.ts.map +1 -1
- package/lib/exercises/powers/powersDivision.js +2 -1
- package/lib/exercises/powers/powersOfTenToDecimal.d.ts.map +1 -1
- package/lib/exercises/powers/powersOfTenToDecimal.js +2 -1
- package/lib/exercises/powers/powersPower.d.ts.map +1 -1
- package/lib/exercises/powers/powersPower.js +3 -2
- package/lib/exercises/powers/powersProduct.d.ts.map +1 -1
- package/lib/exercises/powers/powersProduct.js +3 -2
- package/lib/exercises/powers/scientificToDecimal.d.ts.map +1 -1
- package/lib/exercises/powers/scientificToDecimal.js +12 -12
- package/lib/exercises/sequences/arithmetic/arithmeticExplicitFormulaUsage.js +1 -1
- package/lib/exercises/sequences/arithmetic/arithmeticReasonUsage.js +1 -1
- package/lib/exercises/sequences/arithmetic/arithmeticRecurrenceFormulaUsage.js +1 -1
- package/lib/exercises/sequences/geometric/geometricExplicitFormulaUsage.js +1 -1
- package/lib/exercises/sequences/geometric/geometricReasonUsage.js +1 -1
- package/lib/exercises/sequences/geometric/geometricRecurrenceFormulaUsage.js +1 -1
- package/lib/exercises/squareRoots/simpifySquareRoot.d.ts.map +1 -1
- package/lib/exercises/squareRoots/simpifySquareRoot.js +2 -1
- package/lib/exercises/trigonometry/mainRemarkableValues.d.ts.map +1 -1
- package/lib/exercises/trigonometry/mainRemarkableValues.js +6 -4
- package/lib/exercises/trigonometry/remarkableValues.d.ts.map +1 -1
- package/lib/exercises/trigonometry/remarkableValues.js +6 -4
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +2 -0
- package/lib/math/numbers/decimals/decimal.d.ts +4 -1
- package/lib/math/numbers/decimals/decimal.d.ts.map +1 -1
- package/lib/math/numbers/decimals/decimal.js +45 -2
- package/lib/math/numbers/integer/integer.js +1 -1
- package/lib/math/numbers/rationals/rational.d.ts.map +1 -1
- package/lib/math/numbers/rationals/rational.js +5 -2
- package/lib/math/polynomials/polynomial.d.ts +1 -0
- package/lib/math/polynomials/polynomial.d.ts.map +1 -1
- package/lib/math/polynomials/polynomial.js +25 -0
- package/lib/utils/probaFlip.d.ts +2 -0
- package/lib/utils/probaFlip.d.ts.map +1 -0
- package/lib/utils/probaFlip.js +7 -0
- package/package.json +1 -1
|
@@ -12,7 +12,7 @@ const uuid_1 = require("uuid");
|
|
|
12
12
|
exports.fractionEquation = {
|
|
13
13
|
id: 'fractionEquation',
|
|
14
14
|
connector: '\\iff',
|
|
15
|
-
instruction: '
|
|
15
|
+
instruction: '',
|
|
16
16
|
label: 'Résoudre une équation quotient nul',
|
|
17
17
|
levels: ['2nde', '1reESM', '1reSpé', '1reTech'],
|
|
18
18
|
sections: ['Équations'],
|
|
@@ -65,6 +65,7 @@ function getFractionEquation() {
|
|
|
65
65
|
return (0, shuffle_1.shuffle)(res);
|
|
66
66
|
};
|
|
67
67
|
const question = {
|
|
68
|
+
instruction: `Résoudre : $\\frac{${polynome1.toTex()}}{${polynome2.toTex()}} = 0$`,
|
|
68
69
|
startStatement: `\\frac{${polynome1.toTex()}}{${polynome2.toTex()}} = 0`,
|
|
69
70
|
answer,
|
|
70
71
|
keys: ['x', 'S', 'equal', 'lbrace', 'rbrace', 'semicolon', 'ou', 'emptyset'],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"multiplicationEquation.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calculLitteral/equation/multiplicationEquation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAe,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAU/E,eAAO,MAAM,sBAAsB,EAAE,YAYpC,CAAC;AAEF,wBAAgB,yBAAyB,IAAI,QAAQ,
|
|
1
|
+
{"version":3,"file":"multiplicationEquation.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calculLitteral/equation/multiplicationEquation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAe,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAU/E,eAAO,MAAM,sBAAsB,EAAE,YAYpC,CAAC;AAEF,wBAAgB,yBAAyB,IAAI,QAAQ,CA0EpD"}
|
|
@@ -12,7 +12,7 @@ const uuid_1 = require("uuid");
|
|
|
12
12
|
exports.multiplicationEquation = {
|
|
13
13
|
id: 'multiplicationEquation',
|
|
14
14
|
connector: '\\iff',
|
|
15
|
-
instruction: '
|
|
15
|
+
instruction: '',
|
|
16
16
|
label: 'Résoudre une équation produit nul',
|
|
17
17
|
levels: ['2nde', '1reESM', '1reSpé', '1reTech'],
|
|
18
18
|
sections: ['Équations'],
|
|
@@ -68,6 +68,7 @@ function getMultiplicationEquation() {
|
|
|
68
68
|
return (0, shuffle_1.shuffle)(res);
|
|
69
69
|
};
|
|
70
70
|
const question = {
|
|
71
|
+
instruction: `Résoudre : $(${polynome1.toTex()})(${polynome2.toTex()}) = 0$`,
|
|
71
72
|
startStatement: `(${polynome1.toTex()})(${polynome2.toTex()}) = 0`,
|
|
72
73
|
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
74
|
keys: ['x', 'S', 'equal', 'lbrace', 'rbrace', 'semicolon', 'ou'],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"factoIdRmq1.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calculLitteral/factorisation/factoIdRmq1.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAe,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAgB/E,eAAO,MAAM,WAAW,EAAE,YAYzB,CAAC;AAEF,wBAAgB,qBAAqB,IAAI,QAAQ,
|
|
1
|
+
{"version":3,"file":"factoIdRmq1.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calculLitteral/factorisation/factoIdRmq1.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAe,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAgB/E,eAAO,MAAM,WAAW,EAAE,YAYzB,CAAC;AAEF,wBAAgB,qBAAqB,IAAI,QAAQ,CA4DhD"}
|
|
@@ -14,7 +14,7 @@ const uuid_1 = require("uuid");
|
|
|
14
14
|
exports.factoIdRmq1 = {
|
|
15
15
|
id: 'factoIdRmq1',
|
|
16
16
|
connector: '=',
|
|
17
|
-
instruction: '
|
|
17
|
+
instruction: '',
|
|
18
18
|
isSingleStep: false,
|
|
19
19
|
label: 'Factorisation du type $a^2 + 2ab + b^2$',
|
|
20
20
|
levels: ['3ème', '2nde'],
|
|
@@ -61,6 +61,7 @@ function getFactoType1Question() {
|
|
|
61
61
|
return (0, shuffle_1.shuffle)(res);
|
|
62
62
|
};
|
|
63
63
|
const question = {
|
|
64
|
+
instruction: `Factoriser : $${statementTree.toTex()}$`,
|
|
64
65
|
startStatement: statementTree.toTex(),
|
|
65
66
|
answer: answerTree.toTex(),
|
|
66
67
|
keys: ['x'],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"factoIdRmq2.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calculLitteral/factorisation/factoIdRmq2.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAe,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAY/E,eAAO,MAAM,WAAW,EAAE,YAYzB,CAAC;AAEF,wBAAgB,qBAAqB,IAAI,QAAQ,
|
|
1
|
+
{"version":3,"file":"factoIdRmq2.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calculLitteral/factorisation/factoIdRmq2.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAe,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAY/E,eAAO,MAAM,WAAW,EAAE,YAYzB,CAAC;AAEF,wBAAgB,qBAAqB,IAAI,QAAQ,CAuEhD"}
|
|
@@ -14,7 +14,7 @@ const uuid_1 = require("uuid");
|
|
|
14
14
|
exports.factoIdRmq2 = {
|
|
15
15
|
id: 'factoIdRmq2',
|
|
16
16
|
connector: '=',
|
|
17
|
-
instruction: '
|
|
17
|
+
instruction: '',
|
|
18
18
|
isSingleStep: false,
|
|
19
19
|
label: 'Factorisation du type $a^2 - 2ab + b^2$',
|
|
20
20
|
levels: ['3ème', '2nde'],
|
|
@@ -69,6 +69,7 @@ function getFactoType1Question() {
|
|
|
69
69
|
return (0, shuffle_1.shuffle)(res);
|
|
70
70
|
};
|
|
71
71
|
const question = {
|
|
72
|
+
instruction: `Factoriser : $${statementTree.toTex()}$`,
|
|
72
73
|
startStatement: statementTree.toTex(),
|
|
73
74
|
answer: answerTree.toTex(),
|
|
74
75
|
keys: ['x'],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"factoIdRmq3.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calculLitteral/factorisation/factoIdRmq3.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAe,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAa/E,eAAO,MAAM,WAAW,EAAE,YAYzB,CAAC;AAEF,wBAAgB,qBAAqB,IAAI,QAAQ,
|
|
1
|
+
{"version":3,"file":"factoIdRmq3.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calculLitteral/factorisation/factoIdRmq3.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAe,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAa/E,eAAO,MAAM,WAAW,EAAE,YAYzB,CAAC;AAEF,wBAAgB,qBAAqB,IAAI,QAAQ,CA6EhD"}
|
|
@@ -13,7 +13,7 @@ const uuid_1 = require("uuid");
|
|
|
13
13
|
exports.factoIdRmq3 = {
|
|
14
14
|
id: 'factoIdRmq3',
|
|
15
15
|
connector: '=',
|
|
16
|
-
instruction: '
|
|
16
|
+
instruction: '',
|
|
17
17
|
isSingleStep: false,
|
|
18
18
|
label: 'Factorisation du type $a^2 - b^2$',
|
|
19
19
|
levels: ['3ème', '2nde'],
|
|
@@ -75,6 +75,7 @@ function getFactoType1Question() {
|
|
|
75
75
|
return (0, shuffle_1.shuffle)(res);
|
|
76
76
|
};
|
|
77
77
|
const question = {
|
|
78
|
+
instruction: `Factoriser : $${statementTree.toTex()}$`,
|
|
78
79
|
startStatement: statementTree.toTex(),
|
|
79
80
|
answer: answerTree.toTex(),
|
|
80
81
|
keys: ['x'],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"factoType1Exercise.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calculLitteral/factorisation/factoType1Exercise.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,YAAY,EAAe,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAU/E,eAAO,MAAM,kBAAkB,EAAE,YAYhC,CAAC;AAEF,wBAAgB,qBAAqB,IAAI,QAAQ,
|
|
1
|
+
{"version":3,"file":"factoType1Exercise.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calculLitteral/factorisation/factoType1Exercise.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,YAAY,EAAe,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAU/E,eAAO,MAAM,kBAAkB,EAAE,YAYhC,CAAC;AAEF,wBAAgB,qBAAqB,IAAI,QAAQ,CAqGhD"}
|
|
@@ -15,7 +15,7 @@ const uuid_1 = require("uuid");
|
|
|
15
15
|
exports.factoType1Exercise = {
|
|
16
16
|
id: 'facto1',
|
|
17
17
|
connector: '=',
|
|
18
|
-
instruction: '
|
|
18
|
+
instruction: '',
|
|
19
19
|
isSingleStep: false,
|
|
20
20
|
label: 'Factorisation du type $(ax+b)(cx+d) \\pm (ax+b)(ex+f)$',
|
|
21
21
|
levels: ['3ème', '2nde'],
|
|
@@ -79,6 +79,7 @@ function getFactoType1Question() {
|
|
|
79
79
|
return (0, shuffle_1.shuffle)(res);
|
|
80
80
|
};
|
|
81
81
|
const question = {
|
|
82
|
+
instruction: `Factoriser : $${statementTree.toTex()}$`,
|
|
82
83
|
startStatement: statementTree.toTex(),
|
|
83
84
|
answer: answerTree.toTex(),
|
|
84
85
|
keys: ['x'],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reduceExpression.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calculLitteral/simplifying/reduceExpression.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAe,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAQ/E,eAAO,MAAM,gBAAgB,EAAE,YAY9B,CAAC;AAEF,wBAAgB,mBAAmB,IAAI,QAAQ,
|
|
1
|
+
{"version":3,"file":"reduceExpression.d.ts","sourceRoot":"","sources":["../../../../src/exercises/calculLitteral/simplifying/reduceExpression.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAe,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAQ/E,eAAO,MAAM,gBAAgB,EAAE,YAY9B,CAAC;AAEF,wBAAgB,mBAAmB,IAAI,QAAQ,CAoI9C"}
|
|
@@ -10,7 +10,7 @@ const uuid_1 = require("uuid");
|
|
|
10
10
|
exports.reduceExpression = {
|
|
11
11
|
id: 'reduceExpression',
|
|
12
12
|
connector: '=',
|
|
13
|
-
instruction:
|
|
13
|
+
instruction: '',
|
|
14
14
|
isSingleStep: false,
|
|
15
15
|
label: 'Réduire une expression',
|
|
16
16
|
levels: ['4ème', '3ème', '2nde', 'CAP', '2ndPro'],
|
|
@@ -112,6 +112,7 @@ function getReduceExpression() {
|
|
|
112
112
|
return (0, shuffle_1.shuffle)(res);
|
|
113
113
|
};
|
|
114
114
|
const question = {
|
|
115
|
+
instruction: `Réduire l'expression suivante : $${statement.toTex()}$`,
|
|
115
116
|
startStatement: statement.toTex(),
|
|
116
117
|
answer,
|
|
117
118
|
keys: ['x'],
|
|
@@ -9,7 +9,7 @@ export type Proposition = {
|
|
|
9
9
|
format: 'tex' | 'raw';
|
|
10
10
|
};
|
|
11
11
|
export interface Question {
|
|
12
|
-
instruction
|
|
12
|
+
instruction: string;
|
|
13
13
|
startStatement?: string;
|
|
14
14
|
answer: string;
|
|
15
15
|
answerFormat: 'tex' | 'raw';
|
|
@@ -22,7 +22,7 @@ export interface Question {
|
|
|
22
22
|
}
|
|
23
23
|
export interface MathExercise {
|
|
24
24
|
id: string;
|
|
25
|
-
instruction
|
|
25
|
+
instruction?: string;
|
|
26
26
|
isSingleStep: boolean;
|
|
27
27
|
label: string;
|
|
28
28
|
sections: MathSection[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exercise.d.ts","sourceRoot":"","sources":["../../src/exercises/exercise.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAI3C,eAAO,MAAM,iBAAiB,UAAW,WAAW,EAAE,aAAa,MAAM,WAAU,KAAK,GAAG,KAAK,SAS/F,CAAC;AAEF,eAAO,MAAM,YAAY,UAAW,WAAW,EAAE,KAAK,MAAM,kBAE3D,CAAC;AACF,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,
|
|
1
|
+
{"version":3,"file":"exercise.d.ts","sourceRoot":"","sources":["../../src/exercises/exercise.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAI3C,eAAO,MAAM,iBAAiB,UAAW,WAAW,EAAE,aAAa,MAAM,WAAU,KAAK,GAAG,KAAK,SAS/F,CAAC;AAEF,eAAO,MAAM,YAAY,UAAW,WAAW,EAAE,KAAK,MAAM,kBAE3D,CAAC;AACF,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,EAAE,MAAM,CAAC;IACpB,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,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,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,KAAK,EAAE,CAAC;IACf,SAAS,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,gBAAgB,GAAG,QAAQ,EAAE,CAAC;IAC9D,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,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":"AAkLA,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAU1C,eAAO,MAAM,SAAS,EAAE,YAAY,EA4QnC,CAAC"}
|
|
@@ -115,7 +115,7 @@ const quartiles_1 = require("../exercises/probaStat/quartiles");
|
|
|
115
115
|
const quartilesList_1 = require("../exercises/probaStat/quartilesList");
|
|
116
116
|
const euclideanDivision_1 = require("../exercises/calcul/arithmetics/euclideanDivision");
|
|
117
117
|
const thirdDegreeFunctionVariation_1 = require("../exercises/derivation/derivative/thirdDegreeFunctionVariation");
|
|
118
|
-
const
|
|
118
|
+
const polynomLimit_1 = require("../exercises/limits/polynomLimit");
|
|
119
119
|
const constantPrimitive_1 = require("../exercises/primitve/constantPrimitive");
|
|
120
120
|
const polynomialPrimitive_1 = require("../exercises/primitve/polynomialPrimitive");
|
|
121
121
|
const sinCosPrimitive_1 = require("../exercises/primitve/sinCosPrimitive");
|
|
@@ -169,7 +169,14 @@ const sequencePolynomLimit_1 = require("./limits/sequencePolynomLimit");
|
|
|
169
169
|
const sequenceRationalFracLimit_1 = require("./limits/sequenceRationalFracLimit");
|
|
170
170
|
const sequencePolynomProductLimit_1 = require("./limits/sequencePolynomProductLimit");
|
|
171
171
|
const sequencePolynomNoFILimit_1 = require("./limits/sequencePolynomNoFILimit");
|
|
172
|
+
const polynomLimitNoFI_1 = require("./limits/polynomLimitNoFI");
|
|
173
|
+
const rationalFracLimit_1 = require("./limits/rationalFracLimit");
|
|
174
|
+
const rationalFracForbiddenValueLimit_1 = require("./limits/rationalFracForbiddenValueLimit");
|
|
172
175
|
const sequenceGeometricLimit_1 = require("./limits/sequenceGeometricLimit");
|
|
176
|
+
const calculatePower_1 = require("./powers/calculatePower");
|
|
177
|
+
const calculateNegativePower_1 = require("./powers/calculateNegativePower");
|
|
178
|
+
const decimalToScientific_1 = require("./powers/decimalToScientific");
|
|
179
|
+
const powerDefinition_1 = require("./powers/powerDefinition");
|
|
173
180
|
exports.exercises = [
|
|
174
181
|
/**
|
|
175
182
|
* calcul litteral
|
|
@@ -268,7 +275,11 @@ exports.exercises = [
|
|
|
268
275
|
powersPower_1.powersOfTenPower,
|
|
269
276
|
powersProduct_1.powersOfTenProduct,
|
|
270
277
|
scientificToDecimal_1.scientificToDecimal,
|
|
278
|
+
decimalToScientific_1.decimalToScientific,
|
|
271
279
|
powersOfTenToDecimal_1.powersOfTenToDecimal,
|
|
280
|
+
calculatePower_1.calculatePower,
|
|
281
|
+
calculateNegativePower_1.calculateNegativePower,
|
|
282
|
+
powerDefinition_1.powerDefinition,
|
|
272
283
|
/**
|
|
273
284
|
* suites
|
|
274
285
|
*/
|
|
@@ -401,7 +412,10 @@ exports.exercises = [
|
|
|
401
412
|
intervalsUnion_1.intervalsUnion,
|
|
402
413
|
intervalsIntersection_1.intervalsIntersection,
|
|
403
414
|
/**limites */
|
|
404
|
-
|
|
415
|
+
polynomLimit_1.polynomLimit,
|
|
416
|
+
polynomLimitNoFI_1.polynomLimitNoFI,
|
|
417
|
+
rationalFracLimit_1.rationalFracLimit,
|
|
418
|
+
rationalFracForbiddenValueLimit_1.rationalFracForbiddenValueLimit,
|
|
405
419
|
sequencePolynomLimit_1.sequencePolynomLimit,
|
|
406
420
|
sequencePolynomNoFILimit_1.sequencePolynomNoFILimit,
|
|
407
421
|
sequenceRationalFracLimit_1.sequenceRationalFracLimit,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"leadingCoefficient.d.ts","sourceRoot":"","sources":["../../../../src/exercises/functions/affines/leadingCoefficient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAe,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAY/E,eAAO,MAAM,kBAAkB,EAAE,YAWhC,CAAC;AAEF,wBAAgB,6BAA6B,IAAI,QAAQ,
|
|
1
|
+
{"version":3,"file":"leadingCoefficient.d.ts","sourceRoot":"","sources":["../../../../src/exercises/functions/affines/leadingCoefficient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAe,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAY/E,eAAO,MAAM,kBAAkB,EAAE,YAWhC,CAAC;AAEF,wBAAgB,6BAA6B,IAAI,QAAQ,CAkFxD"}
|
|
@@ -14,7 +14,7 @@ const uuid_1 = require("uuid");
|
|
|
14
14
|
exports.leadingCoefficient = {
|
|
15
15
|
id: 'leadingCoefficient',
|
|
16
16
|
connector: '=',
|
|
17
|
-
instruction: '
|
|
17
|
+
instruction: '',
|
|
18
18
|
label: 'Lire le coefficient directeur',
|
|
19
19
|
levels: ['3ème', '2nde', '1reESM', '2ndPro', '1rePro', '1reTech'],
|
|
20
20
|
isSingleStep: false,
|
|
@@ -83,6 +83,7 @@ function getLeadingCoefficientQuestion() {
|
|
|
83
83
|
return (0, shuffle_1.shuffle)(res);
|
|
84
84
|
};
|
|
85
85
|
const question = {
|
|
86
|
+
instruction: 'Déterminer le coefficient directeur de la droite représentée ci-dessous : ',
|
|
86
87
|
answer: droite.getLeadingCoefficient(),
|
|
87
88
|
keys: [],
|
|
88
89
|
commands: [`f(x) = (${a}) * x + (${b})`],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pythagore.d.ts","sourceRoot":"","sources":["../../../../src/exercises/geometry/euclidean/pythagore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAe,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAQ/E,eAAO,MAAM,SAAS,EAAE,YAWvB,CAAC;AAEF,wBAAgB,YAAY,IAAI,QAAQ,
|
|
1
|
+
{"version":3,"file":"pythagore.d.ts","sourceRoot":"","sources":["../../../../src/exercises/geometry/euclidean/pythagore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAe,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAQ/E,eAAO,MAAM,SAAS,EAAE,YAWvB,CAAC;AAEF,wBAAgB,YAAY,IAAI,QAAQ,CA8EvC"}
|
|
@@ -9,7 +9,7 @@ const uuid_1 = require("uuid");
|
|
|
9
9
|
exports.pythagore = {
|
|
10
10
|
id: 'pythagore',
|
|
11
11
|
connector: '=',
|
|
12
|
-
instruction:
|
|
12
|
+
instruction: '',
|
|
13
13
|
label: "Écrire l'égalité de Pythagore",
|
|
14
14
|
levels: ['4ème', '3ème', '2nde'],
|
|
15
15
|
isSingleStep: false,
|
|
@@ -76,6 +76,7 @@ function getPythagore() {
|
|
|
76
76
|
return (0, shuffle_1.shuffle)(res);
|
|
77
77
|
};
|
|
78
78
|
const question = {
|
|
79
|
+
instruction: "Écrire l'égalité de Pythagore pour la figure suivante : ",
|
|
79
80
|
answer: `${triangle.getSideAName()}^2=${triangle.getSideBName()}^2+${triangle.getSideCName()}^2`,
|
|
80
81
|
keys: [...vertices, 'equal'],
|
|
81
82
|
commands: triangle.generateCommands({}),
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"polynomLimit.d.ts","sourceRoot":"","sources":["../../../src/exercises/limits/polynomLimit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAe,QAAQ,EAAqB,MAAM,0BAA0B,CAAC;AAQlG,eAAO,MAAM,YAAY,EAAE,YAW1B,CAAC;AAEF,wBAAgB,uBAAuB,IAAI,QAAQ,CAkDlD"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getPolynomLimitQuestion = exports.polynomLimit = void 0;
|
|
4
|
+
const exercise_1 = require("../../exercises/exercise");
|
|
5
|
+
const getDistinctQuestions_1 = require("../../exercises/utils/getDistinctQuestions");
|
|
6
|
+
const polynomial_1 = require("../../math/polynomials/polynomial");
|
|
7
|
+
const randint_1 = require("../../math/utils/random/randint");
|
|
8
|
+
const coinFlip_1 = require("../../utils/coinFlip");
|
|
9
|
+
const shuffle_1 = require("../../utils/shuffle");
|
|
10
|
+
const uuid_1 = require("uuid");
|
|
11
|
+
exports.polynomLimit = {
|
|
12
|
+
id: 'polynomLimit',
|
|
13
|
+
connector: '=',
|
|
14
|
+
instruction: '',
|
|
15
|
+
label: "Limite d'une fonction polynomiale",
|
|
16
|
+
levels: ['TermSpé', 'MathComp'],
|
|
17
|
+
isSingleStep: true,
|
|
18
|
+
sections: ['Limites'],
|
|
19
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getPolynomLimitQuestion, nb),
|
|
20
|
+
qcmTimer: 60,
|
|
21
|
+
freeTimer: 60,
|
|
22
|
+
};
|
|
23
|
+
function getPolynomLimitQuestion() {
|
|
24
|
+
const poly = polynomial_1.PolynomialConstructor.random(4);
|
|
25
|
+
const to = (0, coinFlip_1.coinFlip)() ? '+\\infty' : '-\\infty';
|
|
26
|
+
const answer = poly.getLimit(to);
|
|
27
|
+
const getPropositions = (n) => {
|
|
28
|
+
const res = [];
|
|
29
|
+
res.push({
|
|
30
|
+
id: (0, uuid_1.v4)(),
|
|
31
|
+
statement: answer,
|
|
32
|
+
isRightAnswer: true,
|
|
33
|
+
format: 'tex',
|
|
34
|
+
});
|
|
35
|
+
(0, exercise_1.tryToAddWrongProp)(res, '+\\infty');
|
|
36
|
+
(0, exercise_1.tryToAddWrongProp)(res, '-\\infty');
|
|
37
|
+
(0, exercise_1.tryToAddWrongProp)(res, '0');
|
|
38
|
+
(0, exercise_1.tryToAddWrongProp)(res, poly.coefficients[poly.degree] + '');
|
|
39
|
+
const missing = n - res.length;
|
|
40
|
+
for (let i = 0; i < missing; i++) {
|
|
41
|
+
let isDuplicate;
|
|
42
|
+
let proposition;
|
|
43
|
+
do {
|
|
44
|
+
const wrongAnswer = (0, randint_1.randint)(-10, 10) + '';
|
|
45
|
+
proposition = {
|
|
46
|
+
id: (0, uuid_1.v4)() + ``,
|
|
47
|
+
statement: wrongAnswer,
|
|
48
|
+
isRightAnswer: false,
|
|
49
|
+
format: 'tex',
|
|
50
|
+
};
|
|
51
|
+
isDuplicate = res.some((p) => p.statement === proposition.statement);
|
|
52
|
+
} while (isDuplicate);
|
|
53
|
+
res.push(proposition);
|
|
54
|
+
}
|
|
55
|
+
return (0, shuffle_1.shuffle)(res);
|
|
56
|
+
};
|
|
57
|
+
const question = {
|
|
58
|
+
answer: answer,
|
|
59
|
+
instruction: `Déterminer la limite en $${to}$ de la fonction $f$ définie par : $f(x) = ${poly.toTree().toTex()}$.`,
|
|
60
|
+
keys: ['infty'],
|
|
61
|
+
getPropositions,
|
|
62
|
+
answerFormat: 'tex',
|
|
63
|
+
};
|
|
64
|
+
return question;
|
|
65
|
+
}
|
|
66
|
+
exports.getPolynomLimitQuestion = getPolynomLimitQuestion;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"polynomLimitNoFI.d.ts","sourceRoot":"","sources":["../../../src/exercises/limits/polynomLimitNoFI.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAe,QAAQ,EAAqB,MAAM,0BAA0B,CAAC;AAQlG,eAAO,MAAM,gBAAgB,EAAE,YAW9B,CAAC;AAEF,wBAAgB,mCAAmC,IAAI,QAAQ,CAoD9D"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getSequencePolynomNoFILimitQuestion = exports.polynomLimitNoFI = void 0;
|
|
4
|
+
const exercise_1 = require("../../exercises/exercise");
|
|
5
|
+
const getDistinctQuestions_1 = require("../../exercises/utils/getDistinctQuestions");
|
|
6
|
+
const polynomial_1 = require("../../math/polynomials/polynomial");
|
|
7
|
+
const randint_1 = require("../../math/utils/random/randint");
|
|
8
|
+
const coinFlip_1 = require("../../utils/coinFlip");
|
|
9
|
+
const shuffle_1 = require("../../utils/shuffle");
|
|
10
|
+
const uuid_1 = require("uuid");
|
|
11
|
+
exports.polynomLimitNoFI = {
|
|
12
|
+
id: 'polynomLimitNoFI',
|
|
13
|
+
connector: '=',
|
|
14
|
+
instruction: '',
|
|
15
|
+
label: "Limite d'une fonction polynomiale (sans F.I.)",
|
|
16
|
+
levels: ['TermSpé', 'MathComp'],
|
|
17
|
+
isSingleStep: true,
|
|
18
|
+
sections: ['Limites'],
|
|
19
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getSequencePolynomNoFILimitQuestion, nb),
|
|
20
|
+
qcmTimer: 60,
|
|
21
|
+
freeTimer: 60,
|
|
22
|
+
};
|
|
23
|
+
function getSequencePolynomNoFILimitQuestion() {
|
|
24
|
+
const length = (0, randint_1.randint)(2, 5);
|
|
25
|
+
const to = (0, coinFlip_1.coinFlip)() ? '+\\infty' : '-\\infty';
|
|
26
|
+
const poly = polynomial_1.PolynomialConstructor.randomNoFI(4, to, length);
|
|
27
|
+
const answer = poly.getLimit(to);
|
|
28
|
+
const getPropositions = (n) => {
|
|
29
|
+
const res = [];
|
|
30
|
+
res.push({
|
|
31
|
+
id: (0, uuid_1.v4)(),
|
|
32
|
+
statement: answer,
|
|
33
|
+
isRightAnswer: true,
|
|
34
|
+
format: 'tex',
|
|
35
|
+
});
|
|
36
|
+
(0, exercise_1.tryToAddWrongProp)(res, '+\\infty');
|
|
37
|
+
(0, exercise_1.tryToAddWrongProp)(res, '-\\infty');
|
|
38
|
+
(0, exercise_1.tryToAddWrongProp)(res, '0');
|
|
39
|
+
(0, exercise_1.tryToAddWrongProp)(res, poly.coefficients[poly.degree] + '');
|
|
40
|
+
const missing = n - res.length;
|
|
41
|
+
for (let i = 0; i < missing; i++) {
|
|
42
|
+
let isDuplicate;
|
|
43
|
+
let proposition;
|
|
44
|
+
do {
|
|
45
|
+
const wrongAnswer = (0, randint_1.randint)(-10, 10) + '';
|
|
46
|
+
proposition = {
|
|
47
|
+
id: (0, uuid_1.v4)() + ``,
|
|
48
|
+
statement: wrongAnswer,
|
|
49
|
+
isRightAnswer: false,
|
|
50
|
+
format: 'tex',
|
|
51
|
+
};
|
|
52
|
+
isDuplicate = res.some((p) => p.statement === proposition.statement);
|
|
53
|
+
} while (isDuplicate);
|
|
54
|
+
res.push(proposition);
|
|
55
|
+
}
|
|
56
|
+
return (0, shuffle_1.shuffle)(res);
|
|
57
|
+
};
|
|
58
|
+
const question = {
|
|
59
|
+
answer: answer,
|
|
60
|
+
instruction: `Déterminer la limite en $${to}$ de la fonction $f$ définie par : $f(x) = ${poly.toTree().toTex()}$.`,
|
|
61
|
+
keys: ['infty'],
|
|
62
|
+
getPropositions,
|
|
63
|
+
answerFormat: 'tex',
|
|
64
|
+
};
|
|
65
|
+
return question;
|
|
66
|
+
}
|
|
67
|
+
exports.getSequencePolynomNoFILimitQuestion = getSequencePolynomNoFILimitQuestion;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { MathExercise, Question } from '../../exercises/exercise';
|
|
2
|
+
export declare const rationalFracForbiddenValueLimit: MathExercise;
|
|
3
|
+
export declare function getSequenceRationalFracLimitQuestion(): Question;
|
|
4
|
+
//# sourceMappingURL=rationalFracForbiddenValueLimit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rationalFracForbiddenValueLimit.d.ts","sourceRoot":"","sources":["../../../src/exercises/limits/rationalFracForbiddenValueLimit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAe,QAAQ,EAAqB,MAAM,0BAA0B,CAAC;AAclG,eAAO,MAAM,+BAA+B,EAAE,YAW7C,CAAC;AAEF,wBAAgB,oCAAoC,IAAI,QAAQ,CAmE/D"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getSequenceRationalFracLimitQuestion = exports.rationalFracForbiddenValueLimit = void 0;
|
|
4
|
+
const exercise_1 = require("../../exercises/exercise");
|
|
5
|
+
const getDistinctQuestions_1 = require("../../exercises/utils/getDistinctQuestions");
|
|
6
|
+
const integer_1 = require("../../math/numbers/integer/integer");
|
|
7
|
+
const affine_1 = require("../../math/polynomials/affine");
|
|
8
|
+
const trinom_1 = require("../../math/polynomials/trinom");
|
|
9
|
+
const discreteSet_1 = require("../../math/sets/discreteSet");
|
|
10
|
+
const intervals_1 = require("../../math/sets/intervals/intervals");
|
|
11
|
+
const randint_1 = require("../../math/utils/random/randint");
|
|
12
|
+
const coinFlip_1 = require("../../utils/coinFlip");
|
|
13
|
+
const shuffle_1 = require("../../utils/shuffle");
|
|
14
|
+
const uuid_1 = require("uuid");
|
|
15
|
+
exports.rationalFracForbiddenValueLimit = {
|
|
16
|
+
id: 'rationalFracForbiddenValueLimit',
|
|
17
|
+
connector: '=',
|
|
18
|
+
instruction: '',
|
|
19
|
+
label: "Limite d'une fraction rationnelle avec valeur interdite",
|
|
20
|
+
levels: ['TermSpé', 'MathComp'],
|
|
21
|
+
isSingleStep: true,
|
|
22
|
+
sections: ['Limites'],
|
|
23
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getSequenceRationalFracLimitQuestion, nb),
|
|
24
|
+
qcmTimer: 60,
|
|
25
|
+
freeTimer: 60,
|
|
26
|
+
};
|
|
27
|
+
function getSequenceRationalFracLimitQuestion() {
|
|
28
|
+
const polyDenum = new affine_1.Affine(1, (0, randint_1.randint)(-9, 10, [0]));
|
|
29
|
+
const forbiddenValue = -polyDenum.b;
|
|
30
|
+
const interval = new intervals_1.Interval('[[-10;10]]').difference(new discreteSet_1.DiscreteSet([new integer_1.Integer(forbiddenValue)]));
|
|
31
|
+
const polyNum = trinom_1.TrinomConstructor.randomFactorized(new intervals_1.Interval('[[-10;10]]'), interval, interval);
|
|
32
|
+
const numLimit = polyNum.calculate(-polyDenum.b);
|
|
33
|
+
const getSign = (nb) => {
|
|
34
|
+
return nb >= 0 ? '+' : '-';
|
|
35
|
+
};
|
|
36
|
+
const isRight = (0, coinFlip_1.coinFlip)();
|
|
37
|
+
const to = isRight ? `${forbiddenValue}` : `${forbiddenValue}`;
|
|
38
|
+
const from = isRight ? `x > ${forbiddenValue}` : `x<${forbiddenValue}`;
|
|
39
|
+
const answer = isRight ? `${getSign(numLimit)}\\infty` : `${getSign(-numLimit)}\\infty`;
|
|
40
|
+
const getPropositions = (n) => {
|
|
41
|
+
const res = [];
|
|
42
|
+
res.push({
|
|
43
|
+
id: (0, uuid_1.v4)(),
|
|
44
|
+
statement: answer,
|
|
45
|
+
isRightAnswer: true,
|
|
46
|
+
format: 'tex',
|
|
47
|
+
});
|
|
48
|
+
(0, exercise_1.tryToAddWrongProp)(res, '+\\infty');
|
|
49
|
+
(0, exercise_1.tryToAddWrongProp)(res, '-\\infty');
|
|
50
|
+
(0, exercise_1.tryToAddWrongProp)(res, '0');
|
|
51
|
+
(0, exercise_1.tryToAddWrongProp)(res, polyNum.coefficients[polyNum.degree].toString());
|
|
52
|
+
const missing = n - res.length;
|
|
53
|
+
for (let i = 0; i < missing; i++) {
|
|
54
|
+
let isDuplicate;
|
|
55
|
+
let proposition;
|
|
56
|
+
do {
|
|
57
|
+
const wrongAnswer = (0, randint_1.randint)(-10, 10) + '';
|
|
58
|
+
proposition = {
|
|
59
|
+
id: (0, uuid_1.v4)() + ``,
|
|
60
|
+
statement: wrongAnswer,
|
|
61
|
+
isRightAnswer: false,
|
|
62
|
+
format: 'tex',
|
|
63
|
+
};
|
|
64
|
+
isDuplicate = res.some((p) => p.statement === proposition.statement);
|
|
65
|
+
} while (isDuplicate);
|
|
66
|
+
res.push(proposition);
|
|
67
|
+
}
|
|
68
|
+
return (0, shuffle_1.shuffle)(res);
|
|
69
|
+
};
|
|
70
|
+
const question = {
|
|
71
|
+
answer,
|
|
72
|
+
instruction: `Soit $f$ la fonction définie par : $f(x) = \\dfrac{${polyNum.toTree().toTex()}}{${polyDenum
|
|
73
|
+
.toTree()
|
|
74
|
+
.toTex()}}$. Déterminer $\\lim\\limits_{x \\to ${to}, ${from}}f(x).$
|
|
75
|
+
`,
|
|
76
|
+
keys: ['infty'],
|
|
77
|
+
getPropositions,
|
|
78
|
+
answerFormat: 'tex',
|
|
79
|
+
};
|
|
80
|
+
return question;
|
|
81
|
+
}
|
|
82
|
+
exports.getSequenceRationalFracLimitQuestion = getSequenceRationalFracLimitQuestion;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rationalFracLimit.d.ts","sourceRoot":"","sources":["../../../src/exercises/limits/rationalFracLimit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAe,QAAQ,EAAqB,MAAM,0BAA0B,CAAC;AAUlG,eAAO,MAAM,iBAAiB,EAAE,YAW/B,CAAC;AAEF,wBAAgB,oCAAoC,IAAI,QAAQ,CAoE/D"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getSequenceRationalFracLimitQuestion = exports.rationalFracLimit = void 0;
|
|
4
|
+
const exercise_1 = require("../../exercises/exercise");
|
|
5
|
+
const getDistinctQuestions_1 = require("../../exercises/utils/getDistinctQuestions");
|
|
6
|
+
const rational_1 = require("../../math/numbers/rationals/rational");
|
|
7
|
+
const monom_1 = require("../../math/polynomials/monom");
|
|
8
|
+
const polynomial_1 = require("../../math/polynomials/polynomial");
|
|
9
|
+
const randint_1 = require("../../math/utils/random/randint");
|
|
10
|
+
const coinFlip_1 = require("../../utils/coinFlip");
|
|
11
|
+
const shuffle_1 = require("../../utils/shuffle");
|
|
12
|
+
const uuid_1 = require("uuid");
|
|
13
|
+
exports.rationalFracLimit = {
|
|
14
|
+
id: 'rationalFracLimit',
|
|
15
|
+
connector: '=',
|
|
16
|
+
instruction: '',
|
|
17
|
+
label: "Limite d'une fraction rationnelle",
|
|
18
|
+
levels: ['TermSpé', 'MathComp'],
|
|
19
|
+
isSingleStep: true,
|
|
20
|
+
sections: ['Limites'],
|
|
21
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getSequenceRationalFracLimitQuestion, nb),
|
|
22
|
+
qcmTimer: 60,
|
|
23
|
+
freeTimer: 60,
|
|
24
|
+
};
|
|
25
|
+
function getSequenceRationalFracLimitQuestion() {
|
|
26
|
+
const polyNum = polynomial_1.PolynomialConstructor.randomWithLength(4, (0, randint_1.randint)(2, 5));
|
|
27
|
+
const polyDenum = polynomial_1.PolynomialConstructor.randomWithLength(4, (0, randint_1.randint)(2, 5));
|
|
28
|
+
const numLeadingCoeff = polyNum.coefficients[polyNum.degree];
|
|
29
|
+
const denumLeadingCoeff = polyDenum.coefficients[polyDenum.degree];
|
|
30
|
+
const to = (0, coinFlip_1.coinFlip)() ? '+\\infty' : '-\\infty';
|
|
31
|
+
let answer;
|
|
32
|
+
let leadingCoeffsRational = new rational_1.Rational(numLeadingCoeff, denumLeadingCoeff).simplify().toTree().toTex();
|
|
33
|
+
if (polyDenum.degree === polyNum.degree) {
|
|
34
|
+
answer = leadingCoeffsRational;
|
|
35
|
+
}
|
|
36
|
+
else if (polyDenum.degree > polyNum.degree) {
|
|
37
|
+
answer = '0';
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
const tempPoly = new monom_1.Monom(polyNum.degree - polyDenum.degree, numLeadingCoeff * denumLeadingCoeff > 0 ? 1 : -1);
|
|
41
|
+
answer = tempPoly.getLimit(to);
|
|
42
|
+
}
|
|
43
|
+
const getPropositions = (n) => {
|
|
44
|
+
const res = [];
|
|
45
|
+
res.push({
|
|
46
|
+
id: (0, uuid_1.v4)(),
|
|
47
|
+
statement: answer,
|
|
48
|
+
isRightAnswer: true,
|
|
49
|
+
format: 'tex',
|
|
50
|
+
});
|
|
51
|
+
(0, exercise_1.tryToAddWrongProp)(res, '+\\infty');
|
|
52
|
+
(0, exercise_1.tryToAddWrongProp)(res, '-\\infty');
|
|
53
|
+
(0, exercise_1.tryToAddWrongProp)(res, '0');
|
|
54
|
+
(0, exercise_1.tryToAddWrongProp)(res, leadingCoeffsRational);
|
|
55
|
+
const missing = n - res.length;
|
|
56
|
+
for (let i = 0; i < missing; i++) {
|
|
57
|
+
let isDuplicate;
|
|
58
|
+
let proposition;
|
|
59
|
+
do {
|
|
60
|
+
const wrongAnswer = (0, randint_1.randint)(-10, 10) + '';
|
|
61
|
+
proposition = {
|
|
62
|
+
id: (0, uuid_1.v4)() + ``,
|
|
63
|
+
statement: wrongAnswer,
|
|
64
|
+
isRightAnswer: false,
|
|
65
|
+
format: 'tex',
|
|
66
|
+
};
|
|
67
|
+
isDuplicate = res.some((p) => p.statement === proposition.statement);
|
|
68
|
+
} while (isDuplicate);
|
|
69
|
+
res.push(proposition);
|
|
70
|
+
}
|
|
71
|
+
return (0, shuffle_1.shuffle)(res);
|
|
72
|
+
};
|
|
73
|
+
const question = {
|
|
74
|
+
answer,
|
|
75
|
+
instruction: `Déterminer la limite en $${to}$ de la fonction $f$ définie par : $f(x) = \\dfrac{${polyNum
|
|
76
|
+
.toTree()
|
|
77
|
+
.toTex()}}{${polyDenum.toTree().toTex()}}$.`,
|
|
78
|
+
keys: ['infty'],
|
|
79
|
+
getPropositions,
|
|
80
|
+
answerFormat: 'tex',
|
|
81
|
+
};
|
|
82
|
+
return question;
|
|
83
|
+
}
|
|
84
|
+
exports.getSequenceRationalFracLimitQuestion = getSequenceRationalFracLimitQuestion;
|