math-exercises 2.2.6 → 2.2.8
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/addAndSub.js +1 -1
- package/lib/exercises/math/calcul/addAndSubWithoutRelatives.js +1 -1
- package/lib/exercises/math/calcul/arithmetics/divisorsList.d.ts.map +1 -1
- package/lib/exercises/math/calcul/arithmetics/divisorsList.js +10 -7
- package/lib/exercises/math/calcul/arithmetics/primeNumbers.d.ts.map +1 -1
- package/lib/exercises/math/calcul/arithmetics/primeNumbers.js +0 -1
- package/lib/exercises/math/calcul/digitDecimalRank.d.ts.map +1 -1
- package/lib/exercises/math/calcul/digitDecimalRank.js +2 -3
- package/lib/exercises/math/calcul/digitDecimalRankNumber.d.ts.map +1 -1
- package/lib/exercises/math/calcul/digitDecimalRankNumber.js +2 -3
- package/lib/exercises/math/calcul/digitRank.d.ts.map +1 -1
- package/lib/exercises/math/calcul/digitRank.js +2 -3
- package/lib/exercises/math/calcul/digitRankNumber.d.ts.map +1 -1
- package/lib/exercises/math/calcul/digitRankNumber.js +2 -3
- package/lib/exercises/math/calcul/fractions/fractionAndIntegerDivision.d.ts.map +1 -1
- package/lib/exercises/math/calcul/fractions/fractionAndIntegerDivision.js +0 -1
- package/lib/exercises/math/calcul/fractions/fractionAndIntegerProduct.d.ts.map +1 -1
- package/lib/exercises/math/calcul/fractions/fractionAndIntegerProduct.js +0 -1
- package/lib/exercises/math/calcul/fractions/fractionToPercentToDecimal.d.ts.map +1 -1
- package/lib/exercises/math/calcul/fractions/fractionToPercentToDecimal.js +0 -1
- package/lib/exercises/math/calcul/fractions/fractionsSumsMultiplesDenominators.d.ts +10 -0
- package/lib/exercises/math/calcul/fractions/fractionsSumsMultiplesDenominators.d.ts.map +1 -0
- package/lib/exercises/math/calcul/fractions/fractionsSumsMultiplesDenominators.js +61 -0
- package/lib/exercises/math/calcul/fractions/fractionsSumsPrimeDenominators.d.ts +10 -0
- package/lib/exercises/math/calcul/fractions/fractionsSumsPrimeDenominators.d.ts.map +1 -0
- package/lib/exercises/math/calcul/fractions/fractionsSumsPrimeDenominators.js +56 -0
- package/lib/exercises/math/calcul/fractions/fractionsSumsSameDenominators.d.ts +9 -0
- package/lib/exercises/math/calcul/fractions/fractionsSumsSameDenominators.d.ts.map +1 -0
- package/lib/exercises/math/calcul/fractions/fractionsSumsSameDenominators.js +57 -0
- package/lib/exercises/math/calcul/fractions/index.d.ts +3 -0
- package/lib/exercises/math/calcul/fractions/index.d.ts.map +1 -1
- package/lib/exercises/math/calcul/fractions/index.js +3 -0
- package/lib/exercises/math/calcul/fractions/simplifyFraction.d.ts.map +1 -1
- package/lib/exercises/math/calcul/fractions/simplifyFraction.js +0 -1
- package/lib/exercises/math/calcul/mentalCaluls/index.d.ts +2 -0
- package/lib/exercises/math/calcul/mentalCaluls/index.d.ts.map +1 -1
- package/lib/exercises/math/calcul/mentalCaluls/index.js +2 -0
- package/lib/exercises/math/calcul/mentalCaluls/mentalAddAndSub.js +1 -1
- package/lib/exercises/math/calcul/mentalCaluls/mentalAddAndSubNoRelative.d.ts +7 -0
- package/lib/exercises/math/calcul/mentalCaluls/mentalAddAndSubNoRelative.d.ts.map +1 -0
- package/lib/exercises/math/calcul/mentalCaluls/mentalAddAndSubNoRelative.js +71 -0
- package/lib/exercises/math/calcul/mentalCaluls/mentalMultiplications.d.ts.map +1 -1
- package/lib/exercises/math/calcul/mentalCaluls/mentalMultiplications.js +25 -17
- package/lib/exercises/math/calcul/mentalCaluls/mentalMultiplicationsNoRelative.d.ts +7 -0
- package/lib/exercises/math/calcul/mentalCaluls/mentalMultiplicationsNoRelative.d.ts.map +1 -0
- package/lib/exercises/math/calcul/mentalCaluls/mentalMultiplicationsNoRelative.js +93 -0
- package/lib/exercises/math/calcul/operations/expressionNature.d.ts +1 -0
- package/lib/exercises/math/calcul/operations/expressionNature.d.ts.map +1 -0
- package/lib/exercises/math/calcul/operations/expressionNature.js +81 -0
- package/lib/exercises/math/calculLitteral/equation/equationSimpleSquare.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/equationSimpleSquare.js +0 -1
- package/lib/exercises/math/calculLitteral/equation/equationType2Exercise.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/equationType2Exercise.js +0 -1
- package/lib/exercises/math/calculLitteral/factorisation/factoType1Exercise.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/factorisation/factoType1Exercise.js +0 -1
- package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType3.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType3.js +0 -1
- package/lib/exercises/math/calculLitteral/simplifying/reduceExpression.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/simplifying/reduceExpression.js +0 -1
- package/lib/exercises/math/complex/addComplex.d.ts.map +1 -1
- package/lib/exercises/math/complex/addComplex.js +0 -1
- package/lib/exercises/math/complex/conjugateComplex.ts.d.ts.map +1 -1
- package/lib/exercises/math/complex/conjugateComplex.ts.js +0 -1
- package/lib/exercises/math/complex/conjugateDivideComplex.d.ts.map +1 -1
- package/lib/exercises/math/complex/conjugateDivideComplex.js +0 -1
- package/lib/exercises/math/complex/inverseComplex.d.ts.map +1 -1
- package/lib/exercises/math/complex/inverseComplex.js +0 -1
- package/lib/exercises/math/complex/moduloFromAlgebraicComplex.d.ts.map +1 -1
- package/lib/exercises/math/complex/moduloFromAlgebraicComplex.js +0 -1
- package/lib/exercises/math/complex/mutiplyComplex.d.ts.map +1 -1
- package/lib/exercises/math/complex/mutiplyComplex.js +0 -1
- package/lib/exercises/math/conversion/aeraConversion.d.ts.map +1 -1
- package/lib/exercises/math/conversion/aeraConversion.js +0 -2
- package/lib/exercises/math/conversion/capacityConversion.d.ts.map +1 -1
- package/lib/exercises/math/conversion/capacityConversion.js +0 -1
- package/lib/exercises/math/conversion/lengthConversion.d.ts.map +1 -1
- package/lib/exercises/math/conversion/lengthConversion.js +0 -2
- package/lib/exercises/math/conversion/massConversion.d.ts.map +1 -1
- package/lib/exercises/math/conversion/massConversion.js +0 -2
- package/lib/exercises/math/conversion/volumeCapacityConversion.d.ts.map +1 -1
- package/lib/exercises/math/conversion/volumeCapacityConversion.js +0 -2
- package/lib/exercises/math/conversion/volumeConversion.d.ts.map +1 -1
- package/lib/exercises/math/conversion/volumeConversion.js +0 -2
- package/lib/exercises/math/derivation/derivative/expDerivativeOne.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/expDerivativeOne.js +0 -1
- package/lib/exercises/math/derivation/derivative/inverseFunctionDerivative.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/inverseFunctionDerivative.js +0 -1
- package/lib/exercises/math/derivation/derivative/lnDerivativeOne.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/lnDerivativeOne.js +0 -1
- package/lib/exercises/math/derivation/derivative/lnDerivativeThree.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/lnDerivativeThree.js +0 -1
- package/lib/exercises/math/derivation/derivative/powerCompositionDerivation.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/powerCompositionDerivation.js +0 -2
- package/lib/exercises/math/derivation/derivative/powerFunctionDerivative.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/powerFunctionDerivative.js +0 -1
- package/lib/exercises/math/derivation/derivative/quotientDerivative.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/quotientDerivative.js +0 -1
- package/lib/exercises/math/derivation/derivative/rootFunctionDerivative.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/rootFunctionDerivative.js +0 -1
- package/lib/exercises/math/derivation/derivative/secondDegreeDerivative.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/secondDegreeDerivative.js +0 -1
- package/lib/exercises/math/derivation/derivative/thirdDegreeDerivative.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/thirdDegreeDerivative.js +0 -1
- package/lib/exercises/math/derivation/derivativeNumberReading.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivativeNumberReading.js +0 -1
- package/lib/exercises/math/equaDiff/equaDiffGeneralForme.js +0 -1
- package/lib/exercises/math/equaDiff/equaDiffGeneralFormeWithIC.js +0 -1
- package/lib/exercises/math/functions/affines/affineExpressionFromTwoImages.d.ts.map +1 -1
- package/lib/exercises/math/functions/affines/affineExpressionFromTwoImages.js +0 -1
- package/lib/exercises/math/functions/basics/graphicInequation.d.ts.map +1 -1
- package/lib/exercises/math/functions/basics/graphicInequation.js +12 -3
- package/lib/exercises/math/functions/cube/cubicEquation.js +0 -1
- package/lib/exercises/math/functions/exponential/expEquation.js +0 -1
- package/lib/exercises/math/functions/logarithm/log10PowerSimplifying.d.ts.map +1 -1
- package/lib/exercises/math/functions/logarithm/log10PowerSimplifying.js +3 -4
- package/lib/exercises/math/functions/trinoms/rootsFromFactorizedForm.js +0 -1
- package/lib/exercises/math/functions/trinoms/secondDegreeInequation.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/secondDegreeInequation.js +0 -1
- package/lib/exercises/math/functions/trinoms/solveSecondDegreeEquationByFactorisation.js +1 -1
- package/lib/exercises/math/functions/trinoms/solveSecondDegreeEquationFromCano.js +1 -1
- package/lib/exercises/math/functions/trinoms/summitAbscissFromRoots.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/summitAbscissFromRoots.js +0 -2
- package/lib/exercises/math/geometry/areas/triangleAreaV2.d.ts.map +1 -1
- package/lib/exercises/math/geometry/areas/triangleAreaV2.js +0 -1
- package/lib/exercises/math/geometry/cartesian/distanceBetweenTwoPoints.d.ts.map +1 -1
- package/lib/exercises/math/geometry/cartesian/distanceBetweenTwoPoints.js +0 -1
- package/lib/exercises/math/geometry/cartesian/midpoint.js +0 -1
- package/lib/exercises/math/geometry/cartesian/placeAPoint.d.ts +4 -1
- package/lib/exercises/math/geometry/cartesian/placeAPoint.d.ts.map +1 -1
- package/lib/exercises/math/geometry/cartesian/placeAPoint.js +1 -1
- package/lib/exercises/math/geometry/pythagore/pythagoreCalcul.js +0 -1
- package/lib/exercises/math/geometry/thales/thales.js +0 -1
- package/lib/exercises/math/geometry/thales/thalesCalcul.d.ts.map +1 -1
- package/lib/exercises/math/geometry/thales/thalesCalcul.js +0 -1
- package/lib/exercises/math/geometry/vectors/alignementViaColinearity.d.ts.map +1 -1
- package/lib/exercises/math/geometry/vectors/alignementViaColinearity.js +0 -2
- package/lib/exercises/math/geometry/vectors/parallelogramViaEqualVectors.d.ts.map +1 -1
- package/lib/exercises/math/geometry/vectors/parallelogramViaEqualVectors.js +0 -2
- package/lib/exercises/math/percent/averageEvolutionRate.d.ts.map +1 -1
- package/lib/exercises/math/percent/averageEvolutionRate.js +16 -0
- package/lib/exercises/math/percent/cmToEvolution.d.ts +7 -0
- package/lib/exercises/math/percent/cmToEvolution.d.ts.map +1 -0
- package/lib/exercises/math/percent/cmToEvolution.js +70 -0
- package/lib/exercises/math/percent/evolutionToCM.d.ts +0 -1
- package/lib/exercises/math/percent/evolutionToCM.d.ts.map +1 -1
- package/lib/exercises/math/percent/evolutionToCM.js +20 -24
- package/lib/exercises/math/percent/findProportion.d.ts.map +1 -1
- package/lib/exercises/math/percent/findProportion.js +16 -1
- package/lib/exercises/math/percent/globalPercent.d.ts.map +1 -1
- package/lib/exercises/math/percent/globalPercent.js +14 -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/math/percent/isTableProportional.d.ts.map +1 -1
- package/lib/exercises/math/percent/isTableProportional.js +35 -33
- package/lib/exercises/math/percent/percentToDecimal.d.ts.map +1 -1
- package/lib/exercises/math/percent/percentToDecimal.js +14 -1
- package/lib/exercises/math/percent/reciprocalPercentage.d.ts.map +1 -1
- package/lib/exercises/math/percent/reciprocalPercentage.js +18 -0
- package/lib/exercises/math/percent/valuePercent.d.ts.map +1 -1
- package/lib/exercises/math/percent/valuePercent.js +7 -0
- package/lib/exercises/math/powers/calculateNegativePower.js +0 -1
- package/lib/exercises/math/powers/decimalToScientific.d.ts.map +1 -1
- package/lib/exercises/math/powers/decimalToScientific.js +0 -1
- package/lib/exercises/math/powers/powersPower.d.ts.map +1 -1
- package/lib/exercises/math/powers/powersPower.js +0 -1
- package/lib/exercises/math/powers/powersProduct.d.ts.map +1 -1
- package/lib/exercises/math/powers/powersProduct.js +22 -0
- package/lib/exercises/math/powers/scientificToDecimal.d.ts.map +1 -1
- package/lib/exercises/math/powers/scientificToDecimal.js +0 -2
- package/lib/exercises/math/primitive/expUPrimitive.js +0 -1
- package/lib/exercises/math/primitive/exponentialPrimitive.js +0 -1
- package/lib/exercises/math/primitive/logarithmePrimitive.js +0 -1
- package/lib/exercises/math/primitive/polynomialPrimitive.js +0 -1
- package/lib/exercises/math/primitive/sinCosPrimitive.js +0 -1
- package/lib/exercises/math/primitive/sinUCosUPrimitive.js +0 -1
- package/lib/exercises/math/probaStat/cardBasicProbas.js +0 -1
- package/lib/exercises/math/probaStat/diceBasicProbas.js +0 -1
- package/lib/exercises/math/probaStat/expectedValueOfBinomialProba.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/expectedValueOfBinomialProba.js +14 -2
- package/lib/exercises/math/probaStat/probabilityTree.js +0 -1
- package/lib/exercises/math/probaStat/stats1var/marginalAndConditionalFrequency.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats1var/marginalAndConditionalFrequency.js +13 -4
- package/lib/exercises/math/probaStat/varianceOfBinomialProba.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/varianceOfBinomialProba.js +21 -1
- package/lib/exercises/math/sequences/arithmetic/arithmeticExplicitFormulaUsage.d.ts.map +1 -1
- package/lib/exercises/math/sequences/arithmetic/arithmeticExplicitFormulaUsage.js +15 -0
- package/lib/exercises/math/sequences/arithmetic/arithmeticFindExplicitFormula.d.ts.map +1 -1
- package/lib/exercises/math/sequences/arithmetic/arithmeticFindExplicitFormula.js +17 -1
- package/lib/exercises/math/sequences/arithmetic/arithmeticFindExplictFormulaFirstTermRandom.js +0 -1
- package/lib/exercises/math/sequences/arithmetic/arithmeticFindTerm.d.ts +10 -0
- package/lib/exercises/math/sequences/arithmetic/arithmeticFindTerm.d.ts.map +1 -0
- package/lib/exercises/math/sequences/arithmetic/arithmeticFindTerm.js +48 -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/sequences/geometric/geometricExplicitFormulaUsage.d.ts.map +1 -1
- package/lib/exercises/math/sequences/geometric/geometricExplicitFormulaUsage.js +14 -1
- package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormula.d.ts.map +1 -1
- package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormula.js +15 -1
- package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormulaFirstTermRandom.d.ts.map +1 -1
- package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormulaFirstTermRandom.js +0 -1
- package/lib/exercises/math/sequences/geometric/geometricFindTerm.d.ts +10 -0
- package/lib/exercises/math/sequences/geometric/geometricFindTerm.d.ts.map +1 -0
- package/lib/exercises/math/sequences/geometric/geometricFindTerm.js +48 -0
- package/lib/exercises/math/sequences/geometric/geometricRecognizeReasonFromFirstTerms.d.ts +8 -0
- package/lib/exercises/math/sequences/geometric/geometricRecognizeReasonFromFirstTerms.d.ts.map +1 -0
- package/lib/exercises/math/sequences/geometric/geometricRecognizeReasonFromFirstTerms.js +46 -0
- package/lib/exercises/math/sequences/geometric/index.d.ts +2 -0
- package/lib/exercises/math/sequences/geometric/index.d.ts.map +1 -1
- package/lib/exercises/math/sequences/geometric/index.js +2 -0
- package/lib/exercises/math/sets/intervals/inequalityToInterval.d.ts +2 -3
- package/lib/exercises/math/sets/intervals/inequalityToInterval.d.ts.map +1 -1
- package/lib/exercises/math/sets/intervals/inequalityToInterval.js +23 -91
- package/lib/exercises/math/sets/intervals/intervalToInequality.d.ts +10 -0
- package/lib/exercises/math/sets/intervals/intervalToInequality.d.ts.map +1 -0
- package/lib/exercises/math/sets/intervals/intervalToInequality.js +112 -0
- package/lib/exercises/math/spaceGeometry/vectors/spaceVectorCoordinatesFromPoints.d.ts.map +1 -1
- package/lib/exercises/math/spaceGeometry/vectors/spaceVectorCoordinatesFromPoints.js +15 -0
- package/lib/exercises/math/spaceGeometry/vectors/spaceVectorNormCalculation.d.ts.map +1 -1
- package/lib/exercises/math/spaceGeometry/vectors/spaceVectorNormCalculation.js +26 -1
- package/lib/exercises/math/squareRoots/squareRootsSum.d.ts.map +1 -1
- package/lib/exercises/math/squareRoots/squareRootsSum.js +0 -1
- package/lib/exercises/math/suites/sequenceEvaluation.js +1 -1
- package/lib/exercises/math/suites/sequencePlot.d.ts.map +1 -1
- package/lib/exercises/math/suites/sequencePlot.js +10 -3
- package/lib/exercises/pc/chemicalElements/findAtomEntitiesNumberFromMass.d.ts.map +1 -1
- package/lib/exercises/pc/chemicalElements/findAtomEntitiesNumberFromMass.js +0 -1
- package/lib/exercises/pc/energy/energyTransfer.d.ts.map +1 -1
- package/lib/exercises/pc/energy/energyTransfer.js +0 -1
- package/lib/exercises/pc/forces/gravitationalAttractionObjectHeight.d.ts.map +1 -1
- package/lib/exercises/pc/forces/gravitationalAttractionObjectHeight.js +0 -1
- package/lib/exercises/pc/mecanicalWaves/elongationReading.d.ts.map +1 -1
- package/lib/exercises/pc/mecanicalWaves/elongationReading.js +0 -1
- package/lib/index.d.ts +72 -5
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +3 -0
- package/lib/math/geometry/line.d.ts.map +1 -1
- package/lib/math/geometry/line.js +0 -2
- package/lib/math/geometry/spaceVector.d.ts +1 -0
- package/lib/math/geometry/spaceVector.d.ts.map +1 -1
- package/lib/math/geometry/spaceVector.js +3 -0
- package/lib/math/polynomials/trinom.js +2 -2
- package/lib/pc/constants/molecularChemistry/reaction.js +3 -1
- package/lib/playground.d.ts.map +1 -1
- package/lib/playground.js +2 -14
- package/lib/server.d.ts +1 -0
- package/lib/server.d.ts.map +1 -1
- package/lib/server.js +4 -1
- package/lib/tree/nodes/sets/closure.d.ts +2 -0
- package/lib/tree/nodes/sets/closure.d.ts.map +1 -1
- package/lib/tree/nodes/sets/closure.js +24 -0
- package/lib/tree/nodes/sets/intervalNode.d.ts +3 -0
- package/lib/tree/nodes/sets/intervalNode.d.ts.map +1 -1
- package/lib/tree/nodes/sets/intervalNode.js +13 -0
- package/lib/tree/parsers/latexParser.js +6 -6
- package/lib/utils/numberPrototype/toSeparatedThousands.d.ts +2 -0
- package/lib/utils/numberPrototype/toSeparatedThousands.d.ts.map +1 -0
- package/lib/utils/numberPrototype/toSeparatedThousands.js +12 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"powerCompositionDerivation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/derivative/powerCompositionDerivation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAOlC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;
|
|
1
|
+
{"version":3,"file":"powerCompositionDerivation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/derivative/powerCompositionDerivation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAOlC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AA0EF,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,WAAW,CAc5D,CAAC"}
|
|
@@ -24,7 +24,6 @@ const getPowerCompositionDerivationQuestion = () => {
|
|
|
24
24
|
return question;
|
|
25
25
|
};
|
|
26
26
|
const getPropositions = (n, { answer, affineA, affineB, power }) => {
|
|
27
|
-
console.log("qcm");
|
|
28
27
|
const propositions = [];
|
|
29
28
|
const affineTree = new affine_1.Affine(affineA, affineB).toTree();
|
|
30
29
|
(0, exercise_1.addValidProp)(propositions, answer);
|
|
@@ -36,7 +35,6 @@ const getPropositions = (n, { answer, affineA, affineB, power }) => {
|
|
|
36
35
|
(0, exercise_1.tryToAddWrongProp)(propositions, new multiplyNode_1.MultiplyNode((power * affineA).toTree(), powerN).toTex());
|
|
37
36
|
while (propositions.length < n) {
|
|
38
37
|
(0, exercise_1.tryToAddWrongProp)(propositions, new multiplyNode_1.MultiplyNode((0, randint_1.randint)(-10, 10).toTree(), powerN).toTex());
|
|
39
|
-
console.log("prop");
|
|
40
38
|
}
|
|
41
39
|
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
42
40
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"powerFunctionDerivative.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/derivative/powerFunctionDerivative.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;
|
|
1
|
+
{"version":3,"file":"powerFunctionDerivative.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/derivative/powerFunctionDerivative.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AA+GF,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,WAAW,CAezD,CAAC"}
|
|
@@ -53,7 +53,6 @@ const isAnswerValid = (ans, { a, power }) => {
|
|
|
53
53
|
? new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(a * power), new powerNode_1.PowerNode(new variableNode_1.VariableNode("x"), new numberNode_1.NumberNode(power - 1), opts), opts)
|
|
54
54
|
: new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(a * power), new variableNode_1.VariableNode("x"), opts);
|
|
55
55
|
const texs = answerTree.toAllValidTexs();
|
|
56
|
-
console.log(texs);
|
|
57
56
|
return texs.includes(ans);
|
|
58
57
|
};
|
|
59
58
|
exports.powerFunctionDerivative = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"quotientDerivative.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/derivative/quotientDerivative.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB,CAAC;
|
|
1
|
+
{"version":3,"file":"quotientDerivative.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/derivative/quotientDerivative.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB,CAAC;AAmFF,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,WAAW,CAcpD,CAAC"}
|
|
@@ -66,7 +66,6 @@ const isAnswerValid = (ans, { poly1Coeffs, poly2Coeffs }) => {
|
|
|
66
66
|
const answerDenum = new powerNode_1.PowerNode(poly2.toTree(), new numberNode_1.NumberNode(2));
|
|
67
67
|
const answer = new fractionNode_1.FractionNode(answerNum, answerDenum);
|
|
68
68
|
const texs = answer.toAllValidTexs();
|
|
69
|
-
console.log(ans, texs);
|
|
70
69
|
return texs.includes(ans);
|
|
71
70
|
};
|
|
72
71
|
exports.quotientDerivative = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rootFunctionDerivative.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/derivative/rootFunctionDerivative.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAclC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;
|
|
1
|
+
{"version":3,"file":"rootFunctionDerivative.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/derivative/rootFunctionDerivative.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAclC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAgEF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,CAcxD,CAAC"}
|
|
@@ -60,7 +60,6 @@ const isAnswerValid = (ans, { a }) => {
|
|
|
60
60
|
else
|
|
61
61
|
answer = new fractionNode_1.FractionNode(new numberNode_1.NumberNode(a), new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(2), new sqrtNode_1.SqrtNode(new variableNode_1.VariableNode("x"))));
|
|
62
62
|
const texs = answer.toAllValidTexs();
|
|
63
|
-
console.log(texs);
|
|
64
63
|
return texs.includes(ans);
|
|
65
64
|
};
|
|
66
65
|
exports.rootFunctionDerivative = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"secondDegreeDerivative.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/derivative/secondDegreeDerivative.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAER,YAAY,EAEZ,iBAAiB,EACjB,GAAG,EAGJ,MAAM,0BAA0B,CAAC;AAOlC,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB,CAAC;AAEF,eAAO,MAAM,yBAAyB,EAAE,iBAAiB,CAAC,WAAW,CAkBpE,CAAC;AAEF,eAAO,MAAM,qCAAqC,EAAE,YAAY,CAC9D,WAAW,CA+BZ,CAAC;AACF,eAAO,MAAM,mCAAmC,EAAE,GAAG,CAAC,WAAW,
|
|
1
|
+
{"version":3,"file":"secondDegreeDerivative.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/derivative/secondDegreeDerivative.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAER,YAAY,EAEZ,iBAAiB,EACjB,GAAG,EAGJ,MAAM,0BAA0B,CAAC;AAOlC,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB,CAAC;AAEF,eAAO,MAAM,yBAAyB,EAAE,iBAAiB,CAAC,WAAW,CAkBpE,CAAC;AAEF,eAAO,MAAM,qCAAqC,EAAE,YAAY,CAC9D,WAAW,CA+BZ,CAAC;AACF,eAAO,MAAM,mCAAmC,EAAE,GAAG,CAAC,WAAW,CAQhE,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,CAsBxD,CAAC"}
|
|
@@ -49,7 +49,6 @@ const isSecondDegreeDerivativeAnswerValid = (ans, { coefficients }) => {
|
|
|
49
49
|
const polynomial = new polynomial_1.Polynomial(coefficients);
|
|
50
50
|
const derivative = polynomial.derivate().toTree();
|
|
51
51
|
const texs = derivative.toAllValidTexs();
|
|
52
|
-
console.log(texs);
|
|
53
52
|
return texs.includes(ans);
|
|
54
53
|
};
|
|
55
54
|
exports.isSecondDegreeDerivativeAnswerValid = isSecondDegreeDerivativeAnswerValid;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"thirdDegreeDerivative.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/derivative/thirdDegreeDerivative.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAER,YAAY,EAEZ,iBAAiB,EACjB,GAAG,EAIJ,MAAM,0BAA0B,CAAC;AAKlC,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,iBAAiB,CAAC,WAAW,CAsBnE,CAAC;AAEF,eAAO,MAAM,oCAAoC,EAAE,YAAY,CAAC,WAAW,CAqC1E,CAAC;AAEF,eAAO,MAAM,kCAAkC,EAAE,GAAG,CAAC,WAAW,
|
|
1
|
+
{"version":3,"file":"thirdDegreeDerivative.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/derivative/thirdDegreeDerivative.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAER,YAAY,EAEZ,iBAAiB,EACjB,GAAG,EAIJ,MAAM,0BAA0B,CAAC;AAKlC,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,iBAAiB,CAAC,WAAW,CAsBnE,CAAC;AAEF,eAAO,MAAM,oCAAoC,EAAE,YAAY,CAAC,WAAW,CAqC1E,CAAC;AAEF,eAAO,MAAM,kCAAkC,EAAE,GAAG,CAAC,WAAW,CAQ/D,CAAC;AACF,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,WAAW,CAqBvD,CAAC"}
|
|
@@ -56,7 +56,6 @@ const isThirdDegreeDerivativeAnswerValid = (ans, { coefficients }) => {
|
|
|
56
56
|
const polynomial = new polynomial_1.Polynomial(coefficients);
|
|
57
57
|
const derivative = polynomial.derivate().toTree();
|
|
58
58
|
const texs = derivative.toAllValidTexs();
|
|
59
|
-
console.log(texs);
|
|
60
59
|
return texs.includes(ans);
|
|
61
60
|
};
|
|
62
61
|
exports.isThirdDegreeDerivativeAnswerValid = isThirdDegreeDerivativeAnswerValid;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"derivativeNumberReading.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/derivation/derivativeNumberReading.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAmBlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,EAAE,CAAC;IACZ,CAAC,EAAE,MAAM,EAAE,CAAC;CACb,CAAC;
|
|
1
|
+
{"version":3,"file":"derivativeNumberReading.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/derivation/derivativeNumberReading.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAmBlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,EAAE,CAAC;IACZ,CAAC,EAAE,MAAM,EAAE,CAAC;CACb,CAAC;AA2FF,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,WAAW,CAezD,CAAC"}
|
|
@@ -47,7 +47,6 @@ const getPropositions = (n, { answer }) => {
|
|
|
47
47
|
const isAnswerValid = (ans, { a }) => {
|
|
48
48
|
const answer = new equalNode_1.EqualNode(new variableNode_1.VariableNode("y"), new multiplyNode_1.MultiplyNode(new variableNode_1.VariableNode("C"), new expNode_1.ExpNode(new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(a), new variableNode_1.VariableNode("x")))), { allowRawRightChildAsSolution: true });
|
|
49
49
|
const texs = answer.toAllValidTexs();
|
|
50
|
-
console.log(texs);
|
|
51
50
|
return texs.includes(ans);
|
|
52
51
|
};
|
|
53
52
|
exports.exponentialDifferentialEquation = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"affineExpressionFromTwoImages.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/affines/affineExpressionFromTwoImages.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAWlC,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;
|
|
1
|
+
{"version":3,"file":"affineExpressionFromTwoImages.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/affines/affineExpressionFromTwoImages.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAWlC,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AA6EF,eAAO,MAAM,6BAA6B,EAAE,QAAQ,CAAC,WAAW,CAe/D,CAAC"}
|
|
@@ -21,7 +21,6 @@ const getAffineExpressionFromTwoImagesQuestion = () => {
|
|
|
21
21
|
const answer = new addNode_1.AddNode(new multiplyNode_1.MultiplyNode(a, new variableNode_1.VariableNode("x")), b)
|
|
22
22
|
.simplify({ forceDistributeFractions: true })
|
|
23
23
|
.toTex();
|
|
24
|
-
console.log(a.toTex(), b.toTex());
|
|
25
24
|
const question = {
|
|
26
25
|
instruction: `Soit $f$ une fonction affine telle que $f(${xA}) = ${yA}$ et $f(${xB}) = ${yB}$.
|
|
27
26
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graphicInequation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/basics/graphicInequation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"graphicInequation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/basics/graphicInequation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AASlC,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAM5D,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC;IACjC,QAAQ,EAAE,OAAO,CAAC;IAClB,WAAW,EAAE,OAAO,CAAC;IACrB,SAAS,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,WAAW,CAAA;KAAE,EAAE,CAAC;CAC7D,CAAC;AAoLF,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,WAAW,CAenD,CAAC"}
|
|
@@ -120,10 +120,19 @@ const getPropositions = (n, { answer, intervals, splinePoints, yValue }) => {
|
|
|
120
120
|
const propositions = [];
|
|
121
121
|
(0, exercise_1.addValidProp)(propositions, answer);
|
|
122
122
|
(0, exercise_1.tryToAddWrongProp)(propositions, `S=\\varnothing`);
|
|
123
|
-
|
|
123
|
+
if (intervals.length === 1) {
|
|
124
|
+
const interval = new intervalNode_1.IntervalNode(intervals[0].a.toTree(), intervals[0].b.toTree(), intervals[0].closure);
|
|
125
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, `S=\\ ${interval.toRandomDifferentClosure().toTex()}`);
|
|
126
|
+
}
|
|
127
|
+
else if (intervals.length === 2) {
|
|
128
|
+
const rightIntervals = intervals.map((i) => new intervalNode_1.IntervalNode(i.a.toTree(), i.b.toTree(), i.closure));
|
|
129
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, `S=\\ ${rightIntervals[(0, coinFlip_1.coinFlip)() ? 0 : 1].toTex()}`);
|
|
130
|
+
}
|
|
124
131
|
while (propositions.length < n) {
|
|
125
|
-
|
|
126
|
-
|
|
132
|
+
let a = (0, randint_1.randint)(splinePoints[0][0], splinePoints[splinePoints.length - 1][0] + 1);
|
|
133
|
+
let b = (0, randint_1.randint)(splinePoints[0][0], splinePoints[splinePoints.length - 1][0] + 1, [a]);
|
|
134
|
+
if (a > b)
|
|
135
|
+
[a, b] = [b, a];
|
|
127
136
|
(0, exercise_1.tryToAddWrongProp)(propositions, `S=\\ ${new intervalNode_1.IntervalNode(new numberNode_1.NumberNode(a), new numberNode_1.NumberNode(b), closure_1.ClosureType.FF).toTex()}`);
|
|
128
137
|
}
|
|
129
138
|
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
@@ -36,7 +36,6 @@ const isAnswerValid = (ans, { k }) => {
|
|
|
36
36
|
const sol = Math.cbrt(k);
|
|
37
37
|
const answerTree = new equationSolutionNode_1.EquationSolutionNode(new discreteSetNode_1.DiscreteSetNode([new numberNode_1.NumberNode(sol)]));
|
|
38
38
|
const texs = answerTree.toAllValidTexs();
|
|
39
|
-
console.log(texs);
|
|
40
39
|
return texs.includes(ans);
|
|
41
40
|
};
|
|
42
41
|
exports.cubicEquation = {
|
|
@@ -57,7 +57,6 @@ const isAnswerValid = (ans, { a, k }) => {
|
|
|
57
57
|
.toTree({ allowFractionToDecimal: true })),
|
|
58
58
|
], { allowRawRightChildAsSolution: true }));
|
|
59
59
|
const texs = answer.toAllValidTexs();
|
|
60
|
-
console.log(texs);
|
|
61
60
|
return texs.includes(ans);
|
|
62
61
|
};
|
|
63
62
|
exports.expEquation = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"log10PowerSimplifying.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/logarithm/log10PowerSimplifying.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAWlC,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;
|
|
1
|
+
{"version":3,"file":"log10PowerSimplifying.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/logarithm/log10PowerSimplifying.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAWlC,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAsDF,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,WAAW,CAgBvD,CAAC"}
|
|
@@ -10,7 +10,6 @@ const powerNode_1 = require("../../../../tree/nodes/operators/powerNode");
|
|
|
10
10
|
const alignTex_1 = require("../../../../utils/alignTex");
|
|
11
11
|
const getLog10PowerSimplifyingQuestion = () => {
|
|
12
12
|
const tenthPower = (0, randint_1.randint)(-6, 8, [1]);
|
|
13
|
-
console.log("log10 power simp q");
|
|
14
13
|
const nb = new decimal_1.Decimal(1).multiplyByPowerOfTen(tenthPower).toTree();
|
|
15
14
|
const answer = tenthPower + "";
|
|
16
15
|
const question = {
|
|
@@ -45,9 +44,9 @@ const getCorrection = (tenthPower, nb) => {
|
|
|
45
44
|
|
|
46
45
|
On a alors
|
|
47
46
|
${(0, alignTex_1.alignTex)([
|
|
48
|
-
[`\\log(${nb.toTex()})`,
|
|
49
|
-
["",
|
|
50
|
-
["",
|
|
47
|
+
[`\\log(${nb.toTex()})`, `=`, `\\log(${powerTen.toTex()})`],
|
|
48
|
+
["", "=", `${tenthPower}\\times \\log(10)`],
|
|
49
|
+
["", "=", `${tenthPower}`],
|
|
51
50
|
])}
|
|
52
51
|
`;
|
|
53
52
|
};
|
|
@@ -52,7 +52,6 @@ const isAnswerValid = (ans, { a, b, c }) => {
|
|
|
52
52
|
const roots = trinom.getRootsNode();
|
|
53
53
|
const answer = new equationSolutionNode_1.EquationSolutionNode(new discreteSetNode_1.DiscreteSetNode(roots));
|
|
54
54
|
const texs = answer.toAllValidTexs();
|
|
55
|
-
console.log(texs);
|
|
56
55
|
return texs.includes(ans);
|
|
57
56
|
};
|
|
58
57
|
exports.rootsFromFactorizedForm = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"secondDegreeInequation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/trinoms/secondDegreeInequation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAElC,OAAO,EACL,gBAAgB,EAGjB,MAAM,mCAAmC,CAAC;AAc3C,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,QAAQ,EAAE,gBAAgB,CAAC;CAC5B,CAAC;
|
|
1
|
+
{"version":3,"file":"secondDegreeInequation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/trinoms/secondDegreeInequation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAElC,OAAO,EACL,gBAAgB,EAGjB,MAAM,mCAAmC,CAAC;AAc3C,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,QAAQ,EAAE,gBAAgB,CAAC;CAC5B,CAAC;AAsHF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,CAcxD,CAAC"}
|
|
@@ -69,7 +69,6 @@ const getPropositions = (n, { answer, a, b, c, ineqType }) => {
|
|
|
69
69
|
const propositions = [];
|
|
70
70
|
(0, exercise_1.addValidProp)(propositions, answer);
|
|
71
71
|
const roots = new trinom_1.Trinom(a, b, c).getRootsNode();
|
|
72
|
-
console.log("prop", roots.length);
|
|
73
72
|
const ineq = new inequation_1.InequationSymbol(ineqType);
|
|
74
73
|
(0, exercise_1.tryToAddWrongProp)(propositions, getAnswer({ a: -a, ineqType: ineq, roots }).toTex());
|
|
75
74
|
(0, exercise_1.tryToAddWrongProp)(propositions, getAnswer({ a, ineqType: ineq.toStrictnessToggled(), roots }).toTex());
|
|
@@ -64,7 +64,7 @@ const getSolveSecondDegreeEquationByFactorisationQuestion = () => {
|
|
|
64
64
|
}
|
|
65
65
|
break;
|
|
66
66
|
}
|
|
67
|
-
const instruction = `Soit $f(x) = ${statement}$.
|
|
67
|
+
const instruction = `Soit $f(x) = ${statement}$. Factoriser $f(x)$, puis résoudre l'équation $f(x) = 0$.`;
|
|
68
68
|
answer = new equationSolutionNode_1.EquationSolutionNode(new discreteSetNode_1.DiscreteSetNode(roots)).toTex();
|
|
69
69
|
const question = {
|
|
70
70
|
answer,
|
|
@@ -9,7 +9,7 @@ const randint_1 = require("../../../../math/utils/random/randint");
|
|
|
9
9
|
const equationSolutionNode_1 = require("../../../../tree/nodes/equations/equationSolutionNode");
|
|
10
10
|
const discreteSetNode_1 = require("../../../../tree/nodes/sets/discreteSetNode");
|
|
11
11
|
const getSolveSecondDegreeEquationFromCanoQuestion = () => {
|
|
12
|
-
const trinom = trinom_1.TrinomConstructor.
|
|
12
|
+
const trinom = trinom_1.TrinomConstructor.randomNiceRoots();
|
|
13
13
|
const statement = trinom.getCanonicalForm().toTex();
|
|
14
14
|
const roots = trinom.getRootsNode();
|
|
15
15
|
const answer = new equationSolutionNode_1.EquationSolutionNode(new discreteSetNode_1.DiscreteSetNode(roots)).toTex();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"summitAbscissFromRoots.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/trinoms/summitAbscissFromRoots.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAOlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;
|
|
1
|
+
{"version":3,"file":"summitAbscissFromRoots.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/trinoms/summitAbscissFromRoots.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAOlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA8CF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,CAexD,CAAC"}
|
|
@@ -9,7 +9,6 @@ const randint_1 = require("../../../../math/utils/random/randint");
|
|
|
9
9
|
const getSummitAbscissFromRootsQuestion = () => {
|
|
10
10
|
const trinom = trinom_1.TrinomConstructor.randomNiceRoots(2);
|
|
11
11
|
const roots = trinom.getRoots();
|
|
12
|
-
console.log("roots", roots);
|
|
13
12
|
const answer = new rational_1.Rational(roots[0] + roots[1], 2)
|
|
14
13
|
.simplify()
|
|
15
14
|
.toTree()
|
|
@@ -36,7 +35,6 @@ const getPropositions = (n, { answer, a, b, c }) => {
|
|
|
36
35
|
};
|
|
37
36
|
const isAnswerValid = (ans, { answer, a, b, c }) => {
|
|
38
37
|
const trinom = new trinom_1.Trinom(a, b, c);
|
|
39
|
-
console.log(ans, answer);
|
|
40
38
|
const node = trinom.getAlphaNode();
|
|
41
39
|
const texs = node.toAllValidTexs({
|
|
42
40
|
allowFractionToDecimal: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"triangleAreaV2.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/areas/triangleAreaV2.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAKlC,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;
|
|
1
|
+
{"version":3,"file":"triangleAreaV2.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/areas/triangleAreaV2.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAKlC,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAgEF,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,WAAW,CAchD,CAAC"}
|
|
@@ -38,7 +38,6 @@ const getTriangleAreaV2 = () => {
|
|
|
38
38
|
return question;
|
|
39
39
|
};
|
|
40
40
|
const getPropositions = (n, { answer, randomSide }) => {
|
|
41
|
-
console.log("props", answer, randomSide);
|
|
42
41
|
const propositions = [];
|
|
43
42
|
(0, exercise_1.addValidProp)(propositions, answer);
|
|
44
43
|
const area = Number(answer.split("\\text")[0]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"distanceBetweenTwoPoints.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/cartesian/distanceBetweenTwoPoints.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAYlC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB,CAAC;
|
|
1
|
+
{"version":3,"file":"distanceBetweenTwoPoints.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/cartesian/distanceBetweenTwoPoints.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAYlC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB,CAAC;AAgHF,eAAO,MAAM,wBAAwB,EAAE,QAAQ,CAAC,WAAW,CAc1D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"placeAPoint.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/cartesian/placeAPoint.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAIT,MAAM,0BAA0B,CAAC;AAOlC,KAAK,WAAW,GAAG,EAAE,CAAC;AA+
|
|
1
|
+
{"version":3,"file":"placeAPoint.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/cartesian/placeAPoint.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAIT,MAAM,0BAA0B,CAAC;AAOlC,KAAK,WAAW,GAAG;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AA+B5C,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,WAAW,CAY/C,CAAC"}
|
|
@@ -90,7 +90,6 @@ const isAnswerValid = (ans, { square }) => {
|
|
|
90
90
|
? new numberNode_1.NumberNode(sqrt)
|
|
91
91
|
: new sqrtNode_1.SqrtNode(new numberNode_1.NumberNode(square), { allowSimplifySqrt: true });
|
|
92
92
|
const texs = answer.toAllValidTexs();
|
|
93
|
-
console.log(texs);
|
|
94
93
|
return texs.includes(ans);
|
|
95
94
|
};
|
|
96
95
|
exports.pythagoreCalcul = {
|
|
@@ -116,7 +116,6 @@ const isAnswerValid = (ans, { vertices }) => {
|
|
|
116
116
|
new multiEqualNode_1.MultiEqualNode(fractions.map((frac) => frac.toInversed())),
|
|
117
117
|
];
|
|
118
118
|
const texs = [...answers[0].toAllValidTexs(), ...answers[1].toAllValidTexs()];
|
|
119
|
-
console.log(texs);
|
|
120
119
|
return texs.includes(ans);
|
|
121
120
|
};
|
|
122
121
|
exports.thales = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"thalesCalcul.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/thales/thalesCalcul.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,OAAO,CAAC;CACpB,CAAC;
|
|
1
|
+
{"version":3,"file":"thalesCalcul.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/thales/thalesCalcul.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,OAAO,CAAC;CACpB,CAAC;AAkLF,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,WAAW,CAc9C,CAAC"}
|
|
@@ -131,7 +131,6 @@ const isAnswerValid = (ans, { isAskingC, rand, rand2, sideLengths }) => {
|
|
|
131
131
|
.simplify()
|
|
132
132
|
.toTree();
|
|
133
133
|
const texs = answer.toAllValidTexs({ allowFractionToDecimal: true });
|
|
134
|
-
console.log(texs);
|
|
135
134
|
return texs.includes(ans);
|
|
136
135
|
};
|
|
137
136
|
exports.thalesCalcul = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alignementViaColinearity.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/vectors/alignementViaColinearity.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;
|
|
1
|
+
{"version":3,"file":"alignementViaColinearity.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/vectors/alignementViaColinearity.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AA8CF,eAAO,MAAM,wBAAwB,EAAE,QAAQ,CAAC,WAAW,CAa1D,CAAC"}
|
|
@@ -16,12 +16,10 @@ const getAlignementViaColinearityQuestion = () => {
|
|
|
16
16
|
const isAligned = (0, coinFlip_1.coinFlip)();
|
|
17
17
|
const coeff = new numberNode_1.NumberNode((0, randint_1.randint)(-4, 4, [0, 1]));
|
|
18
18
|
if (isAligned) {
|
|
19
|
-
console.log("1");
|
|
20
19
|
C = AB.times(coeff).getEndPoint(points[0], "C");
|
|
21
20
|
}
|
|
22
21
|
else {
|
|
23
22
|
do {
|
|
24
|
-
console.log(`2 : ${AB.x.toTex()} et ${AB.y.toTex()}`);
|
|
25
23
|
C = point_1.PointConstructor.random("C");
|
|
26
24
|
} while (AB.isColinear(vector_1.VectorConstructor.fromPoints(points[0], C)));
|
|
27
25
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parallelogramViaEqualVectors.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/vectors/parallelogramViaEqualVectors.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAWlC,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;
|
|
1
|
+
{"version":3,"file":"parallelogramViaEqualVectors.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/vectors/parallelogramViaEqualVectors.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAWlC,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAkDF,eAAO,MAAM,4BAA4B,EAAE,QAAQ,CAAC,WAAW,CAa9D,CAAC"}
|
|
@@ -12,7 +12,6 @@ const getParallelogramViaEqualVectorsQuestion = () => {
|
|
|
12
12
|
const AB = vector_1.VectorConstructor.fromPoints(points[0], points[1]);
|
|
13
13
|
let D;
|
|
14
14
|
do {
|
|
15
|
-
console.log(`1 : points: ${points.map((p) => p.toCoords())}, vec : ${AB.x.toTex()} et ${AB.y.toTex()}`);
|
|
16
15
|
D = point_1.PointConstructor.random("D");
|
|
17
16
|
} while (AB.isColinear(vector_1.VectorConstructor.fromPoints(D, points[0])));
|
|
18
17
|
let C;
|
|
@@ -22,7 +21,6 @@ const getParallelogramViaEqualVectorsQuestion = () => {
|
|
|
22
21
|
}
|
|
23
22
|
else {
|
|
24
23
|
do {
|
|
25
|
-
console.log("2");
|
|
26
24
|
C = point_1.PointConstructor.random("C");
|
|
27
25
|
} while (AB.equals(vector_1.VectorConstructor.fromPoints(D, C)));
|
|
28
26
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"averageEvolutionRate.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/percent/averageEvolutionRate.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,QAAQ,EAQT,MAAM,gBAAgB,CAAC;AAGxB,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;
|
|
1
|
+
{"version":3,"file":"averageEvolutionRate.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/percent/averageEvolutionRate.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,QAAQ,EAQT,MAAM,gBAAgB,CAAC;AAGxB,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAqEF,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,WAAW,CActD,CAAC"}
|
|
@@ -18,6 +18,21 @@ const getAverageEvolutionRate = () => {
|
|
|
18
18
|
keys: ["percent"],
|
|
19
19
|
answerFormat: "tex",
|
|
20
20
|
identifiers: { nbMois, rate },
|
|
21
|
+
hint: `Commence par déterminer le coefficient multiplicateur assoicié à une hausse de $${rate}\\%$. Puis, élève ce coefficient à la puissance $\\frac{1}{${nbMois}}$. Enfin, transforme le coefficient multiplicateur obtenu en taux d'évolution.`,
|
|
22
|
+
correction: `Le coefficient multiplicateur associé à une hausse de $${rate}\\%$ est :
|
|
23
|
+
|
|
24
|
+
$1+\\frac{${rate}}{100} = ${(1 + rate / 100).frenchify()}$
|
|
25
|
+
|
|
26
|
+
Le coefficient multiplicateur moyen pour chaque mois sur une période de $${nbMois}$ mois est donc de :
|
|
27
|
+
|
|
28
|
+
$\\left(${(1 +
|
|
29
|
+
rate / 100).frenchify()}\\right)^{\\frac{1}{${nbMois}}} = ${(0, round_1.round)(Math.pow(1 + rate / 100, 1 / nbMois), 4).frenchify()}$
|
|
30
|
+
|
|
31
|
+
On transforme alors ce coefficient multiplicateur en taux d'évolution :
|
|
32
|
+
|
|
33
|
+
$t = (${(0, round_1.round)(Math.pow(1 + rate / 100, 1 / nbMois), 4).frenchify()}-1)\\times 100 = ${answer.frenchify()}$
|
|
34
|
+
|
|
35
|
+
Le taux d'évoution mensuel moyen est donc de $${answerTex}$.`,
|
|
21
36
|
};
|
|
22
37
|
return question;
|
|
23
38
|
};
|
|
@@ -52,4 +67,5 @@ exports.averageEvolutionRate = {
|
|
|
52
67
|
getPropositions,
|
|
53
68
|
isAnswerValid,
|
|
54
69
|
subject: "Mathématiques",
|
|
70
|
+
hasHintAndCorrection: true,
|
|
55
71
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cmToEvolution.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/percent/cmToEvolution.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAOlC,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AA8DF,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,WAAW,CAc/C,CAAC"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.cmToEvolution = void 0;
|
|
4
|
+
const exercise_1 = require("../../../exercises/exercise");
|
|
5
|
+
const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
|
|
6
|
+
const randint_1 = require("../../../math/utils/random/randint");
|
|
7
|
+
const round_1 = require("../../../math/utils/round");
|
|
8
|
+
const alignTex_1 = require("../../../utils/alignTex");
|
|
9
|
+
const coinFlip_1 = require("../../../utils/coinFlip");
|
|
10
|
+
const getCmToEvolutionQuestion = () => {
|
|
11
|
+
const evolution = (0, randint_1.randint)(-99, 101, [0]);
|
|
12
|
+
const isHausse = evolution > 0;
|
|
13
|
+
const CM = ((0, round_1.round)(1 + evolution / 100, 2) + "").replaceAll(".", ",");
|
|
14
|
+
const answer = (isHausse ? "+" : "") + evolution + "\\%";
|
|
15
|
+
const question = {
|
|
16
|
+
answer: answer,
|
|
17
|
+
instruction: `Quelle est l'évolution en pourcentage associée à un coefficient multiplicateur de $${CM}$ ?`,
|
|
18
|
+
keys: ["percent"],
|
|
19
|
+
answerFormat: "tex",
|
|
20
|
+
identifiers: { evolution },
|
|
21
|
+
hint: "Pour trouver le taux d'évolution $t$ à partir du coefficient multiplicateur (CM) utilise la formule $t = \\left(\\text{CM}-1\\right)\\times 100$.",
|
|
22
|
+
correction: `Le taux d'évolution $t$ s'obtient par la formule
|
|
23
|
+
|
|
24
|
+
$$t = \\left(\\text{CM}-1\\right)\\times 100$$
|
|
25
|
+
|
|
26
|
+
Ici, on a donc :
|
|
27
|
+
|
|
28
|
+
${(0, alignTex_1.alignTex)([
|
|
29
|
+
["t", "=", `\\left(${CM}-1\\right)\\times 100`],
|
|
30
|
+
["", "=", evolution + ""],
|
|
31
|
+
])}
|
|
32
|
+
|
|
33
|
+
Le taux d'évolution est donc de $${answer}$.
|
|
34
|
+
`,
|
|
35
|
+
};
|
|
36
|
+
return question;
|
|
37
|
+
};
|
|
38
|
+
const getPropositions = (n, { answer, evolution }) => {
|
|
39
|
+
const propositions = [];
|
|
40
|
+
(0, exercise_1.addValidProp)(propositions, answer);
|
|
41
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, "+" + ((0, round_1.round)(1 + evolution / 100, 2) * 100 + "\\%").replaceAll(".", ","));
|
|
42
|
+
while (propositions.length < n) {
|
|
43
|
+
const wrongAnswer = ((0, coinFlip_1.coinFlip)() ? "+" : "-") + (0, randint_1.randint)(1, 100) + "\\%";
|
|
44
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, wrongAnswer);
|
|
45
|
+
}
|
|
46
|
+
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
47
|
+
};
|
|
48
|
+
const isAnswerValid = (ans, { answer }) => {
|
|
49
|
+
const allowedTex = [answer, answer.replace("\\%", "")];
|
|
50
|
+
if (answer[0] === "+") {
|
|
51
|
+
allowedTex.push(answer.slice(1));
|
|
52
|
+
allowedTex.push(answer.slice(1).replace("\\%", ""));
|
|
53
|
+
}
|
|
54
|
+
return allowedTex.includes(ans);
|
|
55
|
+
};
|
|
56
|
+
exports.cmToEvolution = {
|
|
57
|
+
id: "cmToEvolution",
|
|
58
|
+
connector: "=",
|
|
59
|
+
label: "Passer de coefficient multiplicateur à évolution en pourcentage",
|
|
60
|
+
levels: ["2ndPro", "2nde", "1rePro", "1reTech", "1reESM"],
|
|
61
|
+
isSingleStep: true,
|
|
62
|
+
sections: ["Pourcentages"],
|
|
63
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getCmToEvolutionQuestion, nb),
|
|
64
|
+
qcmTimer: 60,
|
|
65
|
+
freeTimer: 60,
|
|
66
|
+
getPropositions,
|
|
67
|
+
isAnswerValid,
|
|
68
|
+
subject: "Mathématiques",
|
|
69
|
+
hasHintAndCorrection: true,
|
|
70
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evolutionToCM.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/percent/evolutionToCM.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"evolutionToCM.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/percent/evolutionToCM.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAOlC,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAsEF,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,WAAW,CAc/C,CAAC"}
|