math-exercises 2.2.4 → 2.2.6
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/exercise.d.ts +1 -1
- package/lib/exercises/exercise.d.ts.map +1 -1
- package/lib/exercises/math/calcul/digitDecimalRank.js +4 -4
- package/lib/exercises/math/calcul/digitDecimalRankNumber.d.ts +8 -0
- package/lib/exercises/math/calcul/digitDecimalRankNumber.d.ts.map +1 -0
- package/lib/exercises/math/calcul/digitDecimalRankNumber.js +60 -0
- package/lib/exercises/math/calcul/digitRank.js +4 -4
- package/lib/exercises/math/calcul/digitRankNumber.d.ts +8 -0
- package/lib/exercises/math/calcul/digitRankNumber.d.ts.map +1 -0
- package/lib/exercises/math/calcul/digitRankNumber.js +56 -0
- package/lib/exercises/math/calcul/fractions/fractionAndIntegerDivision.d.ts.map +1 -1
- package/lib/exercises/math/calcul/fractions/fractionAndIntegerDivision.js +34 -0
- package/lib/exercises/math/calcul/fractions/fractionAndIntegerProduct.d.ts.map +1 -1
- package/lib/exercises/math/calcul/fractions/fractionAndIntegerProduct.js +17 -0
- package/lib/exercises/math/calcul/fractions/fractionsDivision.d.ts.map +1 -1
- package/lib/exercises/math/calcul/fractions/fractionsDivision.js +23 -0
- package/lib/exercises/math/calcul/fractions/fractionsProduct.d.ts.map +1 -1
- package/lib/exercises/math/calcul/fractions/fractionsProduct.js +15 -0
- package/lib/exercises/math/calcul/index.d.ts +2 -0
- package/lib/exercises/math/calcul/index.d.ts.map +1 -1
- package/lib/exercises/math/calcul/index.js +2 -0
- package/lib/exercises/math/calcul/proportionality/scaleUsage.js +1 -1
- package/lib/exercises/math/calcul/rounding/rounding.d.ts.map +1 -1
- package/lib/exercises/math/calcul/rounding/rounding.js +18 -0
- package/lib/exercises/math/calculLitteral/distributivity/allIdentities.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/distributivity/allIdentities.js +1 -0
- package/lib/exercises/math/calculLitteral/distributivity/canonicalFormDevelopment.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/distributivity/canonicalFormDevelopment.js +1 -0
- package/lib/exercises/math/calculLitteral/distributivity/doubleDistributivity.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/distributivity/doubleDistributivity.js +31 -1
- package/lib/exercises/math/calculLitteral/distributivity/doubleDistributivityWithCoeff.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/distributivity/doubleDistributivityWithCoeff.js +11 -2
- package/lib/exercises/math/calculLitteral/distributivity/firstIdentity.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/distributivity/firstIdentity.js +21 -2
- package/lib/exercises/math/calculLitteral/distributivity/secondIdentity.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/distributivity/secondIdentity.js +23 -2
- package/lib/exercises/math/calculLitteral/distributivity/simpleDistributivity.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/distributivity/simpleDistributivity.js +17 -2
- package/lib/exercises/math/calculLitteral/distributivity/thirdIdentity.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/distributivity/thirdIdentity.js +21 -2
- package/lib/exercises/math/calculLitteral/equation/equationSimpleSquare.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/equationSimpleSquare.js +26 -1
- package/lib/exercises/math/calculLitteral/equation/equationType1Exercise.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/equationType1Exercise.js +18 -2
- package/lib/exercises/math/calculLitteral/equation/equationType2Exercise.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/equationType2Exercise.js +19 -2
- package/lib/exercises/math/calculLitteral/equation/equationType3Exercise.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/equationType3Exercise.js +15 -2
- package/lib/exercises/math/calculLitteral/equation/equationType4Exercise.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/equationType4Exercise.js +20 -5
- package/lib/exercises/math/calculLitteral/equation/firstDegreeEquation.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/firstDegreeEquation.js +24 -1
- package/lib/exercises/math/calculLitteral/equation/firstDegreeEquationIntType1.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/firstDegreeEquationIntType1.js +20 -1
- package/lib/exercises/math/calculLitteral/equation/firstDegreeEquationIntType2.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/firstDegreeEquationIntType2.js +19 -3
- package/lib/exercises/math/calculLitteral/equation/fractionEquation.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/fractionEquation.js +24 -8
- package/lib/exercises/math/calculLitteral/equation/multiplicationEquation.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/multiplicationEquation.js +21 -2
- package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq1.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq1.js +24 -4
- package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq2.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq2.js +25 -5
- package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq3.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq3.js +19 -0
- package/lib/exercises/math/calculLitteral/factorisation/factoType1Exercise.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/factorisation/factoType1Exercise.js +1 -0
- package/lib/exercises/math/calculLitteral/factorisation/factorizeCanonicalForm.d.ts +8 -0
- package/lib/exercises/math/calculLitteral/factorisation/factorizeCanonicalForm.d.ts.map +1 -0
- package/lib/exercises/math/calculLitteral/factorisation/factorizeCanonicalForm.js +77 -0
- package/lib/exercises/math/calculLitteral/factorisation/factorizeCanonicalFormWithSqrt.d.ts +8 -0
- package/lib/exercises/math/calculLitteral/factorisation/factorizeCanonicalFormWithSqrt.d.ts.map +1 -0
- package/lib/exercises/math/calculLitteral/factorisation/factorizeCanonicalFormWithSqrt.js +80 -0
- package/lib/exercises/math/calculLitteral/factorisation/index.d.ts +2 -0
- package/lib/exercises/math/calculLitteral/factorisation/index.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/factorisation/index.js +2 -0
- package/lib/exercises/math/equaDiff/equaDiffGeneralForme.d.ts.map +1 -1
- package/lib/exercises/math/equaDiff/equaDiffGeneralForme.js +1 -0
- package/lib/exercises/math/functions/basics/inverseImageFunctionTable.d.ts +2 -0
- package/lib/exercises/math/functions/basics/inverseImageFunctionTable.d.ts.map +1 -1
- package/lib/exercises/math/functions/basics/inverseImageFunctionTable.js +46 -66
- package/lib/exercises/math/functions/logarithm/log10PowerSimplifying.d.ts.map +1 -1
- package/lib/exercises/math/functions/logarithm/log10PowerSimplifying.js +12 -2
- package/lib/exercises/math/functions/trinoms/index.d.ts +2 -0
- package/lib/exercises/math/functions/trinoms/index.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/index.js +2 -0
- package/lib/exercises/math/functions/trinoms/solveEquationByFactorisation.d.ts +5 -0
- package/lib/exercises/math/functions/trinoms/solveEquationByFactorisation.d.ts.map +1 -0
- package/lib/exercises/math/functions/trinoms/solveEquationByFactorisation.js +44 -0
- package/lib/exercises/math/functions/trinoms/solveSecondDegreeEquationByFactorisation.d.ts +9 -0
- package/lib/exercises/math/functions/trinoms/solveSecondDegreeEquationByFactorisation.d.ts.map +1 -0
- package/lib/exercises/math/functions/trinoms/solveSecondDegreeEquationByFactorisation.js +134 -0
- package/lib/exercises/math/functions/trinoms/solveSecondDegreeEquationFromCano.d.ts +7 -0
- package/lib/exercises/math/functions/trinoms/solveSecondDegreeEquationFromCano.d.ts.map +1 -0
- package/lib/exercises/math/functions/trinoms/solveSecondDegreeEquationFromCano.js +59 -0
- package/lib/exercises/math/geometry/vectors/scalarProductViaCoords.d.ts.map +1 -1
- package/lib/exercises/math/geometry/vectors/scalarProductViaCoords.js +1 -0
- package/lib/exercises/math/index.d.ts +1 -0
- package/lib/exercises/math/index.d.ts.map +1 -1
- package/lib/exercises/math/index.js +1 -0
- package/lib/exercises/math/percent/applyPercent.d.ts.map +1 -1
- package/lib/exercises/math/percent/applyPercent.js +20 -2
- package/lib/exercises/math/probaStat/probaFromTableNoContext.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/probaFromTableNoContext.js +5 -4
- package/lib/exercises/math/sequences/arithmetic/arithmeticFindRandomTermFromTwoTerms.d.ts +11 -0
- package/lib/exercises/math/sequences/arithmetic/arithmeticFindRandomTermFromTwoTerms.d.ts.map +1 -0
- package/lib/exercises/math/sequences/arithmetic/arithmeticFindRandomTermFromTwoTerms.js +49 -0
- package/lib/exercises/math/sequences/arithmetic/index.d.ts +1 -0
- package/lib/exercises/math/sequences/arithmetic/index.d.ts.map +1 -1
- package/lib/exercises/math/sequences/arithmetic/index.js +1 -0
- package/lib/exercises/math/spaceGeometry/index.d.ts +2 -0
- package/lib/exercises/math/spaceGeometry/index.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/index.js +17 -0
- package/lib/exercises/math/spaceGeometry/vectors/index.d.ts +4 -0
- package/lib/exercises/math/spaceGeometry/vectors/index.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/vectors/index.js +19 -0
- package/lib/exercises/math/spaceGeometry/vectors/spaceVectorCoordinatesFromPoints.d.ts +5 -0
- package/lib/exercises/math/spaceGeometry/vectors/spaceVectorCoordinatesFromPoints.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/vectors/spaceVectorCoordinatesFromPoints.js +52 -0
- package/lib/exercises/math/spaceGeometry/vectors/spaceVectorLinearCombinationCoords.d.ts +5 -0
- package/lib/exercises/math/spaceGeometry/vectors/spaceVectorLinearCombinationCoords.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/vectors/spaceVectorLinearCombinationCoords.js +62 -0
- package/lib/exercises/math/spaceGeometry/vectors/spaceVectorNormCalculation.d.ts +9 -0
- package/lib/exercises/math/spaceGeometry/vectors/spaceVectorNormCalculation.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/vectors/spaceVectorNormCalculation.js +54 -0
- package/lib/exercises/math/squareRoots/squareRootIdentities.js +3 -3
- package/lib/exercises/math/suites/sequencePlot.d.ts.map +1 -1
- package/lib/exercises/math/suites/sequencePlot.js +1 -2
- package/lib/exercises/math/trigonometry/trigonometrySideCalcul.d.ts.map +1 -1
- package/lib/exercises/math/trigonometry/trigonometrySideCalcul.js +1 -0
- package/lib/exercises/pc/calibrationCurveOfSolution.d.ts.map +1 -1
- package/lib/exercises/pc/calibrationCurveOfSolution.js +1 -0
- package/lib/exercises/pc/chemicalElements/findAtomicStructureElement.d.ts.map +1 -1
- package/lib/exercises/pc/chemicalElements/findAtomicStructureElement.js +1 -0
- package/lib/exercises/pc/chemicalElements/massOrVolumeProportion.d.ts.map +1 -1
- package/lib/exercises/pc/chemicalElements/massOrVolumeProportion.js +1 -0
- package/lib/exercises/pc/chemicalReactions/calculateSynthesisEfficiency.d.ts.map +1 -1
- package/lib/exercises/pc/chemicalReactions/calculateSynthesisEfficiency.js +1 -0
- package/lib/exercises/pc/chemicalReactions/titrationEquivalenceRelation.d.ts.map +1 -1
- package/lib/exercises/pc/chemicalReactions/titrationEquivalenceRelation.js +1 -0
- package/lib/exercises/pc/dosage/beerLambertRandomValue.d.ts.map +1 -1
- package/lib/exercises/pc/dosage/beerLambertRandomValue.js +1 -0
- package/lib/exercises/pc/dosage/concentrationCalculation.d.ts.map +1 -1
- package/lib/exercises/pc/dosage/concentrationCalculation.js +1 -0
- package/lib/exercises/pc/dosage/concentrationFromMassCalculation.d.ts.map +1 -1
- package/lib/exercises/pc/dosage/concentrationFromMassCalculation.js +1 -0
- package/lib/exercises/pc/electricity/calculateIntensity.js +1 -1
- package/lib/exercises/pc/electricity/calculateVoltage.d.ts.map +1 -1
- package/lib/exercises/pc/electricity/calculateVoltage.js +1 -0
- package/lib/exercises/pc/electricity/electricPowerOrEnergyCalculation.d.ts.map +1 -1
- package/lib/exercises/pc/electricity/electricPowerOrEnergyCalculation.js +1 -0
- package/lib/exercises/pc/electricity/ohmLaw.d.ts.map +1 -1
- package/lib/exercises/pc/electricity/ohmLaw.js +1 -0
- package/lib/exercises/pc/electricity/ohmicConductorOrGenerator.d.ts.map +1 -1
- package/lib/exercises/pc/electricity/ohmicConductorOrGenerator.js +1 -0
- package/lib/exercises/pc/energy/calorificValue.d.ts.map +1 -1
- package/lib/exercises/pc/energy/calorificValue.js +1 -0
- package/lib/exercises/pc/energy/combustionTransferEnergy.d.ts.map +1 -1
- package/lib/exercises/pc/energy/combustionTransferEnergy.js +1 -0
- package/lib/exercises/pc/energy/combustionTransferEnergy2.d.ts.map +1 -1
- package/lib/exercises/pc/energy/combustionTransferEnergy2.js +1 -0
- package/lib/exercises/pc/energy/efficencyOfConverter.d.ts.map +1 -1
- package/lib/exercises/pc/energy/efficencyOfConverter.js +1 -0
- package/lib/exercises/pc/energy/efficiencyCalculation.d.ts.map +1 -1
- package/lib/exercises/pc/energy/efficiencyCalculation.js +1 -0
- package/lib/exercises/pc/energy/kineticEnergyOrMassOrSpeed.d.ts.map +1 -1
- package/lib/exercises/pc/energy/kineticEnergyOrMassOrSpeed.js +1 -0
- package/lib/exercises/pc/energy/thermalEnergyTransferCalculation.d.ts.map +1 -1
- package/lib/exercises/pc/energy/thermalEnergyTransferCalculation.js +1 -0
- package/lib/exercises/pc/forces/calculateNormalOrFrictionForce.d.ts.map +1 -1
- package/lib/exercises/pc/forces/calculateNormalOrFrictionForce.js +1 -0
- package/lib/exercises/pc/forces/electroStaticForce.d.ts.map +1 -1
- package/lib/exercises/pc/forces/electroStaticForce.js +1 -0
- package/lib/exercises/pc/forces/gravitationalAttractionObjectHeight.d.ts.map +1 -1
- package/lib/exercises/pc/forces/gravitationalAttractionObjectHeight.js +1 -0
- package/lib/exercises/pc/forces/gravitationalForcePlanets.d.ts.map +1 -1
- package/lib/exercises/pc/forces/gravitationalForcePlanets.js +1 -0
- package/lib/exercises/pc/forces/massWeight.d.ts.map +1 -1
- package/lib/exercises/pc/forces/massWeight.js +1 -0
- package/lib/exercises/pc/motion/averageSpeed.d.ts.map +1 -1
- package/lib/exercises/pc/motion/averageSpeed.js +1 -0
- package/lib/exercises/pc/motion/averageSpeedCalculation.d.ts.map +1 -1
- package/lib/exercises/pc/motion/averageSpeedCalculation.js +1 -0
- package/lib/exercises/pc/motion/motionReference.d.ts.map +1 -1
- package/lib/exercises/pc/motion/motionReference.js +1 -0
- package/lib/exercises/pc/pH.d.ts.map +1 -1
- package/lib/exercises/pc/pH.js +1 -0
- package/lib/exercises/pc/power/calculatePowerOfLight.d.ts.map +1 -1
- package/lib/exercises/pc/power/calculatePowerOfLight.js +1 -0
- package/lib/exercises/pc/spectral/spectralEnergy.d.ts.map +1 -1
- package/lib/exercises/pc/spectral/spectralEnergy.js +1 -0
- package/lib/exercises/pc/waves/lightDistanceConversion.d.ts.map +1 -1
- package/lib/exercises/pc/waves/lightDistanceConversion.js +1 -0
- package/lib/exercises/pc/waves/periodicWaveCelerity.d.ts.map +1 -1
- package/lib/exercises/pc/waves/periodicWaveCelerity.js +1 -0
- package/lib/exercises/pc/weight/calculateWeight.d.ts.map +1 -1
- package/lib/exercises/pc/weight/calculateWeight.js +1 -0
- package/lib/exercises/pc/weight/weightOnTheMoon.d.ts.map +1 -1
- package/lib/exercises/pc/weight/weightOnTheMoon.js +1 -0
- package/lib/index.d.ts +33 -64
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +4 -0
- package/lib/math/geometry/spacePoint.d.ts +27 -0
- package/lib/math/geometry/spacePoint.d.ts.map +1 -0
- package/lib/math/geometry/spacePoint.js +80 -0
- package/lib/math/geometry/spaceVector.d.ts +28 -0
- package/lib/math/geometry/spaceVector.d.ts.map +1 -0
- package/lib/math/geometry/spaceVector.js +83 -0
- package/lib/math/numbers/decimals/decimal.d.ts +1 -0
- package/lib/math/numbers/decimals/decimal.d.ts.map +1 -1
- package/lib/math/numbers/decimals/decimal.js +8 -0
- package/lib/math/numbers/rationals/rational.d.ts +1 -0
- package/lib/math/numbers/rationals/rational.d.ts.map +1 -1
- package/lib/math/numbers/rationals/rational.js +4 -0
- package/lib/math/utils/random/randTupleInt.d.ts +1 -0
- package/lib/math/utils/random/randTupleInt.d.ts.map +1 -1
- package/lib/math/utils/random/randTupleInt.js +5 -1
- package/lib/playground.d.ts +2 -0
- package/lib/playground.d.ts.map +1 -0
- package/lib/playground.js +20 -0
- package/lib/server.d.ts +3 -0
- package/lib/server.d.ts.map +1 -1
- package/lib/server.js +7 -0
- package/lib/tree/nodes/equations/equationSolutionNode.d.ts.map +1 -1
- package/lib/tree/nodes/equations/equationSolutionNode.js +8 -0
- package/lib/tree/nodes/node.d.ts +1 -0
- package/lib/tree/nodes/node.d.ts.map +1 -1
- package/lib/tree/nodes/operators/multiplyNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/multiplyNode.js +8 -2
- package/lib/tree/nodes/operators/powerNode.js +1 -1
- package/lib/utils/alignTex.d.ts +2 -0
- package/lib/utils/alignTex.d.ts.map +1 -0
- package/lib/utils/alignTex.js +18 -0
- package/package.json +1 -1
|
@@ -5,7 +5,10 @@ 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
7
|
const randint_1 = require("../../../../math/utils/random/randint");
|
|
8
|
+
const addNode_1 = require("../../../../tree/nodes/operators/addNode");
|
|
8
9
|
const multiplyNode_1 = require("../../../../tree/nodes/operators/multiplyNode");
|
|
10
|
+
const operatorComposition_1 = require("../../../../tree/utilities/operatorComposition");
|
|
11
|
+
const alignTex_1 = require("../../../../utils/alignTex");
|
|
9
12
|
const shuffle_1 = require("../../../../utils/shuffle");
|
|
10
13
|
const getDoubleDistributivityQuestion = () => {
|
|
11
14
|
const affines = affine_1.AffineConstructor.differentRandoms(2, undefined, {
|
|
@@ -13,8 +16,21 @@ const getDoubleDistributivityQuestion = () => {
|
|
|
13
16
|
});
|
|
14
17
|
const statementTree = new multiplyNode_1.MultiplyNode(affines[0].toTree(), affines[1].toTree());
|
|
15
18
|
const answer = affines[0].multiply(affines[1]).toTree().toTex();
|
|
19
|
+
const subTerms = [
|
|
20
|
+
new multiplyNode_1.MultiplyNode(affines[0].a.toTree(), "x".toTree()),
|
|
21
|
+
affines[0].b.toTree(),
|
|
22
|
+
new multiplyNode_1.MultiplyNode(affines[1].a.toTree(), "x".toTree()),
|
|
23
|
+
affines[1].b.toTree(),
|
|
24
|
+
];
|
|
25
|
+
const subMultiplications = [
|
|
26
|
+
new multiplyNode_1.MultiplyNode(subTerms[0], subTerms[2], { forceTimesSign: true }),
|
|
27
|
+
new multiplyNode_1.MultiplyNode(subTerms[0], subTerms[3], { forceTimesSign: true }),
|
|
28
|
+
new multiplyNode_1.MultiplyNode(subTerms[1], subTerms[2], { forceTimesSign: true }),
|
|
29
|
+
new multiplyNode_1.MultiplyNode(subTerms[1], subTerms[3], { forceTimesSign: true }),
|
|
30
|
+
];
|
|
31
|
+
const statementTex = statementTree.toTex();
|
|
16
32
|
const question = {
|
|
17
|
-
instruction: `Développer et réduire : $${
|
|
33
|
+
instruction: `Développer et réduire : $${statementTex}$`,
|
|
18
34
|
startStatement: statementTree.toTex(),
|
|
19
35
|
answer,
|
|
20
36
|
keys: ["x"],
|
|
@@ -23,6 +39,19 @@ const getDoubleDistributivityQuestion = () => {
|
|
|
23
39
|
affine1Coeffs: affines[0].coefficients,
|
|
24
40
|
affine2Coeffs: affines[1].coefficients,
|
|
25
41
|
},
|
|
42
|
+
hint: "Multiplie chaque terme du premier facteur par chaque terme du second facteur, puis regroupe les termes similaires.",
|
|
43
|
+
correction: `
|
|
44
|
+
${(0, alignTex_1.alignTex)([
|
|
45
|
+
[statementTex, "=", (0, operatorComposition_1.operatorComposition)(addNode_1.AddNode, subMultiplications).toTex()],
|
|
46
|
+
[
|
|
47
|
+
"",
|
|
48
|
+
"=",
|
|
49
|
+
(0, operatorComposition_1.operatorComposition)(addNode_1.AddNode, subMultiplications.map((e) => e.simplify())).toTex(),
|
|
50
|
+
],
|
|
51
|
+
["", "=", answer],
|
|
52
|
+
])}
|
|
53
|
+
|
|
54
|
+
`,
|
|
26
55
|
};
|
|
27
56
|
return question;
|
|
28
57
|
};
|
|
@@ -72,4 +101,5 @@ exports.doubleDistributivity = {
|
|
|
72
101
|
getPropositions,
|
|
73
102
|
isAnswerValid,
|
|
74
103
|
subject: "Mathématiques",
|
|
104
|
+
hasHintAndCorrection: true,
|
|
75
105
|
};
|
package/lib/exercises/math/calculLitteral/distributivity/doubleDistributivityWithCoeff.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doubleDistributivityWithCoeff.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/distributivity/doubleDistributivityWithCoeff.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"doubleDistributivityWithCoeff.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/distributivity/doubleDistributivityWithCoeff.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB,CAAC;AAuGF,eAAO,MAAM,6BAA6B,EAAE,QAAQ,CAAC,WAAW,CAgB/D,CAAC"}
|
|
@@ -8,6 +8,7 @@ const trinom_1 = require("../../../../math/polynomials/trinom");
|
|
|
8
8
|
const randint_1 = require("../../../../math/utils/random/randint");
|
|
9
9
|
const addNode_1 = require("../../../../tree/nodes/operators/addNode");
|
|
10
10
|
const multiplyNode_1 = require("../../../../tree/nodes/operators/multiplyNode");
|
|
11
|
+
const alignTex_1 = require("../../../../utils/alignTex");
|
|
11
12
|
const getDoubleDistributivityWithCoeffQuestion = () => {
|
|
12
13
|
const coeff = (0, randint_1.randint)(-10, 11, [-1, 0, 1]);
|
|
13
14
|
const affine1 = affine_1.AffineConstructor.random(undefined, {
|
|
@@ -32,11 +33,18 @@ const getDoubleDistributivityWithCoeffQuestion = () => {
|
|
|
32
33
|
hint: `Choisis deux facteurs de ce produit et multiplie les entre eux. Puis, multiplier le résultat obtenu par le troisième terme.`,
|
|
33
34
|
correction: `On commence par multiplier les deux premiers termes entre eux :
|
|
34
35
|
|
|
35
|
-
|
|
36
|
+
${(0, alignTex_1.alignTex)(`${statement} = ${new multiplyNode_1.MultiplyNode(affine1.times(coeff).toTree(), affine2.toTree()).toTex()}`)}
|
|
36
37
|
|
|
37
38
|
Puis, on utilise la double distributivité :
|
|
38
39
|
|
|
39
|
-
|
|
40
|
+
${(0, alignTex_1.alignTex)([
|
|
41
|
+
[
|
|
42
|
+
new multiplyNode_1.MultiplyNode(affine3.toTree(), affine2.toTree()).toTex(),
|
|
43
|
+
"=",
|
|
44
|
+
new addNode_1.AddNode(new multiplyNode_1.MultiplyNode(new affine_1.Affine(affine3.a, 0).toTree(), new affine_1.Affine(affine2.a, 0).toTree()), new addNode_1.AddNode(new multiplyNode_1.MultiplyNode(new affine_1.Affine(affine3.a, 0).toTree(), affine2.b.toTree()), new addNode_1.AddNode(new multiplyNode_1.MultiplyNode(affine3.b.toTree(), new affine_1.Affine(affine2.a, 0).toTree()), new multiplyNode_1.MultiplyNode(affine3.b.toTree(), affine2.b.toTree())))).toTex(),
|
|
45
|
+
],
|
|
46
|
+
["", "=", answer],
|
|
47
|
+
])}
|
|
40
48
|
`,
|
|
41
49
|
};
|
|
42
50
|
return question;
|
|
@@ -74,4 +82,5 @@ exports.doubleDistributivityWithCoeff = {
|
|
|
74
82
|
isAnswerValid,
|
|
75
83
|
isGGBAnswerValid,
|
|
76
84
|
subject: "Mathématiques",
|
|
85
|
+
hasHintAndCorrection: true,
|
|
77
86
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"firstIdentity.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/distributivity/firstIdentity.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAER,YAAY,EAEZ,iBAAiB,EACjB,GAAG,EAGJ,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"firstIdentity.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/distributivity/firstIdentity.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAER,YAAY,EAEZ,iBAAiB,EACjB,GAAG,EAGJ,MAAM,0BAA0B,CAAC;AAgBlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,iBAAiB,CAAC,WAAW,CAqDnE,CAAC;AAEF,eAAO,MAAM,4BAA4B,EAAE,YAAY,CAAC,WAAW,CAkClE,CAAC;AAEF,eAAO,MAAM,0BAA0B,EAAE,GAAG,CAAC,WAAW,CAKvD,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,WAAW,CAc/C,CAAC"}
|
|
@@ -6,7 +6,10 @@ const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQ
|
|
|
6
6
|
const affine_1 = require("../../../../math/polynomials/affine");
|
|
7
7
|
const polynomial_1 = require("../../../../math/polynomials/polynomial");
|
|
8
8
|
const numberNode_1 = require("../../../../tree/nodes/numbers/numberNode");
|
|
9
|
+
const addNode_1 = require("../../../../tree/nodes/operators/addNode");
|
|
10
|
+
const multiplyNode_1 = require("../../../../tree/nodes/operators/multiplyNode");
|
|
9
11
|
const powerNode_1 = require("../../../../tree/nodes/operators/powerNode");
|
|
12
|
+
const alignTex_1 = require("../../../../utils/alignTex");
|
|
10
13
|
const shuffle_1 = require("../../../../utils/shuffle");
|
|
11
14
|
const getFirstIdentityQuestion = () => {
|
|
12
15
|
const affine = affine_1.AffineConstructor.random({
|
|
@@ -18,13 +21,28 @@ const getFirstIdentityQuestion = () => {
|
|
|
18
21
|
});
|
|
19
22
|
const statementTree = new powerNode_1.PowerNode(affine.toTree(), new numberNode_1.NumberNode(2));
|
|
20
23
|
const answer = affine.multiply(affine).toTree().toTex();
|
|
24
|
+
const aMonom = new multiplyNode_1.MultiplyNode(affine.a.toTree(), "x".toTree());
|
|
25
|
+
const statementTex = statementTree.toTex();
|
|
21
26
|
const question = {
|
|
22
|
-
instruction: `Développer et réduire : $${
|
|
23
|
-
startStatement:
|
|
27
|
+
instruction: `Développer et réduire : $${statementTex}$`,
|
|
28
|
+
startStatement: statementTex,
|
|
24
29
|
answer,
|
|
25
30
|
keys: ["x"],
|
|
26
31
|
answerFormat: "tex",
|
|
27
32
|
identifiers: { a: affine.a, b: affine.b },
|
|
33
|
+
hint: `Utilise l'identité remarquable $(a+b)^2 = a^2 + 2ab+b^2$ en prenant $a=${aMonom.toTex()}$ et $b=${affine.b}$`,
|
|
34
|
+
correction: `
|
|
35
|
+
On utilise l'identité remarquable $(a+b)^2 = a^2 + 2ab+b^2$ en prenant $a=${aMonom.toTex()}$ et $b=${affine.b}$ :
|
|
36
|
+
|
|
37
|
+
${(0, alignTex_1.alignTex)([
|
|
38
|
+
[
|
|
39
|
+
statementTex,
|
|
40
|
+
"=",
|
|
41
|
+
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(),
|
|
42
|
+
],
|
|
43
|
+
["", "=", answer],
|
|
44
|
+
])}
|
|
45
|
+
`,
|
|
28
46
|
};
|
|
29
47
|
return question;
|
|
30
48
|
};
|
|
@@ -68,4 +86,5 @@ exports.firstIdentity = {
|
|
|
68
86
|
getPropositions: exports.getFirstIdentityPropositions,
|
|
69
87
|
isAnswerValid: exports.isFirstIdentityAnswerValid,
|
|
70
88
|
subject: "Mathématiques",
|
|
89
|
+
hasHintAndCorrection: true,
|
|
71
90
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"secondIdentity.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/distributivity/secondIdentity.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAER,YAAY,EAEZ,iBAAiB,EACjB,GAAG,EAGJ,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"secondIdentity.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/distributivity/secondIdentity.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAER,YAAY,EAEZ,iBAAiB,EACjB,GAAG,EAGJ,MAAM,0BAA0B,CAAC;AAgBlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAEF,eAAO,MAAM,yBAAyB,EAAE,iBAAiB,CAAC,WAAW,CAiDpE,CAAC;AAEF,eAAO,MAAM,6BAA6B,EAAE,YAAY,CAAC,WAAW,CAqCnE,CAAC;AAEF,eAAO,MAAM,2BAA2B,EAAE,GAAG,CAAC,WAAW,CAQxD,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,WAAW,CAehD,CAAC"}
|
|
@@ -6,7 +6,11 @@ const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQ
|
|
|
6
6
|
const affine_1 = require("../../../../math/polynomials/affine");
|
|
7
7
|
const polynomial_1 = require("../../../../math/polynomials/polynomial");
|
|
8
8
|
const numberNode_1 = require("../../../../tree/nodes/numbers/numberNode");
|
|
9
|
+
const addNode_1 = require("../../../../tree/nodes/operators/addNode");
|
|
10
|
+
const multiplyNode_1 = require("../../../../tree/nodes/operators/multiplyNode");
|
|
9
11
|
const powerNode_1 = require("../../../../tree/nodes/operators/powerNode");
|
|
12
|
+
const substractNode_1 = require("../../../../tree/nodes/operators/substractNode");
|
|
13
|
+
const alignTex_1 = require("../../../../utils/alignTex");
|
|
10
14
|
const shuffle_1 = require("../../../../utils/shuffle");
|
|
11
15
|
const getSecondIdentityQuestion = () => {
|
|
12
16
|
const affine = affine_1.AffineConstructor.random({
|
|
@@ -18,13 +22,29 @@ const getSecondIdentityQuestion = () => {
|
|
|
18
22
|
});
|
|
19
23
|
const statementTree = new powerNode_1.PowerNode(affine.toTree(), new numberNode_1.NumberNode(2));
|
|
20
24
|
const answer = affine.multiply(affine).toTree().toTex();
|
|
25
|
+
const aMonom = new multiplyNode_1.MultiplyNode(affine.a.toTree(), "x".toTree());
|
|
26
|
+
const bPositive = -affine.b;
|
|
27
|
+
const statementTex = statementTree.toTex();
|
|
21
28
|
const question = {
|
|
22
|
-
instruction: `Développer et réduire : $${
|
|
23
|
-
startStatement:
|
|
29
|
+
instruction: `Développer et réduire : $${statementTex}$`,
|
|
30
|
+
startStatement: statementTex,
|
|
24
31
|
answer,
|
|
25
32
|
keys: ["x"],
|
|
26
33
|
answerFormat: "tex",
|
|
27
34
|
identifiers: { a: affine.a, b: affine.b },
|
|
35
|
+
hint: `Utilise l'identité remarquable $(a-b)^2 = a^2 - 2ab+b^2$ en prenant $a=${aMonom.toTex()}$ et $b=${bPositive}$`,
|
|
36
|
+
correction: `
|
|
37
|
+
On utilise l'identité remarquable $(a-b)^2 = a^2 - 2ab+b^2$ en prenant $a=${aMonom.toTex()}$ et $b=${bPositive}$ :
|
|
38
|
+
|
|
39
|
+
${(0, alignTex_1.alignTex)([
|
|
40
|
+
[
|
|
41
|
+
statementTex,
|
|
42
|
+
"=",
|
|
43
|
+
new addNode_1.AddNode(new substractNode_1.SubstractNode(new powerNode_1.SquareNode(aMonom), new multiplyNode_1.MultiplyNode((2).toTree(), new multiplyNode_1.MultiplyNode(aMonom, bPositive.toTree()))), new powerNode_1.SquareNode(bPositive.toTree())).toTex(),
|
|
44
|
+
],
|
|
45
|
+
["", "=", answer],
|
|
46
|
+
])}
|
|
47
|
+
`,
|
|
28
48
|
};
|
|
29
49
|
return question;
|
|
30
50
|
};
|
|
@@ -70,4 +90,5 @@ exports.secondIdentity = {
|
|
|
70
90
|
qcmTimer: 60,
|
|
71
91
|
freeTimer: 60,
|
|
72
92
|
subject: "Mathématiques",
|
|
93
|
+
hasHintAndCorrection: true,
|
|
73
94
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"simpleDistributivity.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/distributivity/simpleDistributivity.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"simpleDistributivity.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/distributivity/simpleDistributivity.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAalC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAoEF,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,WAAW,CAetD,CAAC"}
|
|
@@ -6,7 +6,9 @@ const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQ
|
|
|
6
6
|
const affine_1 = require("../../../../math/polynomials/affine");
|
|
7
7
|
const randint_1 = require("../../../../math/utils/random/randint");
|
|
8
8
|
const numberNode_1 = require("../../../../tree/nodes/numbers/numberNode");
|
|
9
|
+
const addNode_1 = require("../../../../tree/nodes/operators/addNode");
|
|
9
10
|
const multiplyNode_1 = require("../../../../tree/nodes/operators/multiplyNode");
|
|
11
|
+
const alignTex_1 = require("../../../../utils/alignTex");
|
|
10
12
|
const shuffle_1 = require("../../../../utils/shuffle");
|
|
11
13
|
const getSimpleDistributivityQuestion = () => {
|
|
12
14
|
const affine = affine_1.AffineConstructor.random(undefined, {
|
|
@@ -15,13 +17,25 @@ const getSimpleDistributivityQuestion = () => {
|
|
|
15
17
|
const coeff = (0, randint_1.randint)(-10, 11, [-1, 0, 1]);
|
|
16
18
|
const statementTree = new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(coeff), affine.toTree());
|
|
17
19
|
const answer = affine.times(coeff).toTree().toTex();
|
|
20
|
+
const statementTex = statementTree.toTex();
|
|
18
21
|
const question = {
|
|
19
|
-
instruction: `Développer et réduire : $${
|
|
20
|
-
startStatement:
|
|
22
|
+
instruction: `Développer et réduire : $${statementTex}$`,
|
|
23
|
+
startStatement: statementTex,
|
|
21
24
|
answer,
|
|
22
25
|
keys: ["x"],
|
|
23
26
|
answerFormat: "tex",
|
|
24
27
|
identifiers: { a: affine.a, b: affine.b, coeff: coeff },
|
|
28
|
+
hint: `Multiplie chaque terme dans la parenthèse par $${coeff}$.`,
|
|
29
|
+
correction: `
|
|
30
|
+
${(0, alignTex_1.alignTex)([
|
|
31
|
+
[
|
|
32
|
+
statementTex,
|
|
33
|
+
"=",
|
|
34
|
+
new addNode_1.AddNode(new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(coeff), new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(affine.a), "x".toTree())), new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(coeff), new numberNode_1.NumberNode(affine.b))).toTex(),
|
|
35
|
+
],
|
|
36
|
+
["", "=", answer],
|
|
37
|
+
])}
|
|
38
|
+
`,
|
|
25
39
|
};
|
|
26
40
|
return question;
|
|
27
41
|
};
|
|
@@ -59,4 +73,5 @@ exports.simpleDistributivity = {
|
|
|
59
73
|
getPropositions,
|
|
60
74
|
isAnswerValid,
|
|
61
75
|
subject: "Mathématiques",
|
|
76
|
+
hasHintAndCorrection: true,
|
|
62
77
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"thirdIdentity.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/distributivity/thirdIdentity.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAER,YAAY,EAEZ,iBAAiB,EACjB,GAAG,EAGJ,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"thirdIdentity.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/distributivity/thirdIdentity.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAER,YAAY,EAEZ,iBAAiB,EACjB,GAAG,EAGJ,MAAM,0BAA0B,CAAC;AAalC,KAAK,WAAW,GAAG;IACjB,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,aAAa,EAAE,MAAM,EAAE,CAAC;CACzB,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,iBAAiB,CAAC,WAAW,CAqCnE,CAAC;AAEF,eAAO,MAAM,4BAA4B,EAAE,YAAY,CAAC,WAAW,CA2BlE,CAAC;AAEF,eAAO,MAAM,0BAA0B,EAAE,GAAG,CAAC,WAAW,CAUvD,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,WAAW,CAc/C,CAAC"}
|
|
@@ -5,15 +5,21 @@ 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
7
|
const multiplyNode_1 = require("../../../../tree/nodes/operators/multiplyNode");
|
|
8
|
+
const powerNode_1 = require("../../../../tree/nodes/operators/powerNode");
|
|
9
|
+
const substractNode_1 = require("../../../../tree/nodes/operators/substractNode");
|
|
10
|
+
const alignTex_1 = require("../../../../utils/alignTex");
|
|
8
11
|
const shuffle_1 = require("../../../../utils/shuffle");
|
|
9
12
|
const getThirdIdentityQuestion = () => {
|
|
10
13
|
const affine = affine_1.AffineConstructor.random(undefined, { excludes: [0] });
|
|
11
14
|
const affine2 = new affine_1.Affine(affine.a, -affine.b);
|
|
12
15
|
const statementTree = new multiplyNode_1.MultiplyNode(affine.toTree(), affine2.toTree());
|
|
13
16
|
const answer = affine.multiply(affine2).toTree().toTex();
|
|
17
|
+
const aMonom = new multiplyNode_1.MultiplyNode(affine.a.toTree(), "x".toTree());
|
|
18
|
+
const bPositive = Math.abs(affine.b);
|
|
19
|
+
const statementTex = statementTree.toTex();
|
|
14
20
|
const question = {
|
|
15
|
-
instruction: `Développer et réduire : $${
|
|
16
|
-
startStatement:
|
|
21
|
+
instruction: `Développer et réduire : $${statementTex}$`,
|
|
22
|
+
startStatement: statementTex,
|
|
17
23
|
answer,
|
|
18
24
|
keys: ["x"],
|
|
19
25
|
answerFormat: "tex",
|
|
@@ -21,6 +27,18 @@ const getThirdIdentityQuestion = () => {
|
|
|
21
27
|
affine1Coeffs: affine.coefficients,
|
|
22
28
|
affine2Coeffs: affine2.coefficients,
|
|
23
29
|
},
|
|
30
|
+
hint: `Utilise l'identité remarquable $(a-b)(a+b) = a^2 - b^2$ en prenant $a=${aMonom.toTex()}$ et $b=${bPositive}$`,
|
|
31
|
+
correction: `
|
|
32
|
+
On utilise l'identité remarquable $(a-b)(a+b) = a^2 - b^2$ en prenant $a=${aMonom.toTex()}$ et $b=${bPositive}$ :
|
|
33
|
+
|
|
34
|
+
${(0, alignTex_1.alignTex)([
|
|
35
|
+
[
|
|
36
|
+
statementTex,
|
|
37
|
+
"=",
|
|
38
|
+
new substractNode_1.SubstractNode(new powerNode_1.SquareNode(aMonom), new powerNode_1.SquareNode(bPositive.toTree())).toTex(),
|
|
39
|
+
],
|
|
40
|
+
["", "=", answer],
|
|
41
|
+
])}`,
|
|
24
42
|
};
|
|
25
43
|
return question;
|
|
26
44
|
};
|
|
@@ -65,4 +83,5 @@ exports.thirdIdentity = {
|
|
|
65
83
|
qcmTimer: 60,
|
|
66
84
|
freeTimer: 60,
|
|
67
85
|
subject: "Mathématiques",
|
|
86
|
+
hasHintAndCorrection: true,
|
|
68
87
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"equationSimpleSquare.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/equation/equationSimpleSquare.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AA0BlC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;
|
|
1
|
+
{"version":3,"file":"equationSimpleSquare.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/equation/equationSimpleSquare.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AA0BlC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAwKF,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,WAAW,CActD,CAAC"}
|
|
@@ -23,7 +23,7 @@ const higherFactor = (n) => {
|
|
|
23
23
|
return 1;
|
|
24
24
|
};
|
|
25
25
|
const getEquationSimpleSquare = () => {
|
|
26
|
-
let randNbr = (0, randint_1.randint)(-
|
|
26
|
+
let randNbr = (0, randint_1.randint)(-10, 101);
|
|
27
27
|
const rand = (0, diceFlip_1.diceFlip)(3);
|
|
28
28
|
if (rand === 0)
|
|
29
29
|
randNbr = (0, randint_1.randint)(-20, 0);
|
|
@@ -34,6 +34,7 @@ const getEquationSimpleSquare = () => {
|
|
|
34
34
|
const instruction = `Résoudre l'équation : $x^2 = ${randNbr}$`;
|
|
35
35
|
const sqrt = Math.sqrt(randNbr);
|
|
36
36
|
let solutionsSet;
|
|
37
|
+
let simplifiedRoot;
|
|
37
38
|
if (randNbr < 0) {
|
|
38
39
|
solutionsSet = new discreteSetNode_1.DiscreteSetNode([]);
|
|
39
40
|
}
|
|
@@ -57,6 +58,29 @@ const getEquationSimpleSquare = () => {
|
|
|
57
58
|
keys: equationKeys_1.equationKeys,
|
|
58
59
|
answerFormat: "tex",
|
|
59
60
|
identifiers: { randNbr },
|
|
61
|
+
hint: `L'équation $x^2 = k$ :
|
|
62
|
+
|
|
63
|
+
- n'admet pas de solution si $k<0$,
|
|
64
|
+
- admet une solution si $k=0$, qui est $0$
|
|
65
|
+
- admet deux solutions si $k>0$ : $-\\sqrt{k}$ et $\\sqrt{k}$
|
|
66
|
+
`,
|
|
67
|
+
correction: `
|
|
68
|
+
${randNbr < 0
|
|
69
|
+
? `L'équation $x^2 = ${randNbr}$ n'admet pas de solution, car $${randNbr}$ est négatif. Ainsi, $${answer}$.`
|
|
70
|
+
: randNbr === 0
|
|
71
|
+
? `L'équation $x^2 = 0$ admet une unique solution : $0$. En effet, $0$ est le seul nombre qui au carré est égal à $0$. Ainsi, $${answer}$.`
|
|
72
|
+
: `Puisque $${randNbr}>0$, l'équation $x^2 = ${randNbr}$ admet deux solutions : $-\\sqrt{${randNbr}}$ et $\\sqrt{${randNbr}}$.
|
|
73
|
+
|
|
74
|
+
${new real_1.SquareRoot(randNbr).isSimplifiable()
|
|
75
|
+
? `Or, $\\sqrt{${randNbr}}=${new real_1.SquareRoot(randNbr)
|
|
76
|
+
.simplify()
|
|
77
|
+
.toTree()
|
|
78
|
+
.toTex()}$.`
|
|
79
|
+
: ""}
|
|
80
|
+
|
|
81
|
+
Ainsi, $${answer}$.
|
|
82
|
+
`}
|
|
83
|
+
`,
|
|
60
84
|
};
|
|
61
85
|
return question;
|
|
62
86
|
};
|
|
@@ -138,4 +162,5 @@ exports.equationSimpleSquare = {
|
|
|
138
162
|
getPropositions,
|
|
139
163
|
isAnswerValid,
|
|
140
164
|
subject: "Mathématiques",
|
|
165
|
+
hasHintAndCorrection: true,
|
|
141
166
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"equationType1Exercise.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/equation/equationType1Exercise.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"equationType1Exercise.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/equation/equationType1Exercise.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAalC;;GAEG;AACH,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAgEF,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,WAAW,CAevD,CAAC"}
|
|
@@ -11,6 +11,8 @@ const numberNode_1 = require("../../../../tree/nodes/numbers/numberNode");
|
|
|
11
11
|
const shuffle_1 = require("../../../../utils/shuffle");
|
|
12
12
|
const discreteSetNode_1 = require("../../../../tree/nodes/sets/discreteSetNode");
|
|
13
13
|
const equalNode_1 = require("../../../../tree/nodes/equations/equalNode");
|
|
14
|
+
const alignTex_1 = require("../../../../utils/alignTex");
|
|
15
|
+
const addNode_1 = require("../../../../tree/nodes/operators/addNode");
|
|
14
16
|
const getEquationType1ExerciseQuestion = () => {
|
|
15
17
|
const b = (0, randint_1.randint)(-10, 11);
|
|
16
18
|
const a = (0, randint_1.randint)(-10, 11, [0]);
|
|
@@ -18,13 +20,26 @@ const getEquationType1ExerciseQuestion = () => {
|
|
|
18
20
|
const affine = new affine_1.Affine(1, a).toTree();
|
|
19
21
|
const tree = new equalNode_1.EqualNode(affine, new numberNode_1.NumberNode(b));
|
|
20
22
|
const answer = `x=${solution}`;
|
|
23
|
+
const statementTree = tree.toTex();
|
|
21
24
|
const question = {
|
|
22
|
-
instruction: `Résoudre : $${
|
|
23
|
-
startStatement:
|
|
25
|
+
instruction: `Résoudre : $${statementTree}$`,
|
|
26
|
+
startStatement: statementTree,
|
|
24
27
|
answer,
|
|
25
28
|
keys: equationKeys_1.equationKeys,
|
|
26
29
|
answerFormat: "tex",
|
|
27
30
|
identifiers: { a, b },
|
|
31
|
+
hint: `Il faut isoler $x$ à gauche. Pour cela, effectue l'opération des deux côtés de l'équation qui permet de supprimer le terme $${a < 0 ? "" : "+"}${a}$.`,
|
|
32
|
+
correction: `Pour isoler $x$ à gauche, on effectue l'opération $${a > 0 ? `$-${a}$` : `+${Math.abs(a)}`}$ des deux côtés de l'équation :
|
|
33
|
+
|
|
34
|
+
${(0, alignTex_1.alignTex)([
|
|
35
|
+
[
|
|
36
|
+
`${statementTree}`,
|
|
37
|
+
"\\iff",
|
|
38
|
+
new equalNode_1.EqualNode(new addNode_1.AddNode(affine, new numberNode_1.NumberNode(-a)), new addNode_1.AddNode(b.toTree(), new numberNode_1.NumberNode(-a))).toTex(),
|
|
39
|
+
],
|
|
40
|
+
["", "\\iff", answer],
|
|
41
|
+
])}
|
|
42
|
+
`,
|
|
28
43
|
};
|
|
29
44
|
return question;
|
|
30
45
|
};
|
|
@@ -58,4 +73,5 @@ exports.equationType1Exercise = {
|
|
|
58
73
|
freeTimer: 60,
|
|
59
74
|
isAnswerValid,
|
|
60
75
|
subject: "Mathématiques",
|
|
76
|
+
hasHintAndCorrection: true,
|
|
61
77
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"equationType2Exercise.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/equation/equationType2Exercise.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"equationType2Exercise.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/equation/equationType2Exercise.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAmBlC;;GAEG;AACH,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAqEF,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,WAAW,CAevD,CAAC"}
|
|
@@ -12,6 +12,9 @@ const equalNode_1 = require("../../../../tree/nodes/equations/equalNode");
|
|
|
12
12
|
const discreteSetNode_1 = require("../../../../tree/nodes/sets/discreteSetNode");
|
|
13
13
|
const variableNode_1 = require("../../../../tree/nodes/variables/variableNode");
|
|
14
14
|
const shuffle_1 = require("../../../../utils/shuffle");
|
|
15
|
+
const alignTex_1 = require("../../../../utils/alignTex");
|
|
16
|
+
const fractionNode_1 = require("../../../../tree/nodes/operators/fractionNode");
|
|
17
|
+
const numberNode_1 = require("../../../../tree/nodes/numbers/numberNode");
|
|
15
18
|
const getEquationType2ExerciseQuestion = () => {
|
|
16
19
|
const b = (0, randint_1.randint)(-10, 11);
|
|
17
20
|
const a = (0, randint_1.randint)(-9, 10, [0, 1]);
|
|
@@ -19,13 +22,26 @@ const getEquationType2ExerciseQuestion = () => {
|
|
|
19
22
|
const affine = new affine_1.Affine(a, 0).toTree();
|
|
20
23
|
const tree = new equalNode_1.EqualNode(affine, b.toTree());
|
|
21
24
|
const answer = new equalNode_1.EqualNode(new variableNode_1.VariableNode("x"), solution.toTree()).toTex();
|
|
25
|
+
const statementTex = tree.toTex();
|
|
22
26
|
const question = {
|
|
23
|
-
instruction: `Résoudre : $${
|
|
24
|
-
startStatement:
|
|
27
|
+
instruction: `Résoudre : $${statementTex}$`,
|
|
28
|
+
startStatement: statementTex,
|
|
25
29
|
answer,
|
|
26
30
|
keys: equationKeys_1.equationKeys,
|
|
27
31
|
answerFormat: "tex",
|
|
28
32
|
identifiers: { a, b: b },
|
|
33
|
+
hint: `Il faut isoler $x$ à gauche. Pour cela, effectue l'opération des deux côtés de l'équation qui permet de supprimer la multiplication par $${a}$.`,
|
|
34
|
+
correction: `Pour isoler $x$ à gauche, on divise les deux côtés de l'équation par $${a}$:
|
|
35
|
+
|
|
36
|
+
${(0, alignTex_1.alignTex)([
|
|
37
|
+
[
|
|
38
|
+
`${statementTex}`,
|
|
39
|
+
"\\iff",
|
|
40
|
+
new equalNode_1.EqualNode(new fractionNode_1.FractionNode(affine, new numberNode_1.NumberNode(a)), new fractionNode_1.FractionNode(b.toTree(), new numberNode_1.NumberNode(a))).toTex(),
|
|
41
|
+
],
|
|
42
|
+
["", "\\iff", answer],
|
|
43
|
+
])}
|
|
44
|
+
`,
|
|
29
45
|
};
|
|
30
46
|
return question;
|
|
31
47
|
};
|
|
@@ -60,4 +76,5 @@ exports.equationType2Exercise = {
|
|
|
60
76
|
getPropositions,
|
|
61
77
|
isAnswerValid,
|
|
62
78
|
subject: "Mathématiques",
|
|
79
|
+
hasHintAndCorrection: true,
|
|
63
80
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"equationType3Exercise.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/equation/equationType3Exercise.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"equationType3Exercise.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/equation/equationType3Exercise.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAgBlC;;GAEG;AACH,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAmEF,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,WAAW,CAgBvD,CAAC"}
|
|
@@ -13,6 +13,8 @@ const discreteSetNode_1 = require("../../../../tree/nodes/sets/discreteSetNode")
|
|
|
13
13
|
const variableNode_1 = require("../../../../tree/nodes/variables/variableNode");
|
|
14
14
|
const shuffle_1 = require("../../../../utils/shuffle");
|
|
15
15
|
const numberNode_1 = require("../../../../tree/nodes/numbers/numberNode");
|
|
16
|
+
const alignTex_1 = require("../../../../utils/alignTex");
|
|
17
|
+
const multiplyNode_1 = require("../../../../tree/nodes/operators/multiplyNode");
|
|
16
18
|
const getEquationType3ExerciseQuestion = () => {
|
|
17
19
|
const b = (0, randint_1.randint)(-10, 11, [0]);
|
|
18
20
|
const a = (0, randint_1.randint)(-10, 11, [0, 1]);
|
|
@@ -22,12 +24,22 @@ const getEquationType3ExerciseQuestion = () => {
|
|
|
22
24
|
const statementTree = new equalNode_1.EqualNode(affine, new numberNode_1.NumberNode(c));
|
|
23
25
|
const answerTree = new equalNode_1.EqualNode(new variableNode_1.VariableNode("x"), solution.toTree());
|
|
24
26
|
const answer = answerTree.toTex();
|
|
27
|
+
const statementTex = statementTree.toTex();
|
|
25
28
|
const question = {
|
|
26
|
-
instruction: `Résoudre : $${
|
|
29
|
+
instruction: `Résoudre : $${statementTex}$`,
|
|
27
30
|
hint: "Isolez le terme $x$ dans la partie gauche de l'équation.",
|
|
28
31
|
correction: `Commencer par soustraire $${b}$ des deux côtés de l'équation pour
|
|
29
32
|
l'éliminer du côté gauche. Ensuite, diviser les deux côtés de l'équation par
|
|
30
|
-
$${a}$ pour isoler $x$, ce qui donne :
|
|
33
|
+
$${a}$ pour isoler $x$, ce qui donne :
|
|
34
|
+
|
|
35
|
+
${(0, alignTex_1.alignTex)([
|
|
36
|
+
[
|
|
37
|
+
statementTex,
|
|
38
|
+
"\\iff",
|
|
39
|
+
new equalNode_1.EqualNode(new multiplyNode_1.MultiplyNode(a.toTree(), new variableNode_1.VariableNode("x")), (c - b).toTree()).toTex(),
|
|
40
|
+
],
|
|
41
|
+
["", "\\iff", answer],
|
|
42
|
+
])}`,
|
|
31
43
|
startStatement: statementTree.toTex(),
|
|
32
44
|
answer,
|
|
33
45
|
keys: equationKeys_1.equationKeys,
|
|
@@ -66,4 +78,5 @@ exports.equationType3Exercise = {
|
|
|
66
78
|
getPropositions,
|
|
67
79
|
isAnswerValid,
|
|
68
80
|
subject: "Mathématiques",
|
|
81
|
+
hasHintAndCorrection: true,
|
|
69
82
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"equationType4Exercise.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/equation/equationType4Exercise.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"equationType4Exercise.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/equation/equationType4Exercise.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAgBlC;;GAEG;AAEH,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA4EF,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,WAAW,CAcvD,CAAC"}
|
|
@@ -13,18 +13,19 @@ const discreteSetNode_1 = require("../../../../tree/nodes/sets/discreteSetNode")
|
|
|
13
13
|
const variableNode_1 = require("../../../../tree/nodes/variables/variableNode");
|
|
14
14
|
const shuffle_1 = require("../../../../utils/shuffle");
|
|
15
15
|
const getEquationType4ExerciseQuestion = () => {
|
|
16
|
-
const a = (0, randint_1.randint)(-10, 11, [0]);
|
|
17
|
-
const b = (0, randint_1.randint)(-10, 11);
|
|
16
|
+
const a = (0, randint_1.randint)(-10, 11, [0, 1]);
|
|
17
|
+
const b = (0, randint_1.randint)(-10, 11, [0]);
|
|
18
18
|
const c = (0, randint_1.randint)(-10, 11, [0, a]);
|
|
19
|
-
const d = (0, randint_1.randint)(-10, 11);
|
|
19
|
+
const d = (0, randint_1.randint)(-10, 11, [0]);
|
|
20
20
|
const affines = [new affine_1.Affine(a, b), new affine_1.Affine(c, d)];
|
|
21
21
|
const solution = new rational_1.Rational(d - b, a - c).simplify();
|
|
22
22
|
const statementTree = new equalNode_1.EqualNode(affines[0].toTree(), affines[1].toTree());
|
|
23
23
|
const answerTree = new equalNode_1.EqualNode(new variableNode_1.VariableNode("x"), solution.toTree());
|
|
24
24
|
const answer = answerTree.toTex();
|
|
25
|
+
const statementTex = statementTree.toTex();
|
|
25
26
|
const question = {
|
|
26
|
-
instruction: `Résoudre : $${
|
|
27
|
-
startStatement:
|
|
27
|
+
instruction: `Résoudre : $${statementTex}$`,
|
|
28
|
+
startStatement: statementTex,
|
|
28
29
|
answer,
|
|
29
30
|
keys: equationKeys_1.equationKeys,
|
|
30
31
|
answerFormat: "tex",
|
|
@@ -34,6 +35,20 @@ const getEquationType4ExerciseQuestion = () => {
|
|
|
34
35
|
c: c,
|
|
35
36
|
d: d,
|
|
36
37
|
},
|
|
38
|
+
// hint: `Commence par regrouper les termes en $x$ d'un même côté de l'équation. Puis, isole $x$ en effectuant les bonnes opérations.`,
|
|
39
|
+
// correction: `On isole $x$ à gauche en soustrayant par $${b}$ puis en divisant par $${a}$ :
|
|
40
|
+
// ${alignTex([
|
|
41
|
+
// [
|
|
42
|
+
// statementTex,
|
|
43
|
+
// "\\iff",
|
|
44
|
+
// new EqualNode(
|
|
45
|
+
// new Affine(a, 0).toTree(),
|
|
46
|
+
// affines[1].add(-b).toTree(),
|
|
47
|
+
// ).toTex(),
|
|
48
|
+
// ],
|
|
49
|
+
// ["", "\\iff", answer],
|
|
50
|
+
// ])}
|
|
51
|
+
// `,
|
|
37
52
|
};
|
|
38
53
|
return question;
|
|
39
54
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"firstDegreeEquation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/equation/firstDegreeEquation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"firstDegreeEquation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/equation/firstDegreeEquation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAclC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAqEF,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,WAAW,CAcrD,CAAC"}
|
|
@@ -6,20 +6,42 @@ const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQ
|
|
|
6
6
|
const equationKeys_1 = require("../../../../exercises/utils/keys/equationKeys");
|
|
7
7
|
const rational_1 = require("../../../../math/numbers/rationals/rational");
|
|
8
8
|
const randint_1 = require("../../../../math/utils/random/randint");
|
|
9
|
+
const equalNode_1 = require("../../../../tree/nodes/equations/equalNode");
|
|
9
10
|
const equationSolutionNode_1 = require("../../../../tree/nodes/equations/equationSolutionNode");
|
|
11
|
+
const fractionNode_1 = require("../../../../tree/nodes/operators/fractionNode");
|
|
12
|
+
const multiplyNode_1 = require("../../../../tree/nodes/operators/multiplyNode");
|
|
10
13
|
const discreteSetNode_1 = require("../../../../tree/nodes/sets/discreteSetNode");
|
|
14
|
+
const alignTex_1 = require("../../../../utils/alignTex");
|
|
11
15
|
const shuffle_1 = require("../../../../utils/shuffle");
|
|
12
16
|
const getFirstDegreeEquation = () => {
|
|
13
17
|
const a = (0, randint_1.randint)(-30, 30, [0]);
|
|
14
18
|
const b = (0, randint_1.randint)(-30, 30, [0]);
|
|
15
19
|
const answer = `x=${new rational_1.Rational(a, b).simplify().toTree().toTex()}`;
|
|
20
|
+
const frac = new fractionNode_1.FractionNode(a.toTree(), "x".toTree());
|
|
21
|
+
const statement = new equalNode_1.EqualNode(frac, b.toTree()).toTex();
|
|
16
22
|
const question = {
|
|
17
|
-
instruction: `Résoudre l'équation suivante :
|
|
23
|
+
instruction: `Résoudre l'équation suivante : $${statement}$`,
|
|
18
24
|
startStatement: `x`,
|
|
19
25
|
answer,
|
|
20
26
|
keys: equationKeys_1.equationKeys,
|
|
21
27
|
answerFormat: "tex",
|
|
22
28
|
identifiers: { a, b },
|
|
29
|
+
hint: `Multiplie les deux côtés de l'équation par $x$, puis isole $x$ dans la partie droite de l'équation.`,
|
|
30
|
+
correction: `On multiplie les deux côtés de l'équation par $x$, puis on divise par $b$ :
|
|
31
|
+
|
|
32
|
+
${(0, alignTex_1.alignTex)([
|
|
33
|
+
["", `${statement}`],
|
|
34
|
+
[
|
|
35
|
+
"\\iff",
|
|
36
|
+
new equalNode_1.EqualNode(new multiplyNode_1.MultiplyNode("x".toTree(), frac), new multiplyNode_1.MultiplyNode("x".toTree(), b.toTree())).toTex(),
|
|
37
|
+
],
|
|
38
|
+
[
|
|
39
|
+
"\\iff",
|
|
40
|
+
new equalNode_1.EqualNode(a.toTree(), new multiplyNode_1.MultiplyNode(b.toTree(), "x".toTree())).toTex(),
|
|
41
|
+
],
|
|
42
|
+
["\\iff", answer],
|
|
43
|
+
])}
|
|
44
|
+
`,
|
|
23
45
|
};
|
|
24
46
|
return question;
|
|
25
47
|
};
|
|
@@ -56,4 +78,5 @@ exports.firstDegreeEquation = {
|
|
|
56
78
|
freeTimer: 60,
|
|
57
79
|
isAnswerValid,
|
|
58
80
|
subject: "Mathématiques",
|
|
81
|
+
hasHintAndCorrection: true,
|
|
59
82
|
};
|