math-exercises 3.0.199 → 3.0.201
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/exercises/exercise.d.ts +14 -1
- package/lib/exercises/exercise.d.ts.map +1 -1
- package/lib/exercises/math/_debug/debugReorder1.d.ts +8 -0
- package/lib/exercises/math/_debug/debugReorder1.d.ts.map +1 -0
- package/lib/exercises/math/_debug/debugReorder1.js +81 -0
- package/lib/exercises/math/_debug/debugReorder2.d.ts +10 -0
- package/lib/exercises/math/_debug/debugReorder2.d.ts.map +1 -0
- package/lib/exercises/math/_debug/debugReorder2.js +88 -0
- package/lib/exercises/math/_debug/debugReorder3.d.ts +10 -0
- package/lib/exercises/math/_debug/debugReorder3.d.ts.map +1 -0
- package/lib/exercises/math/_debug/debugReorder3.js +81 -0
- package/lib/exercises/math/_debug/index.d.ts +3 -1
- package/lib/exercises/math/_debug/index.d.ts.map +1 -1
- package/lib/exercises/math/_debug/index.js +3 -1
- package/lib/exercises/math/calcul/factorial/index.d.ts +2 -0
- package/lib/exercises/math/calcul/factorial/index.d.ts.map +1 -0
- package/lib/exercises/math/calcul/factorial/index.js +1 -0
- package/lib/exercises/math/calcul/factorial/simplifyQuotientOfFactorialToProduct.d.ts +8 -0
- package/lib/exercises/math/calcul/factorial/simplifyQuotientOfFactorialToProduct.d.ts.map +1 -0
- package/lib/exercises/math/calcul/factorial/simplifyQuotientOfFactorialToProduct.js +199 -0
- package/lib/exercises/math/calcul/fractions/fractionsSumsPrimeDenominators.js +1 -1
- package/lib/exercises/math/calcul/index.d.ts +1 -0
- package/lib/exercises/math/calcul/index.d.ts.map +1 -1
- package/lib/exercises/math/calcul/index.js +1 -0
- package/lib/exercises/math/calculLitteral/inequations/index.d.ts +1 -0
- package/lib/exercises/math/calculLitteral/inequations/index.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/inequations/index.js +1 -0
- package/lib/exercises/math/calculLitteral/inequations/inequationCenteredInterval.d.ts +14 -0
- package/lib/exercises/math/calculLitteral/inequations/inequationCenteredInterval.d.ts.map +1 -0
- package/lib/exercises/math/calculLitteral/inequations/inequationCenteredInterval.js +263 -0
- package/lib/exercises/math/combinatory/anagrams.d.ts.map +1 -1
- package/lib/exercises/math/combinatory/anagrams.js +89 -68
- package/lib/exercises/math/combinatory/combination/index.d.ts +3 -0
- package/lib/exercises/math/combinatory/combination/index.d.ts.map +1 -0
- package/lib/exercises/math/combinatory/combination/index.js +2 -0
- package/lib/exercises/math/combinatory/combination/mentalCalculateCombination.d.ts +11 -0
- package/lib/exercises/math/combinatory/combination/mentalCalculateCombination.d.ts.map +1 -0
- package/lib/exercises/math/combinatory/combination/mentalCalculateCombination.js +225 -0
- package/lib/exercises/math/combinatory/combination/writeCombinationFormulaUsingFactorial.d.ts +13 -0
- package/lib/exercises/math/combinatory/combination/writeCombinationFormulaUsingFactorial.d.ts.map +1 -0
- package/lib/exercises/math/combinatory/combination/writeCombinationFormulaUsingFactorial.js +285 -0
- package/lib/exercises/math/combinatory/index.d.ts +1 -0
- package/lib/exercises/math/combinatory/index.d.ts.map +1 -1
- package/lib/exercises/math/combinatory/index.js +1 -0
- package/lib/exercises/math/dataRepresentations/index.d.ts +1 -1
- package/lib/exercises/math/dataRepresentations/index.d.ts.map +1 -1
- package/lib/exercises/math/dataRepresentations/index.js +5 -1
- package/lib/exercises/math/dataRepresentations/scatterPlot/index.d.ts +0 -2
- package/lib/exercises/math/dataRepresentations/scatterPlot/index.d.ts.map +1 -1
- package/lib/exercises/math/dataRepresentations/scatterPlot/index.js +2 -2
- package/lib/exercises/math/dataRepresentations/scatterPlot/scatterPlotInterpreting.d.ts.map +1 -1
- package/lib/exercises/math/dataRepresentations/scatterPlot/scatterPlotInterpreting.js +1 -1
- package/lib/exercises/math/derivation/derivative/trigo/index.d.ts +2 -0
- package/lib/exercises/math/derivation/derivative/trigo/index.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/trigo/index.js +3 -0
- package/lib/exercises/math/derivation/derivative/trigo/productOfSinAXPlusBCosCXPlusDDerivative.d.ts +9 -0
- package/lib/exercises/math/derivation/derivative/trigo/productOfSinAXPlusBCosCXPlusDDerivative.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/trigo/productOfSinAXPlusBCosCXPlusDDerivative.js +209 -0
- package/lib/exercises/math/derivation/derivative/trigo/sinAndCosMixedWithSquareDerivative.d.ts +9 -0
- package/lib/exercises/math/derivation/derivative/trigo/sinAndCosMixedWithSquareDerivative.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/trigo/sinAndCosMixedWithSquareDerivative.js +359 -0
- package/lib/exercises/math/derivation/derivative/trigo/sinCosDerivativeRewriteUsingCos2PlusSin2Equals1.d.ts +11 -0
- package/lib/exercises/math/derivation/derivative/trigo/sinCosDerivativeRewriteUsingCos2PlusSin2Equals1.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/trigo/sinCosDerivativeRewriteUsingCos2PlusSin2Equals1.js +445 -0
- package/lib/exercises/math/derivation/problems/index.d.ts +0 -1
- package/lib/exercises/math/derivation/problems/index.d.ts.map +1 -1
- package/lib/exercises/math/derivation/problems/index.js +1 -1
- package/lib/exercises/math/derivation/problems/problemMovementOnLineFindSpeedAtPoint.d.ts.map +1 -1
- package/lib/exercises/math/derivation/problems/problemMovementOnLineFindSpeedAtPoint.js +5 -2
- package/lib/exercises/math/derivation/tangent/index.d.ts +0 -1
- package/lib/exercises/math/derivation/tangent/index.d.ts.map +1 -1
- package/lib/exercises/math/derivation/tangent/index.js +1 -1
- package/lib/exercises/math/derivation/variations/index.d.ts +1 -1
- package/lib/exercises/math/derivation/variations/index.d.ts.map +1 -1
- package/lib/exercises/math/derivation/variations/index.js +2 -1
- package/lib/exercises/math/derivation/variations/signVarTableAffinePlusCXLogX.d.ts +10 -0
- package/lib/exercises/math/derivation/variations/signVarTableAffinePlusCXLogX.d.ts.map +1 -0
- package/lib/exercises/math/derivation/variations/signVarTableAffinePlusCXLogX.js +222 -0
- package/lib/exercises/math/derivation/variations/signVarTableProductFExp.js +1 -1
- package/lib/exercises/math/derivation/variations/signVarTableQuotientFExp.js +1 -1
- package/lib/exercises/math/functions/affines/affineVarTableOnBoundedInterval.d.ts.map +1 -1
- package/lib/exercises/math/functions/affines/affineVarTableOnBoundedInterval.js +2 -3
- package/lib/exercises/math/functions/affines/index.d.ts +5 -0
- package/lib/exercises/math/functions/affines/index.d.ts.map +1 -1
- package/lib/exercises/math/functions/affines/index.js +5 -0
- package/lib/exercises/math/functions/integral/index.d.ts +1 -0
- package/lib/exercises/math/functions/integral/index.d.ts.map +1 -1
- package/lib/exercises/math/functions/integral/index.js +1 -0
- package/lib/exercises/math/functions/integral/integralTrinomialOverX2.d.ts +12 -0
- package/lib/exercises/math/functions/integral/integralTrinomialOverX2.d.ts.map +1 -0
- package/lib/exercises/math/functions/integral/integralTrinomialOverX2.js +280 -0
- package/lib/exercises/math/functions/logarithm/findLargestPossibleDomainOfLogF.d.ts +13 -0
- package/lib/exercises/math/functions/logarithm/findLargestPossibleDomainOfLogF.d.ts.map +1 -0
- package/lib/exercises/math/functions/logarithm/findLargestPossibleDomainOfLogF.js +622 -0
- package/lib/exercises/math/functions/logarithm/index.d.ts +5 -0
- package/lib/exercises/math/functions/logarithm/index.d.ts.map +1 -1
- package/lib/exercises/math/functions/logarithm/index.js +5 -0
- package/lib/exercises/math/functions/logarithm/logEquationLnAXPlusBEqualsK.d.ts +10 -0
- package/lib/exercises/math/functions/logarithm/logEquationLnAXPlusBEqualsK.d.ts.map +1 -0
- package/lib/exercises/math/functions/logarithm/logEquationLnAXPlusBEqualsK.js +172 -0
- package/lib/exercises/math/functions/logarithm/logInequationIntegerSolutions.d.ts +11 -0
- package/lib/exercises/math/functions/logarithm/logInequationIntegerSolutions.d.ts.map +1 -0
- package/lib/exercises/math/functions/logarithm/logInequationIntegerSolutions.js +163 -0
- package/lib/exercises/math/functions/logarithm/logInequationLnAXPlusBInfK.d.ts +18 -0
- package/lib/exercises/math/functions/logarithm/logInequationLnAXPlusBInfK.d.ts.map +1 -0
- package/lib/exercises/math/functions/logarithm/logInequationLnAXPlusBInfK.js +330 -0
- package/lib/exercises/math/functions/logarithm/logLinearCombinationSimplifiying.d.ts +11 -0
- package/lib/exercises/math/functions/logarithm/logLinearCombinationSimplifiying.d.ts.map +1 -0
- package/lib/exercises/math/functions/logarithm/logLinearCombinationSimplifiying.js +185 -0
- package/lib/exercises/math/index.d.ts +1 -0
- package/lib/exercises/math/index.d.ts.map +1 -1
- package/lib/exercises/math/index.js +1 -0
- package/lib/exercises/math/integration/fromExpr/areaBetweenCrossingCurvesFixedPosFromExpr.d.ts +15 -0
- package/lib/exercises/math/integration/fromExpr/areaBetweenCrossingCurvesFixedPosFromExpr.d.ts.map +1 -0
- package/lib/exercises/math/integration/fromExpr/areaBetweenCrossingCurvesFixedPosFromExpr.js +505 -0
- package/lib/exercises/math/integration/fromExpr/boundIntegralByBoundingFunctionWithAffinesFromExpr.d.ts +16 -0
- package/lib/exercises/math/integration/fromExpr/boundIntegralByBoundingFunctionWithAffinesFromExpr.d.ts.map +1 -0
- package/lib/exercises/math/integration/fromExpr/boundIntegralByBoundingFunctionWithAffinesFromExpr.js +433 -0
- package/lib/exercises/math/integration/fromExpr/boundIntegralByManualRectanglesMethodFromExpr.d.ts +15 -0
- package/lib/exercises/math/integration/fromExpr/boundIntegralByManualRectanglesMethodFromExpr.d.ts.map +1 -0
- package/lib/exercises/math/integration/fromExpr/boundIntegralByManualRectanglesMethodFromExpr.js +436 -0
- package/lib/exercises/math/integration/fromExpr/byParts/index.d.ts +3 -0
- package/lib/exercises/math/integration/fromExpr/byParts/index.d.ts.map +1 -0
- package/lib/exercises/math/integration/fromExpr/byParts/index.js +2 -0
- package/lib/exercises/math/integration/fromExpr/byParts/integralOfAXPlusBTimesExpKXByParts.d.ts +9 -0
- package/lib/exercises/math/integration/fromExpr/byParts/integralOfAXPlusBTimesExpKXByParts.d.ts.map +1 -0
- package/lib/exercises/math/integration/fromExpr/byParts/integralOfAXPlusBTimesExpKXByParts.js +234 -0
- package/lib/exercises/math/integration/fromExpr/byParts/integralOfPolynomialTimesLogXByParts.d.ts +12 -0
- package/lib/exercises/math/integration/fromExpr/byParts/integralOfPolynomialTimesLogXByParts.d.ts.map +1 -0
- package/lib/exercises/math/integration/fromExpr/byParts/integralOfPolynomialTimesLogXByParts.js +330 -0
- package/lib/exercises/math/integration/fromExpr/checkIsPrimitiveFromExpr.d.ts +15 -0
- package/lib/exercises/math/integration/fromExpr/checkIsPrimitiveFromExpr.d.ts.map +1 -0
- package/lib/exercises/math/integration/fromExpr/checkIsPrimitiveFromExpr.js +450 -0
- package/lib/exercises/math/integration/fromExpr/derivativeOfPrimitive.d.ts +10 -0
- package/lib/exercises/math/integration/fromExpr/derivativeOfPrimitive.d.ts.map +1 -0
- package/lib/exercises/math/integration/fromExpr/derivativeOfPrimitive.js +261 -0
- package/lib/exercises/math/integration/fromExpr/index.d.ts +8 -0
- package/lib/exercises/math/integration/fromExpr/index.d.ts.map +1 -0
- package/lib/exercises/math/integration/fromExpr/index.js +8 -0
- package/lib/exercises/math/integration/fromExpr/integralFromExpr.d.ts +13 -0
- package/lib/exercises/math/integration/fromExpr/integralFromExpr.d.ts.map +1 -0
- package/lib/exercises/math/integration/fromExpr/integralFromExpr.js +359 -0
- package/lib/exercises/math/integration/fromExpr/meanValue/index.d.ts +2 -0
- package/lib/exercises/math/integration/fromExpr/meanValue/index.d.ts.map +1 -0
- package/lib/exercises/math/integration/fromExpr/meanValue/index.js +1 -0
- package/lib/exercises/math/integration/fromExpr/meanValue/meanValueOfTrinomFromIntegralFromExpr.d.ts +14 -0
- package/lib/exercises/math/integration/fromExpr/meanValue/meanValueOfTrinomFromIntegralFromExpr.d.ts.map +1 -0
- package/lib/exercises/math/integration/fromExpr/meanValue/meanValueOfTrinomFromIntegralFromExpr.js +429 -0
- package/lib/exercises/math/integration/fromGraph/boundIntegralByManipulatingAutomaticRectanglesMethodFromGraph.d.ts +10 -0
- package/lib/exercises/math/integration/fromGraph/boundIntegralByManipulatingAutomaticRectanglesMethodFromGraph.d.ts.map +1 -0
- package/lib/exercises/math/integration/fromGraph/boundIntegralByManipulatingAutomaticRectanglesMethodFromGraph.js +286 -0
- package/lib/exercises/math/integration/fromGraph/imageOfPrimitiveByManipulatingIntegralBoundsFromGraph.d.ts +9 -0
- package/lib/exercises/math/integration/fromGraph/imageOfPrimitiveByManipulatingIntegralBoundsFromGraph.d.ts.map +1 -0
- package/lib/exercises/math/integration/fromGraph/imageOfPrimitiveByManipulatingIntegralBoundsFromGraph.js +231 -0
- package/lib/exercises/math/integration/fromGraph/index.d.ts +7 -0
- package/lib/exercises/math/integration/fromGraph/index.d.ts.map +1 -0
- package/lib/exercises/math/integration/fromGraph/index.js +6 -0
- package/lib/exercises/math/integration/fromGraph/integralOfAffineFromExprByComputingArea.d.ts +15 -0
- package/lib/exercises/math/integration/fromGraph/integralOfAffineFromExprByComputingArea.d.ts.map +1 -0
- package/lib/exercises/math/integration/fromGraph/integralOfAffineFromExprByComputingArea.js +464 -0
- package/lib/exercises/math/integration/fromGraph/integralOfAffineFromGraph.d.ts +15 -0
- package/lib/exercises/math/integration/fromGraph/integralOfAffineFromGraph.d.ts.map +1 -0
- package/lib/exercises/math/integration/fromGraph/integralOfAffineFromGraph.js +493 -0
- package/lib/exercises/math/integration/fromGraph/integralOfPiecewiseAffineFromGraph.d.ts +18 -0
- package/lib/exercises/math/integration/fromGraph/integralOfPiecewiseAffineFromGraph.d.ts.map +1 -0
- package/lib/exercises/math/integration/fromGraph/integralOfPiecewiseAffineFromGraph.js +466 -0
- package/lib/exercises/math/integration/fromGraph/varTableOfPrimitiveFromGraph.d.ts +10 -0
- package/lib/exercises/math/integration/fromGraph/varTableOfPrimitiveFromGraph.d.ts.map +1 -0
- package/lib/exercises/math/integration/fromGraph/varTableOfPrimitiveFromGraph.js +192 -0
- package/lib/exercises/math/integration/index.d.ts +4 -0
- package/lib/exercises/math/integration/index.d.ts.map +1 -0
- package/lib/exercises/math/integration/index.js +3 -0
- package/lib/exercises/math/integration/integralOfPiecewiseFunctionByUsingComputedIntegrals.d.ts +14 -0
- package/lib/exercises/math/integration/integralOfPiecewiseFunctionByUsingComputedIntegrals.d.ts.map +1 -0
- package/lib/exercises/math/integration/integralOfPiecewiseFunctionByUsingComputedIntegrals.js +222 -0
- package/lib/exercises/math/limits/frac1XTimesALogXPlusBLimit.d.ts +8 -0
- package/lib/exercises/math/limits/frac1XTimesALogXPlusBLimit.d.ts.map +1 -0
- package/lib/exercises/math/limits/frac1XTimesALogXPlusBLimit.js +121 -0
- package/lib/exercises/math/limits/index.d.ts +3 -0
- package/lib/exercises/math/limits/index.d.ts.map +1 -1
- package/lib/exercises/math/limits/index.js +3 -0
- package/lib/exercises/math/limits/kLogXPlusTrinomLimit.d.ts +12 -0
- package/lib/exercises/math/limits/kLogXPlusTrinomLimit.d.ts.map +1 -0
- package/lib/exercises/math/limits/kLogXPlusTrinomLimit.js +224 -0
- package/lib/exercises/math/limits/logOfPolynomialLimit.d.ts +10 -0
- package/lib/exercises/math/limits/logOfPolynomialLimit.d.ts.map +1 -0
- package/lib/exercises/math/limits/logOfPolynomialLimit.js +154 -0
- package/lib/exercises/math/limits/sequenceGeometricLimit.d.ts.map +1 -1
- package/lib/exercises/math/limits/sequenceGeometricLimit.js +9 -0
- package/lib/exercises/math/primitive/constantPrimitive.d.ts +8 -5
- package/lib/exercises/math/primitive/constantPrimitive.d.ts.map +1 -1
- package/lib/exercises/math/primitive/constantPrimitive.js +40 -21
- package/lib/exercises/math/probaStat/basicProbas/expectedValueOfLinearCombination.d.ts +12 -0
- package/lib/exercises/math/probaStat/basicProbas/expectedValueOfLinearCombination.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/basicProbas/expectedValueOfLinearCombination.js +170 -0
- package/lib/exercises/math/probaStat/basicProbas/expectedValueOfSumFromDice.d.ts +7 -0
- package/lib/exercises/math/probaStat/basicProbas/expectedValueOfSumFromDice.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/basicProbas/expectedValueOfSumFromDice.js +163 -0
- package/lib/exercises/math/probaStat/basicProbas/expectedValueOfSumFromProbaLaw.d.ts +14 -0
- package/lib/exercises/math/probaStat/basicProbas/expectedValueOfSumFromProbaLaw.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/basicProbas/expectedValueOfSumFromProbaLaw.js +150 -0
- package/lib/exercises/math/probaStat/basicProbas/index.d.ts +5 -0
- package/lib/exercises/math/probaStat/basicProbas/index.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/basicProbas/index.js +5 -0
- package/lib/exercises/math/probaStat/basicProbas/varianceOfLinearCombination.d.ts +12 -0
- package/lib/exercises/math/probaStat/basicProbas/varianceOfLinearCombination.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/basicProbas/varianceOfLinearCombination.js +193 -0
- package/lib/exercises/math/probaStat/basicProbas/varianceOfMean.d.ts +13 -0
- package/lib/exercises/math/probaStat/basicProbas/varianceOfMean.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/basicProbas/varianceOfMean.js +171 -0
- package/lib/exercises/math/probaStat/binomial/fromSituation/binomialExpectedValueFromSituation.d.ts +9 -0
- package/lib/exercises/math/probaStat/binomial/fromSituation/binomialExpectedValueFromSituation.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/binomial/fromSituation/binomialExpectedValueFromSituation.js +125 -0
- package/lib/exercises/math/probaStat/binomial/fromSituation/binomialFindParamsFromSituation.d.ts +9 -0
- package/lib/exercises/math/probaStat/binomial/fromSituation/binomialFindParamsFromSituation.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/binomial/fromSituation/binomialFindParamsFromSituation.js +126 -0
- package/lib/exercises/math/probaStat/binomial/fromSituation/binomialFindProbaOfAtLeastOneSuccessFromSituation.d.ts +8 -0
- package/lib/exercises/math/probaStat/binomial/fromSituation/binomialFindProbaOfAtLeastOneSuccessFromSituation.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/binomial/fromSituation/binomialFindProbaOfAtLeastOneSuccessFromSituation.js +150 -0
- package/lib/exercises/math/probaStat/binomial/fromSituation/binomialFindProbaOfXCompKFromSituation.d.ts +15 -0
- package/lib/exercises/math/probaStat/binomial/fromSituation/binomialFindProbaOfXCompKFromSituation.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/binomial/fromSituation/binomialFindProbaOfXCompKFromSituation.js +386 -0
- package/lib/exercises/math/probaStat/binomial/fromSituation/binomialFindThresholdForNFromSituation.d.ts +14 -0
- package/lib/exercises/math/probaStat/binomial/fromSituation/binomialFindThresholdForNFromSituation.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/binomial/fromSituation/binomialFindThresholdForNFromSituation.js +248 -0
- package/lib/exercises/math/probaStat/binomial/fromSituation/binomialSituations.d.ts +47 -0
- package/lib/exercises/math/probaStat/binomial/fromSituation/binomialSituations.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/binomial/fromSituation/binomialSituations.js +184 -0
- package/lib/exercises/math/probaStat/binomial/fromSituation/buildTreeBernoulliFromSituation.d.ts +9 -0
- package/lib/exercises/math/probaStat/binomial/fromSituation/buildTreeBernoulliFromSituation.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/binomial/fromSituation/buildTreeBernoulliFromSituation.js +120 -0
- package/lib/exercises/math/probaStat/binomial/fromSituation/index.d.ts +7 -0
- package/lib/exercises/math/probaStat/binomial/fromSituation/index.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/binomial/fromSituation/index.js +6 -0
- package/lib/exercises/math/probaStat/binomial/index.d.ts +1 -0
- package/lib/exercises/math/probaStat/binomial/index.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/binomial/index.js +1 -0
- package/lib/exercises/math/probaStat/index.d.ts +1 -0
- package/lib/exercises/math/probaStat/index.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/index.js +1 -0
- package/lib/exercises/math/probaStat/stats2var/averagePoint.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats2var/averagePoint.js +34 -2
- package/lib/exercises/math/probaStat/tchebychev/index.d.ts +5 -0
- package/lib/exercises/math/probaStat/tchebychev/index.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/tchebychev/index.js +4 -0
- package/lib/exercises/math/probaStat/tchebychev/mean/index.d.ts +4 -0
- package/lib/exercises/math/probaStat/tchebychev/mean/index.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/tchebychev/mean/index.js +3 -0
- package/lib/exercises/math/probaStat/tchebychev/mean/tchebychevFindRadiusToMinorizeProbaOfMeanInCenteredInterval.d.ts +11 -0
- package/lib/exercises/math/probaStat/tchebychev/mean/tchebychevFindRadiusToMinorizeProbaOfMeanInCenteredInterval.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/tchebychev/mean/tchebychevFindRadiusToMinorizeProbaOfMeanInCenteredInterval.js +273 -0
- package/lib/exercises/math/probaStat/tchebychev/mean/tchebychevMajorizeProbaOfMeanOutOfCenteredInterval.d.ts +14 -0
- package/lib/exercises/math/probaStat/tchebychev/mean/tchebychevMajorizeProbaOfMeanOutOfCenteredInterval.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/tchebychev/mean/tchebychevMajorizeProbaOfMeanOutOfCenteredInterval.js +219 -0
- package/lib/exercises/math/probaStat/tchebychev/mean/tchebychevMinorizeProbaOfMeanInCenteredInterval.d.ts +14 -0
- package/lib/exercises/math/probaStat/tchebychev/mean/tchebychevMinorizeProbaOfMeanInCenteredInterval.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/tchebychev/mean/tchebychevMinorizeProbaOfMeanInCenteredInterval.js +245 -0
- package/lib/exercises/math/probaStat/tchebychev/tchebychevFindRadiusToMajorizeProbaOfXOutOfCenteredInterval.d.ts +10 -0
- package/lib/exercises/math/probaStat/tchebychev/tchebychevFindRadiusToMajorizeProbaOfXOutOfCenteredInterval.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/tchebychev/tchebychevFindRadiusToMajorizeProbaOfXOutOfCenteredInterval.js +191 -0
- package/lib/exercises/math/probaStat/tchebychev/tchebychevMajorizeProbaOfXOutOfCenteredInterval.d.ts +10 -0
- package/lib/exercises/math/probaStat/tchebychev/tchebychevMajorizeProbaOfXOutOfCenteredInterval.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/tchebychev/tchebychevMajorizeProbaOfXOutOfCenteredInterval.js +135 -0
- package/lib/exercises/math/probaStat/tchebychev/tchebychevMinorizeProbaOfXInCenteredInterval.d.ts +10 -0
- package/lib/exercises/math/probaStat/tchebychev/tchebychevMinorizeProbaOfXInCenteredInterval.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/tchebychev/tchebychevMinorizeProbaOfXInCenteredInterval.js +155 -0
- package/lib/exercises/math/probaStat/trees/buildTreeBernoulli.d.ts +9 -0
- package/lib/exercises/math/probaStat/trees/buildTreeBernoulli.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/trees/buildTreeBernoulli.js +124 -0
- package/lib/exercises/math/probaStat/trees/index.d.ts +1 -0
- package/lib/exercises/math/probaStat/trees/index.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/trees/index.js +1 -0
- package/lib/exercises/math/sequences/geometric/graph/geometricFindThresholdFromGraph.d.ts +15 -0
- package/lib/exercises/math/sequences/geometric/graph/geometricFindThresholdFromGraph.d.ts.map +1 -0
- package/lib/exercises/math/sequences/geometric/graph/geometricFindThresholdFromGraph.js +255 -0
- package/lib/exercises/math/sequences/geometric/graph/geometricFindThresholdUsingCalculator.d.ts +15 -0
- package/lib/exercises/math/sequences/geometric/graph/geometricFindThresholdUsingCalculator.d.ts.map +1 -0
- package/lib/exercises/math/sequences/geometric/graph/geometricFindThresholdUsingCalculator.js +242 -0
- package/lib/exercises/math/sequences/geometric/graph/geometricPlaceFirstPoints.js +4 -4
- package/lib/exercises/math/sequences/geometric/graph/geometricSignOfReasonFromGraph.d.ts +12 -0
- package/lib/exercises/math/sequences/geometric/graph/geometricSignOfReasonFromGraph.d.ts.map +1 -0
- package/lib/exercises/math/sequences/geometric/graph/geometricSignOfReasonFromGraph.js +161 -0
- package/lib/exercises/math/sequences/geometric/graph/index.d.ts +4 -0
- package/lib/exercises/math/sequences/geometric/graph/index.d.ts.map +1 -1
- package/lib/exercises/math/sequences/geometric/graph/index.js +4 -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/sequences/geometric/situations/geometricFindRankFromSituation.d.ts.map +1 -1
- package/lib/exercises/math/sequences/geometric/situations/geometricFindRankFromSituation.js +71 -48
- package/lib/exercises/math/sequences/geometric/situations/index.d.ts +2 -1
- package/lib/exercises/math/sequences/geometric/situations/index.d.ts.map +1 -1
- package/lib/exercises/math/sequences/geometric/situations/index.js +2 -2
- package/lib/exercises/math/sets/cartesianProduct/findCardinalOfCartesianProductOfFiniteSets.d.ts +10 -0
- package/lib/exercises/math/sets/cartesianProduct/findCardinalOfCartesianProductOfFiniteSets.d.ts.map +1 -0
- package/lib/exercises/math/sets/cartesianProduct/findCardinalOfCartesianProductOfFiniteSets.js +224 -0
- package/lib/exercises/math/sets/cartesianProduct/findCardinalOfCartesianProductOfFiniteSetsFromSituation.d.ts +18 -0
- package/lib/exercises/math/sets/cartesianProduct/findCardinalOfCartesianProductOfFiniteSetsFromSituation.d.ts.map +1 -0
- package/lib/exercises/math/sets/cartesianProduct/findCardinalOfCartesianProductOfFiniteSetsFromSituation.js +198 -0
- package/lib/exercises/math/sets/cartesianProduct/findCardinalOfPowEK.d.ts +10 -0
- package/lib/exercises/math/sets/cartesianProduct/findCardinalOfPowEK.d.ts.map +1 -0
- package/lib/exercises/math/sets/cartesianProduct/findCardinalOfPowEK.js +231 -0
- package/lib/exercises/math/sets/cartesianProduct/findNumberOfPasswordsWithLettersAndNumbers.d.ts +19 -0
- package/lib/exercises/math/sets/cartesianProduct/findNumberOfPasswordsWithLettersAndNumbers.d.ts.map +1 -0
- package/lib/exercises/math/sets/cartesianProduct/findNumberOfPasswordsWithLettersAndNumbers.js +187 -0
- package/lib/exercises/math/sets/cartesianProduct/index.d.ts +7 -0
- package/lib/exercises/math/sets/cartesianProduct/index.d.ts.map +1 -0
- package/lib/exercises/math/sets/cartesianProduct/index.js +6 -0
- package/lib/exercises/math/sets/cartesianProduct/proposeElementInCartesianProductOfFiniteSets.d.ts +15 -0
- package/lib/exercises/math/sets/cartesianProduct/proposeElementInCartesianProductOfFiniteSets.d.ts.map +1 -0
- package/lib/exercises/math/sets/cartesianProduct/proposeElementInCartesianProductOfFiniteSets.js +291 -0
- package/lib/exercises/math/sets/cartesianProduct/proposeElementInPowEK.d.ts +15 -0
- package/lib/exercises/math/sets/cartesianProduct/proposeElementInPowEK.d.ts.map +1 -0
- package/lib/exercises/math/sets/cartesianProduct/proposeElementInPowEK.js +274 -0
- package/lib/exercises/math/sets/combinations/findNumberOfCombinationsFromSituation.d.ts +17 -0
- package/lib/exercises/math/sets/combinations/findNumberOfCombinationsFromSituation.d.ts.map +1 -0
- package/lib/exercises/math/sets/combinations/findNumberOfCombinationsFromSituation.js +228 -0
- package/lib/exercises/math/sets/combinations/findNumberOfProductsOfCombinationsFromSituation.d.ts +17 -0
- package/lib/exercises/math/sets/combinations/findNumberOfProductsOfCombinationsFromSituation.d.ts.map +1 -0
- package/lib/exercises/math/sets/combinations/findNumberOfProductsOfCombinationsFromSituation.js +388 -0
- package/lib/exercises/math/sets/combinations/index.d.ts +4 -0
- package/lib/exercises/math/sets/combinations/index.d.ts.map +1 -0
- package/lib/exercises/math/sets/combinations/index.js +3 -0
- package/lib/exercises/math/sets/combinations/proposeCombination.d.ts +15 -0
- package/lib/exercises/math/sets/combinations/proposeCombination.d.ts.map +1 -0
- package/lib/exercises/math/sets/combinations/proposeCombination.js +347 -0
- package/lib/exercises/math/sets/index.d.ts +3 -0
- package/lib/exercises/math/sets/index.d.ts.map +1 -1
- package/lib/exercises/math/sets/index.js +3 -0
- package/lib/exercises/math/sets/partialPermutations/findNumberOfPartialPermutationsFromSituation.d.ts +16 -0
- package/lib/exercises/math/sets/partialPermutations/findNumberOfPartialPermutationsFromSituation.d.ts.map +1 -0
- package/lib/exercises/math/sets/partialPermutations/findNumberOfPartialPermutationsFromSituation.js +186 -0
- package/lib/exercises/math/sets/partialPermutations/findNumberOfPermutationsFromSituation.d.ts +17 -0
- package/lib/exercises/math/sets/partialPermutations/findNumberOfPermutationsFromSituation.d.ts.map +1 -0
- package/lib/exercises/math/sets/partialPermutations/findNumberOfPermutationsFromSituation.js +232 -0
- package/lib/exercises/math/sets/partialPermutations/index.d.ts +4 -0
- package/lib/exercises/math/sets/partialPermutations/index.d.ts.map +1 -0
- package/lib/exercises/math/sets/partialPermutations/index.js +3 -0
- package/lib/exercises/math/sets/partialPermutations/proposePartialPermutation.d.ts +15 -0
- package/lib/exercises/math/sets/partialPermutations/proposePartialPermutation.d.ts.map +1 -0
- package/lib/exercises/math/sets/partialPermutations/proposePartialPermutation.js +343 -0
- package/lib/exercises/math/spaceGeometry/basis/index.d.ts +6 -0
- package/lib/exercises/math/spaceGeometry/basis/index.d.ts.map +1 -1
- package/lib/exercises/math/spaceGeometry/basis/index.js +6 -0
- package/lib/exercises/math/spaceGeometry/basis/lineLineRelativePositionsFromCubeOuterPoints.d.ts +11 -0
- package/lib/exercises/math/spaceGeometry/basis/lineLineRelativePositionsFromCubeOuterPoints.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/basis/lineLineRelativePositionsFromCubeOuterPoints.js +576 -0
- package/lib/exercises/math/spaceGeometry/basis/linePlaneRelativePositionsFromCubeOuterPoints.d.ts +11 -0
- package/lib/exercises/math/spaceGeometry/basis/linePlaneRelativePositionsFromCubeOuterPoints.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/basis/linePlaneRelativePositionsFromCubeOuterPoints.js +595 -0
- package/lib/exercises/math/spaceGeometry/basis/spaceCoordinatesOfPointInCubeCoordSystem.d.ts +11 -0
- package/lib/exercises/math/spaceGeometry/basis/spaceCoordinatesOfPointInCubeCoordSystem.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/basis/spaceCoordinatesOfPointInCubeCoordSystem.js +501 -0
- package/lib/exercises/math/spaceGeometry/basis/spaceCoordinatesOfPointInCubeCoordSystemFromVecPath.d.ts +16 -0
- package/lib/exercises/math/spaceGeometry/basis/spaceCoordinatesOfPointInCubeCoordSystemFromVecPath.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/basis/spaceCoordinatesOfPointInCubeCoordSystemFromVecPath.js +753 -0
- package/lib/exercises/math/spaceGeometry/basis/spaceCoordinatesOfVectorInCubeCoordSystem.d.ts +12 -0
- package/lib/exercises/math/spaceGeometry/basis/spaceCoordinatesOfVectorInCubeCoordSystem.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/basis/spaceCoordinatesOfVectorInCubeCoordSystem.js +546 -0
- package/lib/exercises/math/spaceGeometry/basis/spaceVectorLinearCombinationFromCoords.d.ts +13 -0
- package/lib/exercises/math/spaceGeometry/basis/spaceVectorLinearCombinationFromCoords.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/basis/spaceVectorLinearCombinationFromCoords.js +233 -0
- package/lib/exercises/math/spaceGeometry/collinearity/checkAlignedSpacePointsFromCoords.d.ts +11 -0
- package/lib/exercises/math/spaceGeometry/collinearity/checkAlignedSpacePointsFromCoords.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/collinearity/checkAlignedSpacePointsFromCoords.js +192 -0
- package/lib/exercises/math/spaceGeometry/collinearity/checkAlignedSpacePointsFromVecPathsFromCubeOuterPoints.d.ts +15 -0
- package/lib/exercises/math/spaceGeometry/collinearity/checkAlignedSpacePointsFromVecPathsFromCubeOuterPoints.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/collinearity/checkAlignedSpacePointsFromVecPathsFromCubeOuterPoints.js +511 -0
- package/lib/exercises/math/spaceGeometry/collinearity/index.d.ts +3 -0
- package/lib/exercises/math/spaceGeometry/collinearity/index.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/collinearity/index.js +2 -0
- package/lib/exercises/math/spaceGeometry/index.d.ts +5 -0
- package/lib/exercises/math/spaceGeometry/index.d.ts.map +1 -1
- package/lib/exercises/math/spaceGeometry/index.js +5 -1
- package/lib/exercises/math/spaceGeometry/orthogonalProjection/findOrthogonalProjectionOfPointOnPlane.d.ts +22 -0
- package/lib/exercises/math/spaceGeometry/orthogonalProjection/findOrthogonalProjectionOfPointOnPlane.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/orthogonalProjection/findOrthogonalProjectionOfPointOnPlane.js +366 -0
- package/lib/exercises/math/spaceGeometry/orthogonalProjection/index.d.ts +2 -0
- package/lib/exercises/math/spaceGeometry/orthogonalProjection/index.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/orthogonalProjection/index.js +2 -0
- package/lib/exercises/math/spaceGeometry/parametricLine/index.d.ts +3 -0
- package/lib/exercises/math/spaceGeometry/parametricLine/index.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/parametricLine/index.js +2 -0
- package/lib/exercises/math/spaceGeometry/parametricLine/lineLineRelativePositionsFromParametricLines.d.ts +14 -0
- package/lib/exercises/math/spaceGeometry/parametricLine/lineLineRelativePositionsFromParametricLines.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/parametricLine/lineLineRelativePositionsFromParametricLines.js +325 -0
- package/lib/exercises/math/spaceGeometry/parametricLine/parametricLineFromPointAndDirectionVector.d.ts +13 -0
- package/lib/exercises/math/spaceGeometry/parametricLine/parametricLineFromPointAndDirectionVector.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/parametricLine/parametricLineFromPointAndDirectionVector.js +181 -0
- package/lib/exercises/math/spaceGeometry/planes/checkIsPointBelongingToPlane.d.ts +10 -0
- package/lib/exercises/math/spaceGeometry/planes/checkIsPointBelongingToPlane.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/planes/checkIsPointBelongingToPlane.js +208 -0
- package/lib/exercises/math/spaceGeometry/planes/findNormalVectorFromPlaneEquation.d.ts +8 -0
- package/lib/exercises/math/spaceGeometry/planes/findNormalVectorFromPlaneEquation.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/planes/findNormalVectorFromPlaneEquation.js +255 -0
- package/lib/exercises/math/spaceGeometry/planes/findNormalVectorFromPlanePointsCoords.d.ts +10 -0
- package/lib/exercises/math/spaceGeometry/planes/findNormalVectorFromPlanePointsCoords.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/planes/findNormalVectorFromPlanePointsCoords.js +232 -0
- package/lib/exercises/math/spaceGeometry/planes/index.d.ts +5 -1
- package/lib/exercises/math/spaceGeometry/planes/index.d.ts.map +1 -1
- package/lib/exercises/math/spaceGeometry/planes/index.js +6 -2
- package/lib/exercises/math/spaceGeometry/planes/planeEquationFromNormalVectorAndContainedPoint.d.ts +10 -0
- package/lib/exercises/math/spaceGeometry/planes/planeEquationFromNormalVectorAndContainedPoint.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/planes/planeEquationFromNormalVectorAndContainedPoint.js +273 -0
- package/lib/exercises/math/spaceGeometry/planes/planeEquationFromOrthogonalLineAndContainedPoint.d.ts +12 -0
- package/lib/exercises/math/spaceGeometry/planes/planeEquationFromOrthogonalLineAndContainedPoint.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/planes/planeEquationFromOrthogonalLineAndContainedPoint.js +398 -0
- package/lib/exercises/math/spaceGeometry/planes/planePlaneRelativePositions.d.ts +22 -0
- package/lib/exercises/math/spaceGeometry/planes/planePlaneRelativePositions.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/planes/planePlaneRelativePositions.js +509 -0
- package/lib/exercises/math/spaceGeometry/scalarProduct/angleFromScalarProductFromSpacePointCoords.d.ts +8 -0
- package/lib/exercises/math/spaceGeometry/scalarProduct/angleFromScalarProductFromSpacePointCoords.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/scalarProduct/angleFromScalarProductFromSpacePointCoords.js +229 -0
- package/lib/exercises/math/spaceGeometry/scalarProduct/checkIsOrthogonalLinesFromParametricReps.d.ts +9 -0
- package/lib/exercises/math/spaceGeometry/scalarProduct/checkIsOrthogonalLinesFromParametricReps.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/scalarProduct/checkIsOrthogonalLinesFromParametricReps.js +200 -0
- package/lib/exercises/math/spaceGeometry/scalarProduct/checkIsOrthogonalSpaceVecsFromCoords.d.ts +8 -0
- package/lib/exercises/math/spaceGeometry/scalarProduct/checkIsOrthogonalSpaceVecsFromCoords.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/scalarProduct/checkIsOrthogonalSpaceVecsFromCoords.js +176 -0
- package/lib/exercises/math/spaceGeometry/scalarProduct/checkIsSpaceVecOrthogonalToPlaneFromCoords.d.ts +9 -0
- package/lib/exercises/math/spaceGeometry/scalarProduct/checkIsSpaceVecOrthogonalToPlaneFromCoords.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/scalarProduct/checkIsSpaceVecOrthogonalToPlaneFromCoords.js +263 -0
- package/lib/exercises/math/spaceGeometry/scalarProduct/index.d.ts +6 -0
- package/lib/exercises/math/spaceGeometry/scalarProduct/index.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/scalarProduct/index.js +6 -0
- package/lib/exercises/math/spaceGeometry/scalarProduct/scalarProductFromCubeOuterPoints.d.ts +14 -0
- package/lib/exercises/math/spaceGeometry/scalarProduct/scalarProductFromCubeOuterPoints.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/scalarProduct/scalarProductFromCubeOuterPoints.js +497 -0
- package/lib/exercises/math/spaceGeometry/scalarProduct/scalarProductFromSpacePointCoords.d.ts +8 -0
- package/lib/exercises/math/spaceGeometry/scalarProduct/scalarProductFromSpacePointCoords.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/scalarProduct/scalarProductFromSpacePointCoords.js +173 -0
- package/lib/exercises/math/spaceGeometry/vectors/findLinearDecompositionWrtCoplanarUVFromCoords.d.ts +10 -0
- package/lib/exercises/math/spaceGeometry/vectors/findLinearDecompositionWrtCoplanarUVFromCoords.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/vectors/findLinearDecompositionWrtCoplanarUVFromCoords.js +236 -0
- package/lib/exercises/math/spaceGeometry/vectors/index.d.ts +2 -0
- package/lib/exercises/math/spaceGeometry/vectors/index.d.ts.map +1 -1
- package/lib/exercises/math/spaceGeometry/vectors/index.js +2 -0
- package/lib/exercises/math/spaceGeometry/vectors/spacePointsDistanceCalculation.d.ts +8 -0
- package/lib/exercises/math/spaceGeometry/vectors/spacePointsDistanceCalculation.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/vectors/spacePointsDistanceCalculation.js +156 -0
- package/lib/exercises/math/trigonometry/functions/index.d.ts +1 -0
- package/lib/exercises/math/trigonometry/functions/index.d.ts.map +1 -1
- package/lib/exercises/math/trigonometry/functions/index.js +1 -0
- package/lib/exercises/math/trigonometry/functions/parityOfCosAXTimesSinBX.d.ts +8 -0
- package/lib/exercises/math/trigonometry/functions/parityOfCosAXTimesSinBX.d.ts.map +1 -0
- package/lib/exercises/math/trigonometry/functions/parityOfCosAXTimesSinBX.js +193 -0
- package/lib/exercises/utils/data/randomDataTable.d.ts +4 -1
- package/lib/exercises/utils/data/randomDataTable.d.ts.map +1 -1
- package/lib/exercises/utils/data/randomDataTable.js +1 -2
- package/lib/exercises/vea/varLineVEA.d.ts.map +1 -1
- package/lib/exercises/vea/varLineVEA.js +15 -2
- package/lib/exercises/vea/xTableLineVEA.d.ts.map +1 -1
- package/lib/exercises/vea/xTableLineVEA.js +13 -2
- package/lib/index.d.ts +545 -26
- package/lib/index.d.ts.map +1 -1
- package/lib/latexTester.d.ts.map +1 -1
- package/lib/latexTester.js +9 -7
- package/lib/math/geometry/parametricLine.d.ts +1 -1
- package/lib/math/geometry/parametricLine.d.ts.map +1 -1
- package/lib/math/geometry/parametricLine.js +2 -2
- package/lib/math/geometry/spaceVector.d.ts +11 -1
- package/lib/math/geometry/spaceVector.d.ts.map +1 -1
- package/lib/math/geometry/spaceVector.js +18 -4
- package/lib/math/probability/randomVariable.d.ts +3 -2
- package/lib/math/probability/randomVariable.d.ts.map +1 -1
- package/lib/math/probability/randomVariable.js +14 -8
- package/lib/math/sets/setOperations.d.ts +9 -0
- package/lib/math/sets/setOperations.d.ts.map +1 -0
- package/lib/math/sets/setOperations.js +84 -0
- package/lib/math/sets/tuple.d.ts +12 -0
- package/lib/math/sets/tuple.d.ts.map +1 -0
- package/lib/math/sets/tuple.js +17 -0
- package/lib/math/systems/generalSystem.d.ts +3 -3
- package/lib/math/systems/generalSystem.d.ts.map +1 -1
- package/lib/math/systems/generalSystem.js +20 -17
- package/lib/math/utils/functions/functionComparison.d.ts.map +1 -1
- package/lib/math/utils/functions/functionComparison.js +2 -45
- package/lib/math/utils/functions/functionComposition.d.ts +3 -1
- package/lib/math/utils/functions/functionComposition.d.ts.map +1 -1
- package/lib/math/utils/functions/functionComposition.js +17 -17
- package/lib/math/utils/integration/rectanglesMethod.d.ts +6 -0
- package/lib/math/utils/integration/rectanglesMethod.d.ts.map +1 -0
- package/lib/math/utils/integration/rectanglesMethod.js +66 -0
- package/lib/math/utils/polynomial/polynomialUtils.d.ts +9 -1
- package/lib/math/utils/polynomial/polynomialUtils.d.ts.map +1 -1
- package/lib/math/utils/polynomial/polynomialUtils.js +66 -7
- package/lib/math/utils/sequences/situations/seqGeometricSituations.d.ts +34 -2
- package/lib/math/utils/sequences/situations/seqGeometricSituations.d.ts.map +1 -1
- package/lib/math/utils/sequences/situations/seqGeometricSituations.js +288 -47
- package/lib/server.js +25 -0
- package/lib/tests/questionTest.d.ts.map +1 -1
- package/lib/tests/questionTest.js +5 -2
- package/lib/tests/singleExo.test.js +2 -2
- package/lib/tree/nodes/functions/cosNode.d.ts +1 -1
- package/lib/tree/nodes/functions/cosNode.d.ts.map +1 -1
- package/lib/tree/nodes/functions/cosNode.js +5 -2
- package/lib/tree/nodes/functions/factorialNode.d.ts +1 -0
- package/lib/tree/nodes/functions/factorialNode.d.ts.map +1 -1
- package/lib/tree/nodes/functions/factorialNode.js +16 -1
- package/lib/tree/nodes/functions/logNode.d.ts.map +1 -1
- package/lib/tree/nodes/functions/logNode.js +2 -1
- package/lib/tree/nodes/operators/binomialCoefficientNode.d.ts +2 -0
- package/lib/tree/nodes/operators/binomialCoefficientNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/binomialCoefficientNode.js +34 -0
- package/lib/tree/nodes/sets/discreteSetNode.d.ts.map +1 -1
- package/lib/tree/nodes/sets/discreteSetNode.js +1 -0
- package/lib/tree/utilities/nodeComparator.d.ts +7 -0
- package/lib/tree/utilities/nodeComparator.d.ts.map +1 -1
- package/lib/tree/utilities/nodeComparator.js +59 -0
- package/lib/tree/utilities/nodeInspector.d.ts +2 -0
- package/lib/tree/utilities/nodeInspector.d.ts.map +1 -1
- package/lib/tree/utilities/nodeInspector.js +23 -1
- package/lib/tree/utilities/nodePrinter.d.ts +7 -0
- package/lib/tree/utilities/nodePrinter.d.ts.map +1 -0
- package/lib/tree/utilities/nodePrinter.js +36 -0
- package/lib/tree/utilities/nodeRewriter.d.ts.map +1 -1
- package/lib/tree/utilities/nodeRewriter.js +4 -1
- package/lib/types/keyIds.d.ts +1 -1
- package/lib/types/keyIds.d.ts.map +1 -1
- package/lib/utils/strings/splitAndKeep.d.ts +2 -0
- package/lib/utils/strings/splitAndKeep.d.ts.map +1 -0
- package/lib/utils/strings/splitAndKeep.js +13 -0
- package/package.json +1 -1
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
|
|
2
|
+
import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
|
+
import { parseAlgebraic } from "../../../../tree/parsers/latexParser.js";
|
|
4
|
+
import { handleVEAError } from "../../../../utils/errors/handleVEAError.js";
|
|
5
|
+
import { NodeConstructor, } from "../../../../tree/nodes/nodeConstructor.js";
|
|
6
|
+
import { DiscreteSetNode } from "../../../../tree/nodes/sets/discreteSetNode.js";
|
|
7
|
+
import { isVariableNode, VariableNode, } from "../../../../tree/nodes/variables/variableNode.js";
|
|
8
|
+
import { NodeComparator } from "../../../../tree/utilities/nodeComparator.js";
|
|
9
|
+
import { randint } from "../../../../math/utils/random/randint.js";
|
|
10
|
+
import { shuffle } from "../../../../utils/alea/shuffle.js";
|
|
11
|
+
import { coinFlip } from "../../../../utils/alea/coinFlip.js";
|
|
12
|
+
import { probaLawFlip } from "../../../../utils/alea/probaLawFlip.js";
|
|
13
|
+
import { randomMany } from "../../../../utils/alea/random.js";
|
|
14
|
+
import { power } from "../../../../tree/nodes/operators/powerNode.js";
|
|
15
|
+
import { multiply } from "../../../../tree/nodes/operators/multiplyNode.js";
|
|
16
|
+
import { facto } from "../../../../tree/nodes/functions/factorialNode.js";
|
|
17
|
+
const randomDiscreteSetIdsAndDescription = () => {
|
|
18
|
+
return probaLawFlip([
|
|
19
|
+
[
|
|
20
|
+
(() => {
|
|
21
|
+
const nbElements = randint(2, 5);
|
|
22
|
+
const arrLetter = shuffle(["a", "b", "c", "d"]).slice(0, nbElements);
|
|
23
|
+
const arrNode = arrLetter.map((letter) => new VariableNode(letter));
|
|
24
|
+
const nodeSetE = new DiscreteSetNode(arrNode);
|
|
25
|
+
return {
|
|
26
|
+
nodeIdsSetE: nodeSetE.toIdentifiers(),
|
|
27
|
+
strDescriptionE: `l'ensemble $${discreteSetNodeToTex(nodeSetE)}$`,
|
|
28
|
+
};
|
|
29
|
+
})(),
|
|
30
|
+
0.3,
|
|
31
|
+
],
|
|
32
|
+
[
|
|
33
|
+
(() => {
|
|
34
|
+
const nbElements = randint(2, 6);
|
|
35
|
+
const arrNumber = randomMany([...Array(9).keys()].map((i) => i + 1), nbElements);
|
|
36
|
+
const arrNode = shuffle(arrNumber.map((v) => v.toTree()));
|
|
37
|
+
const nodeSetE = new DiscreteSetNode(arrNode);
|
|
38
|
+
return {
|
|
39
|
+
nodeIdsSetE: nodeSetE.toIdentifiers(),
|
|
40
|
+
strDescriptionE: `l'ensemble $${discreteSetNodeToTex(nodeSetE)}$`,
|
|
41
|
+
};
|
|
42
|
+
})(),
|
|
43
|
+
0.3,
|
|
44
|
+
],
|
|
45
|
+
[
|
|
46
|
+
(() => {
|
|
47
|
+
const [boundLowRaw, boundHighRaw] = [randint(2, 8), randint(13, 19)];
|
|
48
|
+
const [isBoundLowIncluded, isBoundHighIncluded] = [0, 1].map(() => coinFlip());
|
|
49
|
+
const boundLow = boundLowRaw + (isBoundLowIncluded ? 0 : 1);
|
|
50
|
+
const boundHigh = boundHighRaw + (isBoundHighIncluded ? 0 : -1);
|
|
51
|
+
const arrNumber = [...Array(boundHigh - boundLow).keys()].map((i) => i + boundLow);
|
|
52
|
+
const arrNode = arrNumber.map((v) => v.toTree());
|
|
53
|
+
const nodeSetE = new DiscreteSetNode(arrNode);
|
|
54
|
+
return {
|
|
55
|
+
nodeIdsSetE: nodeSetE.toIdentifiers(),
|
|
56
|
+
strDescriptionE: `l'ensemble des entiers compris entre $${boundLow}$ ${isBoundLowIncluded ? "inclus" : "exclu"} et $${boundHigh}$ ${isBoundHighIncluded ? "inclus" : "exclu"}`,
|
|
57
|
+
};
|
|
58
|
+
})(),
|
|
59
|
+
0.2,
|
|
60
|
+
],
|
|
61
|
+
[
|
|
62
|
+
(() => {
|
|
63
|
+
const isFilterEven = coinFlip();
|
|
64
|
+
const [boundLowRaw, boundHighRaw] = [randint(2, 8), randint(13, 19)];
|
|
65
|
+
const [isBoundLowIncluded, isBoundHighIncluded] = [0, 1].map(() => coinFlip());
|
|
66
|
+
const boundLow = boundLowRaw + (isBoundLowIncluded ? 0 : 1);
|
|
67
|
+
const boundHigh = boundHighRaw + (isBoundHighIncluded ? 0 : -1);
|
|
68
|
+
const arrNumber = [...Array(boundHigh - boundLow).keys()]
|
|
69
|
+
.map((i) => i + boundLow)
|
|
70
|
+
.filter((v) => (isFilterEven ? v % 2 === 0 : v % 2 === 1));
|
|
71
|
+
const arrNode = arrNumber.map((v) => v.toTree());
|
|
72
|
+
const nodeSetE = new DiscreteSetNode(arrNode);
|
|
73
|
+
return {
|
|
74
|
+
nodeIdsSetE: nodeSetE.toIdentifiers(),
|
|
75
|
+
strDescriptionE: `l'ensemble des entiers ${isFilterEven ? "pairs" : "impairs"} compris entre $${boundLow}$ ${isBoundLowIncluded ? "inclus" : "exclu"} et $${boundHigh}$ ${isBoundHighIncluded ? "inclus" : "exclu"}`,
|
|
76
|
+
};
|
|
77
|
+
})(),
|
|
78
|
+
0.2,
|
|
79
|
+
],
|
|
80
|
+
]);
|
|
81
|
+
};
|
|
82
|
+
/*
|
|
83
|
+
This toTex() function supports discreteSetNodes with variableNodes inside (this won't create unknown command \\lbracem if m is the first element)
|
|
84
|
+
*/
|
|
85
|
+
const discreteSetNodeToTex = (discreteSetNode) => {
|
|
86
|
+
return `\\lbrace ${discreteSetNode.elements
|
|
87
|
+
.map((el) => el.toTex())
|
|
88
|
+
.join(";")} \\rbrace`;
|
|
89
|
+
};
|
|
90
|
+
const getInstruction = (identifiers) => {
|
|
91
|
+
const { strDescriptionE, k } = identifiers;
|
|
92
|
+
return `Soit $E$ ${strDescriptionE}.
|
|
93
|
+
Donner le nombre de $${k}$-uplets d'éléments de E.`;
|
|
94
|
+
};
|
|
95
|
+
const getAnswerNode = (identifiers) => {
|
|
96
|
+
const { nodeIdsSetE, k } = identifiers;
|
|
97
|
+
const nodeSetE = NodeConstructor.fromIdentifiers(nodeIdsSetE);
|
|
98
|
+
return power(nodeSetE.elements.length, k);
|
|
99
|
+
};
|
|
100
|
+
const getAnswer = (identifiers) => {
|
|
101
|
+
return getAnswerNode(identifiers).toTex();
|
|
102
|
+
};
|
|
103
|
+
const getHint = (identifiers) => {
|
|
104
|
+
const { k } = identifiers;
|
|
105
|
+
return `Pour prendre un $${k}$-uplet au hasard, tu peux effectuer $${k}$ tirages avec remise d'un élement de $E$.
|
|
106
|
+
Combien y a-t-il d'issues pour un tirage ?
|
|
107
|
+
Combien y a-t-il de séquences différentes de $${k}$ tirages ?`;
|
|
108
|
+
};
|
|
109
|
+
const getCorrection = (identifiers) => {
|
|
110
|
+
const { nodeIdsSetE, k } = identifiers;
|
|
111
|
+
const nodeSetE = NodeConstructor.fromIdentifiers(nodeIdsSetE);
|
|
112
|
+
const nbElements = nodeSetE.elements.length;
|
|
113
|
+
return `
|
|
114
|
+
$$
|
|
115
|
+
E = ${discreteSetNodeToTex(nodeSetE)}
|
|
116
|
+
$$
|
|
117
|
+
|
|
118
|
+
$E$ comporte $${nbElements}$ éléments.
|
|
119
|
+
|
|
120
|
+
Si on prend un $${k}$-uplet au hasard,
|
|
121
|
+
il y a $${nbElements}$ possibilités pour la première composante,
|
|
122
|
+
il y a $${nbElements}$ possibilités pour la deuxième composante,
|
|
123
|
+
etc.
|
|
124
|
+
|
|
125
|
+
Le nombre de $${k}$-uplets d'éléments de $E$ est $${getAnswer(identifiers)}$.`;
|
|
126
|
+
};
|
|
127
|
+
const getPropositions = (n, { answer, ...identifiers }) => {
|
|
128
|
+
const { nodeIdsSetE, k } = identifiers;
|
|
129
|
+
const nodeSetE = NodeConstructor.fromIdentifiers(nodeIdsSetE);
|
|
130
|
+
const nbElements = nodeSetE.elements.length;
|
|
131
|
+
const propositions = [];
|
|
132
|
+
addValidProp(propositions, answer);
|
|
133
|
+
//student: k^card(E)
|
|
134
|
+
{
|
|
135
|
+
const node = power(k, nbElements);
|
|
136
|
+
tryToAddWrongProp(propositions, node.toTex());
|
|
137
|
+
}
|
|
138
|
+
//student: nb of k-uples of distinct elements of E
|
|
139
|
+
{
|
|
140
|
+
if (k <= nbElements) {
|
|
141
|
+
const node = [...Array(k).keys()]
|
|
142
|
+
.map((i) => i + (nbElements - k + 1))
|
|
143
|
+
.toReversed()
|
|
144
|
+
.map((v) => v.toTree())
|
|
145
|
+
.reduce((acc, x) => multiply(acc, x));
|
|
146
|
+
tryToAddWrongProp(propositions, node.toTex());
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
//student: k * card(E)
|
|
150
|
+
{
|
|
151
|
+
const node = multiply(k, nbElements);
|
|
152
|
+
tryToAddWrongProp(propositions, node.toTex());
|
|
153
|
+
}
|
|
154
|
+
//student: (k*card(E))!
|
|
155
|
+
{
|
|
156
|
+
const node = facto(multiply(k, nbElements));
|
|
157
|
+
tryToAddWrongProp(propositions, node.toTex());
|
|
158
|
+
}
|
|
159
|
+
return shuffleProps(propositions, n);
|
|
160
|
+
};
|
|
161
|
+
const getKeys = (identifiers) => {
|
|
162
|
+
const { nodeIdsSetE } = identifiers;
|
|
163
|
+
const nodeSetE = NodeConstructor.fromIdentifiers(nodeIdsSetE);
|
|
164
|
+
const arrVarNode = nodeSetE.elements.filter((node) => isVariableNode(node));
|
|
165
|
+
return [
|
|
166
|
+
"semicolon",
|
|
167
|
+
"lbrace", //pas gentil
|
|
168
|
+
"rbrace", //pas gentil
|
|
169
|
+
...arrVarNode.map((varNode) => {
|
|
170
|
+
const tex = varNode.toTex();
|
|
171
|
+
return {
|
|
172
|
+
id: "custom",
|
|
173
|
+
label: tex,
|
|
174
|
+
labelType: "tex",
|
|
175
|
+
mathfieldInstructions: {
|
|
176
|
+
method: "write",
|
|
177
|
+
content: tex,
|
|
178
|
+
},
|
|
179
|
+
};
|
|
180
|
+
}),
|
|
181
|
+
];
|
|
182
|
+
};
|
|
183
|
+
const isAnswerValid = (ans, { answer, ..._identifiers }) => {
|
|
184
|
+
try {
|
|
185
|
+
const nodeAns = parseAlgebraic(ans);
|
|
186
|
+
const nodeAnswer = parseAlgebraic(answer);
|
|
187
|
+
return (NodeComparator.isEqualViaSub(nodeAns, nodeAnswer) ||
|
|
188
|
+
NodeComparator.isEqualViaFrac(nodeAns, nodeAnswer));
|
|
189
|
+
}
|
|
190
|
+
catch (e) {
|
|
191
|
+
handleVEAError(e);
|
|
192
|
+
return false;
|
|
193
|
+
}
|
|
194
|
+
};
|
|
195
|
+
const getFindCardinalOfPowEKQuestion = () => {
|
|
196
|
+
const k = randint(3, 6);
|
|
197
|
+
const dict = randomDiscreteSetIdsAndDescription();
|
|
198
|
+
const nodeSetE = NodeConstructor.fromIdentifiers(dict.nodeIdsSetE);
|
|
199
|
+
const identifiers = {
|
|
200
|
+
strDescriptionE: dict.strDescriptionE,
|
|
201
|
+
nodeIdsSetE: nodeSetE.toIdentifiers(),
|
|
202
|
+
k,
|
|
203
|
+
};
|
|
204
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
205
|
+
};
|
|
206
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
207
|
+
const question = {
|
|
208
|
+
instruction: getInstruction(identifiers),
|
|
209
|
+
answer: getAnswer(identifiers),
|
|
210
|
+
keys: getKeys(identifiers),
|
|
211
|
+
answerFormat: "tex",
|
|
212
|
+
identifiers,
|
|
213
|
+
hint: getHint(identifiers),
|
|
214
|
+
correction: getCorrection(identifiers),
|
|
215
|
+
};
|
|
216
|
+
return question;
|
|
217
|
+
};
|
|
218
|
+
export const findCardinalOfPowEK = {
|
|
219
|
+
id: "findCardinalOfPowEK",
|
|
220
|
+
connector: "=",
|
|
221
|
+
isSingleStep: true,
|
|
222
|
+
label: "Un ensemble $E$ étant donné, donner le nombre de $k$-uplets d'éléments de $E$",
|
|
223
|
+
generator: (nb) => getDistinctQuestions(getFindCardinalOfPowEKQuestion, nb),
|
|
224
|
+
qcmTimer: 60,
|
|
225
|
+
freeTimer: 60,
|
|
226
|
+
getPropositions,
|
|
227
|
+
isAnswerValid,
|
|
228
|
+
subject: "Mathématiques",
|
|
229
|
+
hasHintAndCorrection: true,
|
|
230
|
+
getQuestionFromIdentifiers,
|
|
231
|
+
};
|
package/lib/exercises/math/sets/cartesianProduct/findNumberOfPasswordsWithLettersAndNumbers.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Exercise } from "../../../../exercises/exercise.js";
|
|
2
|
+
import { NodeIdentifiers } from "../../../../tree/nodes/nodeConstructor.js";
|
|
3
|
+
type Situation = {
|
|
4
|
+
strInstruction: string;
|
|
5
|
+
strCorrection: string;
|
|
6
|
+
arrSets: {
|
|
7
|
+
cardinal: number;
|
|
8
|
+
nbSamples: number;
|
|
9
|
+
strInjected: string;
|
|
10
|
+
strExplain: string;
|
|
11
|
+
}[];
|
|
12
|
+
nodeIdsCardinal: NodeIdentifiers;
|
|
13
|
+
};
|
|
14
|
+
type Identifiers = {
|
|
15
|
+
situation: Situation;
|
|
16
|
+
};
|
|
17
|
+
export declare const findNumberOfPasswordsWithLettersAndNumbers: Exercise<Identifiers>;
|
|
18
|
+
export {};
|
|
19
|
+
//# sourceMappingURL=findNumberOfPasswordsWithLettersAndNumbers.d.ts.map
|
package/lib/exercises/math/sets/cartesianProduct/findNumberOfPasswordsWithLettersAndNumbers.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"findNumberOfPasswordsWithLettersAndNumbers.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sets/cartesianProduct/findNumberOfPasswordsWithLettersAndNumbers.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAGrC,OAAO,EAEL,eAAe,EAChB,MAAM,qCAAqC,CAAC;AA4E7C,KAAK,SAAS,GAAG;IACf,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE;QACP,QAAQ,EAAE,MAAM,CAAC;QACjB,SAAS,EAAE,MAAM,CAAC;QAClB,WAAW,EAAE,MAAM,CAAC;QACpB,UAAU,EAAE,MAAM,CAAC;KACpB,EAAE,CAAC;IACJ,eAAe,EAAE,eAAe,CAAC;CAClC,CAAC;AA+DF,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,SAAS,CAAC;CACtB,CAAC;AA2IF,eAAO,MAAM,0CAA0C,EAAE,QAAQ,CAAC,WAAW,CAmB1E,CAAC"}
|
package/lib/exercises/math/sets/cartesianProduct/findNumberOfPasswordsWithLettersAndNumbers.js
ADDED
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
|
|
2
|
+
import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
|
+
import { handleVEAError } from "../../../../utils/errors/handleVEAError.js";
|
|
4
|
+
import { NodeConstructor, } from "../../../../tree/nodes/nodeConstructor.js";
|
|
5
|
+
import { random, randomMany } from "../../../../utils/alea/random.js";
|
|
6
|
+
import { multiply } from "../../../../tree/nodes/operators/multiplyNode.js";
|
|
7
|
+
import { randint } from "../../../../math/utils/random/randint.js";
|
|
8
|
+
import { joinanded } from "../../../../utils/strings/joinanded.js";
|
|
9
|
+
import { shuffle } from "../../../../utils/alea/shuffle.js";
|
|
10
|
+
import { zip } from "../../../../utils/arrays/arrayZip.js";
|
|
11
|
+
import { power } from "../../../../tree/nodes/operators/powerNode.js";
|
|
12
|
+
import { add } from "../../../../tree/nodes/operators/addNode.js";
|
|
13
|
+
import { parseAlgebraic } from "../../../../tree/parsers/latexParser.js";
|
|
14
|
+
import { NodeComparator } from "../../../../tree/utilities/nodeComparator.js";
|
|
15
|
+
const situationTemplates = [
|
|
16
|
+
{
|
|
17
|
+
strInstruction: "Combien existe-t-il de mots de passe constitués de ${req1} puis de ${req2} ?",
|
|
18
|
+
strCorrection: `\${req1.explain}
|
|
19
|
+
\${req2.explain}
|
|
20
|
+
Le nombre de mots de passe différents est donc $\${cardinal}$.`,
|
|
21
|
+
dictFuncs: {
|
|
22
|
+
letters: (nbSamples) => {
|
|
23
|
+
const cardinal = 26;
|
|
24
|
+
return {
|
|
25
|
+
cardinal,
|
|
26
|
+
nbSamples,
|
|
27
|
+
strInjected: `$${nbSamples}$ lettres`,
|
|
28
|
+
strExplain: `Il y a $${cardinal}$ lettres possibles.`,
|
|
29
|
+
};
|
|
30
|
+
},
|
|
31
|
+
digits: (nbSamples) => {
|
|
32
|
+
const cardinal = 10;
|
|
33
|
+
return {
|
|
34
|
+
cardinal,
|
|
35
|
+
nbSamples,
|
|
36
|
+
strInjected: `$${nbSamples}$ chiffres`,
|
|
37
|
+
strExplain: `Il y a $${cardinal}$ chiffres possibles (${joinanded("0123456789".split("").map((str) => `$${str}$`), ", ", " et ")}).`,
|
|
38
|
+
};
|
|
39
|
+
},
|
|
40
|
+
special: (nbSamples) => {
|
|
41
|
+
const pool = ["!", "@", "*", "&", "?"];
|
|
42
|
+
const cardinal = randint(3, pool.length + 1);
|
|
43
|
+
const arrStr = randomMany(pool, cardinal);
|
|
44
|
+
return {
|
|
45
|
+
cardinal,
|
|
46
|
+
nbSamples,
|
|
47
|
+
strInjected: `$${nbSamples}$ caractères spéciaux (on se limite aux caractères ${joinanded(arrStr, " ", " ")})`,
|
|
48
|
+
strExplain: `Il y a $${cardinal}$ caractères spéciaux possibles.`,
|
|
49
|
+
};
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
];
|
|
54
|
+
class SituationConstructor {
|
|
55
|
+
static randomSituationFromTemplate(situationTemplate) {
|
|
56
|
+
const arrNb = [randint(3, 8), randint(3, 8)];
|
|
57
|
+
const arrSets = zip(arrNb, shuffle(Object.values(situationTemplate.dictFuncs)).slice(arrNb.length - 1)).map(([nb, func]) => func(nb));
|
|
58
|
+
const { strInstruction, strCorrection: strCorrectionIncomplete, nodeCardinal, nodeCardinalExpanded, } = arrSets.reduce((acc, miniDict, i) => {
|
|
59
|
+
const index = i + 1;
|
|
60
|
+
acc.strInstruction = acc.strInstruction.replace(`\${req${index}}`, miniDict.strInjected);
|
|
61
|
+
acc.strCorrection = acc.strCorrection.replace(`\${req${index}.explain}`, miniDict.strExplain);
|
|
62
|
+
acc.nodeCardinal = acc.nodeCardinal
|
|
63
|
+
? multiply(acc.nodeCardinal, power(miniDict.cardinal, miniDict.nbSamples))
|
|
64
|
+
: power(miniDict.cardinal, miniDict.nbSamples);
|
|
65
|
+
acc.nodeCardinalExpanded = acc.nodeCardinalExpanded
|
|
66
|
+
? multiply(acc.nodeCardinalExpanded, power(miniDict.cardinal, miniDict.nbSamples).toMultiplyNode())
|
|
67
|
+
: power(miniDict.cardinal, miniDict.nbSamples).toMultiplyNode();
|
|
68
|
+
return acc;
|
|
69
|
+
}, {
|
|
70
|
+
strInstruction: situationTemplate.strInstruction,
|
|
71
|
+
strCorrection: situationTemplate.strCorrection,
|
|
72
|
+
nodeCardinal: undefined,
|
|
73
|
+
nodeCardinalExpanded: undefined,
|
|
74
|
+
});
|
|
75
|
+
const strCorrection = strCorrectionIncomplete.replace(`\${cardinal}`, `${nodeCardinalExpanded.toTex()} = ${nodeCardinal.toTex()}`);
|
|
76
|
+
return {
|
|
77
|
+
nodeIdsCardinal: nodeCardinal.toIdentifiers(),
|
|
78
|
+
strInstruction,
|
|
79
|
+
strCorrection,
|
|
80
|
+
arrSets,
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
const getInstruction = (identifiers) => {
|
|
85
|
+
const { situation: { strInstruction }, } = identifiers;
|
|
86
|
+
return strInstruction;
|
|
87
|
+
};
|
|
88
|
+
const getAnswerNode = (identifiers) => {
|
|
89
|
+
const { situation: { nodeIdsCardinal }, } = identifiers;
|
|
90
|
+
const nodeCardinal = NodeConstructor.fromIdentifiers(nodeIdsCardinal);
|
|
91
|
+
return nodeCardinal;
|
|
92
|
+
};
|
|
93
|
+
const getAnswer = (identifiers) => {
|
|
94
|
+
return getAnswerNode(identifiers)
|
|
95
|
+
.simplify({ towardsDistribute: true })
|
|
96
|
+
.toTex();
|
|
97
|
+
};
|
|
98
|
+
const getHint = () => {
|
|
99
|
+
return `Voici un exemple avec un mot de passe de longueur $3$ constitué uniquement avec les lettres a, b, c ou d.
|
|
100
|
+
Il y a $4$ possibilités pour le premier caractère.
|
|
101
|
+
Il y a $4$ possibilités pour le deuxième caractère.
|
|
102
|
+
Il y a $4$ possibilités pour le troisième caractère.
|
|
103
|
+
Il y a donc en tout $4 \\times 4 \\times 4 = 4^3$ mots de passe possibles.`;
|
|
104
|
+
};
|
|
105
|
+
const getCorrection = (identifiers) => {
|
|
106
|
+
const { situation: { strCorrection }, } = identifiers;
|
|
107
|
+
return strCorrection;
|
|
108
|
+
};
|
|
109
|
+
const getPropositions = (n, { answer, ...identifiers }) => {
|
|
110
|
+
const { situation: { arrSets }, } = identifiers;
|
|
111
|
+
const propositions = [];
|
|
112
|
+
addValidProp(propositions, answer);
|
|
113
|
+
//student: multiplies everything
|
|
114
|
+
{
|
|
115
|
+
const nodeWrong = arrSets.slice(1).reduce((acc, { cardinal, nbSamples }) => multiply(acc, multiply(cardinal, nbSamples)), (() => {
|
|
116
|
+
const { cardinal, nbSamples } = arrSets[0];
|
|
117
|
+
return multiply(cardinal, nbSamples);
|
|
118
|
+
})());
|
|
119
|
+
tryToAddWrongProp(propositions, nodeWrong.toTex());
|
|
120
|
+
}
|
|
121
|
+
//student: times+times+times
|
|
122
|
+
{
|
|
123
|
+
const nodeWrong = arrSets.slice(1).reduce((acc, { cardinal, nbSamples }) => add(acc, multiply(cardinal, nbSamples)), (() => {
|
|
124
|
+
const { cardinal, nbSamples } = arrSets[0];
|
|
125
|
+
return multiply(cardinal, nbSamples);
|
|
126
|
+
})());
|
|
127
|
+
tryToAddWrongProp(propositions, nodeWrong.toTex());
|
|
128
|
+
}
|
|
129
|
+
//student: pow+pow+pow
|
|
130
|
+
{
|
|
131
|
+
const nodeWrong = arrSets.slice(1).reduce((acc, { cardinal, nbSamples }) => add(acc, power(cardinal, nbSamples)), (() => {
|
|
132
|
+
const { cardinal, nbSamples } = arrSets[0];
|
|
133
|
+
return power(cardinal, nbSamples);
|
|
134
|
+
})());
|
|
135
|
+
tryToAddWrongProp(propositions, nodeWrong.toTex());
|
|
136
|
+
}
|
|
137
|
+
return shuffleProps(propositions, n);
|
|
138
|
+
};
|
|
139
|
+
const getKeys = () => {
|
|
140
|
+
return [];
|
|
141
|
+
};
|
|
142
|
+
const isAnswerValid = (ans, { answer, ..._identifiers }) => {
|
|
143
|
+
try {
|
|
144
|
+
const nodeAns = parseAlgebraic(ans);
|
|
145
|
+
const nodeAnswer = parseAlgebraic(answer);
|
|
146
|
+
return (NodeComparator.isEqualViaFrac(nodeAns, nodeAnswer) ||
|
|
147
|
+
NodeComparator.isEqualViaSub(nodeAns, nodeAnswer));
|
|
148
|
+
}
|
|
149
|
+
catch (e) {
|
|
150
|
+
handleVEAError(e);
|
|
151
|
+
return false;
|
|
152
|
+
}
|
|
153
|
+
};
|
|
154
|
+
const getFindNumberOfPasswordsWithLettersAndNumbersQuestion = () => {
|
|
155
|
+
const situationTemplate = random(situationTemplates);
|
|
156
|
+
const situation = SituationConstructor.randomSituationFromTemplate(situationTemplate);
|
|
157
|
+
const identifiers = {
|
|
158
|
+
situation,
|
|
159
|
+
};
|
|
160
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
161
|
+
};
|
|
162
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
163
|
+
const question = {
|
|
164
|
+
instruction: getInstruction(identifiers),
|
|
165
|
+
answer: getAnswer(identifiers),
|
|
166
|
+
keys: getKeys(identifiers),
|
|
167
|
+
answerFormat: "tex",
|
|
168
|
+
identifiers,
|
|
169
|
+
hint: getHint(identifiers),
|
|
170
|
+
correction: getCorrection(identifiers),
|
|
171
|
+
};
|
|
172
|
+
return question;
|
|
173
|
+
};
|
|
174
|
+
export const findNumberOfPasswordsWithLettersAndNumbers = {
|
|
175
|
+
id: "findNumberOfPasswordsWithLettersAndNumbers",
|
|
176
|
+
connector: "=",
|
|
177
|
+
isSingleStep: true,
|
|
178
|
+
label: "Déterminer le nombre de mots de passe possibles (avec $2$ types de caractères)",
|
|
179
|
+
generator: (nb) => getDistinctQuestions(getFindNumberOfPasswordsWithLettersAndNumbersQuestion, nb),
|
|
180
|
+
qcmTimer: 60,
|
|
181
|
+
freeTimer: 60,
|
|
182
|
+
getPropositions,
|
|
183
|
+
isAnswerValid,
|
|
184
|
+
subject: "Mathématiques",
|
|
185
|
+
hasHintAndCorrection: true,
|
|
186
|
+
getQuestionFromIdentifiers,
|
|
187
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export * from "./proposeElementInCartesianProductOfFiniteSets.js";
|
|
2
|
+
export * from "./findCardinalOfCartesianProductOfFiniteSets.js";
|
|
3
|
+
export * from "./findCardinalOfCartesianProductOfFiniteSetsFromSituation.js";
|
|
4
|
+
export * from "./proposeElementInPowEK.js";
|
|
5
|
+
export * from "./findCardinalOfPowEK.js";
|
|
6
|
+
export * from "./findNumberOfPasswordsWithLettersAndNumbers.js";
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sets/cartesianProduct/index.ts"],"names":[],"mappings":"AAAA,cAAc,mDAAmD,CAAC;AAClE,cAAc,iDAAiD,CAAC;AAChE,cAAc,8DAA8D,CAAC;AAC7E,cAAc,4BAA4B,CAAC;AAC3C,cAAc,0BAA0B,CAAC;AACzC,cAAc,iDAAiD,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export * from "./proposeElementInCartesianProductOfFiniteSets.js";
|
|
2
|
+
export * from "./findCardinalOfCartesianProductOfFiniteSets.js";
|
|
3
|
+
export * from "./findCardinalOfCartesianProductOfFiniteSetsFromSituation.js";
|
|
4
|
+
export * from "./proposeElementInPowEK.js";
|
|
5
|
+
export * from "./findCardinalOfPowEK.js";
|
|
6
|
+
export * from "./findNumberOfPasswordsWithLettersAndNumbers.js";
|
package/lib/exercises/math/sets/cartesianProduct/proposeElementInCartesianProductOfFiniteSets.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Exercise } from "../../../../exercises/exercise.js";
|
|
2
|
+
import { NodeIdentifiers } from "../../../../tree/nodes/nodeConstructor.js";
|
|
3
|
+
type Item = {
|
|
4
|
+
tex: string;
|
|
5
|
+
isValid: boolean;
|
|
6
|
+
};
|
|
7
|
+
type Identifiers = {
|
|
8
|
+
nodeIdsSetA: NodeIdentifiers;
|
|
9
|
+
nodeIdsSetB: NodeIdentifiers;
|
|
10
|
+
isAskedACrossB: boolean;
|
|
11
|
+
items: Item[];
|
|
12
|
+
};
|
|
13
|
+
export declare const proposeElementInCartesianProductOfFiniteSets: Exercise<Identifiers>;
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=proposeElementInCartesianProductOfFiniteSets.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"proposeElementInCartesianProductOfFiniteSets.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sets/cartesianProduct/proposeElementInCartesianProductOfFiniteSets.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAMrC,OAAO,EAEL,eAAe,EAChB,MAAM,qCAAqC,CAAC;AA2B7C,KAAK,IAAI,GAAG;IACV,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,eAAe,CAAC;IAC7B,WAAW,EAAE,eAAe,CAAC;IAC7B,cAAc,EAAE,OAAO,CAAC;IACxB,KAAK,EAAE,IAAI,EAAE,CAAC;CACf,CAAC;AAwUF,eAAO,MAAM,4CAA4C,EAAE,QAAQ,CAAC,WAAW,CAmB5E,CAAC"}
|