math-exercises 2.2.93 → 2.2.95
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/calcul/fractions/fractionSquare.d.ts +8 -0
- package/lib/exercises/math/calcul/fractions/fractionSquare.d.ts.map +1 -0
- package/lib/exercises/math/calcul/fractions/fractionSquare.js +107 -0
- package/lib/exercises/math/calcul/fractions/fractionsSum.d.ts.map +1 -1
- package/lib/exercises/math/calcul/fractions/fractionsSum.js +2 -1
- package/lib/exercises/math/calcul/fractions/fractionsSumsMultiplesDenominators.d.ts.map +1 -1
- package/lib/exercises/math/calcul/fractions/fractionsSumsMultiplesDenominators.js +2 -1
- package/lib/exercises/math/calcul/fractions/fractionsSumsPrimeDenominators.d.ts.map +1 -1
- package/lib/exercises/math/calcul/fractions/fractionsSumsPrimeDenominators.js +2 -1
- package/lib/exercises/math/calcul/fractions/fractionsSumsSameDenominators.d.ts.map +1 -1
- package/lib/exercises/math/calcul/fractions/fractionsSumsSameDenominators.js +2 -1
- package/lib/exercises/math/calcul/fractions/index.d.ts +1 -0
- package/lib/exercises/math/calcul/fractions/index.d.ts.map +1 -1
- package/lib/exercises/math/calcul/fractions/index.js +1 -0
- package/lib/exercises/math/calcul/proportionality/findCoeffInProportionalTableNonIntegers.d.ts.map +1 -1
- package/lib/exercises/math/calcul/proportionality/findCoeffInProportionalTableNonIntegers.js +2 -1
- package/lib/exercises/math/calculLitteral/distributivity/doubleDistributivityWithCoeff.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/distributivity/doubleDistributivityWithCoeff.js +0 -4
- package/lib/exercises/math/calculLitteral/distributivity/identitiesWithNonIntegers.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/distributivity/identitiesWithNonIntegers.js +2 -1
- package/lib/exercises/math/calculLitteral/equation/choseOperationToSolveEquation.d.ts +9 -0
- package/lib/exercises/math/calculLitteral/equation/choseOperationToSolveEquation.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/choseOperationToSolveEquation.js +160 -126
- package/lib/exercises/math/calculLitteral/equation/equationSimpleSquare.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/equationSimpleSquare.js +2 -1
- package/lib/exercises/math/calculLitteral/equation/index.d.ts +1 -0
- package/lib/exercises/math/calculLitteral/equation/index.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/index.js +1 -0
- package/lib/exercises/math/calculLitteral/factorisation/factoByX.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/factorisation/factoByX.js +2 -1
- package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq1.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq1.js +76 -41
- package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq2.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq2.js +71 -40
- package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq3.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq3.js +79 -47
- package/lib/exercises/math/calculLitteral/factorisation/factoType1Exercise.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/factorisation/factoType1Exercise.js +2 -1
- package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType0.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType0.js +2 -1
- package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType1.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType1.js +2 -1
- package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType2.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType2.js +2 -1
- package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType3.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType3.js +2 -1
- package/lib/exercises/math/calculLitteral/inequations/squareFunctionInequation.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/inequations/squareFunctionInequation.js +2 -1
- package/lib/exercises/math/derivation/derivative/convexityQuadrinomials.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/convexityQuadrinomials.js +2 -1
- package/lib/exercises/math/derivation/derivative/expDerivativeFour.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/expDerivativeFour.js +2 -1
- package/lib/exercises/math/derivation/derivative/expDerivativeThree.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/expDerivativeThree.js +2 -1
- package/lib/exercises/math/derivation/derivative/lnDerivativeThree.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/lnDerivativeThree.js +2 -1
- package/lib/exercises/math/derivation/derivative/quotientDerivative.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/quotientDerivative.js +2 -1
- package/lib/exercises/math/derivation/derivative/rootFunctionDerivative.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/rootFunctionDerivative.js +2 -1
- package/lib/exercises/math/derivation/derivative/sqrtCompositionDerivation.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/sqrtCompositionDerivation.js +2 -1
- package/lib/exercises/math/derivation/derivative/thirdDegreeDerivative.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/thirdDegreeDerivative.js +2 -1
- package/lib/exercises/math/derivation/derivative/thirdDegreeFunctionVariation.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/thirdDegreeFunctionVariation.js +2 -1
- package/lib/exercises/math/functions/absolute/absolueValueAffineEquation.d.ts.map +1 -1
- package/lib/exercises/math/functions/absolute/absolueValueAffineEquation.js +2 -1
- package/lib/exercises/math/functions/absolute/absolueValueInequationsSup.d.ts.map +1 -1
- package/lib/exercises/math/functions/absolute/absolueValueInequationsSup.js +2 -1
- package/lib/exercises/math/functions/absolute/absoluteValueInequations.d.ts.map +1 -1
- package/lib/exercises/math/functions/absolute/absoluteValueInequations.js +2 -1
- package/lib/exercises/math/functions/affines/affineExpressionFromTwoImages.d.ts.map +1 -1
- package/lib/exercises/math/functions/affines/affineExpressionFromTwoImages.js +2 -1
- package/lib/exercises/math/functions/affines/affineExpressionReading.d.ts.map +1 -1
- package/lib/exercises/math/functions/affines/affineExpressionReading.js +46 -23
- package/lib/exercises/math/functions/affines/signFunction.d.ts.map +1 -1
- package/lib/exercises/math/functions/affines/signFunction.js +2 -1
- package/lib/exercises/math/functions/basics/graphicEquation.d.ts.map +1 -1
- package/lib/exercises/math/functions/basics/graphicEquation.js +2 -1
- package/lib/exercises/math/functions/basics/graphicInequation.d.ts.map +1 -1
- package/lib/exercises/math/functions/basics/graphicInequation.js +2 -1
- package/lib/exercises/math/functions/basics/graphicInequationAffine.d.ts.map +1 -1
- package/lib/exercises/math/functions/basics/graphicInequationAffine.js +2 -1
- package/lib/exercises/math/functions/basics/imageFunction.d.ts.map +1 -1
- package/lib/exercises/math/functions/basics/imageFunction.js +2 -1
- package/lib/exercises/math/functions/basics/twoFunctionsInequation.d.ts.map +1 -1
- package/lib/exercises/math/functions/basics/twoFunctionsInequation.js +2 -1
- package/lib/exercises/math/functions/exponential/expEquation.d.ts.map +1 -1
- package/lib/exercises/math/functions/exponential/expEquation.js +2 -1
- package/lib/exercises/math/functions/logarithm/logPowerEquation.d.ts.map +1 -1
- package/lib/exercises/math/functions/logarithm/logPowerEquation.js +2 -1
- package/lib/exercises/math/functions/sign/affineProductSign.d.ts.map +1 -1
- package/lib/exercises/math/functions/sign/affineProductSign.js +2 -1
- package/lib/exercises/math/functions/square/squareImageInterval.d.ts.map +1 -1
- package/lib/exercises/math/functions/square/squareImageInterval.js +2 -1
- package/lib/exercises/math/functions/trinoms/coefficientsIdentification.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/coefficientsIdentification.js +2 -1
- package/lib/exercises/math/functions/trinoms/secondDegreeInequation.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/secondDegreeInequation.js +2 -1
- package/lib/exercises/math/functions/trinoms/trinomSignFromRoots.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/trinomSignFromRoots.js +2 -1
- package/lib/exercises/math/geometry/cartesian/readAbscissOnLine.d.ts.map +1 -1
- package/lib/exercises/math/geometry/cartesian/readAbscissOnLine.js +2 -1
- package/lib/exercises/math/geometry/cartesian/readAbscissOnSemiLine.d.ts.map +1 -1
- package/lib/exercises/math/geometry/cartesian/readAbscissOnSemiLine.js +2 -1
- package/lib/exercises/math/geometry/convexity/convexityQuadrinomialsGeo.d.ts.map +1 -1
- package/lib/exercises/math/geometry/convexity/convexityQuadrinomialsGeo.js +2 -1
- package/lib/exercises/math/geometry/parametric/extractPointFromParametricLine.d.ts.map +1 -1
- package/lib/exercises/math/geometry/parametric/extractPointFromParametricLine.js +2 -1
- package/lib/exercises/math/geometry/parametric/extractVectorFromParametricLine.d.ts.map +1 -1
- package/lib/exercises/math/geometry/parametric/extractVectorFromParametricLine.js +2 -1
- package/lib/exercises/math/matrices/matrixInversibilityDomain.d.ts.map +1 -1
- package/lib/exercises/math/matrices/matrixInversibilityDomain.js +2 -1
- package/lib/exercises/math/percent/findRightCalcul.d.ts +10 -0
- package/lib/exercises/math/percent/findRightCalcul.d.ts.map +1 -0
- package/lib/exercises/math/percent/findRightCalcul.js +116 -0
- package/lib/exercises/math/percent/htToTTC.d.ts.map +1 -1
- package/lib/exercises/math/percent/htToTTC.js +34 -12
- package/lib/exercises/math/percent/index.d.ts +2 -0
- package/lib/exercises/math/percent/index.d.ts.map +1 -1
- package/lib/exercises/math/percent/index.js +2 -0
- package/lib/exercises/math/percent/percentToDecimal.d.ts.map +1 -1
- package/lib/exercises/math/percent/percentToDecimal.js +6 -2
- package/lib/exercises/math/percent/percentWritings.d.ts +8 -0
- package/lib/exercises/math/percent/percentWritings.d.ts.map +1 -0
- package/lib/exercises/math/percent/percentWritings.js +145 -0
- package/lib/exercises/math/percent/ttcToHT.d.ts.map +1 -1
- package/lib/exercises/math/percent/ttcToHT.js +33 -12
- package/lib/exercises/math/powers/powersMixOperations.d.ts.map +1 -1
- package/lib/exercises/math/powers/powersMixOperations.js +2 -1
- package/lib/exercises/math/probaStat/probabilityTree.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/probabilityTree.js +2 -1
- package/lib/exercises/math/sampling/confidenceInterval.d.ts.map +1 -1
- package/lib/exercises/math/sampling/confidenceInterval.js +2 -1
- package/lib/exercises/math/sampling/fluctuationInterval.d.ts.map +1 -1
- package/lib/exercises/math/sampling/fluctuationInterval.js +2 -1
- package/lib/exercises/math/sequences/geometric/geometricExplicitFormulaUsage.d.ts.map +1 -1
- package/lib/exercises/math/sequences/geometric/geometricExplicitFormulaUsage.js +55 -23
- package/lib/exercises/math/sets/intervals/inequalityToInterval.d.ts.map +1 -1
- package/lib/exercises/math/sets/intervals/inequalityToInterval.js +2 -1
- package/lib/exercises/math/sets/intervals/intervalsIntersection.d.ts.map +1 -1
- package/lib/exercises/math/sets/intervals/intervalsIntersection.js +2 -1
- package/lib/exercises/math/sets/intervals/intervalsUnion.d.ts.map +1 -1
- package/lib/exercises/math/sets/intervals/intervalsUnion.js +2 -1
- package/lib/exercises/math/trigonometry/degreeToRadians.d.ts.map +1 -1
- package/lib/exercises/math/trigonometry/degreeToRadians.js +2 -1
- package/lib/exercises/math/trigonometry/mainAngleMeasure.d.ts.map +1 -1
- package/lib/exercises/math/trigonometry/mainAngleMeasure.js +2 -1
- package/lib/exercises/vea/equationVEA.d.ts.map +1 -1
- package/lib/exercises/vea/equationVEA.js +2 -1
- package/lib/exercises/vea/rationalVEA.d.ts.map +1 -1
- package/lib/exercises/vea/rationalVEA.js +2 -1
- package/lib/exercises/vea/sqrtVEA.d.ts.map +1 -1
- package/lib/exercises/vea/sqrtVEA.js +2 -1
- package/lib/index.d.ts +16 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/playground.d.ts.map +1 -1
- package/lib/playground.js +1 -12
- package/lib/tree/nodes/functions/oppositeNode.d.ts.map +1 -1
- package/lib/tree/nodes/functions/oppositeNode.js +1 -1
- package/lib/tree/nodes/operators/addNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/addNode.js +1 -1
- package/lib/tree/nodes/operators/fractionNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/fractionNode.js +3 -2
- package/lib/tree/nodes/operators/multiplyNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/multiplyNode.js +1 -1
- package/lib/tree/parsers/affineParser.d.ts.map +1 -1
- package/lib/tree/parsers/affineParser.js +2 -1
- package/lib/tree/parsers/discreteSetParser.d.ts.map +1 -1
- package/lib/tree/parsers/discreteSetParser.js +2 -3
- package/lib/tree/parsers/equationSolutionParser.d.ts.map +1 -1
- package/lib/tree/parsers/equationSolutionParser.js +2 -1
- package/lib/tree/parsers/inequationParser.d.ts.map +1 -1
- package/lib/tree/parsers/inequationParser.js +2 -1
- package/lib/tree/parsers/intervalParser.d.ts.map +1 -1
- package/lib/tree/parsers/intervalParser.js +3 -2
- package/lib/tree/parsers/latexParser.d.ts.map +1 -1
- package/lib/tree/parsers/latexParser.js +12 -0
- package/lib/tree/parsers/monomParser.d.ts.map +1 -1
- package/lib/tree/parsers/monomParser.js +2 -1
- package/lib/tree/parsers/polynomialParser.d.ts.map +1 -1
- package/lib/tree/parsers/polynomialParser.js +2 -1
- package/lib/tree/parsers/powerParser.d.ts.map +1 -1
- package/lib/tree/parsers/powerParser.js +2 -1
- package/lib/tree/parsers/sqrtParser.d.ts.map +1 -1
- package/lib/tree/parsers/sqrtParser.js +2 -1
- package/lib/tree/parsers/trinomParser.d.ts.map +1 -1
- package/lib/tree/parsers/trinomParser.js +2 -1
- package/lib/tree/parsers/unionIntervalParser.d.ts.map +1 -1
- package/lib/tree/parsers/unionIntervalParser.js +2 -1
- package/lib/utils/alea/random.js +1 -1
- package/lib/utils/errors/handleVEAError.d.ts +2 -0
- package/lib/utils/errors/handleVEAError.d.ts.map +1 -0
- package/lib/utils/errors/handleVEAError.js +9 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/equation/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,wCAAwC,CAAC;AACvD,cAAc,8BAA8B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/equation/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,wCAAwC,CAAC;AACvD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,iCAAiC,CAAC"}
|
|
@@ -28,3 +28,4 @@ __exportStar(require("./firstDegreeEquationIntType3"), exports);
|
|
|
28
28
|
__exportStar(require("./equationFromSentenceExercise"), exports);
|
|
29
29
|
__exportStar(require("./binomialsTrinomialsProposedSolutions"), exports);
|
|
30
30
|
__exportStar(require("./equationWithDistributivity"), exports);
|
|
31
|
+
__exportStar(require("./choseOperationToSolveEquation"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"factoByX.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/factorisation/factoByX.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"factoByX.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/factorisation/factoByX.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,0BAA0B,CAAC;AAkBlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAqJF,eAAO,MAAM,QAAQ,EAAE,QAAQ,CAAC,WAAW,CAiB1C,CAAC"}
|
|
@@ -11,6 +11,7 @@ const addNode_1 = require("../../../../tree/nodes/operators/addNode");
|
|
|
11
11
|
const multiplyNode_1 = require("../../../../tree/nodes/operators/multiplyNode");
|
|
12
12
|
const powerNode_1 = require("../../../../tree/nodes/operators/powerNode");
|
|
13
13
|
const latexParser_1 = require("../../../../tree/parsers/latexParser");
|
|
14
|
+
const handleVEAError_1 = require("../../../../utils/errors/handleVEAError");
|
|
14
15
|
const alignTex_1 = require("../../../../utils/latex/alignTex");
|
|
15
16
|
const getPropositions = (n, { answer, ...identifiers }) => {
|
|
16
17
|
const propositions = [];
|
|
@@ -106,7 +107,7 @@ const isAnswerValid = (ans, { answer, ...identifiers }) => {
|
|
|
106
107
|
.toTex() === statement.toTex());
|
|
107
108
|
}
|
|
108
109
|
catch (err) {
|
|
109
|
-
return
|
|
110
|
+
return (0, handleVEAError_1.handleVEAError)(err);
|
|
110
111
|
}
|
|
111
112
|
};
|
|
112
113
|
const getFactoByXQuestion = (ops) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"factoIdRmq1.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/factorisation/factoIdRmq1.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"factoIdRmq1.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/factorisation/factoIdRmq1.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,0BAA0B,CAAC;AAuBlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAqIF,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAC,WAAW,CAkB7C,CAAC"}
|
|
@@ -11,47 +11,76 @@ const multiplyNode_1 = require("../../../../tree/nodes/operators/multiplyNode");
|
|
|
11
11
|
const powerNode_1 = require("../../../../tree/nodes/operators/powerNode");
|
|
12
12
|
const alignTex_1 = require("../../../../utils/latex/alignTex");
|
|
13
13
|
const shuffle_1 = require("../../../../utils/alea/shuffle");
|
|
14
|
-
const
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
max: 10,
|
|
19
|
-
});
|
|
14
|
+
const latexParser_1 = require("../../../../tree/parsers/latexParser");
|
|
15
|
+
const handleVEAError_1 = require("../../../../utils/errors/handleVEAError");
|
|
16
|
+
const getStatementNode = (identifiers) => {
|
|
17
|
+
const affine = new affine_1.Affine(identifiers.a, identifiers.b);
|
|
20
18
|
const statementTree = affine.multiply(affine).toTree();
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
return statementTree;
|
|
20
|
+
};
|
|
21
|
+
const getStartStatement = (identifiers) => {
|
|
22
|
+
const statementTree = getStatementNode(identifiers);
|
|
24
23
|
const statementTex = statementTree.toTex();
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
24
|
+
return statementTex;
|
|
25
|
+
};
|
|
26
|
+
const getInstruction = (identifiers) => {
|
|
27
|
+
return `Factoriser :
|
|
28
|
+
|
|
29
|
+
$$
|
|
30
|
+
${getStartStatement(identifiers)}
|
|
31
|
+
$$`;
|
|
32
|
+
};
|
|
33
|
+
const getHint = (identifiers) => {
|
|
34
|
+
return `Essaie de réécrire cette expression sous la forme
|
|
33
35
|
|
|
34
36
|
$$
|
|
35
37
|
a^2 + 2ab+b^2
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
$$`;
|
|
39
|
+
};
|
|
40
|
+
const getCorrection = (identifiers) => {
|
|
41
|
+
const affine = new affine_1.Affine(identifiers.a, identifiers.b);
|
|
42
|
+
const aMonom = new affine_1.Affine(affine.a, 0).toTree();
|
|
43
|
+
const statementTex = getStartStatement(identifiers);
|
|
44
|
+
const answer = getAnswer(identifiers);
|
|
45
|
+
return `On utilise l'identité remarquable
|
|
46
|
+
|
|
40
47
|
$$
|
|
41
48
|
a^2 + 2ab+b^2 = (a+b)^2
|
|
42
49
|
$$
|
|
43
|
-
|
|
50
|
+
|
|
44
51
|
en prenant $a=${aMonom.toTex()}$ et $b=${affine.b}$ :
|
|
45
52
|
|
|
46
53
|
${(0, alignTex_1.alignTex)([
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
54
|
+
[
|
|
55
|
+
statementTex,
|
|
56
|
+
"=",
|
|
57
|
+
new addNode_1.AddNode(new addNode_1.AddNode(new powerNode_1.SquareNode(aMonom), new multiplyNode_1.MultiplyNode((2).toTree(), new multiplyNode_1.MultiplyNode(aMonom, affine.b.toTree()))), new powerNode_1.SquareNode(affine.b.toTree())).toTex(),
|
|
58
|
+
],
|
|
59
|
+
["", "=", answer],
|
|
60
|
+
])}
|
|
61
|
+
`;
|
|
62
|
+
};
|
|
63
|
+
const getAnswer = (identifiers) => {
|
|
64
|
+
const affine = new affine_1.Affine(identifiers.a, identifiers.b);
|
|
65
|
+
const answerTree = new powerNode_1.PowerNode(affine.toTree(), new numberNode_1.NumberNode(2));
|
|
66
|
+
const answer = answerTree.simplify().toTex();
|
|
67
|
+
return answer;
|
|
68
|
+
};
|
|
69
|
+
const getFactoType1Question = () => {
|
|
70
|
+
const affine = affine_1.AffineConstructor.random({ min: 1, max: 10 }, {
|
|
71
|
+
min: 1,
|
|
72
|
+
max: 10,
|
|
73
|
+
});
|
|
74
|
+
const identifiers = { a: affine.a, b: affine.b };
|
|
75
|
+
const question = {
|
|
76
|
+
instruction: getInstruction(identifiers),
|
|
77
|
+
startStatement: getStartStatement(identifiers),
|
|
78
|
+
answer: getAnswer(identifiers),
|
|
79
|
+
keys: ["x"],
|
|
80
|
+
answerFormat: "tex",
|
|
81
|
+
identifiers,
|
|
82
|
+
hint: getHint(identifiers),
|
|
83
|
+
correction: getCorrection(identifiers),
|
|
55
84
|
};
|
|
56
85
|
return question;
|
|
57
86
|
};
|
|
@@ -65,18 +94,20 @@ const getPropositions = (n, { answer, a, b }) => {
|
|
|
65
94
|
}
|
|
66
95
|
return (0, shuffle_1.shuffle)(propositions);
|
|
67
96
|
};
|
|
68
|
-
const isAnswerValid = (ans, { a, b }) => {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
97
|
+
const isAnswerValid = (ans, { answer, a, b }) => {
|
|
98
|
+
try {
|
|
99
|
+
const parsed = (0, latexParser_1.parseAlgebraic)(ans);
|
|
100
|
+
if (!parsed)
|
|
101
|
+
return false;
|
|
102
|
+
if (!(0, multiplyNode_1.isMultiplyNode)(parsed) &&
|
|
103
|
+
!(0, powerNode_1.isSquareNode)(parsed) &&
|
|
104
|
+
!(0, powerNode_1.isPowerNode)(parsed))
|
|
105
|
+
return false;
|
|
106
|
+
return parsed.simplify().toTex() === answer;
|
|
107
|
+
}
|
|
108
|
+
catch (err) {
|
|
109
|
+
return (0, handleVEAError_1.handleVEAError)(err);
|
|
78
110
|
}
|
|
79
|
-
return validLatexs.includes(ans);
|
|
80
111
|
};
|
|
81
112
|
exports.factoIdRmq1 = {
|
|
82
113
|
id: "factoIdRmq1",
|
|
@@ -92,4 +123,8 @@ exports.factoIdRmq1 = {
|
|
|
92
123
|
isAnswerValid,
|
|
93
124
|
subject: "Mathématiques",
|
|
94
125
|
hasHintAndCorrection: true,
|
|
126
|
+
getInstruction,
|
|
127
|
+
getAnswer,
|
|
128
|
+
getHint,
|
|
129
|
+
getCorrection,
|
|
95
130
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"factoIdRmq2.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/factorisation/factoIdRmq2.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"factoIdRmq2.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/factorisation/factoIdRmq2.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,0BAA0B,CAAC;AAwBlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA+HF,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAC,WAAW,CAkB7C,CAAC"}
|
|
@@ -12,31 +12,40 @@ const powerNode_1 = require("../../../../tree/nodes/operators/powerNode");
|
|
|
12
12
|
const substractNode_1 = require("../../../../tree/nodes/operators/substractNode");
|
|
13
13
|
const alignTex_1 = require("../../../../utils/latex/alignTex");
|
|
14
14
|
const shuffle_1 = require("../../../../utils/alea/shuffle");
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
15
|
+
const latexParser_1 = require("../../../../tree/parsers/latexParser");
|
|
16
|
+
const handleVEAError_1 = require("../../../../utils/errors/handleVEAError");
|
|
17
|
+
const getInstruction = (identifiers) => {
|
|
18
|
+
return `Factoriser :
|
|
19
|
+
|
|
20
|
+
$$
|
|
21
|
+
${getStartStatement(identifiers)}
|
|
22
|
+
$$`;
|
|
23
|
+
};
|
|
24
|
+
const getAnswer = (identifiers) => {
|
|
25
|
+
const affine = new affine_1.Affine(identifiers.a, identifiers.b);
|
|
23
26
|
const answerTree = new powerNode_1.PowerNode(affine.toTree(), new numberNode_1.NumberNode(2));
|
|
24
|
-
const answer = answerTree.toTex();
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
answer,
|
|
30
|
-
keys: ["x"],
|
|
31
|
-
answerFormat: "tex",
|
|
32
|
-
identifiers: { a: affine.a, b: affine.b },
|
|
33
|
-
hint: `Essaie de réécrire cette expression sous la forme
|
|
27
|
+
const answer = answerTree.simplify().toTex();
|
|
28
|
+
return answer;
|
|
29
|
+
};
|
|
30
|
+
const getHint = (identifiers) => {
|
|
31
|
+
return `Essaie de réécrire cette expression sous la forme
|
|
34
32
|
|
|
35
33
|
$$
|
|
36
34
|
a^2 - 2ab+b^2
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
35
|
+
$$`;
|
|
36
|
+
};
|
|
37
|
+
const getStartStatement = (identifiers) => {
|
|
38
|
+
const affine = new affine_1.Affine(identifiers.a, identifiers.b);
|
|
39
|
+
const statementTree = affine.multiply(affine).toTree();
|
|
40
|
+
const statementTex = statementTree.toTex();
|
|
41
|
+
return statementTex;
|
|
42
|
+
};
|
|
43
|
+
const getCorrection = (identifiers) => {
|
|
44
|
+
const affine = new affine_1.Affine(identifiers.a, identifiers.b);
|
|
45
|
+
const answer = getAnswer(identifiers);
|
|
46
|
+
const statementTex = getStartStatement(identifiers);
|
|
47
|
+
const aMonom = new affine_1.Affine(affine.a, 0).toTree();
|
|
48
|
+
return `On utilise l'identité remarquable
|
|
40
49
|
|
|
41
50
|
$$
|
|
42
51
|
a^2 - 2ab+b^2 = (a-b)^2
|
|
@@ -45,14 +54,30 @@ $$
|
|
|
45
54
|
en prenant $a=${aMonom.toTex()}$ et $b=${-affine.b}$ :
|
|
46
55
|
|
|
47
56
|
${(0, alignTex_1.alignTex)([
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
57
|
+
[
|
|
58
|
+
statementTex,
|
|
59
|
+
"=",
|
|
60
|
+
new addNode_1.AddNode(new substractNode_1.SubstractNode(new powerNode_1.SquareNode(aMonom), new multiplyNode_1.MultiplyNode((2).toTree(), new multiplyNode_1.MultiplyNode(aMonom, (-affine.b).toTree()))), new powerNode_1.SquareNode((-affine.b).toTree())).toTex(),
|
|
61
|
+
],
|
|
62
|
+
["", "=", answer],
|
|
63
|
+
])}
|
|
64
|
+
`;
|
|
65
|
+
};
|
|
66
|
+
const getFactoType1Question = () => {
|
|
67
|
+
const affine = affine_1.AffineConstructor.random({
|
|
68
|
+
min: 1,
|
|
69
|
+
max: 10,
|
|
70
|
+
}, { min: -9, max: 0 });
|
|
71
|
+
const identifiers = { a: affine.a, b: affine.b };
|
|
72
|
+
const question = {
|
|
73
|
+
instruction: getInstruction(identifiers),
|
|
74
|
+
startStatement: getStartStatement(identifiers),
|
|
75
|
+
answer: getAnswer(identifiers),
|
|
76
|
+
keys: ["x"],
|
|
77
|
+
answerFormat: "tex",
|
|
78
|
+
identifiers,
|
|
79
|
+
hint: getHint(identifiers),
|
|
80
|
+
correction: getCorrection(identifiers),
|
|
56
81
|
};
|
|
57
82
|
return question;
|
|
58
83
|
};
|
|
@@ -67,18 +92,20 @@ const getPropositions = (n, { answer, a, b }) => {
|
|
|
67
92
|
}
|
|
68
93
|
return (0, shuffle_1.shuffle)(propositions);
|
|
69
94
|
};
|
|
70
|
-
const isAnswerValid = (ans, { a, b }) => {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
95
|
+
const isAnswerValid = (ans, { answer, a, b }) => {
|
|
96
|
+
try {
|
|
97
|
+
const parsed = (0, latexParser_1.parseAlgebraic)(ans);
|
|
98
|
+
if (!parsed)
|
|
99
|
+
return false;
|
|
100
|
+
if (!(0, multiplyNode_1.isMultiplyNode)(parsed) &&
|
|
101
|
+
!(0, powerNode_1.isSquareNode)(parsed) &&
|
|
102
|
+
!(0, powerNode_1.isPowerNode)(parsed))
|
|
103
|
+
return false;
|
|
104
|
+
return parsed.simplify().toTex() === answer;
|
|
105
|
+
}
|
|
106
|
+
catch (err) {
|
|
107
|
+
return (0, handleVEAError_1.handleVEAError)(err);
|
|
80
108
|
}
|
|
81
|
-
return validLatexs.includes(ans);
|
|
82
109
|
};
|
|
83
110
|
exports.factoIdRmq2 = {
|
|
84
111
|
id: "factoIdRmq2",
|
|
@@ -94,4 +121,8 @@ exports.factoIdRmq2 = {
|
|
|
94
121
|
isAnswerValid,
|
|
95
122
|
subject: "Mathématiques",
|
|
96
123
|
hasHintAndCorrection: true,
|
|
124
|
+
getAnswer,
|
|
125
|
+
getCorrection,
|
|
126
|
+
getHint,
|
|
127
|
+
getInstruction,
|
|
97
128
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"factoIdRmq3.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/factorisation/factoIdRmq3.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"factoIdRmq3.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/factorisation/factoIdRmq3.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,0BAA0B,CAAC;AAmBlC,KAAK,WAAW,GAAG;IACjB,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,aAAa,EAAE,MAAM,EAAE,CAAC;CACzB,CAAC;AAmKF,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAC,WAAW,CAkB7C,CAAC"}
|
|
@@ -4,41 +4,42 @@ exports.factoIdRmq3 = void 0;
|
|
|
4
4
|
const exercise_1 = require("../../../../exercises/exercise");
|
|
5
5
|
const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQuestions");
|
|
6
6
|
const affine_1 = require("../../../../math/polynomials/affine");
|
|
7
|
-
const gcd_1 = require("../../../../math/utils/arithmetic/gcd");
|
|
8
7
|
const randint_1 = require("../../../../math/utils/random/randint");
|
|
9
8
|
const multiplyNode_1 = require("../../../../tree/nodes/operators/multiplyNode");
|
|
10
9
|
const powerNode_1 = require("../../../../tree/nodes/operators/powerNode");
|
|
11
10
|
const substractNode_1 = require("../../../../tree/nodes/operators/substractNode");
|
|
11
|
+
const latexParser_1 = require("../../../../tree/parsers/latexParser");
|
|
12
|
+
const handleVEAError_1 = require("../../../../utils/errors/handleVEAError");
|
|
12
13
|
const alignTex_1 = require("../../../../utils/latex/alignTex");
|
|
13
|
-
const
|
|
14
|
-
const affine = affine_1.
|
|
15
|
-
|
|
16
|
-
max: 11,
|
|
17
|
-
}, { excludes: [0] });
|
|
18
|
-
const affine2 = new affine_1.Affine(affine.a, -affine.b);
|
|
19
|
-
const statementTree = affine.multiply(affine2).toTree();
|
|
20
|
-
const statementTex = statementTree.toTex();
|
|
21
|
-
const bPositive = Math.abs(affine.b);
|
|
22
|
-
const aMonom = new multiplyNode_1.MultiplyNode(affine.a.toTree(), "x".toTree());
|
|
14
|
+
const getAnswer = (identifiers) => {
|
|
15
|
+
const affine = new affine_1.Affine(identifiers.affine1Coeffs[1], identifiers.affine1Coeffs[0]);
|
|
16
|
+
const affine2 = new affine_1.Affine(identifiers.affine2Coeffs[1], identifiers.affine2Coeffs[0]);
|
|
23
17
|
const answerTree = new multiplyNode_1.MultiplyNode(affine.toTree(), affine2.toTree());
|
|
24
|
-
const answer = answerTree.toTex();
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
18
|
+
const answer = answerTree.simplify().toTex();
|
|
19
|
+
return answer;
|
|
20
|
+
};
|
|
21
|
+
const getInstruction = (identifiers) => {
|
|
22
|
+
return `Factoriser :
|
|
23
|
+
|
|
24
|
+
$$
|
|
25
|
+
${getStartStatement(identifiers)}
|
|
26
|
+
$$`;
|
|
27
|
+
};
|
|
28
|
+
const getHint = (identifiers) => {
|
|
29
|
+
return `Utilise l'identité remarquable
|
|
36
30
|
|
|
37
31
|
$$
|
|
38
32
|
a^2 - b^2 = (a-b)(a+b)
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
33
|
+
$$`;
|
|
34
|
+
};
|
|
35
|
+
const getCorrection = (identifiers) => {
|
|
36
|
+
const affine = new affine_1.Affine(identifiers.affine1Coeffs[1], identifiers.affine1Coeffs[0]);
|
|
37
|
+
const affine2 = new affine_1.Affine(identifiers.affine2Coeffs[1], identifiers.affine2Coeffs[0]);
|
|
38
|
+
const statementTex = getStartStatement(identifiers);
|
|
39
|
+
const answer = getAnswer(identifiers);
|
|
40
|
+
const bPositive = Math.abs(affine.b);
|
|
41
|
+
const aMonom = new multiplyNode_1.MultiplyNode(affine.a.toTree(), "x".toTree());
|
|
42
|
+
return `On utilise l'identité remarquable
|
|
42
43
|
|
|
43
44
|
$$
|
|
44
45
|
a^2 - b^2=(a-b)(a+b)
|
|
@@ -47,13 +48,39 @@ $$
|
|
|
47
48
|
en prenant $a=${aMonom.toTex()}$ et $b=${bPositive}$ :
|
|
48
49
|
|
|
49
50
|
${(0, alignTex_1.alignTex)([
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
51
|
+
[
|
|
52
|
+
statementTex,
|
|
53
|
+
"=",
|
|
54
|
+
new substractNode_1.SubstractNode(new powerNode_1.SquareNode(aMonom), new powerNode_1.SquareNode(bPositive.toTree())).toTex(),
|
|
55
|
+
],
|
|
56
|
+
["", "=", answer],
|
|
57
|
+
])}`;
|
|
58
|
+
};
|
|
59
|
+
const getStartStatement = (identifiers) => {
|
|
60
|
+
const affine = new affine_1.Affine(identifiers.affine1Coeffs[1], identifiers.affine1Coeffs[0]);
|
|
61
|
+
const affine2 = new affine_1.Affine(identifiers.affine2Coeffs[1], identifiers.affine2Coeffs[0]);
|
|
62
|
+
const statementTree = affine.multiply(affine2).toTree();
|
|
63
|
+
return statementTree.toTex();
|
|
64
|
+
};
|
|
65
|
+
const getFactoType1Question = () => {
|
|
66
|
+
const affine = affine_1.AffineConstructor.random({
|
|
67
|
+
min: 1,
|
|
68
|
+
max: 11,
|
|
69
|
+
}, { excludes: [0] });
|
|
70
|
+
const affine2 = new affine_1.Affine(affine.a, -affine.b);
|
|
71
|
+
const identifiers = {
|
|
72
|
+
affine1Coeffs: affine.coefficients,
|
|
73
|
+
affine2Coeffs: affine2.coefficients,
|
|
74
|
+
};
|
|
75
|
+
const question = {
|
|
76
|
+
instruction: getInstruction(identifiers),
|
|
77
|
+
startStatement: getStartStatement(identifiers),
|
|
78
|
+
answer: getAnswer(identifiers),
|
|
79
|
+
keys: ["x"],
|
|
80
|
+
answerFormat: "tex",
|
|
81
|
+
identifiers,
|
|
82
|
+
hint: getHint(identifiers),
|
|
83
|
+
correction: getCorrection(identifiers),
|
|
57
84
|
};
|
|
58
85
|
return question;
|
|
59
86
|
};
|
|
@@ -72,21 +99,22 @@ const getPropositions = (n, { answer, affine1Coeffs, affine2Coeffs }) => {
|
|
|
72
99
|
}
|
|
73
100
|
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
74
101
|
};
|
|
75
|
-
const isAnswerValid = (ans, {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
102
|
+
const isAnswerValid = (ans, { answer, ...identifiers }) => {
|
|
103
|
+
try {
|
|
104
|
+
const parsed = (0, latexParser_1.parseAlgebraic)(ans);
|
|
105
|
+
if (!parsed)
|
|
106
|
+
return false;
|
|
107
|
+
if (!(0, multiplyNode_1.isMultiplyNode)(parsed) &&
|
|
108
|
+
!(0, powerNode_1.isSquareNode)(parsed) &&
|
|
109
|
+
!(0, powerNode_1.isPowerNode)(parsed))
|
|
110
|
+
return false;
|
|
111
|
+
return (parsed
|
|
112
|
+
.simplify({ towardsDistribute: true, forbidFactorize: true })
|
|
113
|
+
.toTex() === getStartStatement(identifiers));
|
|
114
|
+
}
|
|
115
|
+
catch (err) {
|
|
116
|
+
return (0, handleVEAError_1.handleVEAError)(err);
|
|
88
117
|
}
|
|
89
|
-
return validLatexs.includes(ans);
|
|
90
118
|
};
|
|
91
119
|
exports.factoIdRmq3 = {
|
|
92
120
|
id: "factoIdRmq3",
|
|
@@ -102,4 +130,8 @@ exports.factoIdRmq3 = {
|
|
|
102
130
|
isAnswerValid,
|
|
103
131
|
subject: "Mathématiques",
|
|
104
132
|
hasHintAndCorrection: true,
|
|
133
|
+
getInstruction,
|
|
134
|
+
getHint,
|
|
135
|
+
getAnswer,
|
|
136
|
+
getCorrection,
|
|
105
137
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"factoType1Exercise.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/factorisation/factoType1Exercise.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"factoType1Exercise.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/factorisation/factoType1Exercise.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AAmBlC;;;GAGG;AACH,KAAK,WAAW,GAAG;IACjB,aAAa,EAAE,MAAM,EAAE,EAAE,CAAC;IAC1B,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAgKF,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,WAAW,CAepD,CAAC"}
|
|
@@ -14,6 +14,7 @@ const substractNode_1 = require("../../../../tree/nodes/operators/substractNode"
|
|
|
14
14
|
const latexParser_1 = require("../../../../tree/parsers/latexParser");
|
|
15
15
|
const random_1 = require("../../../../utils/alea/random");
|
|
16
16
|
const shuffle_1 = require("../../../../utils/alea/shuffle");
|
|
17
|
+
const handleVEAError_1 = require("../../../../utils/errors/handleVEAError");
|
|
17
18
|
const getStatementNode = (identifiers) => {
|
|
18
19
|
const { affinesCoeffs, operation } = identifiers;
|
|
19
20
|
const affines = affinesCoeffs.map((coeffs) => new affine_1.Affine(coeffs[1], coeffs[0]));
|
|
@@ -118,7 +119,7 @@ const isAnswerValid = (ans, { answer, ...identifiers }) => {
|
|
|
118
119
|
return simp.toTex() === answerSimp.toTex();
|
|
119
120
|
}
|
|
120
121
|
catch (err) {
|
|
121
|
-
return
|
|
122
|
+
return (0, handleVEAError_1.handleVEAError)(err);
|
|
122
123
|
}
|
|
123
124
|
};
|
|
124
125
|
exports.factoType1Exercise = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"firstDegreeInequationsType0.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/inequations/firstDegreeInequationsType0.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,0BAA0B,CAAC;AAIlC,OAAO,EACL,gBAAgB,EAGjB,MAAM,mCAAmC,CAAC;
|
|
1
|
+
{"version":3,"file":"firstDegreeInequationsType0.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/inequations/firstDegreeInequationsType0.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,0BAA0B,CAAC;AAIlC,OAAO,EACL,gBAAgB,EAGjB,MAAM,mCAAmC,CAAC;AAgB3C,cAAc;AAEd,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,QAAQ,EAAE,gBAAgB,CAAC;CAC5B,CAAC;AA6JF,KAAK,OAAO,GAAG;IACb,wBAAwB,EAAE,MAAM,CAAC;CAClC,CAAC;AAGF,eAAO,MAAM,2BAA2B,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAqBtE,CAAC"}
|
|
@@ -15,6 +15,7 @@ const inequationParser_1 = require("../../../../tree/parsers/inequationParser");
|
|
|
15
15
|
const intervalParser_1 = require("../../../../tree/parsers/intervalParser");
|
|
16
16
|
const coinFlip_1 = require("../../../../utils/alea/coinFlip");
|
|
17
17
|
const shuffle_1 = require("../../../../utils/alea/shuffle");
|
|
18
|
+
const handleVEAError_1 = require("../../../../utils/errors/handleVEAError");
|
|
18
19
|
const getHint = (identifiers) => {
|
|
19
20
|
return `Pour résoudre cette inéquation, il faut isoler $x$ à gauche. Pour cela, il faut effectuer des deux côtés de l'inéquation la bonne opération qui permet de supprimer le terme $${identifiers.b < 0 ? "" : "+"}${identifiers.b}$.`;
|
|
20
21
|
};
|
|
@@ -115,7 +116,7 @@ const isAnswerValid = (ans, { answer, ineqType, b, c }, opts) => {
|
|
|
115
116
|
}
|
|
116
117
|
}
|
|
117
118
|
catch (err) {
|
|
118
|
-
return
|
|
119
|
+
return (0, handleVEAError_1.handleVEAError)(err);
|
|
119
120
|
}
|
|
120
121
|
};
|
|
121
122
|
const options = [inequationSolutionFormat_1.inequationSolutionFormat];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"firstDegreeInequationsType1.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/inequations/firstDegreeInequationsType1.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,0BAA0B,CAAC;AAIlC,OAAO,EACL,gBAAgB,EAGjB,MAAM,mCAAmC,CAAC;
|
|
1
|
+
{"version":3,"file":"firstDegreeInequationsType1.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/inequations/firstDegreeInequationsType1.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,0BAA0B,CAAC;AAIlC,OAAO,EACL,gBAAgB,EAGjB,MAAM,mCAAmC,CAAC;AAe3C,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,QAAQ,EAAE,gBAAgB,CAAC;CAC5B,CAAC;AAgLF,KAAK,OAAO,GAAG;IACb,wBAAwB,EAAE,MAAM,CAAC;CAClC,CAAC;AAGF,eAAO,MAAM,2BAA2B,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAsBtE,CAAC"}
|
|
@@ -15,6 +15,7 @@ const inequationParser_1 = require("../../../../tree/parsers/inequationParser");
|
|
|
15
15
|
const intervalParser_1 = require("../../../../tree/parsers/intervalParser");
|
|
16
16
|
const coinFlip_1 = require("../../../../utils/alea/coinFlip");
|
|
17
17
|
const shuffle_1 = require("../../../../utils/alea/shuffle");
|
|
18
|
+
const handleVEAError_1 = require("../../../../utils/errors/handleVEAError");
|
|
18
19
|
/**ax<b */
|
|
19
20
|
const getHint = (identifiers) => {
|
|
20
21
|
return `Pour résoudre cette inéquation, il faut isoler $x$ à gauche. Pour cela, il faut effectuer des deux côtés de l'inéquation la bonne opération qui permet de supprimer le facteur $${identifiers.a}$.`;
|
|
@@ -124,7 +125,7 @@ const isAnswerValid = (ans, { answer, a, b, ineqType }, opts) => {
|
|
|
124
125
|
}
|
|
125
126
|
}
|
|
126
127
|
catch (err) {
|
|
127
|
-
return
|
|
128
|
+
return (0, handleVEAError_1.handleVEAError)(err);
|
|
128
129
|
}
|
|
129
130
|
};
|
|
130
131
|
const options = [inequationSolutionFormat_1.inequationSolutionFormat];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"firstDegreeInequationsType2.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/inequations/firstDegreeInequationsType2.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,0BAA0B,CAAC;AAGlC,OAAO,EACL,gBAAgB,EAGjB,MAAM,mCAAmC,CAAC;
|
|
1
|
+
{"version":3,"file":"firstDegreeInequationsType2.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/inequations/firstDegreeInequationsType2.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,0BAA0B,CAAC;AAGlC,OAAO,EACL,gBAAgB,EAGjB,MAAM,mCAAmC,CAAC;AAY3C,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAwIF,KAAK,OAAO,GAAG;IACb,wBAAwB,EAAE,MAAM,CAAC;CAClC,CAAC;AAGF,eAAO,MAAM,2BAA2B,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAkBtE,CAAC"}
|
|
@@ -14,6 +14,7 @@ const inequationParser_1 = require("../../../../tree/parsers/inequationParser");
|
|
|
14
14
|
const intervalParser_1 = require("../../../../tree/parsers/intervalParser");
|
|
15
15
|
const coinFlip_1 = require("../../../../utils/alea/coinFlip");
|
|
16
16
|
const shuffle_1 = require("../../../../utils/alea/shuffle");
|
|
17
|
+
const handleVEAError_1 = require("../../../../utils/errors/handleVEAError");
|
|
17
18
|
/**ax+b<c */
|
|
18
19
|
const getKeys = (identifiers, opts) => {
|
|
19
20
|
const isInterval = opts?.inequationSolutionFormat === "Intervalle (S = [a;b])";
|
|
@@ -99,7 +100,7 @@ const isAnswerValid = (ans, { answer, a, b, c, ineqType }, opts) => {
|
|
|
99
100
|
}
|
|
100
101
|
}
|
|
101
102
|
catch (err) {
|
|
102
|
-
return
|
|
103
|
+
return (0, handleVEAError_1.handleVEAError)(err);
|
|
103
104
|
}
|
|
104
105
|
};
|
|
105
106
|
const options = [inequationSolutionFormat_1.inequationSolutionFormat];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"firstDegreeInequationsType3.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/inequations/firstDegreeInequationsType3.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,0BAA0B,CAAC;AAGlC,OAAO,EACL,gBAAgB,EAGjB,MAAM,mCAAmC,CAAC;
|
|
1
|
+
{"version":3,"file":"firstDegreeInequationsType3.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/inequations/firstDegreeInequationsType3.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,0BAA0B,CAAC;AAGlC,OAAO,EACL,gBAAgB,EAGjB,MAAM,mCAAmC,CAAC;AAY3C,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAmJF,KAAK,OAAO,GAAG;IACb,wBAAwB,EAAE,MAAM,CAAC;CAClC,CAAC;AAGF,eAAO,MAAM,2BAA2B,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAkBtE,CAAC"}
|
|
@@ -14,6 +14,7 @@ const inequationParser_1 = require("../../../../tree/parsers/inequationParser");
|
|
|
14
14
|
const intervalParser_1 = require("../../../../tree/parsers/intervalParser");
|
|
15
15
|
const coinFlip_1 = require("../../../../utils/alea/coinFlip");
|
|
16
16
|
const shuffle_1 = require("../../../../utils/alea/shuffle");
|
|
17
|
+
const handleVEAError_1 = require("../../../../utils/errors/handleVEAError");
|
|
17
18
|
/**ax+b<cx+d */
|
|
18
19
|
const getInstruction = (identifiers) => {
|
|
19
20
|
const { ineqType, a, b, c, d } = identifiers;
|
|
@@ -108,7 +109,7 @@ const isAnswerValid = (ans, { answer, a, b, c, d, ineqType }, opts) => {
|
|
|
108
109
|
}
|
|
109
110
|
}
|
|
110
111
|
catch (err) {
|
|
111
|
-
return
|
|
112
|
+
return (0, handleVEAError_1.handleVEAError)(err);
|
|
112
113
|
}
|
|
113
114
|
};
|
|
114
115
|
const options = [inequationSolutionFormat_1.inequationSolutionFormat];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"squareFunctionInequation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/inequations/squareFunctionInequation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAWT,MAAM,0BAA0B,CAAC;AAElC,OAAO,EACL,gBAAgB,EAGjB,MAAM,mCAAmC,CAAC;
|
|
1
|
+
{"version":3,"file":"squareFunctionInequation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/inequations/squareFunctionInequation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAWT,MAAM,0BAA0B,CAAC;AAElC,OAAO,EACL,gBAAgB,EAGjB,MAAM,mCAAmC,CAAC;AAgB3C,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,gBAAgB,EAAE,gBAAgB,CAAC;CACpC,CAAC;AAqFF,eAAO,MAAM,wBAAwB,EAAE,QAAQ,CAAC,WAAW,CAgB1D,CAAC"}
|