math-exercises 2.0.2 → 2.0.3
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/calcul/addAndSub.d.ts +6 -6
- package/lib/exercises/calcul/addAndSub.js +63 -63
- package/lib/exercises/calcul/addAndSubWithoutRelatives.d.ts +6 -6
- package/lib/exercises/calcul/addAndSubWithoutRelatives.js +73 -73
- package/lib/exercises/calcul/arithmetics/euclideanDivision.d.ts +9 -9
- package/lib/exercises/calcul/arithmetics/euclideanDivision.js +60 -60
- package/lib/exercises/calcul/arithmetics/index.d.ts +3 -3
- package/lib/exercises/calcul/arithmetics/index.js +19 -19
- package/lib/exercises/calcul/arithmetics/paritySumsAndProducts.d.ts +4 -4
- package/lib/exercises/calcul/arithmetics/paritySumsAndProducts.js +115 -115
- package/lib/exercises/calcul/arithmetics/primeNumbers.d.ts +6 -6
- package/lib/exercises/calcul/arithmetics/primeNumbers.js +105 -105
- package/lib/exercises/calcul/fractions/fractionAndIntegerDivision.d.ts +8 -8
- package/lib/exercises/calcul/fractions/fractionAndIntegerDivision.js +77 -77
- package/lib/exercises/calcul/fractions/fractionAndIntegerProduct.d.ts +7 -7
- package/lib/exercises/calcul/fractions/fractionAndIntegerProduct.js +68 -68
- package/lib/exercises/calcul/fractions/fractionAndIntegerSum.d.ts +7 -7
- package/lib/exercises/calcul/fractions/fractionAndIntegerSum.js +67 -67
- package/lib/exercises/calcul/fractions/fractionToPercentToDecimal.d.ts +8 -8
- package/lib/exercises/calcul/fractions/fractionToPercentToDecimal.js +157 -157
- package/lib/exercises/calcul/fractions/fractionsDivision.d.ts +7 -7
- package/lib/exercises/calcul/fractions/fractionsDivision.js +62 -62
- package/lib/exercises/calcul/fractions/fractionsProduct.d.ts +7 -7
- package/lib/exercises/calcul/fractions/fractionsProduct.js +60 -60
- package/lib/exercises/calcul/fractions/fractionsSum.d.ts +7 -7
- package/lib/exercises/calcul/fractions/fractionsSum.js +60 -60
- package/lib/exercises/calcul/fractions/index.d.ts +8 -8
- package/lib/exercises/calcul/fractions/index.js +24 -24
- package/lib/exercises/calcul/fractions/simplifyFraction.d.ts +7 -7
- package/lib/exercises/calcul/fractions/simplifyFraction.js +52 -52
- package/lib/exercises/calcul/index.d.ts +8 -8
- package/lib/exercises/calcul/index.js +24 -24
- package/lib/exercises/calcul/mentalCaluls/index.d.ts +4 -4
- package/lib/exercises/calcul/mentalCaluls/index.js +20 -20
- package/lib/exercises/calcul/mentalCaluls/mentalAddAndSub.d.ts +6 -6
- package/lib/exercises/calcul/mentalCaluls/mentalAddAndSub.js +84 -84
- package/lib/exercises/calcul/mentalCaluls/mentalDivisions.d.ts +9 -9
- package/lib/exercises/calcul/mentalCaluls/mentalDivisions.js +101 -101
- package/lib/exercises/calcul/mentalCaluls/mentalMultiplications.d.ts +6 -6
- package/lib/exercises/calcul/mentalCaluls/mentalMultiplications.js +84 -84
- package/lib/exercises/calcul/mentalCaluls/mentalPercentage.d.ts +8 -8
- package/lib/exercises/calcul/mentalCaluls/mentalPercentage.js +140 -140
- package/lib/exercises/calcul/operations/index.d.ts +2 -2
- package/lib/exercises/calcul/operations/index.js +18 -18
- package/lib/exercises/calcul/operations/operationsPriorities.d.ts +17 -17
- package/lib/exercises/calcul/operations/operationsPriorities.js +121 -121
- package/lib/exercises/calcul/operations/operationsPrioritiesWithoutRelative.d.ts +18 -18
- package/lib/exercises/calcul/operations/operationsPrioritiesWithoutRelative.js +202 -202
- package/lib/exercises/calcul/proportionality/index.d.ts +1 -1
- package/lib/exercises/calcul/proportionality/index.js +17 -17
- package/lib/exercises/calcul/proportionality/proportionalityTable.d.ts +10 -10
- package/lib/exercises/calcul/proportionality/proportionalityTable.js +65 -65
- package/lib/exercises/calcul/rounding/index.d.ts +1 -1
- package/lib/exercises/calcul/rounding/index.js +17 -17
- package/lib/exercises/calcul/rounding/rounding.d.ts +21 -21
- package/lib/exercises/calcul/rounding/rounding.js +141 -141
- package/lib/exercises/calculLitteral/distributivity/allIdentities.d.ts +10 -10
- package/lib/exercises/calculLitteral/distributivity/allIdentities.js +72 -72
- package/lib/exercises/calculLitteral/distributivity/doubleDistributivity.d.ts +7 -7
- package/lib/exercises/calculLitteral/distributivity/doubleDistributivity.js +74 -74
- package/lib/exercises/calculLitteral/distributivity/firstIdentity.d.ts +10 -10
- package/lib/exercises/calculLitteral/distributivity/firstIdentity.js +64 -64
- package/lib/exercises/calculLitteral/distributivity/index.d.ts +6 -6
- package/lib/exercises/calculLitteral/distributivity/index.js +26 -26
- package/lib/exercises/calculLitteral/distributivity/secondIdentity.d.ts +10 -10
- package/lib/exercises/calculLitteral/distributivity/secondIdentity.js +65 -65
- package/lib/exercises/calculLitteral/distributivity/simpleDistributivity.d.ts +8 -8
- package/lib/exercises/calculLitteral/distributivity/simpleDistributivity.js +61 -61
- package/lib/exercises/calculLitteral/distributivity/thirdIdentity.d.ts +10 -10
- package/lib/exercises/calculLitteral/distributivity/thirdIdentity.js +69 -69
- package/lib/exercises/calculLitteral/equation/equationSimpleSquare.d.ts +6 -6
- package/lib/exercises/calculLitteral/equation/equationSimpleSquare.js +140 -140
- package/lib/exercises/calculLitteral/equation/equationType1Exercise.d.ts +10 -10
- package/lib/exercises/calculLitteral/equation/equationType1Exercise.js +60 -60
- package/lib/exercises/calculLitteral/equation/equationType2Exercise.d.ts +10 -10
- package/lib/exercises/calculLitteral/equation/equationType2Exercise.js +64 -64
- package/lib/exercises/calculLitteral/equation/equationType3Exercise.d.ts +11 -11
- package/lib/exercises/calculLitteral/equation/equationType3Exercise.js +68 -68
- package/lib/exercises/calculLitteral/equation/equationType4Exercise.d.ts +12 -12
- package/lib/exercises/calculLitteral/equation/equationType4Exercise.js +75 -75
- package/lib/exercises/calculLitteral/equation/expEquation.d.ts +7 -7
- package/lib/exercises/calculLitteral/equation/expEquation.js +75 -75
- package/lib/exercises/calculLitteral/equation/firstDegreeEquation.d.ts +7 -7
- package/lib/exercises/calculLitteral/equation/firstDegreeEquation.js +58 -58
- package/lib/exercises/calculLitteral/equation/fractionEquation.d.ts +9 -9
- package/lib/exercises/calculLitteral/equation/fractionEquation.js +82 -82
- package/lib/exercises/calculLitteral/equation/index.d.ts +10 -10
- package/lib/exercises/calculLitteral/equation/index.js +26 -26
- package/lib/exercises/calculLitteral/equation/logEquation.d.ts +7 -7
- package/lib/exercises/calculLitteral/equation/logEquation.js +74 -74
- package/lib/exercises/calculLitteral/equation/multiplicationEquation.d.ts +9 -9
- package/lib/exercises/calculLitteral/equation/multiplicationEquation.js +78 -78
- package/lib/exercises/calculLitteral/factorisation/factoIdRmq1.d.ts +7 -7
- package/lib/exercises/calculLitteral/factorisation/factoIdRmq1.js +58 -58
- package/lib/exercises/calculLitteral/factorisation/factoIdRmq2.d.ts +7 -7
- package/lib/exercises/calculLitteral/factorisation/factoIdRmq2.js +60 -60
- package/lib/exercises/calculLitteral/factorisation/factoIdRmq3.d.ts +7 -7
- package/lib/exercises/calculLitteral/factorisation/factoIdRmq3.js +66 -66
- package/lib/exercises/calculLitteral/factorisation/factoType1Exercise.d.ts +10 -10
- package/lib/exercises/calculLitteral/factorisation/factoType1Exercise.js +91 -91
- package/lib/exercises/calculLitteral/factorisation/index.d.ts +4 -4
- package/lib/exercises/calculLitteral/factorisation/index.js +20 -20
- package/lib/exercises/calculLitteral/index.d.ts +5 -5
- package/lib/exercises/calculLitteral/index.js +21 -21
- package/lib/exercises/calculLitteral/inequations/firstDegreeInequationsType0.d.ts +8 -8
- package/lib/exercises/calculLitteral/inequations/firstDegreeInequationsType0.js +68 -68
- package/lib/exercises/calculLitteral/inequations/firstDegreeInequationsType1.d.ts +8 -8
- package/lib/exercises/calculLitteral/inequations/firstDegreeInequationsType1.js +80 -80
- package/lib/exercises/calculLitteral/inequations/firstDegreeInequationsType2.d.ts +9 -9
- package/lib/exercises/calculLitteral/inequations/firstDegreeInequationsType2.js +83 -83
- package/lib/exercises/calculLitteral/inequations/firstDegreeInequationsType3.d.ts +11 -11
- package/lib/exercises/calculLitteral/inequations/firstDegreeInequationsType3.js +92 -92
- package/lib/exercises/calculLitteral/inequations/index.d.ts +4 -4
- package/lib/exercises/calculLitteral/inequations/index.js +20 -20
- package/lib/exercises/calculLitteral/simplifying/evaluateExpression.d.ts +9 -9
- package/lib/exercises/calculLitteral/simplifying/evaluateExpression.js +63 -63
- package/lib/exercises/calculLitteral/simplifying/expSimplifiying.d.ts +9 -9
- package/lib/exercises/calculLitteral/simplifying/expSimplifiying.js +116 -116
- package/lib/exercises/calculLitteral/simplifying/index.d.ts +4 -4
- package/lib/exercises/calculLitteral/simplifying/index.js +20 -20
- package/lib/exercises/calculLitteral/simplifying/logSimplifiying.d.ts +8 -8
- package/lib/exercises/calculLitteral/simplifying/logSimplifiying.js +77 -77
- package/lib/exercises/calculLitteral/simplifying/reduceExpression.d.ts +8 -8
- package/lib/exercises/calculLitteral/simplifying/reduceExpression.js +114 -114
- package/lib/exercises/combinatory/anagrams.d.ts +6 -6
- package/lib/exercises/combinatory/anagrams.js +161 -161
- package/lib/exercises/combinatory/ballsCounting.d.ts +9 -9
- package/lib/exercises/combinatory/ballsCounting.js +110 -110
- package/lib/exercises/combinatory/diceCounting.d.ts +6 -6
- package/lib/exercises/combinatory/diceCounting.js +122 -122
- package/lib/exercises/combinatory/index.d.ts +3 -3
- package/lib/exercises/combinatory/index.js +19 -19
- package/lib/exercises/complex/addComplex.d.ts +9 -9
- package/lib/exercises/complex/addComplex.js +64 -64
- package/lib/exercises/complex/argumentFromAlgebraicComplex.js +52 -52
- package/lib/exercises/complex/conjugateComplex.ts.d.ts +7 -7
- package/lib/exercises/complex/conjugateComplex.ts.js +54 -54
- package/lib/exercises/complex/conjugateDivideComplex.d.ts +7 -7
- package/lib/exercises/complex/conjugateDivideComplex.js +61 -61
- package/lib/exercises/complex/conjugateMultiplyComplex.d.ts +7 -7
- package/lib/exercises/complex/conjugateMultiplyComplex.js +61 -61
- package/lib/exercises/complex/divideComplex.d.ts +7 -7
- package/lib/exercises/complex/divideComplex.js +58 -58
- package/lib/exercises/complex/index.d.ts +10 -10
- package/lib/exercises/complex/index.js +27 -27
- package/lib/exercises/complex/inverseComplex.d.ts +7 -7
- package/lib/exercises/complex/inverseComplex.js +54 -54
- package/lib/exercises/complex/linearCombinaisonComplex.d.ts +9 -9
- package/lib/exercises/complex/linearCombinaisonComplex.js +59 -59
- package/lib/exercises/complex/moduloFromAlgebraicComplex.d.ts +7 -7
- package/lib/exercises/complex/moduloFromAlgebraicComplex.js +55 -55
- package/lib/exercises/complex/mutiplyComplex.d.ts +7 -7
- package/lib/exercises/complex/mutiplyComplex.js +58 -58
- package/lib/exercises/complex/reAndIm.d.ts +8 -8
- package/lib/exercises/complex/reAndIm.js +50 -50
- package/lib/exercises/conversion/aeraConversion.d.ts +8 -8
- package/lib/exercises/conversion/aeraConversion.js +60 -60
- package/lib/exercises/conversion/capacityConversion.d.ts +8 -8
- package/lib/exercises/conversion/capacityConversion.js +58 -58
- package/lib/exercises/conversion/index.d.ts +6 -6
- package/lib/exercises/conversion/index.js +22 -22
- package/lib/exercises/conversion/lengthConversion.d.ts +8 -8
- package/lib/exercises/conversion/lengthConversion.js +58 -58
- package/lib/exercises/conversion/massConversion.d.ts +8 -8
- package/lib/exercises/conversion/massConversion.js +58 -58
- package/lib/exercises/conversion/volumeCapacityConversion.d.ts +9 -9
- package/lib/exercises/conversion/volumeCapacityConversion.js +74 -74
- package/lib/exercises/conversion/volumeConversion.d.ts +8 -8
- package/lib/exercises/conversion/volumeConversion.js +60 -60
- package/lib/exercises/derivation/derivative/constanteDerivative.d.ts +9 -9
- package/lib/exercises/derivation/derivative/constanteDerivative.js +54 -54
- package/lib/exercises/derivation/derivative/expDerivativeOne.d.ts +7 -7
- package/lib/exercises/derivation/derivative/expDerivativeOne.d.ts.map +1 -1
- package/lib/exercises/derivation/derivative/expDerivativeOne.js +62 -61
- package/lib/exercises/derivation/derivative/expDerivativeThree.d.ts +7 -7
- package/lib/exercises/derivation/derivative/expDerivativeThree.js +55 -55
- package/lib/exercises/derivation/derivative/expDerivativeTwo.d.ts +7 -7
- package/lib/exercises/derivation/derivative/expDerivativeTwo.js +57 -57
- package/lib/exercises/derivation/derivative/firstDegreeDerivative.d.ts +10 -10
- package/lib/exercises/derivation/derivative/firstDegreeDerivative.js +52 -52
- package/lib/exercises/derivation/derivative/index.d.ts +17 -17
- package/lib/exercises/derivation/derivative/index.js +38 -38
- package/lib/exercises/derivation/derivative/inverseFunctionDerivative.d.ts +6 -6
- package/lib/exercises/derivation/derivative/inverseFunctionDerivative.js +55 -55
- package/lib/exercises/derivation/derivative/lnDerivativeOne.d.ts +7 -7
- package/lib/exercises/derivation/derivative/lnDerivativeOne.js +68 -68
- package/lib/exercises/derivation/derivative/lnDerivativeThree.d.ts +7 -7
- package/lib/exercises/derivation/derivative/lnDerivativeThree.js +83 -83
- package/lib/exercises/derivation/derivative/lnDerivativeTwo.d.ts +7 -7
- package/lib/exercises/derivation/derivative/lnDerivativeTwo.js +60 -60
- package/lib/exercises/derivation/derivative/powerFunctionDerivative.d.ts +7 -7
- package/lib/exercises/derivation/derivative/powerFunctionDerivative.js +71 -71
- package/lib/exercises/derivation/derivative/productDerivative.d.ts +7 -7
- package/lib/exercises/derivation/derivative/productDerivative.js +59 -59
- package/lib/exercises/derivation/derivative/quotientDerivative.d.ts +7 -7
- package/lib/exercises/derivation/derivative/quotientDerivative.js +84 -84
- package/lib/exercises/derivation/derivative/rootFunctionDerivative.d.ts +6 -6
- package/lib/exercises/derivation/derivative/rootFunctionDerivative.js +78 -78
- package/lib/exercises/derivation/derivative/secondDegreeDerivative.d.ts +9 -9
- package/lib/exercises/derivation/derivative/secondDegreeDerivative.js +74 -74
- package/lib/exercises/derivation/derivative/thirdDegreeDerivative.d.ts +9 -9
- package/lib/exercises/derivation/derivative/thirdDegreeDerivative.js +81 -81
- package/lib/exercises/derivation/derivative/thirdDegreeFunctionVariation.d.ts +9 -9
- package/lib/exercises/derivation/derivative/thirdDegreeFunctionVariation.js +99 -99
- package/lib/exercises/derivation/derivative/usualderivative.d.ts +10 -10
- package/lib/exercises/derivation/derivative/usualderivative.js +108 -108
- package/lib/exercises/derivation/derivativeNumberCalcul.d.ts +7 -7
- package/lib/exercises/derivation/derivativeNumberCalcul.js +48 -48
- package/lib/exercises/derivation/derivativeNumberReading.d.ts +7 -7
- package/lib/exercises/derivation/derivativeNumberReading.js +85 -85
- package/lib/exercises/derivation/index.d.ts +3 -3
- package/lib/exercises/derivation/index.js +19 -19
- package/lib/exercises/equaDiff/equaDiffGeneralForme.d.ts +6 -6
- package/lib/exercises/equaDiff/equaDiffGeneralForme.js +58 -58
- package/lib/exercises/equaDiff/equaDiffGeneralFormeWithIC.d.ts +7 -7
- package/lib/exercises/equaDiff/equaDiffGeneralFormeWithIC.js +68 -68
- package/lib/exercises/equaDiff/index.d.ts +2 -2
- package/lib/exercises/equaDiff/index.js +18 -18
- package/lib/exercises/exercise.d.ts +50 -50
- package/lib/exercises/exercise.js +38 -38
- package/lib/exercises/functions/absolute/absoluteValueEquations.d.ts +7 -7
- package/lib/exercises/functions/absolute/absoluteValueEquations.js +74 -74
- package/lib/exercises/functions/absolute/absoluteValueInequations.d.ts +8 -8
- package/lib/exercises/functions/absolute/absoluteValueInequations.js +69 -69
- package/lib/exercises/functions/absolute/index.d.ts +2 -2
- package/lib/exercises/functions/absolute/index.js +18 -18
- package/lib/exercises/functions/affines/index.d.ts +4 -4
- package/lib/exercises/functions/affines/index.js +20 -20
- package/lib/exercises/functions/affines/leadingCoefficient.d.ts +9 -9
- package/lib/exercises/functions/affines/leadingCoefficient.js +83 -83
- package/lib/exercises/functions/affines/leadingCoefficientCalculV1.d.ts +9 -9
- package/lib/exercises/functions/affines/leadingCoefficientCalculV1.js +55 -55
- package/lib/exercises/functions/affines/leadingCoefficientCalculV2.d.ts +9 -9
- package/lib/exercises/functions/affines/leadingCoefficientCalculV2.js +54 -54
- package/lib/exercises/functions/affines/signFunction.d.ts +8 -8
- package/lib/exercises/functions/affines/signFunction.js +83 -83
- package/lib/exercises/functions/basics/imageFunction.d.ts +9 -9
- package/lib/exercises/functions/basics/imageFunction.js +64 -64
- package/lib/exercises/functions/basics/imageFunctionGeogebra.d.ts +9 -9
- package/lib/exercises/functions/basics/imageFunctionGeogebra.js +91 -91
- package/lib/exercises/functions/basics/index.d.ts +4 -4
- package/lib/exercises/functions/basics/index.js +20 -20
- package/lib/exercises/functions/basics/inverseImageFunction.d.ts +7 -7
- package/lib/exercises/functions/basics/inverseImageFunction.js +52 -52
- package/lib/exercises/functions/basics/inverseImageFunctionGeogebra.d.ts +10 -8
- package/lib/exercises/functions/basics/inverseImageFunctionGeogebra.d.ts.map +1 -1
- package/lib/exercises/functions/basics/inverseImageFunctionGeogebra.js +188 -166
- package/lib/exercises/functions/cube/cubicEquation.d.ts +6 -6
- package/lib/exercises/functions/cube/cubicEquation.js +55 -55
- package/lib/exercises/functions/cube/index.d.ts +1 -1
- package/lib/exercises/functions/cube/index.js +17 -17
- package/lib/exercises/functions/index.d.ts +6 -6
- package/lib/exercises/functions/index.js +22 -22
- package/lib/exercises/functions/rationalFraction/index.d.ts +1 -1
- package/lib/exercises/functions/rationalFraction/index.js +17 -17
- package/lib/exercises/functions/rationalFraction/rationalFractionForbiddenValue.d.ts +9 -9
- package/lib/exercises/functions/rationalFraction/rationalFractionForbiddenValue.js +64 -64
- package/lib/exercises/functions/trinoms/alphaBetaFromDevForm.d.ts +7 -7
- package/lib/exercises/functions/trinoms/alphaBetaFromDevForm.js +51 -51
- package/lib/exercises/functions/trinoms/alphaBetaInCanonicalForm.d.ts +9 -9
- package/lib/exercises/functions/trinoms/alphaBetaInCanonicalForm.js +66 -66
- package/lib/exercises/functions/trinoms/canonicalFromDevForm.d.ts +8 -8
- package/lib/exercises/functions/trinoms/canonicalFromDevForm.js +52 -52
- package/lib/exercises/functions/trinoms/deltaTrinom.d.ts +8 -8
- package/lib/exercises/functions/trinoms/deltaTrinom.js +52 -52
- package/lib/exercises/functions/trinoms/extremumFromCanonicalForm.d.ts +8 -8
- package/lib/exercises/functions/trinoms/extremumFromCanonicalForm.js +57 -57
- package/lib/exercises/functions/trinoms/extremumTypeFromAlgebricForm.d.ts +8 -8
- package/lib/exercises/functions/trinoms/extremumTypeFromAlgebricForm.js +43 -43
- package/lib/exercises/functions/trinoms/index.d.ts +10 -10
- package/lib/exercises/functions/trinoms/index.js +26 -26
- package/lib/exercises/functions/trinoms/niceRootsFromDevForm.d.ts +8 -8
- package/lib/exercises/functions/trinoms/niceRootsFromDevForm.js +56 -56
- package/lib/exercises/functions/trinoms/rootsFromDevForm.d.ts +8 -8
- package/lib/exercises/functions/trinoms/rootsFromDevForm.js +56 -56
- package/lib/exercises/functions/trinoms/rootsFromFactorizedForm.d.ts +8 -8
- package/lib/exercises/functions/trinoms/rootsFromFactorizedForm.js +70 -70
- package/lib/exercises/functions/trinoms/variationsFromAlgebricForm.d.ts +8 -8
- package/lib/exercises/functions/trinoms/variationsFromAlgebricForm.js +44 -44
- package/lib/exercises/geometry/areas/circleArea.d.ts +8 -8
- package/lib/exercises/geometry/areas/circleArea.js +52 -52
- package/lib/exercises/geometry/areas/index.d.ts +6 -6
- package/lib/exercises/geometry/areas/index.js +22 -22
- package/lib/exercises/geometry/areas/rectangleArea.d.ts +7 -7
- package/lib/exercises/geometry/areas/rectangleArea.js +46 -46
- package/lib/exercises/geometry/areas/rightTriangleArea.d.ts +6 -6
- package/lib/exercises/geometry/areas/rightTriangleArea.js +75 -75
- package/lib/exercises/geometry/areas/squareArea.d.ts +6 -6
- package/lib/exercises/geometry/areas/squareArea.js +46 -46
- package/lib/exercises/geometry/areas/triangleArea.d.ts +4 -4
- package/lib/exercises/geometry/areas/triangleArea.js +97 -97
- package/lib/exercises/geometry/areas/triangleAreaV2.d.ts +6 -6
- package/lib/exercises/geometry/areas/triangleAreaV2.js +71 -71
- package/lib/exercises/geometry/cartesian/distanceBetweenTwoPoints.d.ts +7 -7
- package/lib/exercises/geometry/cartesian/distanceBetweenTwoPoints.js +95 -95
- package/lib/exercises/geometry/cartesian/index.d.ts +2 -2
- package/lib/exercises/geometry/cartesian/index.js +18 -18
- package/lib/exercises/geometry/cartesian/midpoint.d.ts +7 -7
- package/lib/exercises/geometry/cartesian/midpoint.js +63 -63
- package/lib/exercises/geometry/index.d.ts +6 -6
- package/lib/exercises/geometry/index.js +22 -22
- package/lib/exercises/geometry/perimeters/circleCircumference.d.ts +8 -8
- package/lib/exercises/geometry/perimeters/circleCircumference.js +52 -52
- package/lib/exercises/geometry/perimeters/index.d.ts +4 -4
- package/lib/exercises/geometry/perimeters/index.js +20 -20
- package/lib/exercises/geometry/perimeters/rectanglePerimeter.d.ts +7 -7
- package/lib/exercises/geometry/perimeters/rectanglePerimeter.js +46 -46
- package/lib/exercises/geometry/perimeters/squarePerimeter.d.ts +6 -6
- package/lib/exercises/geometry/perimeters/squarePerimeter.js +46 -46
- package/lib/exercises/geometry/perimeters/trianglePerimeter.d.ts +6 -6
- package/lib/exercises/geometry/perimeters/trianglePerimeter.js +46 -46
- package/lib/exercises/geometry/pythagore/index.d.ts +2 -2
- package/lib/exercises/geometry/pythagore/index.js +18 -18
- package/lib/exercises/geometry/pythagore/pythagore.d.ts +8 -8
- package/lib/exercises/geometry/pythagore/pythagore.js +65 -65
- package/lib/exercises/geometry/pythagore/pythagoreCalcul.d.ts +7 -7
- package/lib/exercises/geometry/pythagore/pythagoreCalcul.js +102 -102
- package/lib/exercises/geometry/thales/index.d.ts +2 -2
- package/lib/exercises/geometry/thales/index.js +18 -18
- package/lib/exercises/geometry/thales/thales.d.ts +6 -6
- package/lib/exercises/geometry/thales/thales.js +128 -128
- package/lib/exercises/geometry/thales/thalesCalcul.d.ts +9 -9
- package/lib/exercises/geometry/thales/thalesCalcul.js +145 -145
- package/lib/exercises/geometry/vectors/chasles.d.ts +7 -7
- package/lib/exercises/geometry/vectors/chasles.js +63 -63
- package/lib/exercises/geometry/vectors/coordinatesReading.d.ts +9 -9
- package/lib/exercises/geometry/vectors/coordinatesReading.js +66 -66
- package/lib/exercises/geometry/vectors/determinant.d.ts +7 -7
- package/lib/exercises/geometry/vectors/determinant.js +54 -54
- package/lib/exercises/geometry/vectors/index.d.ts +5 -5
- package/lib/exercises/geometry/vectors/index.js +21 -21
- package/lib/exercises/geometry/vectors/scalarProductViaCoords.d.ts +7 -7
- package/lib/exercises/geometry/vectors/scalarProductViaCoords.js +52 -52
- package/lib/exercises/geometry/vectors/vectorCoordinatesFromTwoPoints.d.ts +7 -7
- package/lib/exercises/geometry/vectors/vectorCoordinatesFromTwoPoints.js +52 -52
- package/lib/exercises/index.d.ts +18 -18
- package/lib/exercises/index.js +34 -34
- package/lib/exercises/limits/index.d.ts +9 -9
- package/lib/exercises/limits/index.js +25 -25
- package/lib/exercises/limits/polynomLimit.d.ts +7 -7
- package/lib/exercises/limits/polynomLimit.js +53 -53
- package/lib/exercises/limits/polynomLimitNoFI.d.ts +7 -7
- package/lib/exercises/limits/polynomLimitNoFI.js +53 -53
- package/lib/exercises/limits/rationalFracForbiddenValueLimit.d.ts +8 -8
- package/lib/exercises/limits/rationalFracForbiddenValueLimit.js +73 -73
- package/lib/exercises/limits/rationalFracLimit.d.ts +8 -8
- package/lib/exercises/limits/rationalFracLimit.js +101 -101
- package/lib/exercises/limits/sequenceGeometricLimit.d.ts +7 -7
- package/lib/exercises/limits/sequenceGeometricLimit.js +51 -51
- package/lib/exercises/limits/sequencePolynomLimit.d.ts +6 -6
- package/lib/exercises/limits/sequencePolynomLimit.js +52 -52
- package/lib/exercises/limits/sequencePolynomNoFILimit.d.ts +6 -6
- package/lib/exercises/limits/sequencePolynomNoFILimit.js +52 -52
- package/lib/exercises/limits/sequencePolynomProductLimit.d.ts +7 -7
- package/lib/exercises/limits/sequencePolynomProductLimit.js +70 -70
- package/lib/exercises/limits/sequenceRationalFracLimit.d.ts +7 -7
- package/lib/exercises/limits/sequenceRationalFracLimit.js +100 -100
- package/lib/exercises/percent/applyPercent.d.ts +8 -8
- package/lib/exercises/percent/applyPercent.js +78 -78
- package/lib/exercises/percent/averageEvolutionRate.d.ts +7 -7
- package/lib/exercises/percent/averageEvolutionRate.js +54 -54
- package/lib/exercises/percent/evolutionToCM.d.ts +7 -7
- package/lib/exercises/percent/evolutionToCM.js +64 -64
- package/lib/exercises/percent/globalPercent.d.ts +6 -6
- package/lib/exercises/percent/globalPercent.d.ts.map +1 -1
- package/lib/exercises/percent/globalPercent.js +71 -71
- package/lib/exercises/percent/index.d.ts +5 -5
- package/lib/exercises/percent/index.js +21 -21
- package/lib/exercises/percent/reciprocalPercentage.d.ts +7 -7
- package/lib/exercises/percent/reciprocalPercentage.d.ts.map +1 -1
- package/lib/exercises/percent/reciprocalPercentage.js +61 -61
- package/lib/exercises/powers/calculateNegativePower.d.ts +7 -7
- package/lib/exercises/powers/calculateNegativePower.js +73 -73
- package/lib/exercises/powers/calculatePower.d.ts +7 -7
- package/lib/exercises/powers/calculatePower.js +65 -65
- package/lib/exercises/powers/decimalToScientific.d.ts +6 -6
- package/lib/exercises/powers/decimalToScientific.js +76 -76
- package/lib/exercises/powers/index.d.ts +9 -9
- package/lib/exercises/powers/index.js +25 -25
- package/lib/exercises/powers/powerDefinition.d.ts +7 -7
- package/lib/exercises/powers/powerDefinition.js +55 -55
- package/lib/exercises/powers/powersDivision.d.ts +12 -12
- package/lib/exercises/powers/powersDivision.js +87 -87
- package/lib/exercises/powers/powersOfTenToDecimal.d.ts +9 -9
- package/lib/exercises/powers/powersOfTenToDecimal.js +72 -72
- package/lib/exercises/powers/powersPower.d.ts +12 -12
- package/lib/exercises/powers/powersPower.js +94 -94
- package/lib/exercises/powers/powersProduct.d.ts +12 -12
- package/lib/exercises/powers/powersProduct.js +89 -89
- package/lib/exercises/powers/scientificToDecimal.d.ts +10 -10
- package/lib/exercises/powers/scientificToDecimal.js +72 -72
- package/lib/exercises/primitive/constantPrimitive.d.ts +9 -9
- package/lib/exercises/primitive/constantPrimitive.js +56 -56
- package/lib/exercises/primitive/expUPrimitive.d.ts +9 -9
- package/lib/exercises/primitive/expUPrimitive.js +76 -76
- package/lib/exercises/primitive/exponentialPrimitive.d.ts +9 -9
- package/lib/exercises/primitive/exponentialPrimitive.js +72 -72
- package/lib/exercises/primitive/index.d.ts +7 -7
- package/lib/exercises/primitive/index.js +31 -31
- package/lib/exercises/primitive/logarithmePrimitive.d.ts +8 -8
- package/lib/exercises/primitive/logarithmePrimitive.js +79 -79
- package/lib/exercises/primitive/polynomialPrimitive.d.ts +9 -9
- package/lib/exercises/primitive/polynomialPrimitive.js +60 -60
- package/lib/exercises/primitive/sinCosPrimitive.d.ts +10 -10
- package/lib/exercises/primitive/sinCosPrimitive.js +79 -79
- package/lib/exercises/primitive/sinUCosUPrimitive.d.ts +10 -10
- package/lib/exercises/primitive/sinUCosUPrimitive.js +85 -85
- package/lib/exercises/primitive/usualPrimitives.d.ts +10 -10
- package/lib/exercises/primitive/usualPrimitives.js +108 -108
- package/lib/exercises/probaStat/ballsBasicProbas.d.ts +7 -7
- package/lib/exercises/probaStat/ballsBasicProbas.js +62 -62
- package/lib/exercises/probaStat/cardBasicProbas.d.ts +6 -6
- package/lib/exercises/probaStat/cardBasicProbas.js +104 -104
- package/lib/exercises/probaStat/conditionalProbability.d.ts +9 -9
- package/lib/exercises/probaStat/conditionalProbability.js +91 -91
- package/lib/exercises/probaStat/diceBasicProbas.d.ts +8 -8
- package/lib/exercises/probaStat/diceBasicProbas.js +77 -77
- package/lib/exercises/probaStat/index.d.ts +7 -7
- package/lib/exercises/probaStat/index.js +23 -23
- package/lib/exercises/probaStat/probabilityTree.d.ts +12 -12
- package/lib/exercises/probaStat/probabilityTree.js +140 -140
- package/lib/exercises/probaStat/stats1var/averageWithTable.d.ts +7 -7
- package/lib/exercises/probaStat/stats1var/averageWithTable.js +61 -61
- package/lib/exercises/probaStat/stats1var/index.d.ts +6 -6
- package/lib/exercises/probaStat/stats1var/index.js +22 -22
- package/lib/exercises/probaStat/stats1var/marginalAndConditionalFrequency.d.ts +10 -10
- package/lib/exercises/probaStat/stats1var/marginalAndConditionalFrequency.js +122 -122
- package/lib/exercises/probaStat/stats1var/median.d.ts +6 -6
- package/lib/exercises/probaStat/stats1var/median.js +64 -64
- package/lib/exercises/probaStat/stats1var/medianList.d.ts +6 -6
- package/lib/exercises/probaStat/stats1var/medianList.js +55 -55
- package/lib/exercises/probaStat/stats1var/quartiles.d.ts +8 -8
- package/lib/exercises/probaStat/stats1var/quartiles.js +77 -77
- package/lib/exercises/probaStat/stats1var/quartilesList.d.ts +7 -7
- package/lib/exercises/probaStat/stats1var/quartilesList.js +71 -71
- package/lib/exercises/probaStat/stats2var/averagePoint.d.ts +7 -7
- package/lib/exercises/probaStat/stats2var/averagePoint.js +65 -65
- package/lib/exercises/probaStat/stats2var/index.d.ts +1 -1
- package/lib/exercises/probaStat/stats2var/index.js +17 -17
- package/lib/exercises/sequences/arithmetic/arithmeticExplicitFormulaUsage.d.ts +8 -8
- package/lib/exercises/sequences/arithmetic/arithmeticExplicitFormulaUsage.js +48 -48
- package/lib/exercises/sequences/arithmetic/arithmeticFindExplicitFormula.d.ts +7 -7
- package/lib/exercises/sequences/arithmetic/arithmeticFindExplicitFormula.js +55 -55
- package/lib/exercises/sequences/arithmetic/arithmeticFindReason.d.ts +8 -8
- package/lib/exercises/sequences/arithmetic/arithmeticFindReason.js +48 -48
- package/lib/exercises/sequences/arithmetic/arithmeticReasonUsage.d.ts +8 -8
- package/lib/exercises/sequences/arithmetic/arithmeticReasonUsage.js +47 -47
- package/lib/exercises/sequences/arithmetic/arithmeticRecurrenceFormulaUsage.d.ts +8 -8
- package/lib/exercises/sequences/arithmetic/arithmeticRecurrenceFormulaUsage.js +47 -47
- package/lib/exercises/sequences/arithmetic/arithmeticThresholdFind.d.ts +8 -8
- package/lib/exercises/sequences/arithmetic/arithmeticThresholdFind.js +57 -57
- package/lib/exercises/sequences/arithmetic/firstIntegersSum.d.ts +6 -6
- package/lib/exercises/sequences/arithmetic/firstIntegersSum.js +46 -46
- package/lib/exercises/sequences/arithmetic/index.d.ts +7 -7
- package/lib/exercises/sequences/arithmetic/index.js +23 -23
- package/lib/exercises/sequences/explicitFormulaUsage.d.ts +7 -7
- package/lib/exercises/sequences/explicitFormulaUsage.js +50 -50
- package/lib/exercises/sequences/genericSequenceVariations.d.ts +6 -6
- package/lib/exercises/sequences/genericSequenceVariations.js +52 -52
- package/lib/exercises/sequences/geometric/geometricExplicitFormulaUsage.d.ts +8 -8
- package/lib/exercises/sequences/geometric/geometricExplicitFormulaUsage.js +52 -52
- package/lib/exercises/sequences/geometric/geometricFindExplicitFormula.d.ts +7 -7
- package/lib/exercises/sequences/geometric/geometricFindExplicitFormula.js +60 -60
- package/lib/exercises/sequences/geometric/geometricFindReason.d.ts +8 -8
- package/lib/exercises/sequences/geometric/geometricFindReason.js +51 -51
- package/lib/exercises/sequences/geometric/geometricFirstTermsSum.d.ts +7 -7
- package/lib/exercises/sequences/geometric/geometricFirstTermsSum.js +55 -55
- package/lib/exercises/sequences/geometric/geometricReasonUsage.d.ts +8 -8
- package/lib/exercises/sequences/geometric/geometricReasonUsage.js +49 -49
- package/lib/exercises/sequences/geometric/geometricRecurrenceFormulaUsage.d.ts +8 -8
- package/lib/exercises/sequences/geometric/geometricRecurrenceFormulaUsage.js +49 -49
- package/lib/exercises/sequences/geometric/index.d.ts +6 -6
- package/lib/exercises/sequences/geometric/index.js +22 -22
- package/lib/exercises/sequences/index.d.ts +5 -5
- package/lib/exercises/sequences/index.js +21 -21
- package/lib/exercises/sequences/recurrenceFormulaUsage.d.ts +8 -8
- package/lib/exercises/sequences/recurrenceFormulaUsage.js +55 -55
- package/lib/exercises/sets/index.d.ts +2 -2
- package/lib/exercises/sets/index.js +18 -18
- package/lib/exercises/sets/intervals/index.d.ts +3 -3
- package/lib/exercises/sets/intervals/index.js +19 -19
- package/lib/exercises/sets/intervals/inequalityToInterval.d.ts +7 -7
- package/lib/exercises/sets/intervals/inequalityToInterval.js +145 -145
- package/lib/exercises/sets/intervals/intervalsIntersection.d.ts +7 -7
- package/lib/exercises/sets/intervals/intervalsIntersection.js +56 -56
- package/lib/exercises/sets/intervals/intervalsUnion.d.ts +7 -7
- package/lib/exercises/sets/intervals/intervalsUnion.js +48 -48
- package/lib/exercises/sets/setBelonging.d.ts +7 -7
- package/lib/exercises/sets/setBelonging.js +84 -84
- package/lib/exercises/squareRoots/index.d.ts +2 -2
- package/lib/exercises/squareRoots/index.js +18 -18
- package/lib/exercises/squareRoots/simpifySquareRoot.d.ts +6 -6
- package/lib/exercises/squareRoots/simpifySquareRoot.js +54 -54
- package/lib/exercises/squareRoots/squareRootEquation.d.ts +6 -6
- package/lib/exercises/squareRoots/squareRootEquation.js +54 -54
- package/lib/exercises/trigonometry/index.d.ts +5 -5
- package/lib/exercises/trigonometry/index.js +21 -21
- package/lib/exercises/trigonometry/mainRemarkableValues.d.ts +7 -7
- package/lib/exercises/trigonometry/mainRemarkableValues.js +69 -69
- package/lib/exercises/trigonometry/remarkableValues.d.ts +7 -7
- package/lib/exercises/trigonometry/remarkableValues.js +70 -70
- package/lib/exercises/trigonometry/trigonometry.d.ts +10 -10
- package/lib/exercises/trigonometry/trigonometry.js +114 -114
- package/lib/exercises/trigonometry/trigonometryAngleCalcul.d.ts +8 -8
- package/lib/exercises/trigonometry/trigonometryAngleCalcul.js +73 -73
- package/lib/exercises/trigonometry/trigonometrySideCalcul.d.ts +9 -9
- package/lib/exercises/trigonometry/trigonometrySideCalcul.js +85 -85
- package/lib/exercises/utils/cardsData.d.ts +21 -21
- package/lib/exercises/utils/cardsData.js +26 -26
- package/lib/exercises/utils/geogebra/getAdaptedCoords.js +1 -1
- package/lib/exercises/utils/getDistinctQuestions.d.ts +10 -10
- package/lib/exercises/utils/getDistinctQuestions.js +37 -37
- package/lib/exercises/utils/keys/equationKeys.d.ts +2 -2
- package/lib/exercises/utils/keys/equationKeys.js +12 -12
- package/lib/exercises/utils/keys/inequationKeys.d.ts +2 -2
- package/lib/exercises/utils/keys/inequationKeys.js +17 -17
- package/lib/index.d.ts +694 -692
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +61 -61
- package/lib/math/complex/complex.d.ts +24 -24
- package/lib/math/complex/complex.js +104 -104
- package/lib/math/geometry/point.d.ts +31 -31
- package/lib/math/geometry/point.js +73 -73
- package/lib/math/geometry/triangles.d.ts +53 -53
- package/lib/math/geometry/triangles.js +183 -183
- package/lib/math/geometry/vector.d.ts +17 -17
- package/lib/math/geometry/vector.js +49 -49
- package/lib/math/numbers/decimals/decimal.d.ts +27 -27
- package/lib/math/numbers/decimals/decimal.js +187 -187
- package/lib/math/numbers/epsilon.d.ts +1 -1
- package/lib/math/numbers/epsilon.js +10 -10
- package/lib/math/numbers/integer/integer.d.ts +20 -20
- package/lib/math/numbers/integer/integer.js +111 -111
- package/lib/math/numbers/integer/power.d.ts +13 -13
- package/lib/math/numbers/integer/power.js +52 -52
- package/lib/math/numbers/integer/primes.d.ts +1 -1
- package/lib/math/numbers/integer/primes.js +7 -7
- package/lib/math/numbers/nombre.d.ts +17 -17
- package/lib/math/numbers/nombre.js +37 -37
- package/lib/math/numbers/rationals/rational.d.ts +28 -28
- package/lib/math/numbers/rationals/rational.js +132 -132
- package/lib/math/numbers/reals/extendedRingElement.d.ts +14 -14
- package/lib/math/numbers/reals/extendedRingElement.js +41 -41
- package/lib/math/numbers/reals/real.d.ts +31 -31
- package/lib/math/numbers/reals/real.js +114 -114
- package/lib/math/polynomials/affine.d.ts +15 -15
- package/lib/math/polynomials/affine.js +44 -44
- package/lib/math/polynomials/monom.d.ts +4 -4
- package/lib/math/polynomials/monom.js +14 -14
- package/lib/math/polynomials/polynomial.d.ts +45 -45
- package/lib/math/polynomials/polynomial.js +377 -377
- package/lib/math/polynomials/rationalFrac.d.ts +11 -11
- package/lib/math/polynomials/rationalFrac.d.ts.map +1 -1
- package/lib/math/polynomials/rationalFrac.js +50 -50
- package/lib/math/polynomials/trinom.d.ts +29 -29
- package/lib/math/polynomials/trinom.d.ts.map +1 -1
- package/lib/math/polynomials/trinom.js +176 -176
- package/lib/math/sequences/arithmeticSequence.js +1 -1
- package/lib/math/sequences/geometricSequence.d.ts +13 -13
- package/lib/math/sequences/geometricSequence.js +76 -76
- package/lib/math/sequences/sequence.d.ts +24 -24
- package/lib/math/sequences/sequence.js +22 -22
- package/lib/math/sets/discreteSet.d.ts +10 -10
- package/lib/math/sets/discreteSet.js +28 -28
- package/lib/math/sets/emptySet.js +6 -6
- package/lib/math/sets/intervals/intervals.d.ts +35 -35
- package/lib/math/sets/intervals/intervals.js +261 -261
- package/lib/math/sets/mathSet.d.ts +8 -8
- package/lib/math/sets/mathSet.js +11 -11
- package/lib/math/sets/mathSetInterface.d.ts +6 -6
- package/lib/math/sets/mathSetInterface.js +2 -2
- package/lib/math/trigonometry/remarkableValue.d.ts +15 -15
- package/lib/math/trigonometry/remarkableValue.js +40 -40
- package/lib/math/trigonometry/remarkableValues.d.ts +2 -2
- package/lib/math/trigonometry/remarkableValues.js +67 -67
- package/lib/math/utils/arithmetic/coprimesOf.d.ts +1 -1
- package/lib/math/utils/arithmetic/coprimesOf.js +13 -13
- package/lib/math/utils/arithmetic/dividersOf.d.ts +1 -1
- package/lib/math/utils/arithmetic/dividersOf.js +12 -12
- package/lib/math/utils/arithmetic/gcd.d.ts +2 -1
- package/lib/math/utils/arithmetic/gcd.d.ts.map +1 -1
- package/lib/math/utils/arithmetic/gcd.js +14 -7
- package/lib/math/utils/arithmetic/isSquare.d.ts +1 -1
- package/lib/math/utils/arithmetic/isSquare.js +7 -7
- package/lib/math/utils/arithmetic/lcd.d.ts +1 -1
- package/lib/math/utils/arithmetic/lcd.js +12 -12
- package/lib/math/utils/arithmetic/nonCoprimesOf.d.ts +1 -1
- package/lib/math/utils/arithmetic/nonCoprimesOf.js +13 -13
- package/lib/math/utils/arithmetic/nonDividersOf.d.ts +1 -1
- package/lib/math/utils/arithmetic/nonDividersOf.js +14 -14
- package/lib/math/utils/arithmetic/primeFactors.d.ts +5 -5
- package/lib/math/utils/arithmetic/primeFactors.js +22 -22
- package/lib/math/utils/decimals/decimalPartLengthOf.d.ts +1 -1
- package/lib/math/utils/decimals/decimalPartLengthOf.js +14 -14
- package/lib/math/utils/latex/frenchify.d.ts +1 -1
- package/lib/math/utils/latex/frenchify.js +9 -9
- package/lib/math/utils/random/randTupleInt.d.ts +13 -13
- package/lib/math/utils/random/randTupleInt.js +30 -30
- package/lib/math/utils/random/randint.d.ts +4 -4
- package/lib/math/utils/random/randint.js +18 -18
- package/lib/math/utils/round.d.ts +1 -1
- package/lib/math/utils/round.js +8 -8
- package/lib/server.d.ts +2 -2
- package/lib/server.js +119 -117
- package/lib/tree/nodes/algebraicNode.d.ts +3 -3
- package/lib/tree/nodes/algebraicNode.js +5 -5
- package/lib/tree/nodes/complex/complexNode.d.ts +12 -13
- package/lib/tree/nodes/complex/complexNode.d.ts.map +1 -1
- package/lib/tree/nodes/complex/complexNode.js +43 -46
- package/lib/tree/nodes/equations/equalNode.d.ts +12 -13
- package/lib/tree/nodes/equations/equalNode.d.ts.map +1 -1
- package/lib/tree/nodes/equations/equalNode.js +38 -41
- package/lib/tree/nodes/equations/equationSolutionNode.d.ts +20 -20
- package/lib/tree/nodes/equations/equationSolutionNode.js +44 -44
- package/lib/tree/nodes/equations/multiEqualNode.d.ts +13 -13
- package/lib/tree/nodes/equations/multiEqualNode.js +39 -39
- package/lib/tree/nodes/functions/absNode.d.ts +15 -16
- package/lib/tree/nodes/functions/absNode.d.ts.map +1 -1
- package/lib/tree/nodes/functions/absNode.js +41 -41
- package/lib/tree/nodes/functions/cosNode.d.ts +15 -16
- package/lib/tree/nodes/functions/cosNode.d.ts.map +1 -1
- package/lib/tree/nodes/functions/cosNode.js +41 -41
- package/lib/tree/nodes/functions/expNode.d.ts +16 -17
- package/lib/tree/nodes/functions/expNode.d.ts.map +1 -1
- package/lib/tree/nodes/functions/expNode.js +53 -53
- package/lib/tree/nodes/functions/functionNode.d.ts +16 -16
- package/lib/tree/nodes/functions/functionNode.js +18 -18
- package/lib/tree/nodes/functions/logNode.d.ts +16 -17
- package/lib/tree/nodes/functions/logNode.d.ts.map +1 -1
- package/lib/tree/nodes/functions/logNode.js +51 -51
- package/lib/tree/nodes/functions/oppositeNode.d.ts +20 -21
- package/lib/tree/nodes/functions/oppositeNode.d.ts.map +1 -1
- package/lib/tree/nodes/functions/oppositeNode.js +82 -85
- package/lib/tree/nodes/functions/sinNode.d.ts +15 -16
- package/lib/tree/nodes/functions/sinNode.d.ts.map +1 -1
- package/lib/tree/nodes/functions/sinNode.js +41 -41
- package/lib/tree/nodes/functions/sqrtNode.d.ts +15 -16
- package/lib/tree/nodes/functions/sqrtNode.d.ts.map +1 -1
- package/lib/tree/nodes/functions/sqrtNode.js +54 -54
- package/lib/tree/nodes/geometry/lengthNode.d.ts +13 -13
- package/lib/tree/nodes/geometry/lengthNode.js +33 -33
- package/lib/tree/nodes/geometry/pointNode.d.ts +14 -14
- package/lib/tree/nodes/geometry/pointNode.js +41 -41
- package/lib/tree/nodes/geometry/vectorNode.d.ts +13 -13
- package/lib/tree/nodes/geometry/vectorNode.js +30 -30
- package/lib/tree/nodes/inequations/inequationNode.d.ts +20 -20
- package/lib/tree/nodes/inequations/inequationNode.js +116 -116
- package/lib/tree/nodes/inequations/inequationSolutionNode.d.ts +20 -20
- package/lib/tree/nodes/inequations/inequationSolutionNode.js +46 -46
- package/lib/tree/nodes/node.d.ts +33 -34
- package/lib/tree/nodes/node.d.ts.map +1 -1
- package/lib/tree/nodes/node.js +18 -18
- package/lib/tree/nodes/numbers/constantNode.d.ts +13 -14
- package/lib/tree/nodes/numbers/constantNode.d.ts.map +1 -1
- package/lib/tree/nodes/numbers/constantNode.js +32 -32
- package/lib/tree/nodes/numbers/infiniteNode.d.ts +4 -4
- package/lib/tree/nodes/numbers/infiniteNode.js +7 -7
- package/lib/tree/nodes/numbers/numberNode.d.ts +15 -15
- package/lib/tree/nodes/numbers/numberNode.d.ts.map +1 -1
- package/lib/tree/nodes/numbers/numberNode.js +37 -37
- package/lib/tree/nodes/numbers/percentNode.d.ts +11 -11
- package/lib/tree/nodes/numbers/percentNode.js +26 -26
- package/lib/tree/nodes/numbers/piNode.d.ts +2 -2
- package/lib/tree/nodes/numbers/piNode.js +5 -5
- package/lib/tree/nodes/operators/addNode.d.ts +18 -19
- package/lib/tree/nodes/operators/addNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/addNode.js +77 -80
- package/lib/tree/nodes/operators/divideNode.d.ts +19 -20
- package/lib/tree/nodes/operators/divideNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/divideNode.js +63 -66
- package/lib/tree/nodes/operators/fractionNode.d.ts +21 -22
- package/lib/tree/nodes/operators/fractionNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/fractionNode.js +67 -70
- package/lib/tree/nodes/operators/multiplyNode.d.ts +19 -20
- package/lib/tree/nodes/operators/multiplyNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/multiplyNode.js +193 -193
- package/lib/tree/nodes/operators/operatorNode.d.ts +20 -20
- package/lib/tree/nodes/operators/operatorNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/operatorNode.js +17 -17
- package/lib/tree/nodes/operators/powerNode.d.ts +19 -20
- package/lib/tree/nodes/operators/powerNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/powerNode.js +77 -80
- package/lib/tree/nodes/operators/substractNode.d.ts +14 -15
- package/lib/tree/nodes/operators/substractNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/substractNode.js +49 -52
- package/lib/tree/nodes/sets/belongsNode.d.ts +14 -14
- package/lib/tree/nodes/sets/belongsNode.js +36 -36
- package/lib/tree/nodes/sets/discreteSetNode.d.ts +14 -14
- package/lib/tree/nodes/sets/discreteSetNode.js +54 -54
- package/lib/tree/nodes/sets/intervalNode.d.ts +23 -23
- package/lib/tree/nodes/sets/intervalNode.js +71 -71
- package/lib/tree/nodes/sets/setNode.d.ts +3 -3
- package/lib/tree/nodes/sets/setNode.js +2 -2
- package/lib/tree/nodes/sets/unionIntervalNode.d.ts +19 -19
- package/lib/tree/nodes/sets/unionIntervalNode.js +44 -44
- package/lib/tree/nodes/variables/variableNode.d.ts +12 -12
- package/lib/tree/nodes/variables/variableNode.js +30 -30
- package/lib/tree/parsers/derivateParser.js +62 -62
- package/lib/tree/parsers/simplify.d.ts +0 -3
- package/lib/tree/parsers/simplify.d.ts.map +1 -1
- package/lib/tree/parsers/simplify.js +99 -76
- package/lib/tree/utilities/functionComposition.d.ts +4 -4
- package/lib/tree/utilities/functionComposition.js +14 -14
- package/lib/tree/utilities/operatorComposition.d.ts +4 -4
- package/lib/tree/utilities/operatorComposition.js +14 -14
- package/lib/types/class.d.ts +3 -3
- package/lib/types/class.js +2 -2
- package/lib/types/keyIds.d.ts +31 -29
- package/lib/types/keyIds.d.ts.map +1 -1
- package/lib/types/keyIds.js +2 -2
- package/lib/utils/arrayEqual.d.ts +1 -1
- package/lib/utils/arrayEqual.js +13 -13
- package/lib/utils/average.d.ts +1 -1
- package/lib/utils/average.js +9 -9
- package/lib/utils/cartesianProducts.d.ts +12 -12
- package/lib/utils/cartesianProducts.js +64 -64
- package/lib/utils/coinFlip.d.ts +1 -1
- package/lib/utils/coinFlip.js +7 -7
- package/lib/utils/diceFlip.d.ts +1 -1
- package/lib/utils/diceFlip.js +12 -12
- package/lib/utils/enumToArray.d.ts +7 -7
- package/lib/utils/enumToArray.js +16 -16
- package/lib/utils/isInt.d.ts +1 -1
- package/lib/utils/isInt.js +7 -7
- package/lib/utils/isLetter.d.ts +1 -1
- package/lib/utils/isLetter.js +7 -7
- package/lib/utils/permutations.d.ts +1 -1
- package/lib/utils/permutations.js +21 -21
- package/lib/utils/probaFlip.d.ts +6 -6
- package/lib/utils/probaFlip.js +12 -12
- package/lib/utils/probaLawFlip.d.ts +1 -1
- package/lib/utils/probaLawFlip.js +19 -19
- package/lib/utils/random.d.ts +1 -1
- package/lib/utils/random.js +7 -7
- package/lib/utils/randomEnumValue.d.ts +1 -1
- package/lib/utils/randomEnumValue.js +9 -9
- package/lib/utils/randomLetter.d.ts +1 -1
- package/lib/utils/randomLetter.js +9 -9
- package/lib/utils/shuffle.d.ts +1 -1
- package/lib/utils/shuffle.js +15 -15
- package/package.json +3 -4
|
@@ -1,72 +1,72 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* a*10^x vers décimal
|
|
4
|
-
* */
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.scientificToDecimal = void 0;
|
|
7
|
-
const decimal_1 = require("../../math/numbers/decimals/decimal");
|
|
8
|
-
const randint_1 = require("../../math/utils/random/randint");
|
|
9
|
-
const numberNode_1 = require("../../tree/nodes/numbers/numberNode");
|
|
10
|
-
const multiplyNode_1 = require("../../tree/nodes/operators/multiplyNode");
|
|
11
|
-
const powerNode_1 = require("../../tree/nodes/operators/powerNode");
|
|
12
|
-
const exercise_1 = require("../exercise");
|
|
13
|
-
const getDistinctQuestions_1 = require("../utils/getDistinctQuestions");
|
|
14
|
-
const getScientificToDecimalQuestion = () => {
|
|
15
|
-
const decScientific = decimal_1.DecimalConstructor.randomScientific((0, randint_1.randint)(1, 4));
|
|
16
|
-
const tenPower = (0, randint_1.randint)(-5, 6, [0, 1]);
|
|
17
|
-
const answer = decScientific.multiplyByPowerOfTen(tenPower).toTree().toTex();
|
|
18
|
-
const statement = new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(decScientific.value), new powerNode_1.PowerNode(new numberNode_1.NumberNode(10), new numberNode_1.NumberNode(tenPower)));
|
|
19
|
-
const statementTex = statement.toTex();
|
|
20
|
-
const question = {
|
|
21
|
-
instruction: `Donner l'écriture décimale de : $${statementTex}$`,
|
|
22
|
-
startStatement: statementTex,
|
|
23
|
-
answer: answer,
|
|
24
|
-
keys: [],
|
|
25
|
-
answerFormat: "tex",
|
|
26
|
-
identifiers: { decimal: decScientific.value, tenPower },
|
|
27
|
-
};
|
|
28
|
-
return question;
|
|
29
|
-
};
|
|
30
|
-
const getPropositions = (n, { answer, tenPower, decimal }) => {
|
|
31
|
-
const propositions = [];
|
|
32
|
-
const decScientific = new decimal_1.Decimal(decimal);
|
|
33
|
-
(0, exercise_1.addValidProp)(propositions, answer);
|
|
34
|
-
(0, exercise_1.tryToAddWrongProp)(propositions, decScientific.multiplyByPowerOfTen(-tenPower).toTree().toTex());
|
|
35
|
-
while (propositions.length < n) {
|
|
36
|
-
const wrongAnswerTree = decScientific
|
|
37
|
-
.multiplyByPowerOfTen((0, randint_1.randint)(-6, 6, [tenPower]))
|
|
38
|
-
.toTree();
|
|
39
|
-
const wrongAnswer = wrongAnswerTree.toTex();
|
|
40
|
-
(0, exercise_1.tryToAddWrongProp)(propositions, wrongAnswer);
|
|
41
|
-
}
|
|
42
|
-
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
43
|
-
};
|
|
44
|
-
const isAnswerValid = (ans, { answer }) => {
|
|
45
|
-
return ans === answer;
|
|
46
|
-
};
|
|
47
|
-
exports.scientificToDecimal = {
|
|
48
|
-
id: "scientificToDecimal",
|
|
49
|
-
connector: "=",
|
|
50
|
-
label: "Passer d'écriture scientifique à écriture décimale",
|
|
51
|
-
levels: [
|
|
52
|
-
"5ème",
|
|
53
|
-
"4ème",
|
|
54
|
-
"3ème",
|
|
55
|
-
"2nde",
|
|
56
|
-
"CAP",
|
|
57
|
-
"2ndPro",
|
|
58
|
-
"1reESM",
|
|
59
|
-
"1rePro",
|
|
60
|
-
"1reSpé",
|
|
61
|
-
"1reTech",
|
|
62
|
-
"TermPro",
|
|
63
|
-
"TermTech",
|
|
64
|
-
],
|
|
65
|
-
sections: ["Puissances"],
|
|
66
|
-
isSingleStep: true,
|
|
67
|
-
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getScientificToDecimalQuestion, nb),
|
|
68
|
-
qcmTimer: 60,
|
|
69
|
-
freeTimer: 60,
|
|
70
|
-
getPropositions,
|
|
71
|
-
isAnswerValid,
|
|
72
|
-
};
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* a*10^x vers décimal
|
|
4
|
+
* */
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.scientificToDecimal = void 0;
|
|
7
|
+
const decimal_1 = require("../../math/numbers/decimals/decimal");
|
|
8
|
+
const randint_1 = require("../../math/utils/random/randint");
|
|
9
|
+
const numberNode_1 = require("../../tree/nodes/numbers/numberNode");
|
|
10
|
+
const multiplyNode_1 = require("../../tree/nodes/operators/multiplyNode");
|
|
11
|
+
const powerNode_1 = require("../../tree/nodes/operators/powerNode");
|
|
12
|
+
const exercise_1 = require("../exercise");
|
|
13
|
+
const getDistinctQuestions_1 = require("../utils/getDistinctQuestions");
|
|
14
|
+
const getScientificToDecimalQuestion = () => {
|
|
15
|
+
const decScientific = decimal_1.DecimalConstructor.randomScientific((0, randint_1.randint)(1, 4));
|
|
16
|
+
const tenPower = (0, randint_1.randint)(-5, 6, [0, 1]);
|
|
17
|
+
const answer = decScientific.multiplyByPowerOfTen(tenPower).toTree().toTex();
|
|
18
|
+
const statement = new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(decScientific.value), new powerNode_1.PowerNode(new numberNode_1.NumberNode(10), new numberNode_1.NumberNode(tenPower)));
|
|
19
|
+
const statementTex = statement.toTex();
|
|
20
|
+
const question = {
|
|
21
|
+
instruction: `Donner l'écriture décimale de : $${statementTex}$`,
|
|
22
|
+
startStatement: statementTex,
|
|
23
|
+
answer: answer,
|
|
24
|
+
keys: [],
|
|
25
|
+
answerFormat: "tex",
|
|
26
|
+
identifiers: { decimal: decScientific.value, tenPower },
|
|
27
|
+
};
|
|
28
|
+
return question;
|
|
29
|
+
};
|
|
30
|
+
const getPropositions = (n, { answer, tenPower, decimal }) => {
|
|
31
|
+
const propositions = [];
|
|
32
|
+
const decScientific = new decimal_1.Decimal(decimal);
|
|
33
|
+
(0, exercise_1.addValidProp)(propositions, answer);
|
|
34
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, decScientific.multiplyByPowerOfTen(-tenPower).toTree().toTex());
|
|
35
|
+
while (propositions.length < n) {
|
|
36
|
+
const wrongAnswerTree = decScientific
|
|
37
|
+
.multiplyByPowerOfTen((0, randint_1.randint)(-6, 6, [tenPower]))
|
|
38
|
+
.toTree();
|
|
39
|
+
const wrongAnswer = wrongAnswerTree.toTex();
|
|
40
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, wrongAnswer);
|
|
41
|
+
}
|
|
42
|
+
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
43
|
+
};
|
|
44
|
+
const isAnswerValid = (ans, { answer }) => {
|
|
45
|
+
return ans === answer;
|
|
46
|
+
};
|
|
47
|
+
exports.scientificToDecimal = {
|
|
48
|
+
id: "scientificToDecimal",
|
|
49
|
+
connector: "=",
|
|
50
|
+
label: "Passer d'écriture scientifique à écriture décimale",
|
|
51
|
+
levels: [
|
|
52
|
+
"5ème",
|
|
53
|
+
"4ème",
|
|
54
|
+
"3ème",
|
|
55
|
+
"2nde",
|
|
56
|
+
"CAP",
|
|
57
|
+
"2ndPro",
|
|
58
|
+
"1reESM",
|
|
59
|
+
"1rePro",
|
|
60
|
+
"1reSpé",
|
|
61
|
+
"1reTech",
|
|
62
|
+
"TermPro",
|
|
63
|
+
"TermTech",
|
|
64
|
+
],
|
|
65
|
+
sections: ["Puissances"],
|
|
66
|
+
isSingleStep: true,
|
|
67
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getScientificToDecimalQuestion, nb),
|
|
68
|
+
qcmTimer: 60,
|
|
69
|
+
freeTimer: 60,
|
|
70
|
+
getPropositions,
|
|
71
|
+
isAnswerValid,
|
|
72
|
+
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { MathExercise, QCMGenerator, QuestionGenerator, VEA } from "../../exercises/exercise";
|
|
2
|
-
type Identifiers = {
|
|
3
|
-
c: number;
|
|
4
|
-
};
|
|
5
|
-
export declare const getConstantPrimitive: QuestionGenerator<Identifiers>;
|
|
6
|
-
export declare const getConstantPrimitivePropositions: QCMGenerator<Identifiers>;
|
|
7
|
-
export declare const isConstantPrimitiveAnswerValid: VEA<Identifiers>;
|
|
8
|
-
export declare const constantPrimitive: MathExercise<Identifiers>;
|
|
9
|
-
export {};
|
|
1
|
+
import { MathExercise, QCMGenerator, QuestionGenerator, VEA } from "../../exercises/exercise";
|
|
2
|
+
type Identifiers = {
|
|
3
|
+
c: number;
|
|
4
|
+
};
|
|
5
|
+
export declare const getConstantPrimitive: QuestionGenerator<Identifiers>;
|
|
6
|
+
export declare const getConstantPrimitivePropositions: QCMGenerator<Identifiers>;
|
|
7
|
+
export declare const isConstantPrimitiveAnswerValid: VEA<Identifiers>;
|
|
8
|
+
export declare const constantPrimitive: MathExercise<Identifiers>;
|
|
9
|
+
export {};
|
|
10
10
|
//# sourceMappingURL=constantPrimitive.d.ts.map
|
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.constantPrimitive = exports.isConstantPrimitiveAnswerValid = exports.getConstantPrimitivePropositions = exports.getConstantPrimitive = void 0;
|
|
4
|
-
const exercise_1 = require("../../exercises/exercise");
|
|
5
|
-
const getDistinctQuestions_1 = require("../../exercises/utils/getDistinctQuestions");
|
|
6
|
-
const monom_1 = require("../../math/polynomials/monom");
|
|
7
|
-
const randint_1 = require("../../math/utils/random/randint");
|
|
8
|
-
const addNode_1 = require("../../tree/nodes/operators/addNode");
|
|
9
|
-
const variableNode_1 = require("../../tree/nodes/variables/variableNode");
|
|
10
|
-
const shuffle_1 = require("../../utils/shuffle");
|
|
11
|
-
const getConstantPrimitive = () => {
|
|
12
|
-
const c = (0, randint_1.randint)(-19, 20, [0]);
|
|
13
|
-
const monom = new monom_1.Monom(1, c);
|
|
14
|
-
const answer = new addNode_1.AddNode(monom.toTree(), new variableNode_1.VariableNode("C")).toTex();
|
|
15
|
-
const question = {
|
|
16
|
-
instruction: `Déterminer la forme générale des primitives de la fonction constante $f$ définie par $f(x) = ${c}$.`,
|
|
17
|
-
startStatement: `F(x)`,
|
|
18
|
-
answer,
|
|
19
|
-
keys: ["x", "C"],
|
|
20
|
-
answerFormat: "tex",
|
|
21
|
-
identifiers: { c },
|
|
22
|
-
};
|
|
23
|
-
return question;
|
|
24
|
-
};
|
|
25
|
-
exports.getConstantPrimitive = getConstantPrimitive;
|
|
26
|
-
const getConstantPrimitivePropositions = (n, { answer, c }) => {
|
|
27
|
-
const propositions = [];
|
|
28
|
-
(0, exercise_1.addValidProp)(propositions, answer);
|
|
29
|
-
const cNode = new variableNode_1.VariableNode("C");
|
|
30
|
-
while (propositions.length < n) {
|
|
31
|
-
const monom = new monom_1.Monom(1, (0, randint_1.randint)(-9, 10, [-1, 0, 1]));
|
|
32
|
-
const wrongAnswer = new addNode_1.AddNode(monom.toTree(), cNode);
|
|
33
|
-
(0, exercise_1.tryToAddWrongProp)(propositions, wrongAnswer.toTex());
|
|
34
|
-
}
|
|
35
|
-
return (0, shuffle_1.shuffle)(propositions);
|
|
36
|
-
};
|
|
37
|
-
exports.getConstantPrimitivePropositions = getConstantPrimitivePropositions;
|
|
38
|
-
const isConstantPrimitiveAnswerValid = (ans, { c }) => {
|
|
39
|
-
const answer = new addNode_1.AddNode(new monom_1.Monom(1, c).toTree(), new variableNode_1.VariableNode("C"));
|
|
40
|
-
const texs = answer.toAllValidTexs();
|
|
41
|
-
return texs.includes(ans);
|
|
42
|
-
};
|
|
43
|
-
exports.isConstantPrimitiveAnswerValid = isConstantPrimitiveAnswerValid;
|
|
44
|
-
exports.constantPrimitive = {
|
|
45
|
-
id: "constantPrimitive",
|
|
46
|
-
connector: "=",
|
|
47
|
-
label: "Primitive d'une constante",
|
|
48
|
-
levels: ["TermSpé", "MathComp"],
|
|
49
|
-
sections: ["Primitives"],
|
|
50
|
-
isSingleStep: false,
|
|
51
|
-
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(exports.getConstantPrimitive, nb),
|
|
52
|
-
qcmTimer: 60,
|
|
53
|
-
freeTimer: 60,
|
|
54
|
-
getPropositions: exports.getConstantPrimitivePropositions,
|
|
55
|
-
isAnswerValid: exports.isConstantPrimitiveAnswerValid,
|
|
56
|
-
};
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.constantPrimitive = exports.isConstantPrimitiveAnswerValid = exports.getConstantPrimitivePropositions = exports.getConstantPrimitive = void 0;
|
|
4
|
+
const exercise_1 = require("../../exercises/exercise");
|
|
5
|
+
const getDistinctQuestions_1 = require("../../exercises/utils/getDistinctQuestions");
|
|
6
|
+
const monom_1 = require("../../math/polynomials/monom");
|
|
7
|
+
const randint_1 = require("../../math/utils/random/randint");
|
|
8
|
+
const addNode_1 = require("../../tree/nodes/operators/addNode");
|
|
9
|
+
const variableNode_1 = require("../../tree/nodes/variables/variableNode");
|
|
10
|
+
const shuffle_1 = require("../../utils/shuffle");
|
|
11
|
+
const getConstantPrimitive = () => {
|
|
12
|
+
const c = (0, randint_1.randint)(-19, 20, [0]);
|
|
13
|
+
const monom = new monom_1.Monom(1, c);
|
|
14
|
+
const answer = new addNode_1.AddNode(monom.toTree(), new variableNode_1.VariableNode("C")).toTex();
|
|
15
|
+
const question = {
|
|
16
|
+
instruction: `Déterminer la forme générale des primitives de la fonction constante $f$ définie par $f(x) = ${c}$.`,
|
|
17
|
+
startStatement: `F(x)`,
|
|
18
|
+
answer,
|
|
19
|
+
keys: ["x", "C"],
|
|
20
|
+
answerFormat: "tex",
|
|
21
|
+
identifiers: { c },
|
|
22
|
+
};
|
|
23
|
+
return question;
|
|
24
|
+
};
|
|
25
|
+
exports.getConstantPrimitive = getConstantPrimitive;
|
|
26
|
+
const getConstantPrimitivePropositions = (n, { answer, c }) => {
|
|
27
|
+
const propositions = [];
|
|
28
|
+
(0, exercise_1.addValidProp)(propositions, answer);
|
|
29
|
+
const cNode = new variableNode_1.VariableNode("C");
|
|
30
|
+
while (propositions.length < n) {
|
|
31
|
+
const monom = new monom_1.Monom(1, (0, randint_1.randint)(-9, 10, [-1, 0, 1]));
|
|
32
|
+
const wrongAnswer = new addNode_1.AddNode(monom.toTree(), cNode);
|
|
33
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, wrongAnswer.toTex());
|
|
34
|
+
}
|
|
35
|
+
return (0, shuffle_1.shuffle)(propositions);
|
|
36
|
+
};
|
|
37
|
+
exports.getConstantPrimitivePropositions = getConstantPrimitivePropositions;
|
|
38
|
+
const isConstantPrimitiveAnswerValid = (ans, { c }) => {
|
|
39
|
+
const answer = new addNode_1.AddNode(new monom_1.Monom(1, c).toTree(), new variableNode_1.VariableNode("C"));
|
|
40
|
+
const texs = answer.toAllValidTexs();
|
|
41
|
+
return texs.includes(ans);
|
|
42
|
+
};
|
|
43
|
+
exports.isConstantPrimitiveAnswerValid = isConstantPrimitiveAnswerValid;
|
|
44
|
+
exports.constantPrimitive = {
|
|
45
|
+
id: "constantPrimitive",
|
|
46
|
+
connector: "=",
|
|
47
|
+
label: "Primitive d'une constante",
|
|
48
|
+
levels: ["TermSpé", "MathComp"],
|
|
49
|
+
sections: ["Primitives"],
|
|
50
|
+
isSingleStep: false,
|
|
51
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(exports.getConstantPrimitive, nb),
|
|
52
|
+
qcmTimer: 60,
|
|
53
|
+
freeTimer: 60,
|
|
54
|
+
getPropositions: exports.getConstantPrimitivePropositions,
|
|
55
|
+
isAnswerValid: exports.isConstantPrimitiveAnswerValid,
|
|
56
|
+
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { MathExercise, QCMGenerator, QuestionGenerator, VEA } from "../../exercises/exercise";
|
|
2
|
-
type Identifiers = {
|
|
3
|
-
coeffs: number[];
|
|
4
|
-
};
|
|
5
|
-
export declare const getExpUPrimitive: QuestionGenerator<Identifiers>;
|
|
6
|
-
export declare const getExpUPrimitivePropositions: QCMGenerator<Identifiers>;
|
|
7
|
-
export declare const isExpUPrimitiveAnswerValid: VEA<Identifiers>;
|
|
8
|
-
export declare const expUPrimitive: MathExercise<Identifiers>;
|
|
9
|
-
export {};
|
|
1
|
+
import { MathExercise, QCMGenerator, QuestionGenerator, VEA } from "../../exercises/exercise";
|
|
2
|
+
type Identifiers = {
|
|
3
|
+
coeffs: number[];
|
|
4
|
+
};
|
|
5
|
+
export declare const getExpUPrimitive: QuestionGenerator<Identifiers>;
|
|
6
|
+
export declare const getExpUPrimitivePropositions: QCMGenerator<Identifiers>;
|
|
7
|
+
export declare const isExpUPrimitiveAnswerValid: VEA<Identifiers>;
|
|
8
|
+
export declare const expUPrimitive: MathExercise<Identifiers>;
|
|
9
|
+
export {};
|
|
10
10
|
//# sourceMappingURL=expUPrimitive.d.ts.map
|
|
@@ -1,76 +1,76 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.expUPrimitive = exports.isExpUPrimitiveAnswerValid = exports.getExpUPrimitivePropositions = exports.getExpUPrimitive = void 0;
|
|
4
|
-
const exercise_1 = require("../../exercises/exercise");
|
|
5
|
-
const getDistinctQuestions_1 = require("../../exercises/utils/getDistinctQuestions");
|
|
6
|
-
const polynomial_1 = require("../../math/polynomials/polynomial");
|
|
7
|
-
const randint_1 = require("../../math/utils/random/randint");
|
|
8
|
-
const expNode_1 = require("../../tree/nodes/functions/expNode");
|
|
9
|
-
const numberNode_1 = require("../../tree/nodes/numbers/numberNode");
|
|
10
|
-
const addNode_1 = require("../../tree/nodes/operators/addNode");
|
|
11
|
-
const fractionNode_1 = require("../../tree/nodes/operators/fractionNode");
|
|
12
|
-
const multiplyNode_1 = require("../../tree/nodes/operators/multiplyNode");
|
|
13
|
-
const variableNode_1 = require("../../tree/nodes/variables/variableNode");
|
|
14
|
-
const getExpUPrimitive = () => {
|
|
15
|
-
const u = polynomial_1.PolynomialConstructor.randomWithOrder((0, randint_1.randint)(1, 3));
|
|
16
|
-
const integratedFuction = new expNode_1.ExpNode(u.toTree());
|
|
17
|
-
const selectedFunction = new multiplyNode_1.MultiplyNode(u.derivate().toTree(), integratedFuction);
|
|
18
|
-
const answer = new addNode_1.AddNode(integratedFuction, new variableNode_1.VariableNode("C")).toTex();
|
|
19
|
-
const question = {
|
|
20
|
-
instruction: `Déterminer la forme générale des primitives de la fonction $f$ définie par $f(x) = ${selectedFunction.toTex()}$.`,
|
|
21
|
-
startStatement: `F(x)`,
|
|
22
|
-
answer,
|
|
23
|
-
keys: ["x", "C", "epower", "exp"],
|
|
24
|
-
answerFormat: "tex",
|
|
25
|
-
identifiers: { coeffs: u.coefficients },
|
|
26
|
-
};
|
|
27
|
-
return question;
|
|
28
|
-
};
|
|
29
|
-
exports.getExpUPrimitive = getExpUPrimitive;
|
|
30
|
-
const getExpUPrimitivePropositions = (n, { answer, coeffs }) => {
|
|
31
|
-
const propositions = [];
|
|
32
|
-
(0, exercise_1.addValidProp)(propositions, answer);
|
|
33
|
-
const u = new polynomial_1.Polynomial(coeffs);
|
|
34
|
-
const uTree = u.toTree();
|
|
35
|
-
const expXTree = new expNode_1.ExpNode(new variableNode_1.VariableNode("x"));
|
|
36
|
-
const expUTree = new expNode_1.ExpNode(uTree);
|
|
37
|
-
const invUTree = new fractionNode_1.FractionNode(new numberNode_1.NumberNode(1), uTree);
|
|
38
|
-
const wrongIntegrals = [
|
|
39
|
-
new multiplyNode_1.MultiplyNode(uTree, expUTree),
|
|
40
|
-
new multiplyNode_1.MultiplyNode(u.derivate().toTree(), expUTree),
|
|
41
|
-
new multiplyNode_1.MultiplyNode(uTree, expXTree),
|
|
42
|
-
new multiplyNode_1.MultiplyNode(invUTree, expXTree),
|
|
43
|
-
new multiplyNode_1.MultiplyNode(invUTree, expUTree),
|
|
44
|
-
new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode((0, randint_1.randint)(-9, 10, [0])), expUTree),
|
|
45
|
-
];
|
|
46
|
-
const cNode = new variableNode_1.VariableNode("c");
|
|
47
|
-
wrongIntegrals.forEach((node) => (0, exercise_1.tryToAddWrongProp)(propositions, new addNode_1.AddNode(node, cNode).toTex()));
|
|
48
|
-
while (propositions.length < n) {
|
|
49
|
-
let wrongIntegral = new addNode_1.AddNode(new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode((0, randint_1.randint)(-10, 10, [0])), expXTree), cNode).toTex();
|
|
50
|
-
(0, exercise_1.tryToAddWrongProp)(propositions, wrongIntegral);
|
|
51
|
-
}
|
|
52
|
-
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
53
|
-
};
|
|
54
|
-
exports.getExpUPrimitivePropositions = getExpUPrimitivePropositions;
|
|
55
|
-
const isExpUPrimitiveAnswerValid = (ans, { coeffs }) => {
|
|
56
|
-
const u = new polynomial_1.Polynomial(coeffs);
|
|
57
|
-
const integratedFuction = new expNode_1.ExpNode(u.toTree({ forbidPowerToProduct: true }));
|
|
58
|
-
const answer = new addNode_1.AddNode(integratedFuction, new variableNode_1.VariableNode("C"));
|
|
59
|
-
const texs = answer.toAllValidTexs();
|
|
60
|
-
console.log(texs);
|
|
61
|
-
return texs.includes(ans);
|
|
62
|
-
};
|
|
63
|
-
exports.isExpUPrimitiveAnswerValid = isExpUPrimitiveAnswerValid;
|
|
64
|
-
exports.expUPrimitive = {
|
|
65
|
-
id: "expUPrimitive",
|
|
66
|
-
connector: "=",
|
|
67
|
-
label: "Primitive de $u'\\exp(u)$",
|
|
68
|
-
levels: ["TermSpé", "MathComp"],
|
|
69
|
-
sections: ["Primitives", "Exponentielle"],
|
|
70
|
-
isSingleStep: false,
|
|
71
|
-
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(exports.getExpUPrimitive, nb),
|
|
72
|
-
qcmTimer: 60,
|
|
73
|
-
freeTimer: 60,
|
|
74
|
-
getPropositions: exports.getExpUPrimitivePropositions,
|
|
75
|
-
isAnswerValid: exports.isExpUPrimitiveAnswerValid,
|
|
76
|
-
};
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.expUPrimitive = exports.isExpUPrimitiveAnswerValid = exports.getExpUPrimitivePropositions = exports.getExpUPrimitive = void 0;
|
|
4
|
+
const exercise_1 = require("../../exercises/exercise");
|
|
5
|
+
const getDistinctQuestions_1 = require("../../exercises/utils/getDistinctQuestions");
|
|
6
|
+
const polynomial_1 = require("../../math/polynomials/polynomial");
|
|
7
|
+
const randint_1 = require("../../math/utils/random/randint");
|
|
8
|
+
const expNode_1 = require("../../tree/nodes/functions/expNode");
|
|
9
|
+
const numberNode_1 = require("../../tree/nodes/numbers/numberNode");
|
|
10
|
+
const addNode_1 = require("../../tree/nodes/operators/addNode");
|
|
11
|
+
const fractionNode_1 = require("../../tree/nodes/operators/fractionNode");
|
|
12
|
+
const multiplyNode_1 = require("../../tree/nodes/operators/multiplyNode");
|
|
13
|
+
const variableNode_1 = require("../../tree/nodes/variables/variableNode");
|
|
14
|
+
const getExpUPrimitive = () => {
|
|
15
|
+
const u = polynomial_1.PolynomialConstructor.randomWithOrder((0, randint_1.randint)(1, 3));
|
|
16
|
+
const integratedFuction = new expNode_1.ExpNode(u.toTree());
|
|
17
|
+
const selectedFunction = new multiplyNode_1.MultiplyNode(u.derivate().toTree(), integratedFuction);
|
|
18
|
+
const answer = new addNode_1.AddNode(integratedFuction, new variableNode_1.VariableNode("C")).toTex();
|
|
19
|
+
const question = {
|
|
20
|
+
instruction: `Déterminer la forme générale des primitives de la fonction $f$ définie par $f(x) = ${selectedFunction.toTex()}$.`,
|
|
21
|
+
startStatement: `F(x)`,
|
|
22
|
+
answer,
|
|
23
|
+
keys: ["x", "C", "epower", "exp"],
|
|
24
|
+
answerFormat: "tex",
|
|
25
|
+
identifiers: { coeffs: u.coefficients },
|
|
26
|
+
};
|
|
27
|
+
return question;
|
|
28
|
+
};
|
|
29
|
+
exports.getExpUPrimitive = getExpUPrimitive;
|
|
30
|
+
const getExpUPrimitivePropositions = (n, { answer, coeffs }) => {
|
|
31
|
+
const propositions = [];
|
|
32
|
+
(0, exercise_1.addValidProp)(propositions, answer);
|
|
33
|
+
const u = new polynomial_1.Polynomial(coeffs);
|
|
34
|
+
const uTree = u.toTree();
|
|
35
|
+
const expXTree = new expNode_1.ExpNode(new variableNode_1.VariableNode("x"));
|
|
36
|
+
const expUTree = new expNode_1.ExpNode(uTree);
|
|
37
|
+
const invUTree = new fractionNode_1.FractionNode(new numberNode_1.NumberNode(1), uTree);
|
|
38
|
+
const wrongIntegrals = [
|
|
39
|
+
new multiplyNode_1.MultiplyNode(uTree, expUTree),
|
|
40
|
+
new multiplyNode_1.MultiplyNode(u.derivate().toTree(), expUTree),
|
|
41
|
+
new multiplyNode_1.MultiplyNode(uTree, expXTree),
|
|
42
|
+
new multiplyNode_1.MultiplyNode(invUTree, expXTree),
|
|
43
|
+
new multiplyNode_1.MultiplyNode(invUTree, expUTree),
|
|
44
|
+
new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode((0, randint_1.randint)(-9, 10, [0])), expUTree),
|
|
45
|
+
];
|
|
46
|
+
const cNode = new variableNode_1.VariableNode("c");
|
|
47
|
+
wrongIntegrals.forEach((node) => (0, exercise_1.tryToAddWrongProp)(propositions, new addNode_1.AddNode(node, cNode).toTex()));
|
|
48
|
+
while (propositions.length < n) {
|
|
49
|
+
let wrongIntegral = new addNode_1.AddNode(new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode((0, randint_1.randint)(-10, 10, [0])), expXTree), cNode).toTex();
|
|
50
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, wrongIntegral);
|
|
51
|
+
}
|
|
52
|
+
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
53
|
+
};
|
|
54
|
+
exports.getExpUPrimitivePropositions = getExpUPrimitivePropositions;
|
|
55
|
+
const isExpUPrimitiveAnswerValid = (ans, { coeffs }) => {
|
|
56
|
+
const u = new polynomial_1.Polynomial(coeffs);
|
|
57
|
+
const integratedFuction = new expNode_1.ExpNode(u.toTree({ forbidPowerToProduct: true }));
|
|
58
|
+
const answer = new addNode_1.AddNode(integratedFuction, new variableNode_1.VariableNode("C"));
|
|
59
|
+
const texs = answer.toAllValidTexs();
|
|
60
|
+
console.log(texs);
|
|
61
|
+
return texs.includes(ans);
|
|
62
|
+
};
|
|
63
|
+
exports.isExpUPrimitiveAnswerValid = isExpUPrimitiveAnswerValid;
|
|
64
|
+
exports.expUPrimitive = {
|
|
65
|
+
id: "expUPrimitive",
|
|
66
|
+
connector: "=",
|
|
67
|
+
label: "Primitive de $u'\\exp(u)$",
|
|
68
|
+
levels: ["TermSpé", "MathComp"],
|
|
69
|
+
sections: ["Primitives", "Exponentielle"],
|
|
70
|
+
isSingleStep: false,
|
|
71
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(exports.getExpUPrimitive, nb),
|
|
72
|
+
qcmTimer: 60,
|
|
73
|
+
freeTimer: 60,
|
|
74
|
+
getPropositions: exports.getExpUPrimitivePropositions,
|
|
75
|
+
isAnswerValid: exports.isExpUPrimitiveAnswerValid,
|
|
76
|
+
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { MathExercise, QCMGenerator, QuestionGenerator, VEA } from "../../exercises/exercise";
|
|
2
|
-
type Identifiers = {
|
|
3
|
-
a: number;
|
|
4
|
-
};
|
|
5
|
-
export declare const getExponentialPrimitive: QuestionGenerator<Identifiers>;
|
|
6
|
-
export declare const getExponentialPrimitivePropositions: QCMGenerator<Identifiers>;
|
|
7
|
-
export declare const isExponentialPrimitiveAnswerValid: VEA<Identifiers>;
|
|
8
|
-
export declare const exponentialPrimitive: MathExercise<Identifiers>;
|
|
9
|
-
export {};
|
|
1
|
+
import { MathExercise, QCMGenerator, QuestionGenerator, VEA } from "../../exercises/exercise";
|
|
2
|
+
type Identifiers = {
|
|
3
|
+
a: number;
|
|
4
|
+
};
|
|
5
|
+
export declare const getExponentialPrimitive: QuestionGenerator<Identifiers>;
|
|
6
|
+
export declare const getExponentialPrimitivePropositions: QCMGenerator<Identifiers>;
|
|
7
|
+
export declare const isExponentialPrimitiveAnswerValid: VEA<Identifiers>;
|
|
8
|
+
export declare const exponentialPrimitive: MathExercise<Identifiers>;
|
|
9
|
+
export {};
|
|
10
10
|
//# sourceMappingURL=exponentialPrimitive.d.ts.map
|
|
@@ -1,72 +1,72 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.exponentialPrimitive = exports.isExponentialPrimitiveAnswerValid = exports.getExponentialPrimitivePropositions = exports.getExponentialPrimitive = 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 expNode_1 = require("../../tree/nodes/functions/expNode");
|
|
8
|
-
const numberNode_1 = require("../../tree/nodes/numbers/numberNode");
|
|
9
|
-
const addNode_1 = require("../../tree/nodes/operators/addNode");
|
|
10
|
-
const fractionNode_1 = require("../../tree/nodes/operators/fractionNode");
|
|
11
|
-
const multiplyNode_1 = require("../../tree/nodes/operators/multiplyNode");
|
|
12
|
-
const powerNode_1 = require("../../tree/nodes/operators/powerNode");
|
|
13
|
-
const variableNode_1 = require("../../tree/nodes/variables/variableNode");
|
|
14
|
-
const getExponentialPrimitive = () => {
|
|
15
|
-
const a = (0, randint_1.randint)(-20, 20, [0]);
|
|
16
|
-
const integratedFuction = new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(a), new expNode_1.ExpNode(new variableNode_1.VariableNode("x")));
|
|
17
|
-
const answer = new addNode_1.AddNode(integratedFuction, new variableNode_1.VariableNode("C")).toTex();
|
|
18
|
-
const question = {
|
|
19
|
-
instruction: `Déterminer la forme générale des primitives de la fonction $f$ définie par $f(x) = ${integratedFuction.toTex()}$.`,
|
|
20
|
-
startStatement: `F(x)`,
|
|
21
|
-
answer,
|
|
22
|
-
keys: ["x", "C", "epower", "exp"],
|
|
23
|
-
answerFormat: "tex",
|
|
24
|
-
identifiers: { a },
|
|
25
|
-
};
|
|
26
|
-
return question;
|
|
27
|
-
};
|
|
28
|
-
exports.getExponentialPrimitive = getExponentialPrimitive;
|
|
29
|
-
const getExponentialPrimitivePropositions = (n, { answer, a }) => {
|
|
30
|
-
const propositions = [];
|
|
31
|
-
(0, exercise_1.addValidProp)(propositions, answer);
|
|
32
|
-
const aNode = new numberNode_1.NumberNode(a);
|
|
33
|
-
const xNode = new variableNode_1.VariableNode("x");
|
|
34
|
-
const expXTree = new expNode_1.ExpNode(new variableNode_1.VariableNode("x"));
|
|
35
|
-
const wrongIntegrals = [
|
|
36
|
-
new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(-a), expXTree),
|
|
37
|
-
new multiplyNode_1.MultiplyNode(aNode, new expNode_1.ExpNode(new multiplyNode_1.MultiplyNode(aNode, xNode))),
|
|
38
|
-
new multiplyNode_1.MultiplyNode(aNode, new expNode_1.ExpNode(new fractionNode_1.FractionNode(xNode, aNode))),
|
|
39
|
-
new multiplyNode_1.MultiplyNode(aNode, new expNode_1.ExpNode(new addNode_1.AddNode(xNode, aNode))),
|
|
40
|
-
new multiplyNode_1.MultiplyNode(aNode, new expNode_1.ExpNode(new powerNode_1.PowerNode(xNode, aNode))),
|
|
41
|
-
expXTree,
|
|
42
|
-
];
|
|
43
|
-
const cNode = new variableNode_1.VariableNode("C");
|
|
44
|
-
wrongIntegrals.forEach((node) => (0, exercise_1.tryToAddWrongProp)(propositions, new addNode_1.AddNode(node, cNode).toTex()));
|
|
45
|
-
while (propositions.length < n) {
|
|
46
|
-
let wrongIntegral = new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode((0, randint_1.randint)(-10, 10, [0])), expXTree);
|
|
47
|
-
(0, exercise_1.tryToAddWrongProp)(propositions, new addNode_1.AddNode(wrongIntegral, cNode).toTex());
|
|
48
|
-
}
|
|
49
|
-
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
50
|
-
};
|
|
51
|
-
exports.getExponentialPrimitivePropositions = getExponentialPrimitivePropositions;
|
|
52
|
-
const isExponentialPrimitiveAnswerValid = (ans, { a }) => {
|
|
53
|
-
const integratedFuction = new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(a), new expNode_1.ExpNode(new variableNode_1.VariableNode("x")));
|
|
54
|
-
const answer = new addNode_1.AddNode(integratedFuction, new variableNode_1.VariableNode("C"));
|
|
55
|
-
const texs = answer.toAllValidTexs();
|
|
56
|
-
console.log(texs);
|
|
57
|
-
return texs.includes(ans);
|
|
58
|
-
};
|
|
59
|
-
exports.isExponentialPrimitiveAnswerValid = isExponentialPrimitiveAnswerValid;
|
|
60
|
-
exports.exponentialPrimitive = {
|
|
61
|
-
id: "exponentialPrimitive",
|
|
62
|
-
connector: "=",
|
|
63
|
-
label: "Primitive de la fonction exponentielle",
|
|
64
|
-
levels: ["TermSpé", "MathComp"],
|
|
65
|
-
sections: ["Primitives", "Exponentielle"],
|
|
66
|
-
isSingleStep: false,
|
|
67
|
-
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(exports.getExponentialPrimitive, nb),
|
|
68
|
-
qcmTimer: 60,
|
|
69
|
-
freeTimer: 60,
|
|
70
|
-
getPropositions: exports.getExponentialPrimitivePropositions,
|
|
71
|
-
isAnswerValid: exports.isExponentialPrimitiveAnswerValid,
|
|
72
|
-
};
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.exponentialPrimitive = exports.isExponentialPrimitiveAnswerValid = exports.getExponentialPrimitivePropositions = exports.getExponentialPrimitive = 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 expNode_1 = require("../../tree/nodes/functions/expNode");
|
|
8
|
+
const numberNode_1 = require("../../tree/nodes/numbers/numberNode");
|
|
9
|
+
const addNode_1 = require("../../tree/nodes/operators/addNode");
|
|
10
|
+
const fractionNode_1 = require("../../tree/nodes/operators/fractionNode");
|
|
11
|
+
const multiplyNode_1 = require("../../tree/nodes/operators/multiplyNode");
|
|
12
|
+
const powerNode_1 = require("../../tree/nodes/operators/powerNode");
|
|
13
|
+
const variableNode_1 = require("../../tree/nodes/variables/variableNode");
|
|
14
|
+
const getExponentialPrimitive = () => {
|
|
15
|
+
const a = (0, randint_1.randint)(-20, 20, [0]);
|
|
16
|
+
const integratedFuction = new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(a), new expNode_1.ExpNode(new variableNode_1.VariableNode("x")));
|
|
17
|
+
const answer = new addNode_1.AddNode(integratedFuction, new variableNode_1.VariableNode("C")).toTex();
|
|
18
|
+
const question = {
|
|
19
|
+
instruction: `Déterminer la forme générale des primitives de la fonction $f$ définie par $f(x) = ${integratedFuction.toTex()}$.`,
|
|
20
|
+
startStatement: `F(x)`,
|
|
21
|
+
answer,
|
|
22
|
+
keys: ["x", "C", "epower", "exp"],
|
|
23
|
+
answerFormat: "tex",
|
|
24
|
+
identifiers: { a },
|
|
25
|
+
};
|
|
26
|
+
return question;
|
|
27
|
+
};
|
|
28
|
+
exports.getExponentialPrimitive = getExponentialPrimitive;
|
|
29
|
+
const getExponentialPrimitivePropositions = (n, { answer, a }) => {
|
|
30
|
+
const propositions = [];
|
|
31
|
+
(0, exercise_1.addValidProp)(propositions, answer);
|
|
32
|
+
const aNode = new numberNode_1.NumberNode(a);
|
|
33
|
+
const xNode = new variableNode_1.VariableNode("x");
|
|
34
|
+
const expXTree = new expNode_1.ExpNode(new variableNode_1.VariableNode("x"));
|
|
35
|
+
const wrongIntegrals = [
|
|
36
|
+
new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(-a), expXTree),
|
|
37
|
+
new multiplyNode_1.MultiplyNode(aNode, new expNode_1.ExpNode(new multiplyNode_1.MultiplyNode(aNode, xNode))),
|
|
38
|
+
new multiplyNode_1.MultiplyNode(aNode, new expNode_1.ExpNode(new fractionNode_1.FractionNode(xNode, aNode))),
|
|
39
|
+
new multiplyNode_1.MultiplyNode(aNode, new expNode_1.ExpNode(new addNode_1.AddNode(xNode, aNode))),
|
|
40
|
+
new multiplyNode_1.MultiplyNode(aNode, new expNode_1.ExpNode(new powerNode_1.PowerNode(xNode, aNode))),
|
|
41
|
+
expXTree,
|
|
42
|
+
];
|
|
43
|
+
const cNode = new variableNode_1.VariableNode("C");
|
|
44
|
+
wrongIntegrals.forEach((node) => (0, exercise_1.tryToAddWrongProp)(propositions, new addNode_1.AddNode(node, cNode).toTex()));
|
|
45
|
+
while (propositions.length < n) {
|
|
46
|
+
let wrongIntegral = new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode((0, randint_1.randint)(-10, 10, [0])), expXTree);
|
|
47
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, new addNode_1.AddNode(wrongIntegral, cNode).toTex());
|
|
48
|
+
}
|
|
49
|
+
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
50
|
+
};
|
|
51
|
+
exports.getExponentialPrimitivePropositions = getExponentialPrimitivePropositions;
|
|
52
|
+
const isExponentialPrimitiveAnswerValid = (ans, { a }) => {
|
|
53
|
+
const integratedFuction = new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(a), new expNode_1.ExpNode(new variableNode_1.VariableNode("x")));
|
|
54
|
+
const answer = new addNode_1.AddNode(integratedFuction, new variableNode_1.VariableNode("C"));
|
|
55
|
+
const texs = answer.toAllValidTexs();
|
|
56
|
+
console.log(texs);
|
|
57
|
+
return texs.includes(ans);
|
|
58
|
+
};
|
|
59
|
+
exports.isExponentialPrimitiveAnswerValid = isExponentialPrimitiveAnswerValid;
|
|
60
|
+
exports.exponentialPrimitive = {
|
|
61
|
+
id: "exponentialPrimitive",
|
|
62
|
+
connector: "=",
|
|
63
|
+
label: "Primitive de la fonction exponentielle",
|
|
64
|
+
levels: ["TermSpé", "MathComp"],
|
|
65
|
+
sections: ["Primitives", "Exponentielle"],
|
|
66
|
+
isSingleStep: false,
|
|
67
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(exports.getExponentialPrimitive, nb),
|
|
68
|
+
qcmTimer: 60,
|
|
69
|
+
freeTimer: 60,
|
|
70
|
+
getPropositions: exports.getExponentialPrimitivePropositions,
|
|
71
|
+
isAnswerValid: exports.isExponentialPrimitiveAnswerValid,
|
|
72
|
+
};
|