math-exercises 3.0.200 → 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/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/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/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/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/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 -1
- package/lib/exercises/math/index.d.ts.map +1 -1
- package/lib/exercises/math/index.js +2 -1
- 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/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/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/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/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/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/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 +539 -34
- 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/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/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/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
package/lib/exercises/math/probaStat/tchebychev/tchebychevMinorizeProbaOfXInCenteredInterval.js
ADDED
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import { addValidProp, shuffleProps, tryToAddWrongProp, propWhile, } from "../../../../exercises/exercise.js";
|
|
2
|
+
import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
|
+
import { randfloat } from "../../../../math/utils/random/randfloat.js";
|
|
4
|
+
import { randint } from "../../../../math/utils/random/randint.js";
|
|
5
|
+
import { abs } from "../../../../tree/nodes/functions/absNode.js";
|
|
6
|
+
import { NodeConstructor, } from "../../../../tree/nodes/nodeConstructor.js";
|
|
7
|
+
import { add } from "../../../../tree/nodes/operators/addNode.js";
|
|
8
|
+
import { frac } from "../../../../tree/nodes/operators/fractionNode.js";
|
|
9
|
+
import { square } from "../../../../tree/nodes/operators/powerNode.js";
|
|
10
|
+
import { substract } from "../../../../tree/nodes/operators/substractNode.js";
|
|
11
|
+
import { VariableNode } from "../../../../tree/nodes/variables/variableNode.js";
|
|
12
|
+
import { parseAlgebraic } from "../../../../tree/parsers/latexParser.js";
|
|
13
|
+
import { NodeComparator } from "../../../../tree/utilities/nodeComparator.js";
|
|
14
|
+
import { handleVEAError } from "../../../../utils/errors/handleVEAError.js";
|
|
15
|
+
import { alignTex } from "../../../../utils/latex/alignTex.js";
|
|
16
|
+
const getHydrated = (identifiers) => {
|
|
17
|
+
const { nodeIdsE, nodeIdsV, nodeIdsA } = identifiers;
|
|
18
|
+
const [nodeE, nodeV, nodeA] = [nodeIdsE, nodeIdsV, nodeIdsA].map((nodeIds) => NodeConstructor.fromIdentifiers(nodeIds));
|
|
19
|
+
const nodeVarX = new VariableNode("X");
|
|
20
|
+
const nodeBoundLow = substract(nodeE, nodeA).simplify();
|
|
21
|
+
const nodeBoundHigh = add(nodeE, nodeA).simplify();
|
|
22
|
+
const texPWithinBounds = `P( ${nodeBoundLow.toTex()} < ${nodeVarX.toTex()} < ${nodeBoundHigh.toTex()} )`;
|
|
23
|
+
const nodeErrorMin = frac(nodeV, square(nodeA));
|
|
24
|
+
return {
|
|
25
|
+
nodeE,
|
|
26
|
+
nodeV,
|
|
27
|
+
nodeA,
|
|
28
|
+
texPWithinBounds,
|
|
29
|
+
nodeErrorMin,
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
const getInstruction = (identifiers) => {
|
|
33
|
+
const { nodeE, nodeV, texPWithinBounds } = getHydrated(identifiers);
|
|
34
|
+
return `Soit $X$ une variable aléatoire d'espérance $${nodeE.toTex()}$ et de variance $${nodeV.toTex()}$.
|
|
35
|
+
À l'aide du théorème de Bienaymé-Tchebychev, donner une minoration de $${texPWithinBounds}$.`;
|
|
36
|
+
};
|
|
37
|
+
const getAnswer = (identifiers) => {
|
|
38
|
+
const { nodeErrorMin } = getHydrated(identifiers);
|
|
39
|
+
return nodeErrorMin.simplify().toTex();
|
|
40
|
+
};
|
|
41
|
+
const getHint = () => {
|
|
42
|
+
const nodeE = new VariableNode("E(Y)");
|
|
43
|
+
const nodeV = new VariableNode("V(Y)");
|
|
44
|
+
const nodeA = new VariableNode("a");
|
|
45
|
+
const nodeVarY = new VariableNode("Y");
|
|
46
|
+
const nodeBoundLow = substract(nodeE, nodeA);
|
|
47
|
+
const nodeBoundHigh = add(nodeE, nodeA);
|
|
48
|
+
const texPWithinBounds = `P( ${nodeBoundLow.toTex()} < ${nodeVarY.toTex()} < ${nodeBoundHigh.toTex()} )`;
|
|
49
|
+
const nodeLhs = abs(substract(nodeVarY, nodeE).simplify());
|
|
50
|
+
const texPOutside = `P( ${nodeLhs.toTex()} \\geq ${nodeA.toTex()} )`;
|
|
51
|
+
const texPInside = `P( ${nodeLhs.toTex()} < ${nodeA.toTex()} )`;
|
|
52
|
+
const nodeErrorMax = frac(nodeV, square(nodeA));
|
|
53
|
+
return `Soit $Y$ une variable aléatoire. Soit $a$ un réel strictement positif.
|
|
54
|
+
|
|
55
|
+
D'après le théorème de Bienaymé-Tchebychev :
|
|
56
|
+
|
|
57
|
+
${alignTex([
|
|
58
|
+
[texPOutside, "\\leq", nodeErrorMax.toTex()],
|
|
59
|
+
[`1 - ${texPOutside}`, `\\geq`, `1 - ${nodeErrorMax.toTex()}`],
|
|
60
|
+
[texPInside, `\\geq`, `1 - ${nodeErrorMax.toTex()}`],
|
|
61
|
+
[texPWithinBounds, `\\geq`, `1 - ${nodeErrorMax.toTex()}`],
|
|
62
|
+
])}
|
|
63
|
+
|
|
64
|
+
`;
|
|
65
|
+
};
|
|
66
|
+
const getCorrection = (identifiers) => {
|
|
67
|
+
const { nodeA, nodeE, texPWithinBounds, nodeErrorMin } = getHydrated(identifiers);
|
|
68
|
+
const nodeVarX = new VariableNode("X");
|
|
69
|
+
const nodeLhs = abs(substract(nodeVarX, nodeE).simplify());
|
|
70
|
+
const texPInside = `P( ${nodeLhs.toTex()} < ${nodeA.toTex()} )`;
|
|
71
|
+
return `D'après le théorème de Bienaymé-Tchebychev :
|
|
72
|
+
|
|
73
|
+
${alignTex([
|
|
74
|
+
[
|
|
75
|
+
`P( \\lvert X - E(X) \\rvert \\geq ${nodeA.toTex()})`,
|
|
76
|
+
`\\leq`,
|
|
77
|
+
`\\frac{V(X)}{${square(nodeA).toTex()}}`,
|
|
78
|
+
],
|
|
79
|
+
[
|
|
80
|
+
`1 - P( \\lvert X - E(X) \\rvert \\geq ${nodeA.toTex()})`,
|
|
81
|
+
`\\geq`,
|
|
82
|
+
`1 - \\frac{V(X)}{${square(nodeA).toTex()}}`,
|
|
83
|
+
],
|
|
84
|
+
[texPInside, `\\geq`, nodeErrorMin.toTex()],
|
|
85
|
+
[texPWithinBounds, `\\geq`, nodeErrorMin.simplify().toTex()],
|
|
86
|
+
])}
|
|
87
|
+
|
|
88
|
+
`;
|
|
89
|
+
};
|
|
90
|
+
const getPropositions = (n, { answer }) => {
|
|
91
|
+
const propositions = [];
|
|
92
|
+
addValidProp(propositions, answer);
|
|
93
|
+
propWhile(propositions, n, () => {
|
|
94
|
+
const identifiersWrong = createRandomIdentifiers();
|
|
95
|
+
tryToAddWrongProp(propositions, getAnswer(identifiersWrong));
|
|
96
|
+
});
|
|
97
|
+
return shuffleProps(propositions, n);
|
|
98
|
+
};
|
|
99
|
+
const getKeys = () => {
|
|
100
|
+
return [];
|
|
101
|
+
};
|
|
102
|
+
const isAnswerValid = (ans, { answer }) => {
|
|
103
|
+
try {
|
|
104
|
+
const nodeAns = parseAlgebraic(ans);
|
|
105
|
+
const nodeAnswer = parseAlgebraic(answer);
|
|
106
|
+
return (NodeComparator.isEqualViaSub(nodeAns, nodeAnswer) ||
|
|
107
|
+
NodeComparator.isEqualViaFrac(nodeAns, nodeAnswer));
|
|
108
|
+
}
|
|
109
|
+
catch (err) {
|
|
110
|
+
return handleVEAError(err);
|
|
111
|
+
}
|
|
112
|
+
};
|
|
113
|
+
const createRandomIdentifiers = () => {
|
|
114
|
+
const nodeE = randfloat(-10, 10, 2).toTree();
|
|
115
|
+
const nodeV = randfloat(1, 10, 2).toTree();
|
|
116
|
+
const nodeA = randint(2, Math.ceil(3 * nodeV.evaluate())).toTree();
|
|
117
|
+
const identifiers = {
|
|
118
|
+
nodeIdsE: nodeE.toIdentifiers(),
|
|
119
|
+
nodeIdsV: nodeV.toIdentifiers(),
|
|
120
|
+
nodeIdsA: nodeA.toIdentifiers(),
|
|
121
|
+
};
|
|
122
|
+
return identifiers;
|
|
123
|
+
};
|
|
124
|
+
const getTchebychevMinorizeProbaOfXInCenteredIntervalQuestion = () => {
|
|
125
|
+
const identifiers = createRandomIdentifiers();
|
|
126
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
127
|
+
};
|
|
128
|
+
const getQuestionFromIdentifiers = (identifiers, opts) => {
|
|
129
|
+
return {
|
|
130
|
+
answer: getAnswer(identifiers, opts),
|
|
131
|
+
instruction: getInstruction(identifiers, opts),
|
|
132
|
+
keys: getKeys(identifiers, opts),
|
|
133
|
+
answerFormat: "tex",
|
|
134
|
+
identifiers,
|
|
135
|
+
hint: getHint(identifiers, opts),
|
|
136
|
+
correction: getCorrection(identifiers, opts),
|
|
137
|
+
};
|
|
138
|
+
};
|
|
139
|
+
export const tchebychevMinorizeProbaOfXInCenteredInterval = {
|
|
140
|
+
id: "tchebychevMinorizeProbaOfXInCenteredInterval",
|
|
141
|
+
label: "Utiliser le théorème de Bienaymé Tchebychev pour donner une minoration de la probabilité de tomber dans un intervalle centré sur l'espérance",
|
|
142
|
+
isSingleStep: true,
|
|
143
|
+
generator: (nb, opts) => getDistinctQuestions(() => getTchebychevMinorizeProbaOfXInCenteredIntervalQuestion(opts), nb),
|
|
144
|
+
qcmTimer: 60,
|
|
145
|
+
freeTimer: 60,
|
|
146
|
+
getPropositions,
|
|
147
|
+
isAnswerValid,
|
|
148
|
+
subject: "Mathématiques",
|
|
149
|
+
getInstruction,
|
|
150
|
+
getHint,
|
|
151
|
+
getCorrection,
|
|
152
|
+
getAnswer,
|
|
153
|
+
getQuestionFromIdentifiers,
|
|
154
|
+
hasHintAndCorrection: true,
|
|
155
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Exercise } from "../../../../exercises/exercise.js";
|
|
2
|
+
import { NodeIdentifiers } from "../../../../tree/nodes/nodeConstructor.js";
|
|
3
|
+
type Identifiers = {
|
|
4
|
+
n: number;
|
|
5
|
+
nodeIdsProba: NodeIdentifiers;
|
|
6
|
+
};
|
|
7
|
+
export declare const buildTreeBernoulli: Exercise<Identifiers>;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=buildTreeBernoulli.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"buildTreeBernoulli.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/trees/buildTreeBernoulli.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,6BAA6B,CAAC;AAIrC,OAAO,EAEL,eAAe,EAChB,MAAM,qCAAqC,CAAC;AAK7C,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,YAAY,EAAE,eAAe,CAAC;CAC/B,CAAC;AA4HF,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,WAAW,CAmBpD,CAAC"}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { treeTableVEA } from "../../../../exercises/vea/treeTableVEA.js";
|
|
2
|
+
import { randfloat } from "../../../../math/utils/random/randfloat.js";
|
|
3
|
+
import { NodeConstructor, } from "../../../../tree/nodes/nodeConstructor.js";
|
|
4
|
+
import { substract } from "../../../../tree/nodes/operators/substractNode.js";
|
|
5
|
+
import { coinFlip } from "../../../../utils/alea/coinFlip.js";
|
|
6
|
+
import { handleVEAError } from "../../../../utils/errors/handleVEAError.js";
|
|
7
|
+
const getHydrated = (identifiers) => {
|
|
8
|
+
const { n, nodeIdsProba } = identifiers;
|
|
9
|
+
const nodeProba = NodeConstructor.fromIdentifiers(nodeIdsProba);
|
|
10
|
+
return {
|
|
11
|
+
n,
|
|
12
|
+
nodeProba,
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
const getAnswerTreeTable = (identifiers) => {
|
|
16
|
+
const { n, nodeProba } = getHydrated(identifiers);
|
|
17
|
+
const arrBranch = [
|
|
18
|
+
[`${nodeProba.toTex()}`, "S"],
|
|
19
|
+
[`${substract(1, nodeProba).simplify().toTex()}`, "\\overline{S}"],
|
|
20
|
+
];
|
|
21
|
+
return [
|
|
22
|
+
[arrBranch],
|
|
23
|
+
[arrBranch, arrBranch],
|
|
24
|
+
[arrBranch, arrBranch, arrBranch, arrBranch],
|
|
25
|
+
].slice(0, n);
|
|
26
|
+
};
|
|
27
|
+
const getInstruction = (identifiers) => {
|
|
28
|
+
const { n, nodeProba } = getHydrated(identifiers);
|
|
29
|
+
return `Donner l'arbre qui représente un schéma de Bernoulli de paramètres $${n.frenchify()}$ et $${nodeProba.toTex()}$.`;
|
|
30
|
+
};
|
|
31
|
+
const getHint = () => {
|
|
32
|
+
return `Dans une épreuve de Bernoulli, les probabilités des $2$ seules issues possibles (succès $S$ et échec $\\overline{S}$) sont respectivement $p$ et $1-p$.
|
|
33
|
+
|
|
34
|
+
Un schéma de Bernoulli de paramètres $n$ et $p$ est la répétitions de $n$ épreuves de Bernoulli identiques et indépendantes (toutes ayant la même probabilité de succès $p$).
|
|
35
|
+
|
|
36
|
+
Commence donc par réprésenter les branches correspondant à la première épreuve, puis celles de la deuxième à partir des branches de la première, etc.`;
|
|
37
|
+
};
|
|
38
|
+
const getCorrection = (identifiers) => {
|
|
39
|
+
const { n, nodeProba } = getHydrated(identifiers);
|
|
40
|
+
return `Puisque c'est la même épreuve que l'on réalise $${n.frenchify()}$ fois, l'arbre va comporter un motif qui va se répéter.
|
|
41
|
+
|
|
42
|
+
Ce motif est constitué des $2$ branches correspondant l'épreuve de Bernoulli :
|
|
43
|
+
|
|
44
|
+
- la branche de l'issue succès $S$ avec une probabilité de $${nodeProba.toTex()}$
|
|
45
|
+
- la branche de l'issue échec $\\overline{S}$ avec une probabilité de $${substract(1, nodeProba)
|
|
46
|
+
.simplify()
|
|
47
|
+
.toTex()}$
|
|
48
|
+
|
|
49
|
+
On inscrit ce motif $1$ fois pour la première épreuve,
|
|
50
|
+
$2$ fois pour la deuxième épreuve (car la première épreuve a $2$ issues),
|
|
51
|
+
$4$ fois pour la troisième épreuve (car la séquence "première épreuve puis deuxième épreuve" a $4$ issues), ..., $2^{k-1}$ fois pour la $k$-ième épreuve.`;
|
|
52
|
+
};
|
|
53
|
+
const getKeys = (_identifiers) => {
|
|
54
|
+
return ["S", "overlineS"];
|
|
55
|
+
};
|
|
56
|
+
const isAnswerTreeTableValid = (ans, { answerTreeTable }) => {
|
|
57
|
+
try {
|
|
58
|
+
return treeTableVEA(ans, answerTreeTable);
|
|
59
|
+
}
|
|
60
|
+
catch (err) {
|
|
61
|
+
return handleVEAError(err);
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
const getBuildTreeBernoulliQuestion = () => {
|
|
65
|
+
const n = coinFlip() ? 2 : 3;
|
|
66
|
+
const nodeProba = randfloat(0.2, 0.8, 1).toTree();
|
|
67
|
+
const identifiers = {
|
|
68
|
+
n,
|
|
69
|
+
nodeIdsProba: nodeProba.toIdentifiers(),
|
|
70
|
+
};
|
|
71
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
72
|
+
};
|
|
73
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
74
|
+
const { n } = identifiers;
|
|
75
|
+
return {
|
|
76
|
+
answerTreeTable: getAnswerTreeTable(identifiers),
|
|
77
|
+
instruction: getInstruction(identifiers),
|
|
78
|
+
keys: getKeys(identifiers),
|
|
79
|
+
answerFormat: "tex",
|
|
80
|
+
identifiers,
|
|
81
|
+
hint: getHint(identifiers),
|
|
82
|
+
correction: getCorrection(identifiers),
|
|
83
|
+
initTreeTable: (() => {
|
|
84
|
+
const arrBranch = [
|
|
85
|
+
["", ""],
|
|
86
|
+
["", ""],
|
|
87
|
+
];
|
|
88
|
+
switch (n) {
|
|
89
|
+
case 2: {
|
|
90
|
+
return [[arrBranch], [arrBranch, arrBranch]];
|
|
91
|
+
}
|
|
92
|
+
case 3: {
|
|
93
|
+
return [
|
|
94
|
+
[arrBranch],
|
|
95
|
+
[arrBranch, arrBranch],
|
|
96
|
+
[arrBranch, arrBranch, arrBranch, arrBranch],
|
|
97
|
+
];
|
|
98
|
+
}
|
|
99
|
+
default: {
|
|
100
|
+
throw new Error("Unsupported n: " + n);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
})(),
|
|
104
|
+
};
|
|
105
|
+
};
|
|
106
|
+
export const buildTreeBernoulli = {
|
|
107
|
+
id: "buildTreeBernoulli",
|
|
108
|
+
label: "Donner l'arbre qui permet de représenter un schéma de Bernoulli de paramètres $n$ et $p$ (decontextualisé)",
|
|
109
|
+
isSingleStep: true,
|
|
110
|
+
generator: (nb, opts) =>
|
|
111
|
+
// getDistinctQuestions(() => getBuildTreeBernoulliQuestion(opts), nb),
|
|
112
|
+
[...Array(nb).keys()].map(() => getBuildTreeBernoulliQuestion(opts)),
|
|
113
|
+
qcmTimer: 60,
|
|
114
|
+
freeTimer: 60,
|
|
115
|
+
isAnswerTreeTableValid,
|
|
116
|
+
subject: "Mathématiques",
|
|
117
|
+
getInstruction,
|
|
118
|
+
getHint,
|
|
119
|
+
getCorrection,
|
|
120
|
+
getAnswerTreeTable,
|
|
121
|
+
getQuestionFromIdentifiers,
|
|
122
|
+
answerType: "treeDiagram",
|
|
123
|
+
hasHintAndCorrection: true,
|
|
124
|
+
};
|
|
@@ -2,4 +2,5 @@ export { probabilityTree, probabilityTreeIntersection, probabilityTreeTotalProba
|
|
|
2
2
|
export * from "./fillProbaTreeWithComplementaryProbabilities.js";
|
|
3
3
|
export * from "./buildTreeFromSituation.js";
|
|
4
4
|
export * from "./probaTreeSituationTotalProbaFormula.js";
|
|
5
|
+
export * from "./buildTreeBernoulli.js";
|
|
5
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/trees/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,2BAA2B,EAC3B,+BAA+B,EAC/B,8BAA8B,EAC9B,mCAAmC,GACpC,MAAM,sBAAsB,CAAC;AAC9B,cAAc,kDAAkD,CAAC;AACjE,cAAc,6BAA6B,CAAC;AAC5C,cAAc,0CAA0C,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/trees/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,2BAA2B,EAC3B,+BAA+B,EAC/B,8BAA8B,EAC9B,mCAAmC,GACpC,MAAM,sBAAsB,CAAC;AAC9B,cAAc,kDAAkD,CAAC;AACjE,cAAc,6BAA6B,CAAC;AAC5C,cAAc,0CAA0C,CAAC;AACzD,cAAc,yBAAyB,CAAC"}
|
|
@@ -2,3 +2,4 @@ export { probabilityTree, probabilityTreeIntersection, probabilityTreeTotalProba
|
|
|
2
2
|
export * from "./fillProbaTreeWithComplementaryProbabilities.js";
|
|
3
3
|
export * from "./buildTreeFromSituation.js";
|
|
4
4
|
export * from "./probaTreeSituationTotalProbaFormula.js";
|
|
5
|
+
export * from "./buildTreeBernoulli.js";
|
|
@@ -2,4 +2,8 @@ export * from "./recognizeGeometricFromGraph.js";
|
|
|
2
2
|
export * from "./plausibleGeometricSequenceExpressionFromGraph.js";
|
|
3
3
|
export * from "./readGeometricExpressionFromGraph.js";
|
|
4
4
|
export * from "./compareGeometricReasonWithOneFromGraph.js";
|
|
5
|
+
export * from "./geometricPlaceFirstPoints.js";
|
|
6
|
+
export * from "./geometricSignOfReasonFromGraph.js";
|
|
7
|
+
export * from "./geometricFindThresholdFromGraph.js";
|
|
8
|
+
export * from "./geometricFindThresholdUsingCalculator.js";
|
|
5
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/sequences/geometric/graph/index.ts"],"names":[],"mappings":"AAAA,cAAc,kCAAkC,CAAC;AACjD,cAAc,oDAAoD,CAAC;AACnE,cAAc,uCAAuC,CAAC;AACtD,cAAc,6CAA6C,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/sequences/geometric/graph/index.ts"],"names":[],"mappings":"AAAA,cAAc,kCAAkC,CAAC;AACjD,cAAc,oDAAoD,CAAC;AACnE,cAAc,uCAAuC,CAAC;AACtD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,gCAAgC,CAAC;AAC/C,cAAc,qCAAqC,CAAC;AACpD,cAAc,sCAAsC,CAAC;AACrD,cAAc,4CAA4C,CAAC"}
|
|
@@ -2,3 +2,7 @@ export * from "./recognizeGeometricFromGraph.js";
|
|
|
2
2
|
export * from "./plausibleGeometricSequenceExpressionFromGraph.js";
|
|
3
3
|
export * from "./readGeometricExpressionFromGraph.js";
|
|
4
4
|
export * from "./compareGeometricReasonWithOneFromGraph.js";
|
|
5
|
+
export * from "./geometricPlaceFirstPoints.js";
|
|
6
|
+
export * from "./geometricSignOfReasonFromGraph.js";
|
|
7
|
+
export * from "./geometricFindThresholdFromGraph.js";
|
|
8
|
+
export * from "./geometricFindThresholdUsingCalculator.js";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from "./geometricExplicitFormulaUsage.js";
|
|
2
2
|
export * from "./geometricFindExplicitFormula.js";
|
|
3
3
|
export * from "./geometricFindExplicitFormulaFirstRankOne.js";
|
|
4
|
+
export * from "./geometricFindRecurrenceFormula.js";
|
|
4
5
|
export * from "./geometricFindReason.js";
|
|
5
6
|
export * from "./geometricReasonUsage.js";
|
|
6
7
|
export * from "./geometricRecurrenceFormulaUsage.js";
|
|
@@ -15,5 +16,6 @@ export * from "./situations/index.js";
|
|
|
15
16
|
export * from "./geometricFindExplicitFormulaFromTwoTerms.js";
|
|
16
17
|
export * from "./geometricFindExplicitFormulaFromTwoConsecutiveTerms.js";
|
|
17
18
|
export * from "./geometricFindRandomTermFromTwoConsecutiveTerms.js";
|
|
19
|
+
export * from "./geometricFindNextTermFromTwoConsecutiveTerms.js";
|
|
18
20
|
export * from "./graph/index.js";
|
|
19
21
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sequences/geometric/index.ts"],"names":[],"mappings":"AAAA,cAAc,oCAAoC,CAAC;AACnD,cAAc,mCAAmC,CAAC;AAClD,cAAc,+CAA+C,CAAC;AAE9D,cAAc,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,sCAAsC,CAAC;AACrD,cAAc,kDAAkD,CAAC;AACjE,cAAc,wBAAwB,CAAC;AACvC,cAAc,oCAAoC,CAAC;AAEnD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,0BAA0B,CAAC;AAEzC,cAAc,0CAA0C,CAAC;AAEzD,cAAc,gBAAgB,CAAC;AAE/B,cAAc,uBAAuB,CAAC;AAEtC,cAAc,+CAA+C,CAAC;AAC9D,cAAc,0DAA0D,CAAC;AACzE,cAAc,qDAAqD,CAAC;AACpE,cAAc,kBAAkB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sequences/geometric/index.ts"],"names":[],"mappings":"AAAA,cAAc,oCAAoC,CAAC;AACnD,cAAc,mCAAmC,CAAC;AAClD,cAAc,+CAA+C,CAAC;AAE9D,cAAc,qCAAqC,CAAC;AAEpD,cAAc,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,sCAAsC,CAAC;AACrD,cAAc,kDAAkD,CAAC;AACjE,cAAc,wBAAwB,CAAC;AACvC,cAAc,oCAAoC,CAAC;AAEnD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,0BAA0B,CAAC;AAEzC,cAAc,0CAA0C,CAAC;AAEzD,cAAc,gBAAgB,CAAC;AAE/B,cAAc,uBAAuB,CAAC;AAEtC,cAAc,+CAA+C,CAAC;AAC9D,cAAc,0DAA0D,CAAC;AACzE,cAAc,qDAAqD,CAAC;AACpE,cAAc,mDAAmD,CAAC;AAElE,cAAc,kBAAkB,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from "./geometricExplicitFormulaUsage.js";
|
|
2
2
|
export * from "./geometricFindExplicitFormula.js";
|
|
3
3
|
export * from "./geometricFindExplicitFormulaFirstRankOne.js";
|
|
4
|
+
export * from "./geometricFindRecurrenceFormula.js";
|
|
4
5
|
export * from "./geometricFindReason.js";
|
|
5
6
|
export * from "./geometricReasonUsage.js";
|
|
6
7
|
export * from "./geometricRecurrenceFormulaUsage.js";
|
|
@@ -15,4 +16,5 @@ export * from "./situations/index.js";
|
|
|
15
16
|
export * from "./geometricFindExplicitFormulaFromTwoTerms.js";
|
|
16
17
|
export * from "./geometricFindExplicitFormulaFromTwoConsecutiveTerms.js";
|
|
17
18
|
export * from "./geometricFindRandomTermFromTwoConsecutiveTerms.js";
|
|
19
|
+
export * from "./geometricFindNextTermFromTwoConsecutiveTerms.js";
|
|
18
20
|
export * from "./graph/index.js";
|
package/lib/exercises/math/sequences/geometric/situations/geometricFindRankFromSituation.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"geometricFindRankFromSituation.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/sequences/geometric/situations/geometricFindRankFromSituation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAgBT,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAEL,sBAAsB,EACvB,MAAM,mDAAmD,CAAC;AAC3D,OAAO,EAEL,2BAA2B,EAC5B,MAAM,wDAAwD,CAAC;AAIhE,OAAO,EAEL,iCAAiC,EAElC,MAAM,iEAAiE,CAAC;AAGzE,KAAK,WAAW,GAAG;IACjB,cAAc,EAAE,MAAM,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,eAAe,CAAC,EAAE,iCAAiC,CAAC;IACpD,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;
|
|
1
|
+
{"version":3,"file":"geometricFindRankFromSituation.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/sequences/geometric/situations/geometricFindRankFromSituation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAgBT,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAEL,sBAAsB,EACvB,MAAM,mDAAmD,CAAC;AAC3D,OAAO,EAEL,2BAA2B,EAC5B,MAAM,wDAAwD,CAAC;AAIhE,OAAO,EAEL,iCAAiC,EAElC,MAAM,iEAAiE,CAAC;AAGzE,KAAK,WAAW,GAAG;IACjB,cAAc,EAAE,MAAM,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,eAAe,CAAC,EAAE,iCAAiC,CAAC;IACpD,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAuNF,KAAK,OAAO,GAAG,sBAAsB,GAAG,2BAA2B,CAAC;AAcpE,eAAO,MAAM,8BAA8B,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAmBzE,CAAC"}
|
|
@@ -10,65 +10,46 @@ const situations = situationsGeometric;
|
|
|
10
10
|
const getInstruction = (identifiers, optsIn) => {
|
|
11
11
|
const opts = optsIn ?? optsDefault;
|
|
12
12
|
const firstRank = opts?.firstTermRankOne ? 1 : 0;
|
|
13
|
-
const { situationIndex, initial, reason, superfluousData } = identifiers;
|
|
13
|
+
const { situationIndex, initial, reason, superfluousData, valueAsked } = identifiers;
|
|
14
14
|
const situation = situations[situationIndex];
|
|
15
15
|
return `${situation.getStrSituation(initial, reason, firstRank, superfluousData)}
|
|
16
16
|
|
|
17
|
-
situation.variationFindRank.getStrQuestion
|
|
18
|
-
initial,
|
|
19
|
-
reason,
|
|
20
|
-
firstRank,
|
|
21
|
-
valueAsked,
|
|
22
|
-
)`;
|
|
17
|
+
${situation.variationFindRank.getStrQuestion(initial, reason, firstRank, valueAsked)}`;
|
|
23
18
|
};
|
|
24
|
-
const getAnswerNode = (
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
// reason,
|
|
31
|
-
// firstRank,
|
|
32
|
-
// valueAsked,
|
|
33
|
-
// );
|
|
34
|
-
return (0).toTree();
|
|
19
|
+
const getAnswerNode = (identifiers, opts) => {
|
|
20
|
+
const firstRank = opts?.firstTermRankOne ? 1 : 0;
|
|
21
|
+
const { situationIndex, initial, reason, valueAsked } = identifiers;
|
|
22
|
+
const situation = situations[situationIndex];
|
|
23
|
+
const { rankDecoder, digitsValue, digitsTarget } = situation;
|
|
24
|
+
return situation.variationFindRank.getAnswerStuff(initial, reason, firstRank, valueAsked, rankDecoder, digitsValue, digitsTarget).answerNode;
|
|
35
25
|
};
|
|
36
26
|
const getAnswer = (identifiers, optsIn) => {
|
|
37
27
|
const opts = optsIn ?? optsDefault;
|
|
38
28
|
return getAnswerNode(identifiers, opts).simplify().toTex();
|
|
39
29
|
};
|
|
40
|
-
const getHint = (
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
return
|
|
30
|
+
const getHint = (identifiers, optsIn) => {
|
|
31
|
+
const opts = optsIn ?? optsDefault;
|
|
32
|
+
const firstRank = opts?.firstTermRankOne ? 1 : 0;
|
|
33
|
+
const { situationIndex, valueAsked } = identifiers;
|
|
34
|
+
const situation = situations[situationIndex];
|
|
35
|
+
const { rankDecoder, digitsValue, digitsTarget } = situation;
|
|
36
|
+
return situation.variationFindRank.getHint(firstRank, valueAsked, rankDecoder, digitsValue, digitsTarget);
|
|
47
37
|
};
|
|
48
|
-
const getCorrection = (
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
// reason,
|
|
56
|
-
// firstRank,
|
|
57
|
-
// valueAsked,
|
|
58
|
-
// ).str as string;
|
|
59
|
-
return "correction";
|
|
38
|
+
const getCorrection = (identifiers, optsIn) => {
|
|
39
|
+
const opts = optsIn ?? optsDefault;
|
|
40
|
+
const firstRank = opts?.firstTermRankOne ? 1 : 0;
|
|
41
|
+
const { situationIndex, initial, reason, valueAsked } = identifiers;
|
|
42
|
+
const situation = situations[situationIndex];
|
|
43
|
+
const { rankDecoder, digitsValue, digitsTarget } = situation;
|
|
44
|
+
return situation.variationFindRank.getCorrectionStuff(initial, reason, firstRank, valueAsked, rankDecoder, digitsValue, digitsTarget).str;
|
|
60
45
|
};
|
|
61
|
-
const getPropositions = (n, { answer
|
|
62
|
-
// const opts = optsIn ?? optsDefault;
|
|
63
|
-
// const firstRank = opts?.firstTermRankOne ? 1 : 0;
|
|
64
|
-
// const { situationIndex, initial, reason, valueAsked } = identifiers;
|
|
65
|
-
// const situation = situations[situationIndex];
|
|
46
|
+
const getPropositions = (n, { answer }, _optsIn) => {
|
|
66
47
|
const propositions = [];
|
|
67
48
|
addValidProp(propositions, answer);
|
|
68
49
|
//filler
|
|
69
50
|
{
|
|
70
51
|
propWhile(propositions, n, () => {
|
|
71
|
-
tryToAddWrongProp(propositions, randint(
|
|
52
|
+
tryToAddWrongProp(propositions, randint(3, 16).frenchify());
|
|
72
53
|
});
|
|
73
54
|
}
|
|
74
55
|
return shuffleProps(propositions, n);
|
|
@@ -81,10 +62,9 @@ const isAnswerValid = (ans, { answer }) => {
|
|
|
81
62
|
return handleVEAError(err);
|
|
82
63
|
}
|
|
83
64
|
};
|
|
84
|
-
const
|
|
85
|
-
const opts = optsIn ?? optsDefault;
|
|
65
|
+
const createRandomIdentifiers = (opts) => {
|
|
86
66
|
const { isWithSuperfluousData } = opts;
|
|
87
|
-
const firstRank = opts
|
|
67
|
+
const firstRank = opts.firstTermRankOne ? 1 : 0;
|
|
88
68
|
const situationIndex = randint(0, situations.length);
|
|
89
69
|
const situation = situations[situationIndex];
|
|
90
70
|
const initial = situation.randInitial();
|
|
@@ -92,9 +72,10 @@ const getGeometricFindRankFromSituationQuestion = (optsIn) => {
|
|
|
92
72
|
const superfluousData = isWithSuperfluousData
|
|
93
73
|
? situation.randSuperfluousData()
|
|
94
74
|
: undefined;
|
|
75
|
+
const { rankDecoder, digitsValue, digitsTarget } = situation;
|
|
95
76
|
const rankAsked = randint(4, 15);
|
|
96
77
|
const valueAsked = situation.variationFindRandomTerm
|
|
97
|
-
.getAnswerNode(initial, reason, firstRank, rankAsked)
|
|
78
|
+
.getAnswerNode(initial, reason, firstRank, rankAsked, rankDecoder, digitsValue, digitsTarget)
|
|
98
79
|
.evaluate();
|
|
99
80
|
const identifiers = {
|
|
100
81
|
situationIndex,
|
|
@@ -103,6 +84,48 @@ const getGeometricFindRankFromSituationQuestion = (optsIn) => {
|
|
|
103
84
|
superfluousData,
|
|
104
85
|
valueAsked,
|
|
105
86
|
};
|
|
87
|
+
return identifiers;
|
|
88
|
+
};
|
|
89
|
+
const isIdentifiersQCPassed = (identifiers) => {
|
|
90
|
+
const isExploding = (identifiers) => {
|
|
91
|
+
let isExploding = false;
|
|
92
|
+
try {
|
|
93
|
+
getAnswer(identifiers);
|
|
94
|
+
}
|
|
95
|
+
catch (e) {
|
|
96
|
+
console.log("e", e);
|
|
97
|
+
isExploding = true;
|
|
98
|
+
}
|
|
99
|
+
return isExploding;
|
|
100
|
+
};
|
|
101
|
+
return !isExploding(identifiers);
|
|
102
|
+
};
|
|
103
|
+
const createQCPassedIdentifiers = (opts) => {
|
|
104
|
+
let identifiers;
|
|
105
|
+
let counter = -1;
|
|
106
|
+
let isValid = false;
|
|
107
|
+
while (!isValid && counter < 100) {
|
|
108
|
+
counter++;
|
|
109
|
+
const identifiersCandidate = createRandomIdentifiers(opts);
|
|
110
|
+
isValid = isIdentifiersQCPassed(identifiersCandidate);
|
|
111
|
+
if (isValid) {
|
|
112
|
+
identifiers = identifiersCandidate;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
if (!isValid) {
|
|
116
|
+
const identifiersDefault = {
|
|
117
|
+
situationIndex: 0,
|
|
118
|
+
initial: 3600,
|
|
119
|
+
reason: 1.0213,
|
|
120
|
+
valueAsked: 4172.3,
|
|
121
|
+
};
|
|
122
|
+
identifiers = identifiersDefault;
|
|
123
|
+
}
|
|
124
|
+
return identifiers;
|
|
125
|
+
};
|
|
126
|
+
const getGeometricFindRankFromSituationQuestion = (optsIn) => {
|
|
127
|
+
const opts = optsIn ?? optsDefault;
|
|
128
|
+
const identifiers = createQCPassedIdentifiers(opts);
|
|
106
129
|
return getQuestionFromIdentifiers(identifiers, opts);
|
|
107
130
|
};
|
|
108
131
|
const getQuestionFromIdentifiers = (identifiers, opts) => {
|
|
@@ -128,7 +151,7 @@ const options = [
|
|
|
128
151
|
export const geometricFindRankFromSituation = {
|
|
129
152
|
id: "geometricFindRankFromSituation",
|
|
130
153
|
connector: "=",
|
|
131
|
-
label: "À partir d'une situation décrivant une évolution géométrique, retrouver le rang d'une valeur donnée",
|
|
154
|
+
label: "À partir d'une situation décrivant une évolution géométrique, retrouver le rang d'une valeur donnée, en utilisant la calculatrice",
|
|
132
155
|
isSingleStep: true,
|
|
133
156
|
generator: (nb, opts) => getDistinctQuestions(() => getGeometricFindRankFromSituationQuestion(opts), nb),
|
|
134
157
|
options,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
export * from "./geometricFindExplicitFormulaFromSituation.js";
|
|
1
2
|
export * from "./geometricFindRecurrenceFormulaFromSituation.js";
|
|
2
3
|
export * from "./geometricFindTermFromSituation.js";
|
|
3
|
-
export * from "./
|
|
4
|
+
export * from "./geometricFindRankFromSituation.js";
|
|
4
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/sequences/geometric/situations/index.ts"],"names":[],"mappings":"AAAA,cAAc,kDAAkD,CAAC;AACjE,cAAc,qCAAqC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/sequences/geometric/situations/index.ts"],"names":[],"mappings":"AAAA,cAAc,gDAAgD,CAAC;AAC/D,cAAc,kDAAkD,CAAC;AACjE,cAAc,qCAAqC,CAAC;AACpD,cAAc,qCAAqC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
export * from "./geometricFindExplicitFormulaFromSituation.js";
|
|
1
2
|
export * from "./geometricFindRecurrenceFormulaFromSituation.js";
|
|
2
3
|
export * from "./geometricFindTermFromSituation.js";
|
|
3
|
-
|
|
4
|
+
export * from "./geometricFindRankFromSituation.js";
|
|
4
5
|
// export * from "./geometricFindThresholdFromSituation.js";
|
|
5
|
-
export * from "./geometricFindExplicitFormulaFromSituation.js";
|
|
@@ -3,4 +3,7 @@ export * from "./setBelonging.js";
|
|
|
3
3
|
export * from "./nameOfNumberSets.js";
|
|
4
4
|
export * from "./subsetsOfKnownSets.js";
|
|
5
5
|
export * from "./isNumberDecimal.js";
|
|
6
|
+
export * from "./cartesianProduct/index.js";
|
|
7
|
+
export * from "./partialPermutations/index.js";
|
|
8
|
+
export * from "./combinations/index.js";
|
|
6
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/sets/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/sets/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AACrC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,yBAAyB,CAAC"}
|
|
@@ -3,3 +3,6 @@ export * from "./setBelonging.js";
|
|
|
3
3
|
export * from "./nameOfNumberSets.js";
|
|
4
4
|
export * from "./subsetsOfKnownSets.js";
|
|
5
5
|
export * from "./isNumberDecimal.js";
|
|
6
|
+
export * from "./cartesianProduct/index.js";
|
|
7
|
+
export * from "./partialPermutations/index.js";
|
|
8
|
+
export * from "./combinations/index.js";
|
|
@@ -1,3 +1,9 @@
|
|
|
1
1
|
export * from "./spaceCoordinatesInPrism.js";
|
|
2
2
|
export * from "./findSpacePointOnRectangularPrism.js";
|
|
3
|
+
export * from "./spaceCoordinatesOfPointInCubeCoordSystem.js";
|
|
4
|
+
export * from "./spaceCoordinatesOfVectorInCubeCoordSystem.js";
|
|
5
|
+
export * from "./spaceCoordinatesOfPointInCubeCoordSystemFromVecPath.js";
|
|
6
|
+
export * from "./spaceVectorLinearCombinationFromCoords.js";
|
|
7
|
+
export * from "./lineLineRelativePositionsFromCubeOuterPoints.js";
|
|
8
|
+
export * from "./linePlaneRelativePositionsFromCubeOuterPoints.js";
|
|
3
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/spaceGeometry/basis/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC;AAC7C,cAAc,uCAAuC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/spaceGeometry/basis/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC;AAC7C,cAAc,uCAAuC,CAAC;AACtD,cAAc,+CAA+C,CAAC;AAC9D,cAAc,gDAAgD,CAAC;AAC/D,cAAc,0DAA0D,CAAC;AACzE,cAAc,6CAA6C,CAAC;AAC5D,cAAc,mDAAmD,CAAC;AAClE,cAAc,oDAAoD,CAAC"}
|
|
@@ -1,2 +1,8 @@
|
|
|
1
1
|
export * from "./spaceCoordinatesInPrism.js";
|
|
2
2
|
export * from "./findSpacePointOnRectangularPrism.js";
|
|
3
|
+
export * from "./spaceCoordinatesOfPointInCubeCoordSystem.js";
|
|
4
|
+
export * from "./spaceCoordinatesOfVectorInCubeCoordSystem.js";
|
|
5
|
+
export * from "./spaceCoordinatesOfPointInCubeCoordSystemFromVecPath.js";
|
|
6
|
+
export * from "./spaceVectorLinearCombinationFromCoords.js";
|
|
7
|
+
export * from "./lineLineRelativePositionsFromCubeOuterPoints.js";
|
|
8
|
+
export * from "./linePlaneRelativePositionsFromCubeOuterPoints.js";
|
package/lib/exercises/math/spaceGeometry/basis/lineLineRelativePositionsFromCubeOuterPoints.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Exercise } from "../../../../exercises/exercise.js";
|
|
2
|
+
import { SpacePointIdentifiers } from "../../../../math/geometry/spacePoint.js";
|
|
3
|
+
type Identifiers = {
|
|
4
|
+
spacePointIdsCubeOrigin: SpacePointIdentifiers;
|
|
5
|
+
spacePointIdsCubeVecsEndPoint: SpacePointIdentifiers[];
|
|
6
|
+
spacePointIdsBaseVecsEndPoint: SpacePointIdentifiers[];
|
|
7
|
+
spacePointIdsWrtBaseVecs: SpacePointIdentifiers[];
|
|
8
|
+
};
|
|
9
|
+
export declare const lineLineRelativePositionsFromCubeOuterPoints: Exercise<Identifiers>;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=lineLineRelativePositionsFromCubeOuterPoints.d.ts.map
|
package/lib/exercises/math/spaceGeometry/basis/lineLineRelativePositionsFromCubeOuterPoints.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lineLineRelativePositionsFromCubeOuterPoints.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/spaceGeometry/basis/lineLineRelativePositionsFromCubeOuterPoints.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,6BAA6B,CAAC;AAIrC,OAAO,EAGL,qBAAqB,EACtB,MAAM,mCAAmC,CAAC;AAgT3C,KAAK,WAAW,GAAG;IACjB,uBAAuB,EAAE,qBAAqB,CAAC;IAC/C,6BAA6B,EAAE,qBAAqB,EAAE,CAAC;IACvD,6BAA6B,EAAE,qBAAqB,EAAE,CAAC;IACvD,wBAAwB,EAAE,qBAAqB,EAAE,CAAC;CACnD,CAAC;AAqhBF,eAAO,MAAM,4CAA4C,EAAE,QAAQ,CAAC,WAAW,CAsB5E,CAAC"}
|