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
|
@@ -10,30 +10,38 @@ const multiplyNode_1 = require("../../../../tree/nodes/operators/multiplyNode");
|
|
|
10
10
|
const coinFlip_1 = require("../../../../utils/coinFlip");
|
|
11
11
|
const shuffle_1 = require("../../../../utils/shuffle");
|
|
12
12
|
const getMentalMultiplications = () => {
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
? (0, randint_1.randint)(-99, 100, [-10, 0, 10]) / 10
|
|
16
|
-
: (0, coinFlip_1.coinFlip)()
|
|
17
|
-
? (0, randint_1.randint)(2, 10) * 10 + (0, randint_1.randint)(-1, 2, [0])
|
|
18
|
-
: (0, randint_1.randint)(2, 10) + (0, randint_1.randint)(-1, 2, [0]) / 10;
|
|
19
|
-
const c = (0, randint_1.randint)(2, 9, [3, 6, 7]);
|
|
20
|
-
const d = (0, randint_1.randint)(2, 11, [c]) / c;
|
|
21
|
-
const f = (0, coinFlip_1.coinFlip)() ? (0, randint_1.randint)(2, 10) / 10 : (0, randint_1.randint)(2, 100) / 100;
|
|
22
|
-
let numbers = [a, b, c, d, f];
|
|
23
|
-
const allNumbersNodes = numbers.map((nb) => new numberNode_1.NumberNode(nb));
|
|
13
|
+
const numbers = [];
|
|
14
|
+
const nbOfOperations = (0, randint_1.randint)(2, 4);
|
|
24
15
|
let statementTree;
|
|
25
16
|
let answer;
|
|
26
|
-
if (
|
|
17
|
+
if (nbOfOperations === 2) {
|
|
18
|
+
const a = (0, randint_1.randint)(-9, 10, [-1, 0, 1]);
|
|
19
|
+
const b = (0, coinFlip_1.coinFlip)()
|
|
20
|
+
? (0, randint_1.randint)(-99, 100, [-10, 0, 10]) / 10
|
|
21
|
+
: (0, coinFlip_1.coinFlip)()
|
|
22
|
+
? (0, randint_1.randint)(2, 10) * 10 + (0, randint_1.randint)(-1, 2, [0]) / 10
|
|
23
|
+
: (0, randint_1.randint)(2, 10) + (0, randint_1.randint)(-1, 2, [0]) / 10;
|
|
24
|
+
numbers.push(a);
|
|
25
|
+
numbers.push(b);
|
|
26
|
+
const allNumbersNodes = numbers.map((nb) => new numberNode_1.NumberNode(nb));
|
|
27
27
|
statementTree = new multiplyNode_1.MultiplyNode(allNumbersNodes[0], allNumbersNodes[1]);
|
|
28
28
|
answer = numbers[0] * numbers[1];
|
|
29
29
|
}
|
|
30
30
|
else {
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
//nbOfOperations = 3
|
|
32
|
+
const c = (0, randint_1.randint)(2, 9, [3, 6, 7]);
|
|
33
|
+
const d = (0, randint_1.randint)(2, 11, [c]) / c;
|
|
34
|
+
const f = (0, coinFlip_1.coinFlip)() ? (0, randint_1.randint)(2, 10) / 10 : (0, randint_1.randint)(2, 100) / 100;
|
|
35
|
+
numbers.push(c);
|
|
36
|
+
numbers.push(d);
|
|
37
|
+
numbers.push(f);
|
|
38
|
+
const allNumbersNodes = numbers.map((nb) => new numberNode_1.NumberNode(nb));
|
|
39
|
+
statementTree = new multiplyNode_1.MultiplyNode(allNumbersNodes[0], new multiplyNode_1.MultiplyNode(allNumbersNodes[1], allNumbersNodes[2]));
|
|
40
|
+
answer = numbers[0] * numbers[1] * numbers[2];
|
|
33
41
|
}
|
|
34
42
|
statementTree.shuffle();
|
|
35
43
|
const statementTex = statementTree.toTex();
|
|
36
|
-
const answerTex = (
|
|
44
|
+
const answerTex = (0, round_1.round)(answer, 2).frenchify();
|
|
37
45
|
const question = {
|
|
38
46
|
instruction: `Calculer : $${statementTex}$`,
|
|
39
47
|
startStatement: statementTex,
|
|
@@ -47,7 +55,7 @@ const getMentalMultiplications = () => {
|
|
|
47
55
|
const getPropositions = (n, { answer }) => {
|
|
48
56
|
const propositions = [];
|
|
49
57
|
(0, exercise_1.addValidProp)(propositions, answer);
|
|
50
|
-
const result =
|
|
58
|
+
const result = answer.unfrenchify();
|
|
51
59
|
while (propositions.length < n) {
|
|
52
60
|
let incorrectAnswer = (0, round_1.round)(result + ((0, coinFlip_1.coinFlip)() ? 1 : -1) * Math.random() * 10, 2);
|
|
53
61
|
(0, exercise_1.tryToAddWrongProp)(propositions, incorrectAnswer.toString().replace(".", ","));
|
|
@@ -62,7 +70,7 @@ const isAnswerValid = (studentAns, { answer }) => {
|
|
|
62
70
|
exports.mentalMultiplications = {
|
|
63
71
|
id: "mentalMultiplications",
|
|
64
72
|
connector: "=",
|
|
65
|
-
label: "
|
|
73
|
+
label: "Multiplications avec des décimaux",
|
|
66
74
|
levels: [
|
|
67
75
|
"6ème",
|
|
68
76
|
"5ème",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mentalMultiplicationsNoRelative.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/mentalCaluls/mentalMultiplicationsNoRelative.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAQlC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB,CAAC;AA4EF,eAAO,MAAM,+BAA+B,EAAE,QAAQ,CAAC,WAAW,CAwBjE,CAAC"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.mentalMultiplicationsNoRelative = 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 numberNode_1 = require("../../../../tree/nodes/numbers/numberNode");
|
|
9
|
+
const multiplyNode_1 = require("../../../../tree/nodes/operators/multiplyNode");
|
|
10
|
+
const coinFlip_1 = require("../../../../utils/coinFlip");
|
|
11
|
+
const shuffle_1 = require("../../../../utils/shuffle");
|
|
12
|
+
const getMentalMultiplicationsNoRelative = () => {
|
|
13
|
+
const numbers = [];
|
|
14
|
+
const nbOfOperations = (0, randint_1.randint)(2, 4);
|
|
15
|
+
let statementTree;
|
|
16
|
+
let answer;
|
|
17
|
+
if (nbOfOperations === 2) {
|
|
18
|
+
const a = (0, randint_1.randint)(2, 10);
|
|
19
|
+
const b = (0, coinFlip_1.coinFlip)()
|
|
20
|
+
? (0, randint_1.randint)(1, 100, [10]) / 10
|
|
21
|
+
: (0, coinFlip_1.coinFlip)()
|
|
22
|
+
? (0, randint_1.randint)(2, 10) * 10 + (0, randint_1.randint)(-1, 2, [0]) / 10
|
|
23
|
+
: (0, randint_1.randint)(2, 10) + (0, randint_1.randint)(-1, 2, [0]) / 10;
|
|
24
|
+
numbers.push(a);
|
|
25
|
+
numbers.push(b);
|
|
26
|
+
const allNumbersNodes = numbers.map((nb) => new numberNode_1.NumberNode(nb));
|
|
27
|
+
statementTree = new multiplyNode_1.MultiplyNode(allNumbersNodes[0], allNumbersNodes[1]);
|
|
28
|
+
answer = numbers[0] * numbers[1];
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
//nbOfOperations = 3
|
|
32
|
+
const c = (0, randint_1.randint)(2, 9, [3, 6, 7]);
|
|
33
|
+
const d = (0, randint_1.randint)(2, 11, [c]) / c;
|
|
34
|
+
const f = (0, coinFlip_1.coinFlip)() ? (0, randint_1.randint)(2, 10) / 10 : (0, randint_1.randint)(2, 100) / 100;
|
|
35
|
+
numbers.push(c);
|
|
36
|
+
numbers.push(d);
|
|
37
|
+
numbers.push(f);
|
|
38
|
+
const allNumbersNodes = numbers.map((nb) => new numberNode_1.NumberNode(nb));
|
|
39
|
+
statementTree = new multiplyNode_1.MultiplyNode(allNumbersNodes[0], new multiplyNode_1.MultiplyNode(allNumbersNodes[1], allNumbersNodes[2]));
|
|
40
|
+
answer = numbers[0] * numbers[1] * numbers[2];
|
|
41
|
+
}
|
|
42
|
+
statementTree.shuffle();
|
|
43
|
+
const statementTex = statementTree.toTex();
|
|
44
|
+
const answerTex = (0, round_1.round)(answer, 2).frenchify();
|
|
45
|
+
const question = {
|
|
46
|
+
instruction: `Calculer : $${statementTex}$`,
|
|
47
|
+
startStatement: statementTex,
|
|
48
|
+
answer: answerTex,
|
|
49
|
+
keys: [],
|
|
50
|
+
answerFormat: "tex",
|
|
51
|
+
identifiers: { numbers },
|
|
52
|
+
};
|
|
53
|
+
return question;
|
|
54
|
+
};
|
|
55
|
+
const getPropositions = (n, { answer }) => {
|
|
56
|
+
const propositions = [];
|
|
57
|
+
(0, exercise_1.addValidProp)(propositions, answer);
|
|
58
|
+
const result = answer.unfrenchify();
|
|
59
|
+
while (propositions.length < n) {
|
|
60
|
+
let incorrectAnswer = (0, round_1.round)(result + Math.random() * 10, 2);
|
|
61
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, incorrectAnswer.toString().replace(".", ","));
|
|
62
|
+
}
|
|
63
|
+
return (0, shuffle_1.shuffle)(propositions);
|
|
64
|
+
};
|
|
65
|
+
const isAnswerValid = (studentAns, { answer }) => {
|
|
66
|
+
const answerTree = answer.unfrenchify().toTree();
|
|
67
|
+
const texs = answerTree.toAllValidTexs();
|
|
68
|
+
return texs.includes(studentAns);
|
|
69
|
+
};
|
|
70
|
+
exports.mentalMultiplicationsNoRelative = {
|
|
71
|
+
id: "mentalMultiplicationsNoRelative",
|
|
72
|
+
connector: "=",
|
|
73
|
+
label: "Multiplications avec des décimaux (sans relatifs)",
|
|
74
|
+
levels: [
|
|
75
|
+
"6ème",
|
|
76
|
+
"5ème",
|
|
77
|
+
"4ème",
|
|
78
|
+
"3ème",
|
|
79
|
+
"2nde",
|
|
80
|
+
"1reESM",
|
|
81
|
+
"CAP",
|
|
82
|
+
"2ndPro",
|
|
83
|
+
"1rePro",
|
|
84
|
+
],
|
|
85
|
+
sections: ["Calculs"],
|
|
86
|
+
isSingleStep: true,
|
|
87
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getMentalMultiplicationsNoRelative, nb),
|
|
88
|
+
qcmTimer: 60,
|
|
89
|
+
freeTimer: 60,
|
|
90
|
+
getPropositions,
|
|
91
|
+
isAnswerValid,
|
|
92
|
+
subject: "Mathématiques",
|
|
93
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=expressionNature.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"expressionNature.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/operations/expressionNature.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// import {
|
|
3
|
+
// Exercise,
|
|
4
|
+
// Proposition,
|
|
5
|
+
// QCMGenerator,
|
|
6
|
+
// Question,
|
|
7
|
+
// QuestionGenerator,
|
|
8
|
+
// VEA,
|
|
9
|
+
// GGBVEA,
|
|
10
|
+
// addValidProp,
|
|
11
|
+
// shuffleProps,
|
|
12
|
+
// tryToAddWrongProp,
|
|
13
|
+
// } from "../../../../exercises/exercise";
|
|
14
|
+
// import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions";
|
|
15
|
+
// import { AddNode } from "../../../../tree/nodes/operators/addNode";
|
|
16
|
+
// import { diceFlip } from "../../../../utils/diceFlip";
|
|
17
|
+
// type Identifiers = {};
|
|
18
|
+
// const getExpressionNatureQuestion: QuestionGenerator<Identifiers> = () => {
|
|
19
|
+
// let answer = "";
|
|
20
|
+
// let statement = "";
|
|
21
|
+
// let numbers = [0, 0];
|
|
22
|
+
// const type = diceFlip(4)
|
|
23
|
+
// switch(type){
|
|
24
|
+
// case 0 :
|
|
25
|
+
// //somme
|
|
26
|
+
// //ab+c , ac + bc, a/b + c, a + b/c
|
|
27
|
+
// const node= new AddNode(
|
|
28
|
+
// )
|
|
29
|
+
// answer = "une somme"
|
|
30
|
+
// break;
|
|
31
|
+
// case 1 :
|
|
32
|
+
// //différence
|
|
33
|
+
// answer = "une différence"
|
|
34
|
+
// break;
|
|
35
|
+
// case 2 :
|
|
36
|
+
// //produit
|
|
37
|
+
// answer = "un produit"
|
|
38
|
+
// break;
|
|
39
|
+
// case 3 :
|
|
40
|
+
// default:
|
|
41
|
+
// //quotient
|
|
42
|
+
// answer = "un quotient"
|
|
43
|
+
// break;
|
|
44
|
+
// }
|
|
45
|
+
// const question: Question<Identifiers> = {
|
|
46
|
+
// answer,
|
|
47
|
+
// instruction: `L'expression ${statement} est : `,
|
|
48
|
+
// keys: [],
|
|
49
|
+
// answerFormat: "tex",
|
|
50
|
+
// identifiers: {},
|
|
51
|
+
// };
|
|
52
|
+
// return question;
|
|
53
|
+
// };
|
|
54
|
+
// const getPropositions: QCMGenerator<Identifiers> = (n, { answer }) => {
|
|
55
|
+
// const propositions: Proposition[] = [];
|
|
56
|
+
// addValidProp(propositions, answer);
|
|
57
|
+
// tryToAddWrongProp(propositions, "une somme");
|
|
58
|
+
// tryToAddWrongProp(propositions, "un produit");
|
|
59
|
+
// tryToAddWrongProp(propositions, "une différence");
|
|
60
|
+
// tryToAddWrongProp(propositions, "un quotient");
|
|
61
|
+
// return shuffleProps(propositions, n);
|
|
62
|
+
// };
|
|
63
|
+
// const isAnswerValid: VEA<Identifiers> = (ans, { answer }) => {
|
|
64
|
+
// return ans === answer;
|
|
65
|
+
// };
|
|
66
|
+
// export const expressionNature: Exercise<Identifiers> = {
|
|
67
|
+
// id: "expressionNature",
|
|
68
|
+
// connector: "=",
|
|
69
|
+
// label:
|
|
70
|
+
// "Déterminer la nature d'une expression (somme/produit/différence/quotient)",
|
|
71
|
+
// levels: [],
|
|
72
|
+
// isSingleStep: true,
|
|
73
|
+
// sections: [],
|
|
74
|
+
// generator: (nb: number) =>
|
|
75
|
+
// getDistinctQuestions(getExpressionNatureQuestion, nb),
|
|
76
|
+
// qcmTimer: 60,
|
|
77
|
+
// freeTimer: 60,
|
|
78
|
+
// getPropositions,
|
|
79
|
+
// isAnswerValid,
|
|
80
|
+
// subject: "Mathématiques",
|
|
81
|
+
// };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"equationSimpleSquare.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/equation/equationSimpleSquare.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AA0BlC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;
|
|
1
|
+
{"version":3,"file":"equationSimpleSquare.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/equation/equationSimpleSquare.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AA0BlC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAuKF,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,WAAW,CActD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"equationType2Exercise.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/equation/equationType2Exercise.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAmBlC;;GAEG;AACH,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;
|
|
1
|
+
{"version":3,"file":"equationType2Exercise.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/equation/equationType2Exercise.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAmBlC;;GAEG;AACH,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAoEF,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,WAAW,CAevD,CAAC"}
|
|
@@ -60,7 +60,6 @@ const isAnswerValid = (ans, { a, b }) => {
|
|
|
60
60
|
opts: { allowFractionToDecimal: true, allowRawRightChildAsSolution: true },
|
|
61
61
|
});
|
|
62
62
|
const validLatexs = answerTree.toAllValidTexs();
|
|
63
|
-
console.log(validLatexs);
|
|
64
63
|
return validLatexs.includes(ans);
|
|
65
64
|
};
|
|
66
65
|
exports.equationType2Exercise = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"factoType1Exercise.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/factorisation/factoType1Exercise.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,aAAa,EAAE,MAAM,EAAE,EAAE,CAAC;IAC1B,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;
|
|
1
|
+
{"version":3,"file":"factoType1Exercise.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/factorisation/factoType1Exercise.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,aAAa,EAAE,MAAM,EAAE,EAAE,CAAC;IAC1B,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAyHF,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,WAAW,CAapD,CAAC"}
|
|
@@ -74,7 +74,6 @@ const isAnswerValid = (ans, { affinesCoeffs, operation }) => {
|
|
|
74
74
|
: new multiplyNode_1.MultiplyNode(affine1.toTree(), affine2.toTree());
|
|
75
75
|
const answer = answerTree.toTex();
|
|
76
76
|
const validLatexs = answerTree.toAllValidTexs();
|
|
77
|
-
console.log(ans, validLatexs);
|
|
78
77
|
return validLatexs.includes(ans);
|
|
79
78
|
};
|
|
80
79
|
exports.factoType1Exercise = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"firstDegreeInequationsType3.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/inequations/firstDegreeInequationsType3.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAGlC,OAAO,EACL,gBAAgB,EAGjB,MAAM,mCAAmC,CAAC;AAW3C,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;
|
|
1
|
+
{"version":3,"file":"firstDegreeInequationsType3.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/inequations/firstDegreeInequationsType3.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAGlC,OAAO,EACL,gBAAgB,EAGjB,MAAM,mCAAmC,CAAC;AAW3C,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAoFF,eAAO,MAAM,2BAA2B,EAAE,QAAQ,CAAC,WAAW,CAc7D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reduceExpression.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/simplifying/reduceExpression.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAQlC,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,eAAe,EAAE,MAAM,EAAE,CAAC;CAC3B,CAAC;
|
|
1
|
+
{"version":3,"file":"reduceExpression.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/simplifying/reduceExpression.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAQlC,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,eAAe,EAAE,MAAM,EAAE,CAAC;CAC3B,CAAC;AAiHF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAalD,CAAC"}
|
|
@@ -96,7 +96,6 @@ const isAnswerValid = (ans, { polynome1Coeffs, polynome2Coeffs, rand }) => {
|
|
|
96
96
|
.add(polynome2)
|
|
97
97
|
.toTree({ forbidPowerToProduct: true });
|
|
98
98
|
const texs = answer.toAllValidTexs();
|
|
99
|
-
console.log(texs);
|
|
100
99
|
return texs.includes(ans);
|
|
101
100
|
};
|
|
102
101
|
exports.reduceExpression = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"addComplex.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/complex/addComplex.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAKlC,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;
|
|
1
|
+
{"version":3,"file":"addComplex.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/complex/addComplex.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAKlC,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAsDF,eAAO,MAAM,UAAU,EAAE,QAAQ,CAAC,WAAW,CAa5C,CAAC"}
|
|
@@ -46,7 +46,6 @@ const isAnswerValid = (ans, { z1Im, z1Re, z2Im, z2Re }) => {
|
|
|
46
46
|
const z2 = new complex_1.Complex(z2Re, z2Im);
|
|
47
47
|
const answer = z1.add(z2).toTree();
|
|
48
48
|
const texs = answer.toAllValidTexs();
|
|
49
|
-
console.log(ans, texs);
|
|
50
49
|
return texs.includes(ans);
|
|
51
50
|
};
|
|
52
51
|
exports.addComplex = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conjugateComplex.ts.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/complex/conjugateComplex.ts.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAKlC,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;
|
|
1
|
+
{"version":3,"file":"conjugateComplex.ts.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/complex/conjugateComplex.ts.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAKlC,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AA2CF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAclD,CAAC"}
|
|
@@ -36,7 +36,6 @@ const isAnswerValid = (ans, { im, re }) => {
|
|
|
36
36
|
const complex = new complex_1.Complex(re, im);
|
|
37
37
|
const answer = complex.conjugate().toTree();
|
|
38
38
|
const texs = answer.toAllValidTexs();
|
|
39
|
-
console.log(ans, texs);
|
|
40
39
|
return texs.includes(ans);
|
|
41
40
|
};
|
|
42
41
|
exports.conjugateComplex = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conjugateDivideComplex.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/complex/conjugateDivideComplex.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAMlC,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,EAAE,CAAC;IACb,EAAE,EAAE,MAAM,EAAE,CAAC;CACd,CAAC;
|
|
1
|
+
{"version":3,"file":"conjugateDivideComplex.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/complex/conjugateDivideComplex.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAMlC,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,EAAE,CAAC;IACb,EAAE,EAAE,MAAM,EAAE,CAAC;CACd,CAAC;AAuDF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,CAcxD,CAAC"}
|
|
@@ -43,7 +43,6 @@ const isAnswerValid = (ans, { z1, z2 }) => {
|
|
|
43
43
|
const complex2 = new complex_1.Complex(z2[0], z2[1]).conjugate();
|
|
44
44
|
const divide = complex1.divideNode(complex2);
|
|
45
45
|
const texs = divide.toAllValidTexs({ allowFractionToDecimal: true });
|
|
46
|
-
console.log(texs);
|
|
47
46
|
return texs.includes(ans);
|
|
48
47
|
};
|
|
49
48
|
exports.conjugateDivideComplex = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inverseComplex.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/complex/inverseComplex.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAKlC,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;
|
|
1
|
+
{"version":3,"file":"inverseComplex.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/complex/inverseComplex.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAKlC,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAyCF,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,WAAW,CAchD,CAAC"}
|
|
@@ -36,7 +36,6 @@ const isAnswerValid = (ans, { re, im }) => {
|
|
|
36
36
|
const z = new complex_1.Complex(re, im);
|
|
37
37
|
const inv = z.inverseNode();
|
|
38
38
|
const texs = inv.toAllValidTexs({ allowFractionToDecimal: true });
|
|
39
|
-
console.log(texs);
|
|
40
39
|
return texs.includes(ans);
|
|
41
40
|
};
|
|
42
41
|
exports.inverseComplex = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"moduloFromAlgebraicComplex.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/complex/moduloFromAlgebraicComplex.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAQlC,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;
|
|
1
|
+
{"version":3,"file":"moduloFromAlgebraicComplex.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/complex/moduloFromAlgebraicComplex.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAQlC,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AA2CF,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,WAAW,CAc5D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mutiplyComplex.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/complex/mutiplyComplex.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAKlC,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,EAAE,CAAC;IACb,EAAE,EAAE,MAAM,EAAE,CAAC;CACd,CAAC;
|
|
1
|
+
{"version":3,"file":"mutiplyComplex.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/complex/mutiplyComplex.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAKlC,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,EAAE,CAAC;IACb,EAAE,EAAE,MAAM,EAAE,CAAC;CACd,CAAC;AA+CF,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,WAAW,CAchD,CAAC"}
|
|
@@ -40,7 +40,6 @@ const isAnswerValid = (ans, { z1, z2 }) => {
|
|
|
40
40
|
const complex2 = new complex_1.Complex(z2[0], z2[1]);
|
|
41
41
|
const answer = complex1.multiply(complex2).toTree();
|
|
42
42
|
const texs = answer.toAllValidTexs();
|
|
43
|
-
console.log(ans, texs);
|
|
44
43
|
return texs.includes(ans);
|
|
45
44
|
};
|
|
46
45
|
exports.mutiplyComplex = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aeraConversion.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/conversion/aeraConversion.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,QAAQ,EAQT,MAAM,gBAAgB,CAAC;AAExB,KAAK,WAAW,GAAG;IACjB,eAAe,EAAE,MAAM,CAAC;IACxB,0BAA0B,EAAE,MAAM,CAAC;IACnC,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;
|
|
1
|
+
{"version":3,"file":"aeraConversion.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/conversion/aeraConversion.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,QAAQ,EAQT,MAAM,gBAAgB,CAAC;AAExB,KAAK,WAAW,GAAG;IACjB,eAAe,EAAE,MAAM,CAAC;IACxB,0BAA0B,EAAE,MAAM,CAAC;IACnC,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AA4DF,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,WAAW,CAahD,CAAC"}
|
|
@@ -8,7 +8,6 @@ const exercise_1 = require("../../exercise");
|
|
|
8
8
|
const getDistinctQuestions_1 = require("../../utils/getDistinctQuestions");
|
|
9
9
|
const units = ["mm", "cm", "dm", "m", "dam", "hm", "km"];
|
|
10
10
|
const getAeraConversion = () => {
|
|
11
|
-
console.log("aera conv q");
|
|
12
11
|
const randomUnitIndex = (0, randint_1.randint)(0, 7);
|
|
13
12
|
const randomUnitInstructionIndex = (0, randint_1.randint)(
|
|
14
13
|
// cette manip a pour but d'éviter des conversion de type km² --> cm² ou le contraire (chiffre trop grand/petit)
|
|
@@ -35,7 +34,6 @@ const getPropositions = (n, { answer, randomAera, randomUnitIndex, randomUnitIns
|
|
|
35
34
|
(0, exercise_1.addValidProp)(propositions, answer);
|
|
36
35
|
const aeraDecimal = new decimal_1.Decimal(randomAera);
|
|
37
36
|
while (propositions.length < n) {
|
|
38
|
-
console.log("aera conv qcm");
|
|
39
37
|
const wrongAnswer = aeraDecimal
|
|
40
38
|
.multiplyByPowerOfTen(2 * (0, randint_1.randint)(-2, 4, [randomUnitIndex - randomUnitInstructionIndex]))
|
|
41
39
|
.value.toString()
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capacityConversion.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/conversion/capacityConversion.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,QAAQ,EAQT,MAAM,gBAAgB,CAAC;AAGxB,KAAK,WAAW,GAAG;IACjB,eAAe,EAAE,MAAM,CAAC;IACxB,0BAA0B,EAAE,MAAM,CAAC;IACnC,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC;
|
|
1
|
+
{"version":3,"file":"capacityConversion.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/conversion/capacityConversion.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,QAAQ,EAQT,MAAM,gBAAgB,CAAC;AAGxB,KAAK,WAAW,GAAG;IACjB,eAAe,EAAE,MAAM,CAAC;IACxB,0BAA0B,EAAE,MAAM,CAAC;IACnC,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC;AAuDF,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,WAAW,CAcpD,CAAC"}
|
|
@@ -8,7 +8,6 @@ const exercise_1 = require("../../exercise");
|
|
|
8
8
|
const getDistinctQuestions_1 = require("../../utils/getDistinctQuestions");
|
|
9
9
|
const units = ["mL", "cL", "dL", "L", "daL", "hL", "kL"];
|
|
10
10
|
const getCapacityConversion = () => {
|
|
11
|
-
console.log("capacity conv q");
|
|
12
11
|
const randomUnitIndex = (0, randint_1.randint)(0, 7);
|
|
13
12
|
const randomUnitInstructionIndex = (0, randint_1.randint)(0, 7, [randomUnitIndex]);
|
|
14
13
|
const randomCapacity = decimal_1.DecimalConstructor.random(0, 1000, (0, randint_1.randint)(0, 4));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lengthConversion.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/conversion/lengthConversion.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,QAAQ,EAQT,MAAM,gBAAgB,CAAC;AAIxB,KAAK,WAAW,GAAG;IACjB,eAAe,EAAE,MAAM,CAAC;IACxB,0BAA0B,EAAE,MAAM,CAAC;IACnC,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;
|
|
1
|
+
{"version":3,"file":"lengthConversion.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/conversion/lengthConversion.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,QAAQ,EAQT,MAAM,gBAAgB,CAAC;AAIxB,KAAK,WAAW,GAAG;IACjB,eAAe,EAAE,MAAM,CAAC;IACxB,0BAA0B,EAAE,MAAM,CAAC;IACnC,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AA6DF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAalD,CAAC"}
|
|
@@ -23,7 +23,6 @@ const getLengthConversion = () => {
|
|
|
23
23
|
const randomUnitInstructionIndex = (0, randint_1.randint)(0, 7, [randomUnitIndex]);
|
|
24
24
|
const randomLength = decimal_1.DecimalConstructor.random(0, 1000, (0, randint_1.randint)(0, 4));
|
|
25
25
|
const measure = new measure_1.Measure(randomLength.value, 0, unitsObj[randomUnitIndex]);
|
|
26
|
-
console.log("length conv q");
|
|
27
26
|
const answer = measure
|
|
28
27
|
.convert(units[randomUnitInstructionIndex])
|
|
29
28
|
.toTex({ notScientific: true });
|
|
@@ -47,7 +46,6 @@ const getPropositions = (n, { answer, randomLength, randomUnitIndex, randomUnitI
|
|
|
47
46
|
(0, exercise_1.addValidProp)(propositions, answer);
|
|
48
47
|
const lengthDecimal = new decimal_1.Decimal(randomLength);
|
|
49
48
|
while (propositions.length < n) {
|
|
50
|
-
console.log("length conv qcm");
|
|
51
49
|
const wrongAnswer = lengthDecimal
|
|
52
50
|
.multiplyByPowerOfTen((0, randint_1.randint)(-3, 4, [randomUnitIndex - randomUnitInstructionIndex]))
|
|
53
51
|
.value.toString()
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"massConversion.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/conversion/massConversion.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,QAAQ,EAQT,MAAM,gBAAgB,CAAC;AAGxB,KAAK,WAAW,GAAG;IACjB,eAAe,EAAE,MAAM,CAAC;IACxB,0BAA0B,EAAE,MAAM,CAAC;IACnC,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;
|
|
1
|
+
{"version":3,"file":"massConversion.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/conversion/massConversion.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,QAAQ,EAQT,MAAM,gBAAgB,CAAC;AAGxB,KAAK,WAAW,GAAG;IACjB,eAAe,EAAE,MAAM,CAAC;IACxB,0BAA0B,EAAE,MAAM,CAAC;IACnC,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAuDF,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,WAAW,CAahD,CAAC"}
|
|
@@ -8,7 +8,6 @@ const exercise_1 = require("../../exercise");
|
|
|
8
8
|
const getDistinctQuestions_1 = require("../../utils/getDistinctQuestions");
|
|
9
9
|
const units = ["mg", "cg", "dg", "g", "dag", "hg", "kg"];
|
|
10
10
|
const getMassConversion = () => {
|
|
11
|
-
console.log("mass conv gen");
|
|
12
11
|
const randomUnitIndex = (0, randint_1.randint)(0, 7);
|
|
13
12
|
const randomUnitInstructionIndex = (0, randint_1.randint)(0, 7, [randomUnitIndex]);
|
|
14
13
|
const randomMass = decimal_1.DecimalConstructor.random(0, 1000, (0, randint_1.randint)(0, 4));
|
|
@@ -33,7 +32,6 @@ const getPropositions = (n, { answer, randomMass, randomUnitIndex, randomUnitIns
|
|
|
33
32
|
(0, exercise_1.addValidProp)(propositions, answer);
|
|
34
33
|
const massDecimal = new decimal_1.Decimal(randomMass);
|
|
35
34
|
while (propositions.length < n) {
|
|
36
|
-
console.log("mass conv prop");
|
|
37
35
|
const wrongAnswer = massDecimal
|
|
38
36
|
.multiplyByPowerOfTen((0, randint_1.randint)(-3, 4, [randomUnitIndex - randomUnitInstructionIndex]))
|
|
39
37
|
.value.toString()
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"volumeCapacityConversion.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/conversion/volumeCapacityConversion.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,QAAQ,EAQT,MAAM,gBAAgB,CAAC;AAGxB,KAAK,WAAW,GAAG;IACjB,eAAe,EAAE,MAAM,CAAC;IACxB,0BAA0B,EAAE,MAAM,CAAC;IACnC,WAAW,EAAE,MAAM,CAAC;IACpB,kBAAkB,EAAE,OAAO,CAAC;CAC7B,CAAC;
|
|
1
|
+
{"version":3,"file":"volumeCapacityConversion.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/conversion/volumeCapacityConversion.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,QAAQ,EAQT,MAAM,gBAAgB,CAAC;AAGxB,KAAK,WAAW,GAAG;IACjB,eAAe,EAAE,MAAM,CAAC;IACxB,0BAA0B,EAAE,MAAM,CAAC;IACnC,WAAW,EAAE,MAAM,CAAC;IACpB,kBAAkB,EAAE,OAAO,CAAC;CAC7B,CAAC;AAkEF,eAAO,MAAM,wBAAwB,EAAE,QAAQ,CAAC,WAAW,CAe1D,CAAC"}
|
|
@@ -10,7 +10,6 @@ const getDistinctQuestions_1 = require("../../utils/getDistinctQuestions");
|
|
|
10
10
|
const volumeUnits = ["mm", "cm", "dm", "m", "dam", "hm", "km"];
|
|
11
11
|
const capacityUnits = ["mL", "cL", "dL", "L", "daL", "hL", "kL"];
|
|
12
12
|
const getVolumeCapacityConversion = () => {
|
|
13
|
-
console.log("volume capacity q");
|
|
14
13
|
const randomUnitInstructionIndex = (0, randint_1.randint)(0, 7);
|
|
15
14
|
const randomUnitIndex = (0, randint_1.randint)(
|
|
16
15
|
// cette manip a pour but d'éviter des conversion avec des nombres trop grand/petit
|
|
@@ -52,7 +51,6 @@ const getPropositions = (n, { answer }) => {
|
|
|
52
51
|
(0, exercise_1.addValidProp)(propositions, answer);
|
|
53
52
|
const decimal = new decimal_1.Decimal(Number(answer.replace(",", ".")));
|
|
54
53
|
while (propositions.length < n) {
|
|
55
|
-
console.log("volume capactiy conv qcm");
|
|
56
54
|
const wrongAnswer = decimal.multiplyByPowerOfTen((0, randint_1.randint)(-3, 4, [0]));
|
|
57
55
|
(0, exercise_1.tryToAddWrongProp)(propositions, wrongAnswer.toTree().toTex());
|
|
58
56
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"volumeConversion.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/conversion/volumeConversion.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,QAAQ,EAQT,MAAM,gBAAgB,CAAC;AAExB,KAAK,WAAW,GAAG;IACjB,eAAe,EAAE,MAAM,CAAC;IACxB,0BAA0B,EAAE,MAAM,CAAC;IACnC,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;
|
|
1
|
+
{"version":3,"file":"volumeConversion.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/conversion/volumeConversion.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,QAAQ,EAQT,MAAM,gBAAgB,CAAC;AAExB,KAAK,WAAW,GAAG;IACjB,eAAe,EAAE,MAAM,CAAC;IACxB,0BAA0B,EAAE,MAAM,CAAC;IACnC,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AA4DF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAclD,CAAC"}
|
|
@@ -8,7 +8,6 @@ const exercise_1 = require("../../exercise");
|
|
|
8
8
|
const getDistinctQuestions_1 = require("../../utils/getDistinctQuestions");
|
|
9
9
|
const units = ["mm", "cm", "dm", "m", "dam", "hm", "km"];
|
|
10
10
|
const getVolumeConversion = () => {
|
|
11
|
-
console.log("volume conv q");
|
|
12
11
|
const randomUnitIndex = (0, randint_1.randint)(0, 7);
|
|
13
12
|
const randomUnitInstructionIndex = (0, randint_1.randint)(
|
|
14
13
|
// cette manip a pour but d'éviter des conversion de type km³ --> cm³ ou le contraire (chiffre trop grand/petit)
|
|
@@ -35,7 +34,6 @@ const getPropositions = (n, { answer, randomUnitIndex, randomUnitInstructionInde
|
|
|
35
34
|
(0, exercise_1.addValidProp)(propositions, answer);
|
|
36
35
|
const volumeDecimal = new decimal_1.Decimal(randomVolume);
|
|
37
36
|
while (propositions.length < n) {
|
|
38
|
-
console.log("volume conv qcm");
|
|
39
37
|
const wrongAnswer = volumeDecimal
|
|
40
38
|
.multiplyByPowerOfTen((0, randint_1.randint)(-3, 4, [randomUnitIndex - randomUnitInstructionIndex]))
|
|
41
39
|
.value.toString()
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"expDerivativeOne.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/derivative/expDerivativeOne.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;
|
|
1
|
+
{"version":3,"file":"expDerivativeOne.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/derivative/expDerivativeOne.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAqDF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAalD,CAAC"}
|
|
@@ -44,7 +44,6 @@ const isAnswerValid = (ans, { a, b }) => {
|
|
|
44
44
|
const myfunction = new expNode_1.ExpNode(affine.toTree());
|
|
45
45
|
const derivative = new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(a), myfunction);
|
|
46
46
|
const texs = derivative.toAllValidTexs();
|
|
47
|
-
console.log(ans, texs);
|
|
48
47
|
return texs.includes(ans);
|
|
49
48
|
};
|
|
50
49
|
exports.expDerivativeOne = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inverseFunctionDerivative.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/derivative/inverseFunctionDerivative.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;
|
|
1
|
+
{"version":3,"file":"inverseFunctionDerivative.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/derivative/inverseFunctionDerivative.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA0CF,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,WAAW,CAc3D,CAAC"}
|
|
@@ -37,7 +37,6 @@ const getPropositions = (n, { answer, a }) => {
|
|
|
37
37
|
const isAnswerValid = (ans, { a }) => {
|
|
38
38
|
const answerTree = new fractionNode_1.FractionNode(new numberNode_1.NumberNode(-a), new powerNode_1.SquareNode(new variableNode_1.VariableNode("x")));
|
|
39
39
|
const texs = answerTree.toAllValidTexs();
|
|
40
|
-
console.log(texs);
|
|
41
40
|
return texs.includes(ans);
|
|
42
41
|
};
|
|
43
42
|
exports.inverseFunctionDerivative = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lnDerivativeOne.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/derivative/lnDerivativeOne.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;
|
|
1
|
+
{"version":3,"file":"lnDerivativeOne.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/derivative/lnDerivativeOne.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAoDF,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,CAajD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lnDerivativeThree.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/derivative/lnDerivativeThree.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAclC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;
|
|
1
|
+
{"version":3,"file":"lnDerivativeThree.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/derivative/lnDerivativeThree.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAclC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA6FF,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,WAAW,CAanD,CAAC"}
|