math-exercises 3.0.67 → 3.0.69
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/fractionToPercentToDecimal.d.ts.map +1 -1
- package/lib/exercises/math/calcul/fractions/fractionToPercentToDecimal.js +55 -37
- package/lib/exercises/math/calcul/fractions/fractionsSumsMultiplesDenominators.d.ts.map +1 -1
- package/lib/exercises/math/calcul/fractions/fractionsSumsMultiplesDenominators.js +4 -4
- package/lib/exercises/math/calcul/fractions/fractionsSumsPrimeDenominators.d.ts.map +1 -1
- package/lib/exercises/math/calcul/fractions/fractionsSumsPrimeDenominators.js +31 -18
- package/lib/exercises/math/calcul/fractions/fractionsSumsSameDenominators.d.ts.map +1 -1
- package/lib/exercises/math/calcul/fractions/fractionsSumsSameDenominators.js +59 -35
- package/lib/exercises/math/calculLitteral/systems/basicNiceValuesSystemResolution.js +1 -1
- package/lib/exercises/math/combinatory/anagrams.d.ts.map +1 -1
- package/lib/exercises/math/combinatory/anagrams.js +18 -7
- package/lib/exercises/math/combinatory/ballsCounting.d.ts.map +1 -1
- package/lib/exercises/math/combinatory/ballsCounting.js +8 -6
- package/lib/exercises/math/combinatory/diceCounting.d.ts.map +1 -1
- package/lib/exercises/math/combinatory/diceCounting.js +62 -27
- package/lib/exercises/math/functions/absolute/absolueValueAffineEquation.d.ts.map +1 -1
- package/lib/exercises/math/functions/absolute/absolueValueAffineEquation.js +4 -0
- package/lib/exercises/math/functions/absolute/absolueValueInequationsSup.d.ts.map +1 -1
- package/lib/exercises/math/functions/absolute/absolueValueInequationsSup.js +4 -4
- package/lib/exercises/math/functions/absolute/absoluteValueEquations.d.ts.map +1 -1
- package/lib/exercises/math/functions/absolute/absoluteValueEquations.js +22 -10
- package/lib/exercises/math/functions/absolute/absoluteValueInequations.d.ts.map +1 -1
- package/lib/exercises/math/functions/absolute/absoluteValueInequations.js +22 -8
- package/lib/exercises/math/functions/affines/affineAdjustment.d.ts.map +1 -1
- package/lib/exercises/math/functions/affines/affineAdjustment.js +4 -4
- package/lib/exercises/math/functions/affines/affineAdjustmentComplete.d.ts.map +1 -1
- package/lib/exercises/math/functions/affines/affineAdjustmentComplete.js +4 -4
- package/lib/exercises/math/functions/affines/affineAdjustmentRsquared.d.ts.map +1 -1
- package/lib/exercises/math/functions/affines/affineAdjustmentRsquared.js +4 -4
- package/lib/exercises/math/functions/affines/affineExpressionFromTwoImages.d.ts.map +1 -1
- package/lib/exercises/math/functions/affines/affineExpressionFromTwoImages.js +4 -4
- package/lib/exercises/math/functions/affines/affineExpressionReading.d.ts.map +1 -1
- package/lib/exercises/math/functions/affines/affineExpressionReading.js +1 -0
- package/lib/exercises/math/functions/affines/affineMeanValue.d.ts.map +1 -1
- package/lib/exercises/math/functions/affines/affineMeanValue.js +33 -14
- package/lib/exercises/math/functions/affines/algebricExpressionOfAffine.d.ts.map +1 -1
- package/lib/exercises/math/functions/affines/algebricExpressionOfAffine.js +4 -4
- package/lib/exercises/math/functions/affines/leadingCoeffAndOriginOrdinate.d.ts.map +1 -1
- package/lib/exercises/math/functions/affines/leadingCoeffAndOriginOrdinate.js +4 -0
- package/lib/exercises/math/functions/affines/leadingCoefficient.d.ts.map +1 -1
- package/lib/exercises/math/functions/affines/leadingCoefficient.js +4 -5
- package/lib/exercises/math/functions/affines/leadingCoefficientCalculV1.d.ts.map +1 -1
- package/lib/exercises/math/functions/affines/leadingCoefficientCalculV1.js +4 -2
- package/lib/exercises/math/functions/basics/graphicEquation.d.ts.map +1 -1
- package/lib/exercises/math/functions/basics/graphicEquation.js +4 -2
- package/lib/exercises/math/functions/basics/graphicInequation.d.ts.map +1 -1
- package/lib/exercises/math/functions/basics/graphicInequation.js +4 -2
- package/lib/exercises/math/functions/basics/graphicInequationAffine.d.ts.map +1 -1
- package/lib/exercises/math/functions/basics/graphicInequationAffine.js +4 -5
- package/lib/exercises/math/functions/basics/imageAntecedentFromSentence.d.ts.map +1 -1
- package/lib/exercises/math/functions/basics/imageAntecedentFromSentence.js +4 -3
- package/lib/exercises/math/functions/basics/inverseImageFunction.d.ts.map +1 -1
- package/lib/exercises/math/functions/basics/inverseImageFunction.js +4 -6
- package/lib/exercises/math/functions/basics/inverseImageFunctionGeogebra.d.ts.map +1 -1
- package/lib/exercises/math/functions/basics/inverseImageFunctionGeogebra.js +0 -2
- package/lib/exercises/math/functions/basics/inverseImageFunctionTable.d.ts.map +1 -1
- package/lib/exercises/math/functions/basics/inverseImageFunctionTable.js +16 -15
- package/lib/exercises/math/functions/basics/twoFunctionsEquation.d.ts +1 -0
- package/lib/exercises/math/functions/basics/twoFunctionsEquation.d.ts.map +1 -1
- package/lib/exercises/math/functions/basics/twoFunctionsEquation.js +46 -32
- package/lib/exercises/math/functions/basics/twoFunctionsInequation.d.ts.map +1 -1
- package/lib/exercises/math/functions/basics/twoFunctionsInequation.js +4 -2
- package/lib/exercises/math/functions/cube/cubicEquation.d.ts.map +1 -1
- package/lib/exercises/math/functions/cube/cubicEquation.js +4 -3
- package/lib/exercises/math/functions/exponentials/exponentialsVariations.d.ts.map +1 -1
- package/lib/exercises/math/functions/exponentials/exponentialsVariations.js +4 -1
- package/lib/exercises/math/functions/integral/integralAffines.d.ts.map +1 -1
- package/lib/exercises/math/functions/integral/integralAffines.js +4 -2
- package/lib/exercises/math/functions/integral/integralDerivatedUCosU.d.ts.map +1 -1
- package/lib/exercises/math/functions/integral/integralDerivatedUCosU.js +27 -12
- package/lib/exercises/math/functions/integral/integralDerivatedUSinU.d.ts.map +1 -1
- package/lib/exercises/math/functions/integral/integralDerivatedUSinU.js +26 -11
- package/lib/exercises/math/functions/integral/integralExpAxPlusB.d.ts.map +1 -1
- package/lib/exercises/math/functions/integral/integralExpAxPlusB.js +26 -11
- package/lib/exercises/math/functions/integral/integralExpU.d.ts.map +1 -1
- package/lib/exercises/math/functions/integral/integralExpU.js +38 -20
- package/lib/exercises/math/functions/integral/integralFractions.d.ts.map +1 -1
- package/lib/exercises/math/functions/integral/integralFractions.js +40 -21
- package/lib/exercises/math/functions/integral/integralKCosinus.d.ts.map +1 -1
- package/lib/exercises/math/functions/integral/integralKCosinus.js +29 -12
- package/lib/exercises/math/functions/integral/integralKSinus.d.ts.map +1 -1
- package/lib/exercises/math/functions/integral/integralKSinus.js +29 -12
- package/lib/exercises/math/functions/integral/integralTrinomials.d.ts.map +1 -1
- package/lib/exercises/math/functions/integral/integralTrinomials.js +4 -2
- package/lib/exercises/math/functions/logarithm/log10PowerSimplifying.d.ts +0 -1
- package/lib/exercises/math/functions/logarithm/log10PowerSimplifying.d.ts.map +1 -1
- package/lib/exercises/math/functions/logarithm/log10PowerSimplifying.js +36 -15
- package/lib/exercises/math/functions/logarithm/log10Simplifying.d.ts.map +1 -1
- package/lib/exercises/math/functions/logarithm/log10Simplifying.js +43 -22
- package/lib/exercises/math/functions/logarithm/logEquation.d.ts.map +1 -1
- package/lib/exercises/math/functions/logarithm/logEquation.js +20 -11
- package/lib/exercises/math/functions/logarithm/logPowerEquation.d.ts.map +1 -1
- package/lib/exercises/math/functions/logarithm/logPowerEquation.js +26 -14
- package/lib/exercises/math/functions/logarithm/logSimplifiying.d.ts.map +1 -1
- package/lib/exercises/math/functions/logarithm/logSimplifiying.js +4 -3
- package/lib/exercises/math/functions/parity/parityFromAlgebra.d.ts.map +1 -1
- package/lib/exercises/math/functions/parity/parityFromAlgebra.js +29 -13
- package/lib/exercises/math/functions/parity/parityFromGraph.d.ts.map +1 -1
- package/lib/exercises/math/functions/parity/parityFromGraph.js +30 -12
- package/lib/exercises/math/functions/rationalFraction/rationalFractionForbiddenValue.d.ts.map +1 -1
- package/lib/exercises/math/functions/rationalFraction/rationalFractionForbiddenValue.js +27 -14
- package/lib/exercises/math/functions/sign/affineProductSign.d.ts.map +1 -1
- package/lib/exercises/math/functions/sign/affineProductSign.js +4 -4
- package/lib/exercises/math/functions/square/squareImageInterval.d.ts.map +1 -1
- package/lib/exercises/math/functions/square/squareImageInterval.js +39 -19
- package/lib/exercises/math/functions/trinoms/devForm/coefficientsIdentification.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/devForm/coefficientsIdentification.js +4 -3
- package/lib/exercises/math/functions/trinoms/devForm/variationsFromAlgebricForm.d.ts +1 -0
- package/lib/exercises/math/functions/trinoms/devForm/variationsFromAlgebricForm.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/devForm/variationsFromAlgebricForm.js +26 -9
- package/lib/exercises/math/functions/trinoms/equation/deltaTrinom.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/equation/deltaTrinom.js +25 -10
- package/lib/exercises/math/functions/trinoms/equation/solveSecondDegreeEquationByFactorisation.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/equation/solveSecondDegreeEquationByFactorisation.js +4 -2
- package/lib/exercises/math/functions/trinoms/equation/solveSecondDegreeEquationFromCano.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/equation/solveSecondDegreeEquationFromCano.js +4 -2
- package/lib/exercises/math/functions/trinoms/factoForm/factorizedFormFromRoots.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/factoForm/factorizedFormFromRoots.js +4 -4
- package/lib/exercises/math/functions/trinoms/parabole/paraboleExpressionReading.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/parabole/paraboleExpressionReading.js +4 -5
- package/lib/exercises/math/functions/trinoms/parabole/trinomSymetryAxisFromFacto.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/parabole/trinomSymetryAxisFromFacto.js +4 -4
- package/lib/exercises/math/functions/trinoms/roots/findSecondRoot.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/roots/findSecondRoot.js +4 -4
- package/lib/exercises/math/functions/trinoms/roots/niceRootsFromDevForm.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/roots/niceRootsFromDevForm.js +4 -2
- package/lib/exercises/math/functions/trinoms/roots/rootsFromDevForm.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/roots/rootsFromDevForm.js +4 -2
- package/lib/exercises/math/functions/trinoms/roots/rootsFromFactorizedForm.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/roots/rootsFromFactorizedForm.js +4 -2
- package/lib/exercises/math/functions/trinoms/roots/rootsProduct.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/roots/rootsProduct.js +4 -4
- package/lib/exercises/math/functions/trinoms/roots/rootsReading.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/roots/rootsReading.js +4 -3
- package/lib/exercises/math/functions/trinoms/roots/rootsSum.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/roots/rootsSum.js +4 -4
- package/lib/exercises/math/functions/trinoms/sign/trinomSignFromFacto.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/sign/trinomSignFromFacto.js +4 -0
- package/lib/exercises/math/functions/trinoms/sign/trinomSignFromRoots.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/sign/trinomSignFromRoots.js +4 -0
- package/lib/exercises/math/functions/trinoms/summitAndCanonical/alphaBetaFromDevForm.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/summitAndCanonical/alphaBetaFromDevForm.js +32 -11
- package/lib/exercises/math/functions/trinoms/summitAndCanonical/canonicalFromDevForm.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/summitAndCanonical/canonicalFromDevForm.js +24 -9
- package/lib/exercises/math/functions/trinoms/summitAndCanonical/extremumFromCanonicalForm.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/summitAndCanonical/extremumFromCanonicalForm.js +24 -9
- package/lib/exercises/math/functions/trinoms/summitAndCanonical/extremumTypeFromAlgebricForm.d.ts +1 -0
- package/lib/exercises/math/functions/trinoms/summitAndCanonical/extremumTypeFromAlgebricForm.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/summitAndCanonical/extremumTypeFromAlgebricForm.js +29 -12
- package/lib/exercises/math/functions/trinoms/summitAndCanonical/summitAbscissFromDevForm.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/summitAndCanonical/summitAbscissFromDevForm.js +4 -0
- package/lib/exercises/math/functions/trinoms/summitAndCanonical/summitAbscissFromRoots.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/summitAndCanonical/summitAbscissFromRoots.js +4 -0
- package/lib/exercises/math/functions/trinoms/summitAndCanonical/summitReading.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/summitAndCanonical/summitReading.js +3 -0
- package/lib/exercises/math/functions/trinoms/trinomialMeanValue.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/trinomialMeanValue.js +33 -14
- package/lib/exercises/math/geometry/cartesian/cartesianFromTwoPoints.js +1 -1
- package/lib/exercises/math/geometry/euclidianConstructions/buildMediatriceWithCompass.d.ts +2 -0
- package/lib/exercises/math/geometry/euclidianConstructions/buildMediatriceWithCompass.d.ts.map +1 -1
- package/lib/exercises/math/geometry/euclidianConstructions/buildMediatriceWithCompass.js +55 -27
- package/lib/exercises/math/geometry/euclidianConstructions/buildPointFromAxialSymetry.d.ts.map +1 -1
- package/lib/exercises/math/geometry/euclidianConstructions/buildPointFromAxialSymetry.js +4 -0
- package/lib/exercises/math/geometry/euclidianConstructions/buildTriangleWithSizes.d.ts.map +1 -1
- package/lib/exercises/math/geometry/euclidianConstructions/buildTriangleWithSizes.js +4 -0
- package/lib/exercises/math/geometry/euclidianConstructions/pointImageFromTranslation.d.ts.map +1 -1
- package/lib/exercises/math/geometry/euclidianConstructions/pointImageFromTranslation.js +6 -2
- package/lib/exercises/math/geometry/lines/isPointOnCartesianLine.d.ts.map +1 -1
- package/lib/exercises/math/geometry/lines/isPointOnCartesianLine.js +7 -5
- package/lib/exercises/math/geometry/lines/isPointOnLine.d.ts.map +1 -1
- package/lib/exercises/math/geometry/lines/isPointOnLine.js +4 -0
- package/lib/exercises/math/geometry/parametric/extractPointFromParametricLine.d.ts.map +1 -1
- package/lib/exercises/math/geometry/parametric/extractPointFromParametricLine.js +4 -0
- package/lib/exercises/math/geometry/parametric/extractVectorFromParametricLine.d.ts.map +1 -1
- package/lib/exercises/math/geometry/parametric/extractVectorFromParametricLine.js +4 -0
- package/lib/exercises/math/geometry/parametric/pointFromParametricLine.d.ts.map +1 -1
- package/lib/exercises/math/geometry/parametric/pointFromParametricLine.js +4 -0
- package/lib/exercises/math/geometry/perimeters/circleRadiusFromPerimeter.d.ts.map +1 -1
- package/lib/exercises/math/geometry/perimeters/circleRadiusFromPerimeter.js +4 -0
- package/lib/exercises/math/geometry/perimeters/rectangleSideFromPerimeter.d.ts.map +1 -1
- package/lib/exercises/math/geometry/perimeters/rectangleSideFromPerimeter.js +4 -0
- package/lib/exercises/math/geometry/perimeters/squareSideFromPerimeter.d.ts.map +1 -1
- package/lib/exercises/math/geometry/perimeters/squareSideFromPerimeter.js +4 -0
- package/lib/exercises/math/geometry/pythagore/isTriangleRight.d.ts.map +1 -1
- package/lib/exercises/math/geometry/pythagore/isTriangleRight.js +4 -0
- package/lib/exercises/math/geometry/quadrilaterals/parallelogramAngles.d.ts.map +1 -1
- package/lib/exercises/math/geometry/quadrilaterals/parallelogramAngles.js +4 -0
- package/lib/exercises/math/geometry/quadrilaterals/quadrilateralRecognition.d.ts.map +1 -1
- package/lib/exercises/math/geometry/quadrilaterals/quadrilateralRecognition.js +4 -0
- package/lib/exercises/math/geometry/shapes/basicShapesRecognition.d.ts.map +1 -1
- package/lib/exercises/math/geometry/shapes/basicShapesRecognition.js +42 -23
- package/lib/exercises/math/geometry/thales/thalesCalcul.d.ts.map +1 -1
- package/lib/exercises/math/geometry/thales/thalesCalcul.js +8 -4
- package/lib/exercises/math/geometry/vectors/chasles.d.ts.map +1 -1
- package/lib/exercises/math/geometry/vectors/chasles.js +36 -12
- package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductOrthoInSquare.d.ts.map +1 -1
- package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductOrthoInSquare.js +4 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductViaCoords.d.ts.map +1 -1
- package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductViaCoords.js +4 -2
- package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductViaCos.d.ts.map +1 -1
- package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductViaCos.js +4 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductViaNorms.d.ts.map +1 -1
- package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductViaNorms.js +4 -0
- package/lib/exercises/math/percent/index.d.ts +1 -0
- package/lib/exercises/math/percent/index.d.ts.map +1 -1
- package/lib/exercises/math/percent/index.js +1 -0
- package/lib/exercises/pc/energy/calorificValue.d.ts.map +1 -1
- package/lib/exercises/pc/energy/calorificValue.js +58 -29
- package/lib/exercises/pc/energy/combustionTransferEnergy.d.ts.map +1 -1
- package/lib/exercises/pc/energy/combustionTransferEnergy.js +52 -29
- package/lib/exercises/pc/energy/combustionTransferEnergy2.d.ts.map +1 -1
- package/lib/exercises/pc/energy/combustionTransferEnergy2.js +96 -67
- package/lib/exercises/pc/energy/efficencyOfConverter.d.ts.map +1 -1
- package/lib/exercises/pc/energy/efficencyOfConverter.js +53 -40
- package/lib/exercises/pc/energy/efficiencyCalculation.d.ts.map +1 -1
- package/lib/exercises/pc/energy/efficiencyCalculation.js +66 -38
- package/lib/exercises/pc/energy/energyTransfer.d.ts +0 -2
- package/lib/exercises/pc/energy/energyTransfer.d.ts.map +1 -1
- package/lib/exercises/pc/energy/energyTransfer.js +27 -11
- package/lib/exercises/pc/energy/kineticEnergyOrMassOrSpeed.d.ts.map +1 -1
- package/lib/exercises/pc/energy/kineticEnergyOrMassOrSpeed.js +111 -64
- package/lib/exercises/pc/energy/thermalEnergyTransferCalculation.d.ts.map +1 -1
- package/lib/exercises/pc/energy/thermalEnergyTransferCalculation.js +86 -38
- package/lib/exercises/pc/fluids/mariotte.d.ts.map +1 -1
- package/lib/exercises/pc/fluids/mariotte.js +40 -23
- package/lib/exercises/pc/forces/calculateNormalOrFrictionForce.d.ts.map +1 -1
- package/lib/exercises/pc/forces/calculateNormalOrFrictionForce.js +81 -52
- package/lib/exercises/pc/forces/electroStaticForce.d.ts.map +1 -1
- package/lib/exercises/pc/forces/electroStaticForce.js +73 -58
- package/lib/exercises/pc/forces/forceWork.d.ts.map +1 -1
- package/lib/exercises/pc/forces/forceWork.js +22 -7
- package/lib/exercises/pc/math/proportionnalityCoeffFromLine.d.ts.map +1 -1
- package/lib/exercises/pc/math/proportionnalityCoeffFromLine.js +0 -2
- package/lib/index.d.ts +17 -4
- package/lib/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,22 +1,38 @@
|
|
|
1
1
|
import { addValidProp, tryToAddWrongProp, } from "../../../../../exercises/exercise.js";
|
|
2
2
|
import { getDistinctQuestions } from "../../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
|
-
import { TrinomConstructor } from "../../../../../math/polynomials/trinom.js";
|
|
3
|
+
import { Trinom, TrinomConstructor } from "../../../../../math/polynomials/trinom.js";
|
|
4
4
|
import { randint } from "../../../../../math/utils/random/randint.js";
|
|
5
5
|
import { shuffle } from "../../../../../utils/alea/shuffle.js";
|
|
6
|
-
const
|
|
7
|
-
const trinom =
|
|
6
|
+
const getInstruction = (identifiers) => {
|
|
7
|
+
const trinom = new Trinom(identifiers.a, identifiers.b, identifiers.c);
|
|
8
|
+
return `Soit $f$ la fonction polynôme du second degré définie par
|
|
9
|
+
|
|
10
|
+
$$
|
|
11
|
+
f(x) = ${trinom.toTree().toTex()}
|
|
12
|
+
$$
|
|
13
|
+
|
|
14
|
+
Calculer le discriminant $\\Delta$ de $f$.`;
|
|
15
|
+
};
|
|
16
|
+
const getAnswer = (identifiers) => {
|
|
17
|
+
const trinom = new Trinom(identifiers.a, identifiers.b, identifiers.c);
|
|
8
18
|
const answer = trinom.getDelta() + "";
|
|
19
|
+
return answer;
|
|
20
|
+
};
|
|
21
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
9
22
|
const question = {
|
|
10
|
-
answer:
|
|
11
|
-
instruction:
|
|
12
|
-
.toTree()
|
|
13
|
-
.toTex()}$. Calculer le discriminant $\\Delta$.`,
|
|
23
|
+
answer: getAnswer(identifiers),
|
|
24
|
+
instruction: getInstruction(identifiers),
|
|
14
25
|
keys: [],
|
|
15
26
|
answerFormat: "tex",
|
|
16
|
-
identifiers
|
|
27
|
+
identifiers,
|
|
17
28
|
};
|
|
18
29
|
return question;
|
|
19
30
|
};
|
|
31
|
+
const getDeltaTrinomQuestion = () => {
|
|
32
|
+
const trinom = TrinomConstructor.random();
|
|
33
|
+
const identifiers = { a: trinom.a, b: trinom.b, c: trinom.c };
|
|
34
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
35
|
+
};
|
|
20
36
|
const getPropositions = (n, { answer, a, b, c }) => {
|
|
21
37
|
const propositions = [];
|
|
22
38
|
addValidProp(propositions, answer);
|
|
@@ -39,12 +55,11 @@ export const deltaTrinom = {
|
|
|
39
55
|
connector: "=",
|
|
40
56
|
getPropositions,
|
|
41
57
|
label: "Calculer le discriminant d'un trinôme",
|
|
42
|
-
levels: ["1reSpé", "TermSpé", "MathComp"],
|
|
43
58
|
isSingleStep: true,
|
|
44
|
-
sections: ["Second degré"],
|
|
45
59
|
generator: (nb) => getDistinctQuestions(getDeltaTrinomQuestion, nb),
|
|
46
60
|
qcmTimer: 60,
|
|
47
61
|
freeTimer: 60,
|
|
48
62
|
isAnswerValid,
|
|
49
63
|
subject: "Mathématiques",
|
|
64
|
+
getQuestionFromIdentifiers,
|
|
50
65
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"solveSecondDegreeEquationByFactorisation.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/trinoms/equation/solveSecondDegreeEquationByFactorisation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"solveSecondDegreeEquationByFactorisation.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/trinoms/equation/solveSecondDegreeEquationByFactorisation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAarC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAuHF,eAAO,MAAM,wCAAwC,EAAE,QAAQ,CAAC,WAAW,CAgB1E,CAAC"}
|
package/lib/exercises/math/functions/trinoms/equation/solveSecondDegreeEquationByFactorisation.js
CHANGED
|
@@ -74,6 +74,9 @@ const getSolveSecondDegreeEquationByFactorisationQuestion = () => {
|
|
|
74
74
|
a = randint(-9, 10, [0]);
|
|
75
75
|
b = randint([2, 4].includes(type) ? 1 : -9, 10, [0]);
|
|
76
76
|
const identifiers = { a, b, type };
|
|
77
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
78
|
+
};
|
|
79
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
77
80
|
const question = {
|
|
78
81
|
answer: getAnswer(identifiers),
|
|
79
82
|
instruction: getInstruction(identifiers),
|
|
@@ -118,6 +121,5 @@ export const solveSecondDegreeEquationByFactorisation = {
|
|
|
118
121
|
getPropositions,
|
|
119
122
|
isAnswerValid,
|
|
120
123
|
subject: "Mathématiques",
|
|
121
|
-
|
|
122
|
-
getInstruction,
|
|
124
|
+
getQuestionFromIdentifiers,
|
|
123
125
|
};
|
package/lib/exercises/math/functions/trinoms/equation/solveSecondDegreeEquationFromCano.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"solveSecondDegreeEquationFromCano.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/trinoms/equation/solveSecondDegreeEquationFromCano.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"solveSecondDegreeEquationFromCano.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/trinoms/equation/solveSecondDegreeEquationFromCano.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAUrC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB,CAAC;AAyEF,eAAO,MAAM,iCAAiC,EAAE,QAAQ,CAAC,WAAW,CAanE,CAAC"}
|
|
@@ -27,6 +27,9 @@ const getAnswer = (identifiers) => {
|
|
|
27
27
|
const getSolveSecondDegreeEquationFromCanoQuestion = () => {
|
|
28
28
|
const trinom = TrinomConstructor.randomNiceRootsAndSummit();
|
|
29
29
|
const identifiers = { coeffs: trinom.coefficients };
|
|
30
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
31
|
+
};
|
|
32
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
30
33
|
const question = {
|
|
31
34
|
answer: getAnswer(identifiers),
|
|
32
35
|
instruction: getInstruction(identifiers),
|
|
@@ -64,6 +67,5 @@ export const solveSecondDegreeEquationFromCano = {
|
|
|
64
67
|
getPropositions,
|
|
65
68
|
isAnswerValid,
|
|
66
69
|
subject: "Mathématiques",
|
|
67
|
-
|
|
68
|
-
getAnswer,
|
|
70
|
+
getQuestionFromIdentifiers,
|
|
69
71
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"factorizedFormFromRoots.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/trinoms/factoForm/factorizedFormFromRoots.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"factorizedFormFromRoots.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/trinoms/factoForm/factorizedFormFromRoots.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAerC,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA6JF,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,WAAW,CAczD,CAAC"}
|
|
@@ -81,6 +81,9 @@ const getFactorizedFormFromRootsQuestion = () => {
|
|
|
81
81
|
? [firstRoot]
|
|
82
82
|
: [firstRoot, secondRoot].sort((a, b) => a - b);
|
|
83
83
|
const identifiers = { a, roots };
|
|
84
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
85
|
+
};
|
|
86
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
84
87
|
const question = {
|
|
85
88
|
answer: getAnswer(identifiers),
|
|
86
89
|
instruction: getInstruction(identifiers),
|
|
@@ -136,9 +139,6 @@ export const factorizedFormFromRoots = {
|
|
|
136
139
|
getPropositions,
|
|
137
140
|
isAnswerValid,
|
|
138
141
|
subject: "Mathématiques",
|
|
139
|
-
|
|
140
|
-
getAnswer,
|
|
141
|
-
getHint,
|
|
142
|
-
getCorrection,
|
|
142
|
+
getQuestionFromIdentifiers,
|
|
143
143
|
hasHintAndCorrection: true,
|
|
144
144
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paraboleExpressionReading.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/trinoms/parabole/paraboleExpressionReading.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"paraboleExpressionReading.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/trinoms/parabole/paraboleExpressionReading.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAmBT,MAAM,6BAA6B,CAAC;AAgBrC,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,EAAE,EAAE,CAAC;CAIpB,CAAC;AA4SF,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,WAAW,CAe3D,CAAC"}
|
|
@@ -252,6 +252,9 @@ const getParaboleExpressionReadingQuestion = (opts) => {
|
|
|
252
252
|
type,
|
|
253
253
|
points,
|
|
254
254
|
};
|
|
255
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
256
|
+
};
|
|
257
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
255
258
|
const question = {
|
|
256
259
|
answer: getAnswer(identifiers),
|
|
257
260
|
instruction: getInstruction(identifiers),
|
|
@@ -275,11 +278,7 @@ export const paraboleExpressionReading = {
|
|
|
275
278
|
getPropositions,
|
|
276
279
|
isAnswerValid,
|
|
277
280
|
subject: "Mathématiques",
|
|
278
|
-
|
|
279
|
-
getCorrection,
|
|
280
|
-
getInstruction,
|
|
281
|
-
getAnswer,
|
|
282
|
-
getGGBOptions,
|
|
281
|
+
getQuestionFromIdentifiers,
|
|
283
282
|
hasGeogebra: true,
|
|
284
283
|
hasHintAndCorrection: true,
|
|
285
284
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trinomSymetryAxisFromFacto.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/trinoms/parabole/trinomSymetryAxisFromFacto.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"trinomSymetryAxisFromFacto.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/trinoms/parabole/trinomSymetryAxisFromFacto.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAarC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAsGF,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,WAAW,CAe5D,CAAC"}
|
|
@@ -82,6 +82,9 @@ const getTrinomSymetryAxisFromFactoQuestion = (ops) => {
|
|
|
82
82
|
x1,
|
|
83
83
|
x2,
|
|
84
84
|
};
|
|
85
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
86
|
+
};
|
|
87
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
85
88
|
const question = {
|
|
86
89
|
answer: getAnswer(identifiers),
|
|
87
90
|
instruction: getInstruction(identifiers),
|
|
@@ -104,9 +107,6 @@ export const trinomSymetryAxisFromFacto = {
|
|
|
104
107
|
getPropositions,
|
|
105
108
|
isAnswerValid,
|
|
106
109
|
subject: "Mathématiques",
|
|
107
|
-
|
|
108
|
-
getHint,
|
|
109
|
-
getCorrection,
|
|
110
|
-
getAnswer,
|
|
110
|
+
getQuestionFromIdentifiers,
|
|
111
111
|
hasHintAndCorrection: true,
|
|
112
112
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"findSecondRoot.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/trinoms/roots/findSecondRoot.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"findSecondRoot.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/trinoms/roots/findSecondRoot.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAIrC,OAAO,EAGL,qBAAqB,EACtB,MAAM,4CAA4C,CAAC;AAIpD,OAAO,EAEL,eAAe,EAChB,MAAM,qCAAqC,CAAC;AAO7C,KAAK,WAAW,GAAG;IACjB,iBAAiB,EAAE,qBAAqB,CAAC;IACzC,oBAAoB,EAAE,eAAe,CAAC;CACvC,CAAC;AAuHF,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,WAAW,CAchD,CAAC"}
|
|
@@ -94,6 +94,9 @@ const getFindSecondRootQuestion = (ops) => {
|
|
|
94
94
|
firstRootIdentifiers: firstRoot.toTree().toIdentifiers(),
|
|
95
95
|
trinomIdentifiers: new TrinomNode(a, b, c).toIdentifiers(),
|
|
96
96
|
};
|
|
97
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
98
|
+
};
|
|
99
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
97
100
|
const question = {
|
|
98
101
|
answer: getAnswer(identifiers),
|
|
99
102
|
instruction: getInstruction(identifiers),
|
|
@@ -116,9 +119,6 @@ export const findSecondRoot = {
|
|
|
116
119
|
getPropositions,
|
|
117
120
|
isAnswerValid,
|
|
118
121
|
subject: "Mathématiques",
|
|
119
|
-
|
|
120
|
-
getHint,
|
|
121
|
-
getCorrection,
|
|
122
|
-
getAnswer,
|
|
122
|
+
getQuestionFromIdentifiers,
|
|
123
123
|
hasHintAndCorrection: true,
|
|
124
124
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"niceRootsFromDevForm.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/trinoms/roots/niceRootsFromDevForm.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"niceRootsFromDevForm.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/trinoms/roots/niceRootsFromDevForm.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAWT,MAAM,6BAA6B,CAAC;AAUrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAkEF,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,WAAW,CAYtD,CAAC"}
|
|
@@ -25,6 +25,9 @@ const getAnswer = (identifiers) => {
|
|
|
25
25
|
const getRootsFromDevFormQuestion = () => {
|
|
26
26
|
const trinom = TrinomConstructor.randomFactorized();
|
|
27
27
|
const identifiers = { a: trinom.a, b: trinom.b, c: trinom.c };
|
|
28
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
29
|
+
};
|
|
30
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
28
31
|
const question = {
|
|
29
32
|
answer: getAnswer(identifiers),
|
|
30
33
|
instruction: getInstruction(identifiers),
|
|
@@ -68,6 +71,5 @@ export const niceRootsFromDevForm = {
|
|
|
68
71
|
qcmTimer: 60,
|
|
69
72
|
freeTimer: 60,
|
|
70
73
|
subject: "Mathématiques",
|
|
71
|
-
|
|
72
|
-
getAnswer,
|
|
74
|
+
getQuestionFromIdentifiers,
|
|
73
75
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rootsFromDevForm.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/trinoms/roots/rootsFromDevForm.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"rootsFromDevForm.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/trinoms/roots/rootsFromDevForm.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAWT,MAAM,6BAA6B,CAAC;AAUrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAwEF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAalD,CAAC"}
|
|
@@ -24,6 +24,9 @@ const getAnswer = (identifiers) => {
|
|
|
24
24
|
const getRootsFromDevFormQuestion = () => {
|
|
25
25
|
const trinom = TrinomConstructor.random();
|
|
26
26
|
const identifiers = { a: trinom.a, b: trinom.b, c: trinom.c };
|
|
27
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
28
|
+
};
|
|
29
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
27
30
|
const question = {
|
|
28
31
|
answer: getAnswer(identifiers),
|
|
29
32
|
instruction: getInstruction(identifiers),
|
|
@@ -73,6 +76,5 @@ export const rootsFromDevForm = {
|
|
|
73
76
|
isAnswerValid,
|
|
74
77
|
subject: "Mathématiques",
|
|
75
78
|
pdfOptions: { shouldSpreadPropositions: true },
|
|
76
|
-
|
|
77
|
-
getAnswer,
|
|
79
|
+
getQuestionFromIdentifiers,
|
|
78
80
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rootsFromFactorizedForm.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/trinoms/roots/rootsFromFactorizedForm.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"rootsFromFactorizedForm.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/trinoms/roots/rootsFromFactorizedForm.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAYrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAkHF,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,WAAW,CAazD,CAAC"}
|
|
@@ -37,6 +37,9 @@ const getAnswer = (identifiers) => {
|
|
|
37
37
|
const getRootsFromFactorizedFormQuestion = () => {
|
|
38
38
|
const trinom = TrinomConstructor.randomFactorized();
|
|
39
39
|
const identifiers = { a: trinom.a, b: trinom.b, c: trinom.c };
|
|
40
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
41
|
+
};
|
|
42
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
40
43
|
const question = {
|
|
41
44
|
answer: getAnswer(identifiers),
|
|
42
45
|
instruction: getInstruction(identifiers),
|
|
@@ -91,6 +94,5 @@ export const rootsFromFactorizedForm = {
|
|
|
91
94
|
getPropositions,
|
|
92
95
|
isAnswerValid,
|
|
93
96
|
subject: "Mathématiques",
|
|
94
|
-
|
|
95
|
-
getAnswer,
|
|
97
|
+
getQuestionFromIdentifiers,
|
|
96
98
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rootsProduct.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/trinoms/roots/rootsProduct.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"rootsProduct.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/trinoms/roots/rootsProduct.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAGrC,OAAO,EAGL,qBAAqB,EACtB,MAAM,4CAA4C,CAAC;AAOpD,KAAK,WAAW,GAAG;IACjB,iBAAiB,EAAE,qBAAqB,CAAC;CAC1C,CAAC;AA+GF,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,WAAW,CAc9C,CAAC"}
|
|
@@ -79,6 +79,9 @@ const getRootsProductQuestion = (ops) => {
|
|
|
79
79
|
const identifiers = {
|
|
80
80
|
trinomIdentifiers: trinom.toIdentifiers(),
|
|
81
81
|
};
|
|
82
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
83
|
+
};
|
|
84
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
82
85
|
const question = {
|
|
83
86
|
answer: getAnswer(identifiers),
|
|
84
87
|
instruction: getInstruction(identifiers),
|
|
@@ -101,9 +104,6 @@ export const rootsProduct = {
|
|
|
101
104
|
getPropositions,
|
|
102
105
|
isAnswerValid,
|
|
103
106
|
subject: "Mathématiques",
|
|
104
|
-
|
|
105
|
-
getHint,
|
|
106
|
-
getCorrection,
|
|
107
|
-
getAnswer,
|
|
107
|
+
getQuestionFromIdentifiers,
|
|
108
108
|
hasHintAndCorrection: true,
|
|
109
109
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rootsReading.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/trinoms/roots/rootsReading.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"rootsReading.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/trinoms/roots/rootsReading.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAOrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAyEF,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,WAAW,CAY9C,CAAC"}
|
|
@@ -30,6 +30,9 @@ const getGGBOptions = (identifiers) => {
|
|
|
30
30
|
const getRootsReadingQuestion = () => {
|
|
31
31
|
const trinom = TrinomConstructor.randomNiceRoots(randint(1, 3));
|
|
32
32
|
const identifiers = { a: trinom.a, b: trinom.b, c: trinom.c };
|
|
33
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
34
|
+
};
|
|
35
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
33
36
|
const question = {
|
|
34
37
|
answer: getAnswer(identifiers),
|
|
35
38
|
instruction: getInstruction(identifiers),
|
|
@@ -73,7 +76,5 @@ export const rootsReading = {
|
|
|
73
76
|
isAnswerValid,
|
|
74
77
|
hasGeogebra: true,
|
|
75
78
|
subject: "Mathématiques",
|
|
76
|
-
|
|
77
|
-
getAnswer,
|
|
78
|
-
getGGBOptions,
|
|
79
|
+
getQuestionFromIdentifiers,
|
|
79
80
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rootsSum.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/trinoms/roots/rootsSum.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"rootsSum.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/trinoms/roots/rootsSum.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAGrC,OAAO,EAGL,qBAAqB,EACtB,MAAM,4CAA4C,CAAC;AAOpD,KAAK,WAAW,GAAG;IACjB,iBAAiB,EAAE,qBAAqB,CAAC;CAC1C,CAAC;AA0GF,eAAO,MAAM,QAAQ,EAAE,QAAQ,CAAC,WAAW,CAc1C,CAAC"}
|
|
@@ -79,6 +79,9 @@ const getRootsSumQuestion = (ops) => {
|
|
|
79
79
|
const identifiers = {
|
|
80
80
|
trinomIdentifiers: trinom.toIdentifiers(),
|
|
81
81
|
};
|
|
82
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
83
|
+
};
|
|
84
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
82
85
|
const question = {
|
|
83
86
|
answer: getAnswer(identifiers),
|
|
84
87
|
instruction: getInstruction(identifiers),
|
|
@@ -101,9 +104,6 @@ export const rootsSum = {
|
|
|
101
104
|
getPropositions,
|
|
102
105
|
isAnswerValid,
|
|
103
106
|
subject: "Mathématiques",
|
|
104
|
-
|
|
105
|
-
getHint,
|
|
106
|
-
getCorrection,
|
|
107
|
-
getAnswer,
|
|
107
|
+
getQuestionFromIdentifiers,
|
|
108
108
|
hasHintAndCorrection: true,
|
|
109
109
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trinomSignFromFacto.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/trinoms/sign/trinomSignFromFacto.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"trinomSignFromFacto.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/trinoms/sign/trinomSignFromFacto.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAgBT,MAAM,6BAA6B,CAAC;AAkBrC,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,gBAAgB,EAAE,OAAO,CAAC;CAC3B,CAAC;AA8HF,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,WAAW,CAqBrD,CAAC"}
|
|
@@ -90,6 +90,9 @@ const getTrinomSignFromFactoQuestion = () => {
|
|
|
90
90
|
isAskingPositive,
|
|
91
91
|
trinomCoeffs: trinom.getCoeffs(),
|
|
92
92
|
};
|
|
93
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
94
|
+
};
|
|
95
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
93
96
|
const question = {
|
|
94
97
|
answer: getAnswer(identifiers),
|
|
95
98
|
instruction: getInstruction(identifiers),
|
|
@@ -120,4 +123,5 @@ export const trinomSignFromFacto = {
|
|
|
120
123
|
pdfOptions: {
|
|
121
124
|
shouldSpreadPropositions: true,
|
|
122
125
|
},
|
|
126
|
+
getQuestionFromIdentifiers,
|
|
123
127
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trinomSignFromRoots.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/trinoms/sign/trinomSignFromRoots.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"trinomSignFromRoots.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/trinoms/sign/trinomSignFromRoots.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAgBT,MAAM,6BAA6B,CAAC;AAkBrC,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,gBAAgB,EAAE,OAAO,CAAC;CAC3B,CAAC;AA6HF,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,WAAW,CAqBrD,CAAC"}
|
|
@@ -89,6 +89,9 @@ const getTrinomSignFromRootsQuestion = () => {
|
|
|
89
89
|
isAskingPositive,
|
|
90
90
|
trinomCoeffs: trinom.getCoeffs(),
|
|
91
91
|
};
|
|
92
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
93
|
+
};
|
|
94
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
92
95
|
const question = {
|
|
93
96
|
answer: getAnswer(identifiers),
|
|
94
97
|
instruction: getInstruction(identifiers),
|
|
@@ -119,4 +122,5 @@ export const trinomSignFromRoots = {
|
|
|
119
122
|
pdfOptions: {
|
|
120
123
|
shouldSpreadPropositions: true,
|
|
121
124
|
},
|
|
125
|
+
getQuestionFromIdentifiers,
|
|
122
126
|
};
|
package/lib/exercises/math/functions/trinoms/summitAndCanonical/alphaBetaFromDevForm.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alphaBetaFromDevForm.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/trinoms/summitAndCanonical/alphaBetaFromDevForm.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"alphaBetaFromDevForm.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/trinoms/summitAndCanonical/alphaBetaFromDevForm.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,6BAA6B,CAAC;AAOrC,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB,CAAC;AA8DF,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,WAAW,CAatD,CAAC"}
|
|
@@ -4,24 +4,46 @@ import { TrinomConstructor } from "../../../../../math/polynomials/trinom.js";
|
|
|
4
4
|
import { randint } from "../../../../../math/utils/random/randint.js";
|
|
5
5
|
import { coinFlip } from "../../../../../utils/alea/coinFlip.js";
|
|
6
6
|
import { shuffle } from "../../../../../utils/alea/shuffle.js";
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
7
|
+
const getInstruction = (identifiers) => {
|
|
8
|
+
const { param, coeffs } = identifiers;
|
|
9
|
+
const trinom = TrinomConstructor.fromCoeffs(coeffs);
|
|
10
|
+
return `Soit $f$ la fonction polynôme du second degré définie par
|
|
11
|
+
|
|
12
|
+
$$
|
|
13
|
+
f(x) = ${trinom.toTree().toTex()}
|
|
14
|
+
$$
|
|
15
|
+
|
|
16
|
+
Que vaut $${param}$ ?`;
|
|
17
|
+
};
|
|
18
|
+
const getAnswer = (identifiers) => {
|
|
19
|
+
const { param, coeffs } = identifiers;
|
|
20
|
+
const trinom = TrinomConstructor.fromCoeffs(coeffs);
|
|
10
21
|
const alphaTex = trinom.getAlphaNode().toTex();
|
|
11
22
|
const betaTex = trinom.getBetaNode().toTex();
|
|
12
23
|
const answer = param === "\\alpha" ? alphaTex : betaTex;
|
|
24
|
+
return answer;
|
|
25
|
+
};
|
|
26
|
+
const getStartStatement = (identifiers) => {
|
|
27
|
+
const { param } = identifiers;
|
|
28
|
+
return param;
|
|
29
|
+
};
|
|
30
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
13
31
|
const question = {
|
|
14
|
-
answer:
|
|
32
|
+
answer: getAnswer(identifiers),
|
|
15
33
|
keys: ["x", "alpha", "beta"],
|
|
16
|
-
instruction:
|
|
17
|
-
.toTree()
|
|
18
|
-
.toTex()}$. Que vaut $${param}$ ?`,
|
|
34
|
+
instruction: getInstruction(identifiers),
|
|
19
35
|
answerFormat: "tex",
|
|
20
|
-
startStatement:
|
|
21
|
-
identifiers
|
|
36
|
+
startStatement: getStartStatement(identifiers),
|
|
37
|
+
identifiers,
|
|
22
38
|
};
|
|
23
39
|
return question;
|
|
24
40
|
};
|
|
41
|
+
const getAlphaBetaFromDevFormQuestion = () => {
|
|
42
|
+
const trinom = TrinomConstructor.randomCanonical();
|
|
43
|
+
const param = coinFlip() ? "\\alpha" : "\\beta";
|
|
44
|
+
const identifiers = { coeffs: trinom.coefficients, param };
|
|
45
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
46
|
+
};
|
|
25
47
|
const getPropositions = (n, { answer }) => {
|
|
26
48
|
const propositions = [];
|
|
27
49
|
addValidProp(propositions, answer);
|
|
@@ -37,13 +59,12 @@ export const alphaBetaFromDevForm = {
|
|
|
37
59
|
id: "alphaBetaFromDevForm",
|
|
38
60
|
connector: "=",
|
|
39
61
|
label: "Déterminer $\\alpha$ ou $\\beta$ à partir de la forme développée",
|
|
40
|
-
levels: ["1reSpé"],
|
|
41
62
|
isSingleStep: false,
|
|
42
|
-
sections: ["Second degré"],
|
|
43
63
|
generator: (nb) => getDistinctQuestions(getAlphaBetaFromDevFormQuestion, nb),
|
|
44
64
|
qcmTimer: 60,
|
|
45
65
|
freeTimer: 60,
|
|
46
66
|
getPropositions,
|
|
47
67
|
isAnswerValid,
|
|
48
68
|
subject: "Mathématiques",
|
|
69
|
+
getQuestionFromIdentifiers,
|
|
49
70
|
};
|
package/lib/exercises/math/functions/trinoms/summitAndCanonical/canonicalFromDevForm.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"canonicalFromDevForm.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/trinoms/summitAndCanonical/canonicalFromDevForm.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"canonicalFromDevForm.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/trinoms/summitAndCanonical/canonicalFromDevForm.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAWT,MAAM,6BAA6B,CAAC;AAMrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA4DF,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,WAAW,CAatD,CAAC"}
|
|
@@ -2,20 +2,36 @@ import { addValidProp, tryToAddWrongProp, } from "../../../../../exercises/exerc
|
|
|
2
2
|
import { getDistinctQuestions } from "../../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
3
|
import { Trinom, TrinomConstructor } from "../../../../../math/polynomials/trinom.js";
|
|
4
4
|
import { shuffle } from "../../../../../utils/alea/shuffle.js";
|
|
5
|
-
const
|
|
6
|
-
const
|
|
5
|
+
const getInstruction = (identifiers) => {
|
|
6
|
+
const { a, b, c } = identifiers;
|
|
7
|
+
const trinom = new Trinom(a, b, c);
|
|
8
|
+
return `Déterminer la forme canonique de la fonction $f$ définie par
|
|
9
|
+
|
|
10
|
+
$$
|
|
11
|
+
f(x) = ${trinom.toTree().toTex()}
|
|
12
|
+
$$`;
|
|
13
|
+
};
|
|
14
|
+
const getAnswer = (identifiers) => {
|
|
15
|
+
const { a, b, c } = identifiers;
|
|
16
|
+
const trinom = new Trinom(a, b, c);
|
|
7
17
|
const answer = trinom.getCanonicalForm().toTex();
|
|
18
|
+
return answer;
|
|
19
|
+
};
|
|
20
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
8
21
|
const question = {
|
|
9
|
-
answer,
|
|
22
|
+
answer: getAnswer(identifiers),
|
|
10
23
|
keys: ["x", "equal", "alpha", "beta"],
|
|
11
|
-
instruction:
|
|
12
|
-
.toTree()
|
|
13
|
-
.toTex()}$`,
|
|
24
|
+
instruction: getInstruction(identifiers),
|
|
14
25
|
answerFormat: "tex",
|
|
15
|
-
identifiers
|
|
26
|
+
identifiers,
|
|
16
27
|
};
|
|
17
28
|
return question;
|
|
18
29
|
};
|
|
30
|
+
const getCanonicalFromDevFormQuestion = () => {
|
|
31
|
+
const trinom = TrinomConstructor.randomCanonical();
|
|
32
|
+
const identifiers = { a: trinom.a, b: trinom.b, c: trinom.c };
|
|
33
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
34
|
+
};
|
|
19
35
|
const getPropositions = (n, { answer, a }) => {
|
|
20
36
|
const propositions = [];
|
|
21
37
|
addValidProp(propositions, answer);
|
|
@@ -36,13 +52,12 @@ export const canonicalFromDevForm = {
|
|
|
36
52
|
id: "canonicalFromDevForm",
|
|
37
53
|
connector: "\\iff",
|
|
38
54
|
label: "Déterminer la forme canonique à partir de la forme développée",
|
|
39
|
-
levels: ["1reSpé"],
|
|
40
55
|
isSingleStep: false,
|
|
41
|
-
sections: ["Second degré"],
|
|
42
56
|
generator: (nb) => getDistinctQuestions(getCanonicalFromDevFormQuestion, nb),
|
|
43
57
|
qcmTimer: 60,
|
|
44
58
|
freeTimer: 60,
|
|
45
59
|
getPropositions,
|
|
46
60
|
isAnswerValid,
|
|
47
61
|
subject: "Mathématiques",
|
|
62
|
+
getQuestionFromIdentifiers,
|
|
48
63
|
};
|
package/lib/exercises/math/functions/trinoms/summitAndCanonical/extremumFromCanonicalForm.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extremumFromCanonicalForm.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/trinoms/summitAndCanonical/extremumFromCanonicalForm.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"extremumFromCanonicalForm.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/trinoms/summitAndCanonical/extremumFromCanonicalForm.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAWT,MAAM,6BAA6B,CAAC;AAMrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAqEF,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,WAAW,CAc3D,CAAC"}
|
package/lib/exercises/math/functions/trinoms/summitAndCanonical/extremumFromCanonicalForm.js
CHANGED
|
@@ -4,20 +4,36 @@ import { Trinom, TrinomConstructor } from "../../../../../math/polynomials/trino
|
|
|
4
4
|
import { randint } from "../../../../../math/utils/random/randint.js";
|
|
5
5
|
import { PointNode } from "../../../../../tree/nodes/geometry/pointNode.js";
|
|
6
6
|
import { shuffle } from "../../../../../utils/alea/shuffle.js";
|
|
7
|
-
const
|
|
8
|
-
const trinom =
|
|
7
|
+
const getInstruction = (identifiers) => {
|
|
8
|
+
const trinom = new Trinom(identifiers.a, identifiers.b, identifiers.c);
|
|
9
|
+
return `Soit $f$ la fonction définie par
|
|
10
|
+
|
|
11
|
+
$$
|
|
12
|
+
f(x) = ${trinom.getCanonicalForm().toTex()}
|
|
13
|
+
$$
|
|
14
|
+
|
|
15
|
+
Quelles sont les coordonnées du sommet $S$ de la parabole représentative de $f$ ?`;
|
|
16
|
+
};
|
|
17
|
+
const getAnswer = (identifiers) => {
|
|
18
|
+
const trinom = new Trinom(identifiers.a, identifiers.b, identifiers.c);
|
|
9
19
|
const answer = trinom.getSommet().toTexWithCoords();
|
|
20
|
+
return answer;
|
|
21
|
+
};
|
|
22
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
10
23
|
const question = {
|
|
11
|
-
answer:
|
|
12
|
-
instruction:
|
|
13
|
-
.getCanonicalForm()
|
|
14
|
-
.toTex()}$. Quelles sont les coordonnées du sommet $S$ de la parabole représentative de $f$ ?`,
|
|
24
|
+
answer: getAnswer(identifiers),
|
|
25
|
+
instruction: getInstruction(identifiers),
|
|
15
26
|
keys: ["S", "semicolon"],
|
|
16
27
|
answerFormat: "tex",
|
|
17
|
-
identifiers
|
|
28
|
+
identifiers,
|
|
18
29
|
};
|
|
19
30
|
return question;
|
|
20
31
|
};
|
|
32
|
+
const getExtremumFromCanonicalFormQuestion = () => {
|
|
33
|
+
const trinom = TrinomConstructor.randomCanonical();
|
|
34
|
+
const identifiers = { a: trinom.a, b: trinom.b, c: trinom.c };
|
|
35
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
36
|
+
};
|
|
21
37
|
const getPropositions = (n, { answer, a, b, c }) => {
|
|
22
38
|
const propositions = [];
|
|
23
39
|
addValidProp(propositions, answer);
|
|
@@ -43,13 +59,12 @@ export const extremumFromCanonicalForm = {
|
|
|
43
59
|
id: "extremumFromCanonicalForm",
|
|
44
60
|
connector: "=",
|
|
45
61
|
label: "Déterminer les coordonnées du sommet d'une parabole à partir de la forme canonique",
|
|
46
|
-
levels: ["1reSpé"],
|
|
47
62
|
isSingleStep: true,
|
|
48
|
-
sections: ["Second degré"],
|
|
49
63
|
generator: (nb) => getDistinctQuestions(getExtremumFromCanonicalFormQuestion, nb),
|
|
50
64
|
qcmTimer: 60,
|
|
51
65
|
freeTimer: 60,
|
|
52
66
|
getPropositions,
|
|
53
67
|
isAnswerValid,
|
|
54
68
|
subject: "Mathématiques",
|
|
69
|
+
getQuestionFromIdentifiers,
|
|
55
70
|
};
|