math-exercises 3.0.64 → 3.0.65
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/arithmetics/commonDivisorsList.d.ts.map +1 -1
- package/lib/exercises/math/calcul/arithmetics/commonDivisorsList.js +4 -6
- package/lib/exercises/math/calcul/arithmetics/divisibiltyCriteria.d.ts.map +1 -1
- package/lib/exercises/math/calcul/arithmetics/divisibiltyCriteria.js +4 -5
- package/lib/exercises/math/calcul/arithmetics/divisorsList.d.ts.map +1 -1
- package/lib/exercises/math/calcul/arithmetics/divisorsList.js +18 -7
- package/lib/exercises/math/calcul/arithmetics/euclideanDivision.d.ts.map +1 -1
- package/lib/exercises/math/calcul/arithmetics/euclideanDivision.js +18 -7
- package/lib/exercises/math/calcul/arithmetics/paritySumsAndProducts.d.ts.map +1 -1
- package/lib/exercises/math/calcul/arithmetics/paritySumsAndProducts.js +56 -47
- package/lib/exercises/math/calcul/arithmetics/pgcdCalcul.d.ts.map +1 -1
- package/lib/exercises/math/calcul/arithmetics/pgcdCalcul.js +4 -4
- package/lib/exercises/math/calcul/arithmetics/ppcmCalcul.d.ts.map +1 -1
- package/lib/exercises/math/calcul/arithmetics/ppcmCalcul.js +0 -4
- package/lib/exercises/math/calcul/arithmetics/primeNumbers.d.ts.map +1 -1
- package/lib/exercises/math/calcul/arithmetics/primeNumbers.js +4 -3
- package/lib/exercises/math/calcul/decimals/multiplyDecimalByNegativeTens.js +2 -2
- package/lib/exercises/math/calcul/decimals/multiplyDecimalByTens.d.ts.map +1 -1
- package/lib/exercises/math/calcul/decimals/multiplyDecimalByTens.js +6 -8
- package/lib/exercises/math/calcul/fractions/fractionAndIntegerDivision.d.ts.map +1 -1
- package/lib/exercises/math/calcul/fractions/fractionAndIntegerDivision.js +2 -5
- package/lib/exercises/math/calcul/fractions/fractionsSumsSameDenominators.js +1 -1
- package/lib/exercises/math/calcul/fractions/simplifyFraction.js +2 -2
- package/lib/exercises/math/calcul/operations/index.d.ts +1 -0
- package/lib/exercises/math/calcul/operations/index.d.ts.map +1 -1
- package/lib/exercises/math/calcul/operations/index.js +1 -0
- package/lib/exercises/math/calcul/operations/numberInverse.d.ts +8 -0
- package/lib/exercises/math/calcul/operations/numberInverse.d.ts.map +1 -0
- package/lib/exercises/math/calcul/operations/numberInverse.js +113 -0
- package/lib/exercises/math/calcul/proportionality/rectangleSideAfterReduction.d.ts.map +1 -1
- package/lib/exercises/math/calcul/proportionality/rectangleSideAfterReduction.js +4 -2
- package/lib/exercises/math/calcul/proportionality/scaleCalculation.d.ts.map +1 -1
- package/lib/exercises/math/calcul/proportionality/scaleCalculation.js +65 -35
- package/lib/exercises/math/calculLitteral/distributivity/doubleDistributivityWithCoeff.js +2 -2
- package/lib/exercises/math/calculLitteral/distributivity/simpleDistriXCoeff.js +1 -1
- package/lib/exercises/math/calculLitteral/equation/choseOperationToSolveEquation.js +17 -17
- package/lib/exercises/math/calculLitteral/equation/equa1.js +1 -1
- package/lib/exercises/math/calculLitteral/equation/equa2.js +1 -1
- package/lib/exercises/math/calculLitteral/equation/equa3.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/equa3.js +2 -4
- package/lib/exercises/math/calculLitteral/equation/equa4.js +1 -1
- package/lib/exercises/math/calculLitteral/equation/equationFromSentenceExercise.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/equationFromSentenceExercise.js +78 -63
- package/lib/exercises/math/calculLitteral/equation/firstDegreeEquation.js +3 -3
- package/lib/exercises/math/calculLitteral/equation/firstDegreeEquationIntType1.js +1 -1
- package/lib/exercises/math/calculLitteral/equation/firstDegreeEquationIntType2.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/firstDegreeEquationIntType2.js +2 -4
- package/lib/exercises/math/calculLitteral/equation/firstDegreeEquationIntType3.js +1 -1
- package/lib/exercises/math/calculLitteral/equation/multiplicationEquation.js +1 -1
- package/lib/exercises/math/calculLitteral/factorisation/factoType2.js +1 -1
- package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType0.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType0.js +4 -5
- package/lib/exercises/math/calculLitteral/simplifying/evaluateExpression.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/simplifying/evaluateExpression.js +1 -0
- package/lib/exercises/math/calculLitteral/simplifying/valuateExpression.js +1 -1
- package/lib/exercises/math/conversion/aeraConversion.d.ts.map +1 -1
- package/lib/exercises/math/conversion/aeraConversion.js +4 -4
- package/lib/exercises/math/conversion/hoursToDecimal.d.ts.map +1 -1
- package/lib/exercises/math/conversion/hoursToDecimal.js +6 -5
- package/lib/exercises/math/conversion/hoursToSecond.d.ts.map +1 -1
- package/lib/exercises/math/conversion/hoursToSecond.js +8 -7
- package/lib/exercises/math/conversion/lengthConversion.js +1 -1
- package/lib/exercises/math/conversion/massConversion.js +2 -2
- package/lib/exercises/math/conversion/volumeCapacityConversion.d.ts.map +1 -1
- package/lib/exercises/math/conversion/volumeCapacityConversion.js +42 -23
- package/lib/exercises/math/conversion/volumeConversion.js +2 -2
- package/lib/exercises/math/dataRepresentations/barChartReading.d.ts.map +1 -1
- package/lib/exercises/math/dataRepresentations/barChartReading.js +5 -5
- package/lib/exercises/math/dataRepresentations/tableReading.d.ts.map +1 -1
- package/lib/exercises/math/dataRepresentations/tableReading.js +4 -4
- package/lib/exercises/math/derivation/derivative/ln/lnDerivativeOne.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/ln/lnDerivativeOne.js +27 -14
- package/lib/exercises/math/derivation/derivative/ln/lnDerivativeThree.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/ln/lnDerivativeThree.js +4 -5
- package/lib/exercises/math/derivation/derivative/polynomial/firstDegreeDerivative.js +1 -1
- package/lib/exercises/math/derivation/derivative/polynomial/secondDegreeDerivative.js +1 -1
- package/lib/exercises/math/derivation/derivative/polynomial/thirdDegreeDerivative.js +1 -1
- package/lib/exercises/math/derivation/derivative/sqrt/sqrtProductDerivative.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/sqrt/sqrtProductDerivative.js +8 -5
- package/lib/exercises/math/derivation/tangent/derivativeNumberOrImageReading.d.ts +10 -0
- package/lib/exercises/math/derivation/tangent/derivativeNumberOrImageReading.d.ts.map +1 -0
- package/lib/exercises/math/derivation/tangent/derivativeNumberOrImageReading.js +144 -0
- package/lib/exercises/math/derivation/tangent/derivativeNumberReading.d.ts.map +1 -1
- package/lib/exercises/math/derivation/tangent/derivativeNumberReading.js +17 -12
- package/lib/exercises/math/derivation/tangent/derivativeTangentEquationReading.js +2 -2
- package/lib/exercises/math/derivation/tangent/horizontalTangentFromAlgebraic.d.ts +7 -0
- package/lib/exercises/math/derivation/tangent/horizontalTangentFromAlgebraic.d.ts.map +1 -0
- package/lib/exercises/math/derivation/tangent/horizontalTangentFromAlgebraic.js +108 -0
- package/lib/exercises/math/derivation/tangent/index.d.ts +3 -0
- package/lib/exercises/math/derivation/tangent/index.d.ts.map +1 -1
- package/lib/exercises/math/derivation/tangent/index.js +3 -0
- package/lib/exercises/math/derivation/tangent/tangentEquationWithData.d.ts +9 -0
- package/lib/exercises/math/derivation/tangent/tangentEquationWithData.d.ts.map +1 -0
- package/lib/exercises/math/derivation/tangent/tangentEquationWithData.js +121 -0
- package/lib/exercises/math/derivation/tangent/tangentEquations.d.ts.map +1 -1
- package/lib/exercises/math/derivation/tangent/tangentEquations.js +5 -5
- package/lib/exercises/math/equaDiff/exponentialDifferentialEquationWithIC.d.ts.map +1 -1
- package/lib/exercises/math/equaDiff/exponentialDifferentialEquationWithIC.js +6 -0
- package/lib/exercises/math/functions/affines/signFunction.d.ts.map +1 -1
- package/lib/exercises/math/functions/affines/signFunction.js +7 -7
- package/lib/exercises/math/functions/exponential/expEquation.d.ts.map +1 -1
- package/lib/exercises/math/functions/exponential/expEquation.js +4 -6
- package/lib/exercises/math/functions/exponentials/exponentialsVariations.js +1 -1
- package/lib/exercises/math/geometry/areas/circleArea.d.ts.map +1 -1
- package/lib/exercises/math/geometry/areas/circleArea.js +6 -3
- package/lib/exercises/math/geometry/areas/circleRadiusFromArea.d.ts.map +1 -1
- package/lib/exercises/math/geometry/areas/circleRadiusFromArea.js +6 -5
- package/lib/exercises/math/geometry/areas/rectangleArea.d.ts.map +1 -1
- package/lib/exercises/math/geometry/areas/rectangleArea.js +5 -4
- package/lib/exercises/math/geometry/areas/rectangleSideFromArea.d.ts.map +1 -1
- package/lib/exercises/math/geometry/areas/rectangleSideFromArea.js +3 -2
- package/lib/exercises/math/geometry/areas/rightTriangleArea.js +1 -1
- package/lib/exercises/math/geometry/areas/squareArea.d.ts.map +1 -1
- package/lib/exercises/math/geometry/areas/squareArea.js +4 -3
- package/lib/exercises/math/geometry/areas/triangleArea.d.ts.map +1 -1
- package/lib/exercises/math/geometry/areas/triangleArea.js +8 -5
- package/lib/exercises/math/geometry/areas/triangleAreaV2.d.ts.map +1 -1
- package/lib/exercises/math/geometry/areas/triangleAreaV2.js +3 -2
- package/lib/exercises/math/geometry/cartesian/drawAlineInGGB.js +1 -1
- package/lib/exercises/math/geometry/cartesian/readAbscissOnLine.d.ts.map +1 -1
- package/lib/exercises/math/geometry/cartesian/readAbscissOnLine.js +8 -6
- package/lib/exercises/math/geometry/cartesian/readAbscissOnSemiLine.js +1 -1
- package/lib/exercises/math/geometry/euclidianConstructions/buildTriangleWithSizes.js +1 -1
- package/lib/exercises/math/geometry/perimeters/circleCircumference.d.ts.map +1 -1
- package/lib/exercises/math/geometry/perimeters/circleCircumference.js +10 -8
- package/lib/exercises/math/geometry/perimeters/circleRadiusFromPerimeter.d.ts.map +1 -1
- package/lib/exercises/math/geometry/perimeters/circleRadiusFromPerimeter.js +15 -13
- package/lib/exercises/math/geometry/perimeters/rectanglePerimeter.d.ts.map +1 -1
- package/lib/exercises/math/geometry/perimeters/rectanglePerimeter.js +4 -3
- package/lib/exercises/math/geometry/perimeters/rectangleSideFromPerimeter.d.ts.map +1 -1
- package/lib/exercises/math/geometry/perimeters/rectangleSideFromPerimeter.js +1 -0
- package/lib/exercises/math/geometry/perimeters/squarePerimeter.d.ts.map +1 -1
- package/lib/exercises/math/geometry/perimeters/squarePerimeter.js +3 -2
- package/lib/exercises/math/geometry/perimeters/squareSideFromPerimeter.d.ts.map +1 -1
- package/lib/exercises/math/geometry/perimeters/squareSideFromPerimeter.js +1 -0
- package/lib/exercises/math/geometry/perimeters/trianglePerimeter.js +1 -1
- package/lib/exercises/math/geometry/pythagore/isTriangleRight.d.ts.map +1 -1
- package/lib/exercises/math/geometry/pythagore/isTriangleRight.js +6 -3
- package/lib/exercises/math/geometry/pythagore/pythagoreCalcul.d.ts.map +1 -1
- package/lib/exercises/math/geometry/pythagore/pythagoreCalcul.js +4 -3
- package/lib/exercises/math/geometry/triangles/triangleNature.js +1 -1
- package/lib/exercises/math/geometry/triangles/triangleThirdAngleValue.d.ts.map +1 -1
- package/lib/exercises/math/geometry/triangles/triangleThirdAngleValue.js +11 -4
- package/lib/exercises/math/geometry/vectors/lineFromDirectorVector.js +1 -1
- package/lib/exercises/math/geometry/volumes/coneVolume.d.ts.map +1 -1
- package/lib/exercises/math/geometry/volumes/coneVolume.js +7 -8
- package/lib/exercises/math/geometry/volumes/parallelepipedVolume.d.ts.map +1 -1
- package/lib/exercises/math/geometry/volumes/parallelepipedVolume.js +21 -22
- package/lib/exercises/math/geometry/volumes/sphereVolume.d.ts.map +1 -1
- package/lib/exercises/math/geometry/volumes/sphereVolume.js +2 -1
- package/lib/exercises/math/geometry/volumes/volumeOfPyramidWithSquareOrRectBase.d.ts.map +1 -1
- package/lib/exercises/math/geometry/volumes/volumeOfPyramidWithSquareOrRectBase.js +6 -3
- package/lib/exercises/math/geometry/volumes/volumeOfPyramidWithTriangleBase.d.ts.map +1 -1
- package/lib/exercises/math/geometry/volumes/volumeOfPyramidWithTriangleBase.js +3 -2
- package/lib/exercises/math/geometry/volumes/volumeOfPyramidWithTriangleRectBase.d.ts.map +1 -1
- package/lib/exercises/math/geometry/volumes/volumeOfPyramidWithTriangleRectBase.js +3 -2
- package/lib/exercises/math/percent/averageEvolutionRate.js +1 -1
- package/lib/exercises/math/percent/evolutions/applyPercent.d.ts +9 -0
- package/lib/exercises/math/percent/evolutions/applyPercent.d.ts.map +1 -0
- package/lib/exercises/math/percent/evolutions/applyPercent.js +114 -0
- package/lib/exercises/math/percent/evolutions/averageEvolutionRate.d.ts +8 -0
- package/lib/exercises/math/percent/evolutions/averageEvolutionRate.d.ts.map +1 -0
- package/lib/exercises/math/percent/evolutions/averageEvolutionRate.js +104 -0
- package/lib/exercises/math/percent/evolutions/cmToEvolution.d.ts +7 -0
- package/lib/exercises/math/percent/evolutions/cmToEvolution.d.ts.map +1 -0
- package/lib/exercises/math/percent/evolutions/cmToEvolution.js +88 -0
- package/lib/exercises/math/percent/evolutions/compoundInterest.d.ts +12 -0
- package/lib/exercises/math/percent/evolutions/compoundInterest.d.ts.map +1 -0
- package/lib/exercises/math/percent/evolutions/compoundInterest.js +128 -0
- package/lib/exercises/math/percent/evolutions/evolutionRateFromValues.d.ts +8 -0
- package/lib/exercises/math/percent/evolutions/evolutionRateFromValues.d.ts.map +1 -0
- package/lib/exercises/math/percent/evolutions/evolutionRateFromValues.js +100 -0
- package/lib/exercises/math/percent/evolutions/evolutionToCM.d.ts +7 -0
- package/lib/exercises/math/percent/evolutions/evolutionToCM.d.ts.map +1 -0
- package/lib/exercises/math/percent/evolutions/evolutionToCM.js +83 -0
- package/lib/exercises/math/percent/evolutions/findEndValueAfterEvolution.d.ts +8 -0
- package/lib/exercises/math/percent/evolutions/findEndValueAfterEvolution.d.ts.map +1 -0
- package/lib/exercises/math/percent/evolutions/findEndValueAfterEvolution.js +102 -0
- package/lib/exercises/math/percent/evolutions/findRightCalculForPriceEvolution.d.ts +10 -0
- package/lib/exercises/math/percent/evolutions/findRightCalculForPriceEvolution.d.ts.map +1 -0
- package/lib/exercises/math/percent/evolutions/findRightCalculForPriceEvolution.js +113 -0
- package/lib/exercises/math/percent/evolutions/findStartValueAfterEvolution.d.ts +8 -0
- package/lib/exercises/math/percent/evolutions/findStartValueAfterEvolution.d.ts.map +1 -0
- package/lib/exercises/math/percent/evolutions/findStartValueAfterEvolution.js +100 -0
- package/lib/exercises/math/percent/evolutions/globalPercent.d.ts +7 -0
- package/lib/exercises/math/percent/evolutions/globalPercent.d.ts.map +1 -0
- package/lib/exercises/math/percent/evolutions/globalPercent.js +104 -0
- package/lib/exercises/math/percent/evolutions/index.d.ts +12 -0
- package/lib/exercises/math/percent/evolutions/index.d.ts.map +1 -0
- package/lib/exercises/math/percent/evolutions/index.js +11 -0
- package/lib/exercises/math/percent/evolutions/reciprocalPercentage.d.ts +8 -0
- package/lib/exercises/math/percent/evolutions/reciprocalPercentage.d.ts.map +1 -0
- package/lib/exercises/math/percent/evolutions/reciprocalPercentage.js +108 -0
- package/lib/exercises/math/percent/findEndValueAfterEvolution.js +1 -1
- package/lib/exercises/math/percent/findProportion.d.ts.map +1 -1
- package/lib/exercises/math/percent/findProportion.js +12 -10
- package/lib/exercises/math/percent/findStartValueAfterEvolution.js +1 -1
- package/lib/exercises/math/percent/findTVA.d.ts.map +1 -1
- package/lib/exercises/math/percent/findTVA.js +4 -4
- package/lib/exercises/math/percent/htToTTC.d.ts.map +1 -1
- package/lib/exercises/math/percent/htToTTC.js +11 -7
- package/lib/exercises/math/percent/index.d.ts +1 -10
- package/lib/exercises/math/percent/index.d.ts.map +1 -1
- package/lib/exercises/math/percent/index.js +1 -10
- package/lib/exercises/math/percent/percentToDecimal.d.ts.map +1 -1
- package/lib/exercises/math/percent/percentToDecimal.js +4 -0
- package/lib/exercises/math/percent/percentWritings.d.ts.map +1 -1
- package/lib/exercises/math/percent/percentWritings.js +4 -4
- package/lib/exercises/math/percent/populationEffectifFromSubPopulation.d.ts.map +1 -1
- package/lib/exercises/math/percent/populationEffectifFromSubPopulation.js +7 -5
- package/lib/exercises/math/percent/reciprocalPercentage.js +1 -1
- package/lib/exercises/math/percent/subPopulationEffectifFromPercent.d.ts.map +1 -1
- package/lib/exercises/math/percent/subPopulationEffectifFromPercent.js +6 -4
- package/lib/exercises/math/percent/ttcToHT.d.ts.map +1 -1
- package/lib/exercises/math/percent/ttcToHT.js +4 -4
- package/lib/exercises/math/percent/valuePercent.d.ts.map +1 -1
- package/lib/exercises/math/percent/valuePercent.js +4 -4
- package/lib/exercises/math/powers/calculateNegativePower.d.ts.map +1 -1
- package/lib/exercises/math/powers/calculateNegativePower.js +6 -10
- package/lib/exercises/math/powers/calculatePower.d.ts.map +1 -1
- package/lib/exercises/math/powers/calculatePower.js +1 -0
- package/lib/exercises/math/powers/decimalToScientific.d.ts.map +1 -1
- package/lib/exercises/math/powers/decimalToScientific.js +36 -9
- package/lib/exercises/math/powers/powersMixOperations.d.ts.map +1 -1
- package/lib/exercises/math/powers/powersMixOperations.js +0 -4
- package/lib/exercises/math/powers/powersOfTenMixOperations.d.ts.map +1 -1
- package/lib/exercises/math/powers/powersOfTenMixOperations.js +0 -4
- package/lib/exercises/math/powers/powersOfTenToDecimal.js +2 -2
- package/lib/exercises/math/powers/powersProduct.d.ts.map +1 -1
- package/lib/exercises/math/powers/powersProduct.js +0 -5
- package/lib/exercises/math/powers/scientificToDecimal.js +2 -2
- package/lib/exercises/math/probaStat/ballsBasicProbas.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/ballsBasicProbas.js +4 -4
- package/lib/exercises/math/probaStat/basicStats/calculateFrequency.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/basicStats/calculateFrequency.js +4 -4
- package/lib/exercises/math/probaStat/basicStats/calculateFrequencyInList.d.ts +8 -0
- package/lib/exercises/math/probaStat/basicStats/calculateFrequencyInList.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/basicStats/calculateFrequencyInList.js +117 -0
- package/lib/exercises/math/probaStat/basicStats/index.d.ts +1 -0
- package/lib/exercises/math/probaStat/basicStats/index.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/basicStats/index.js +1 -0
- package/lib/exercises/math/probaStat/binomial/calculateProbaOfBinomialDistribution.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/binomial/calculateProbaOfBinomialDistribution.js +66 -41
- package/lib/exercises/math/probaStat/cardBasicProbas.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/cardBasicProbas.js +4 -2
- package/lib/exercises/math/probaStat/conditionalProbability.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/conditionalProbability.js +168 -88
- package/lib/exercises/math/probaStat/diceBasicProbas.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/diceBasicProbas.js +3 -0
- package/lib/exercises/math/probaStat/independancy.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/independancy.js +18 -8
- package/lib/exercises/math/probaStat/issuesCountingForCards.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/issuesCountingForCards.js +41 -15
- package/lib/exercises/math/probaStat/probaFromTableNoContext.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/probaFromTableNoContext.js +4 -4
- package/lib/exercises/math/probaStat/probaFromTableWithContext.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/probaFromTableWithContext.js +5 -2
- package/lib/exercises/math/probaStat/probabilityTree.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/probabilityTree.js +8 -4
- package/lib/exercises/math/probaStat/stats1var/medianList.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats1var/medianList.js +1 -4
- package/lib/exercises/math/probaStat/stats1var/standardDeviationList.js +1 -1
- package/lib/exercises/math/probaStat/stats1var/standardDeviationTable.js +1 -1
- package/lib/exercises/math/probaStat/stats2var/averagePoint.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats2var/averagePoint.js +25 -22
- package/lib/exercises/math/probaStat/stats2var/fineAdjustementExercise.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats2var/fineAdjustementExercise.js +52 -43
- package/lib/exercises/math/sampling/confidenceInterval.d.ts.map +1 -1
- package/lib/exercises/math/sampling/confidenceInterval.js +4 -4
- package/lib/exercises/math/sampling/fluctuationInterval.d.ts.map +1 -1
- package/lib/exercises/math/sampling/fluctuationInterval.js +4 -4
- package/lib/exercises/math/sampling/isSamplingRepresentative.d.ts.map +1 -1
- package/lib/exercises/math/sampling/isSamplingRepresentative.js +5 -5
- package/lib/exercises/math/sequences/geometric/geometricFirstTermsGeneralSum.d.ts.map +1 -1
- package/lib/exercises/math/sequences/geometric/geometricFirstTermsGeneralSum.js +0 -2
- package/lib/exercises/math/sequences/geometric/geometricVariations.js +1 -1
- package/lib/exercises/math/sets/intervals/inequalityToInterval.d.ts.map +1 -1
- package/lib/exercises/math/sets/intervals/inequalityToInterval.js +4 -4
- package/lib/exercises/math/sets/intervals/intervalToInequality.d.ts.map +1 -1
- package/lib/exercises/math/sets/intervals/intervalToInequality.js +4 -4
- package/lib/exercises/math/sets/intervals/intervalsIntersection.d.ts.map +1 -1
- package/lib/exercises/math/sets/intervals/intervalsIntersection.js +8 -1
- package/lib/exercises/math/sets/intervals/intervalsUnion.d.ts.map +1 -1
- package/lib/exercises/math/sets/intervals/intervalsUnion.js +3 -0
- package/lib/exercises/math/spaceGeometry/basis/spaceCoordinatesInPrism.d.ts.map +1 -1
- package/lib/exercises/math/spaceGeometry/basis/spaceCoordinatesInPrism.js +0 -5
- package/lib/exercises/math/spaceGeometry/index.js +1 -0
- package/lib/exercises/math/spaceGeometry/planes/index.d.ts +2 -0
- package/lib/exercises/math/spaceGeometry/planes/index.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/planes/index.js +2 -0
- package/lib/exercises/math/spaceGeometry/planes/isPointOnCartesianPlane.d.ts +2 -0
- package/lib/exercises/math/spaceGeometry/planes/isPointOnCartesianPlane.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/planes/isPointOnCartesianPlane.js +102 -0
- package/lib/exercises/math/spaceGeometry/vectors/spaceVectorCoordinatesFromPoints.d.ts.map +1 -1
- package/lib/exercises/math/spaceGeometry/vectors/spaceVectorCoordinatesFromPoints.js +4 -4
- package/lib/exercises/math/spaceGeometry/vectors/spaceVectorLinearCombinationCoords.d.ts.map +1 -1
- package/lib/exercises/math/spaceGeometry/vectors/spaceVectorLinearCombinationCoords.js +4 -2
- package/lib/exercises/math/spaceGeometry/vectors/spaceVectorNormCalculation.d.ts.map +1 -1
- package/lib/exercises/math/spaceGeometry/vectors/spaceVectorNormCalculation.js +4 -6
- package/lib/exercises/math/trigonometry/arcLength.d.ts.map +1 -1
- package/lib/exercises/math/trigonometry/arcLength.js +5 -2
- package/lib/exercises/math/trigonometry/basicEquationCos.d.ts.map +1 -1
- package/lib/exercises/math/trigonometry/basicEquationCos.js +4 -3
- package/lib/exercises/math/trigonometry/basicEquationSin.d.ts.map +1 -1
- package/lib/exercises/math/trigonometry/basicEquationSin.js +4 -3
- package/lib/exercises/math/trigonometry/basicTrigoSystemEquation.d.ts.map +1 -1
- package/lib/exercises/math/trigonometry/basicTrigoSystemEquation.js +4 -3
- package/lib/exercises/math/trigonometry/calculateCosSinAndTan.d.ts.map +1 -1
- package/lib/exercises/math/trigonometry/calculateCosSinAndTan.js +1 -0
- package/lib/exercises/math/trigonometry/degreeToRadians.d.ts.map +1 -1
- package/lib/exercises/math/trigonometry/degreeToRadians.js +7 -6
- package/lib/exercises/math/trigonometry/equationCosOnRandomInterval.d.ts.map +1 -1
- package/lib/exercises/math/trigonometry/equationCosOnRandomInterval.js +4 -3
- package/lib/exercises/math/trigonometry/equationSinOnRandomInterval.d.ts.map +1 -1
- package/lib/exercises/math/trigonometry/equationSinOnRandomInterval.js +4 -3
- package/lib/exercises/math/trigonometry/mainAngleMeasure.d.ts.map +1 -1
- package/lib/exercises/math/trigonometry/mainAngleMeasure.js +4 -5
- package/lib/exercises/math/trigonometry/mainRemarkableValues.d.ts.map +1 -1
- package/lib/exercises/math/trigonometry/mainRemarkableValues.js +4 -3
- package/lib/exercises/math/trigonometry/trigonometry.js +2 -2
- package/lib/exercises/math/trigonometry/trigonometryAngleCalcul.d.ts.map +1 -1
- package/lib/exercises/math/trigonometry/trigonometryAngleCalcul.js +5 -3
- package/lib/exercises/math/trigonometry/trigonometrySideCalcul.d.ts.map +1 -1
- package/lib/exercises/math/trigonometry/trigonometrySideCalcul.js +6 -6
- package/lib/exercises/pc/chemicalElements/atomicStructureOfNucleus.js +1 -1
- package/lib/index.d.ts +47 -25
- package/lib/index.d.ts.map +1 -1
- package/lib/math/spaceGeometry/plane.d.ts +9 -0
- package/lib/math/spaceGeometry/plane.d.ts.map +1 -0
- package/lib/math/spaceGeometry/plane.js +22 -0
- package/lib/tree/nodes/algebraicNode.d.ts +1 -0
- package/lib/tree/nodes/algebraicNode.d.ts.map +1 -1
- package/lib/tree/nodes/equations/equationSolutionNode.d.ts +2 -2
- package/lib/tree/nodes/equations/equationSolutionNode.d.ts.map +1 -1
- package/lib/tree/nodes/equations/equationSolutionNode.js +2 -2
- package/lib/tree/nodes/operators/fractionNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/fractionNode.js +4 -0
- package/package.json +1 -1
|
@@ -149,11 +149,6 @@ export const powersProduct = {
|
|
|
149
149
|
isAnswerValid,
|
|
150
150
|
subject: "Mathématiques",
|
|
151
151
|
hasHintAndCorrection: true,
|
|
152
|
-
getAnswer,
|
|
153
|
-
getCorrection,
|
|
154
|
-
getHint,
|
|
155
|
-
getInstruction,
|
|
156
|
-
getStartStatement,
|
|
157
152
|
options,
|
|
158
153
|
getQuestionFromIdentifiers,
|
|
159
154
|
};
|
|
@@ -24,9 +24,9 @@ const getAnswer = (identifiers) => {
|
|
|
24
24
|
};
|
|
25
25
|
const getHint = (identifiers) => {
|
|
26
26
|
const { decimal, tenPower } = identifiers;
|
|
27
|
-
return `Si $
|
|
27
|
+
return `Si $n$ est un entier négatif, alors multiplier par $10^n$ revient à déplacer la virgule de $n$ rangs vers la gauche.
|
|
28
28
|
|
|
29
|
-
Si $
|
|
29
|
+
Si $n$ est un entier positif, alors multiplier par $10^n$ revient à déplacer la virgule de $n$ rangs vers la droite.`;
|
|
30
30
|
};
|
|
31
31
|
const getCorrection = (identifiers) => {
|
|
32
32
|
const { decimal, tenPower } = identifiers;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ballsBasicProbas.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/probaStat/ballsBasicProbas.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,
|
|
1
|
+
{"version":3,"file":"ballsBasicProbas.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/probaStat/ballsBasicProbas.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAUrC,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;CACzB,CAAC;AAoGF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAgBlD,CAAC"}
|
|
@@ -41,6 +41,9 @@ const getBallsBasicProbasQuestion = () => {
|
|
|
41
41
|
const repartitions = [randint(1, 4), randint(1, 4), randint(1, 4)];
|
|
42
42
|
const colorAskedIndex = randint(0, 3);
|
|
43
43
|
const identifiers = { colorAskedIndex, repartitions };
|
|
44
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
45
|
+
};
|
|
46
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
44
47
|
const question = {
|
|
45
48
|
answer: getAnswer(identifiers),
|
|
46
49
|
instruction: getInstruction(identifiers),
|
|
@@ -90,9 +93,6 @@ export const ballsBasicProbas = {
|
|
|
90
93
|
getPropositions,
|
|
91
94
|
isAnswerValid,
|
|
92
95
|
subject: "Mathématiques",
|
|
93
|
-
getInstruction,
|
|
94
|
-
getAnswer,
|
|
95
96
|
hasHintAndCorrection: true,
|
|
96
|
-
|
|
97
|
-
getCorrection,
|
|
97
|
+
getQuestionFromIdentifiers,
|
|
98
98
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"calculateFrequency.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/basicStats/calculateFrequency.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAkBT,MAAM,6BAA6B,CAAC;AAWrC,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,CAAC,EAAE,MAAM,CAAC;IACV,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;
|
|
1
|
+
{"version":3,"file":"calculateFrequency.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/basicStats/calculateFrequency.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAkBT,MAAM,6BAA6B,CAAC;AAWrC,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,CAAC,EAAE,MAAM,CAAC;IACV,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAgJF,KAAK,OAAO,GAAG;IACb,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,CAAC;AAUF,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAe7D,CAAC"}
|
|
@@ -40,10 +40,13 @@ const getInstruction = (identifiers, opts) => {
|
|
|
40
40
|
switch (type) {
|
|
41
41
|
case 0: //pièce
|
|
42
42
|
instruction = `On lance une pièce de monnaie $${nbEssais}$ fois. On tombe $${k}$ fois sur ${caracType}.`;
|
|
43
|
+
break;
|
|
43
44
|
case 1: //dé 6 faces
|
|
44
45
|
instruction = `On lance un dé à $6$ faces $${nbEssais}$ fois. On tombe $${k}$ fois sur ${caracType}.`;
|
|
46
|
+
break;
|
|
45
47
|
case 2: // dé X faces
|
|
46
48
|
instruction = `On lance un dé à $12$ faces $${nbEssais}$ fois. On tombe $${k}$ fois sur ${caracType}.`;
|
|
49
|
+
break;
|
|
47
50
|
case 3:
|
|
48
51
|
default: //deux dés 6 faces
|
|
49
52
|
instruction = `On lance deux dés à $6$ faces $${nbEssais}$ fois. On note la somme obtenue. On tombe $${k}$ fois sur ${caracType}.`;
|
|
@@ -125,10 +128,7 @@ export const calculateFrequency = {
|
|
|
125
128
|
getPropositions,
|
|
126
129
|
isAnswerValid,
|
|
127
130
|
subject: "Mathématiques",
|
|
128
|
-
|
|
129
|
-
getHint,
|
|
130
|
-
getCorrection,
|
|
131
|
-
getAnswer,
|
|
131
|
+
getQuestionFromIdentifiers,
|
|
132
132
|
hasHintAndCorrection: true,
|
|
133
133
|
options,
|
|
134
134
|
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Exercise } from "../../../../exercises/exercise.js";
|
|
2
|
+
type Identifiers = {
|
|
3
|
+
values: number[];
|
|
4
|
+
target: number;
|
|
5
|
+
};
|
|
6
|
+
export declare const calculateFrequencyInList: Exercise<Identifiers>;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=calculateFrequencyInList.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"calculateFrequencyInList.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/basicStats/calculateFrequencyInList.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AASrC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAoHF,eAAO,MAAM,wBAAwB,EAAE,QAAQ,CAAC,WAAW,CAc1D,CAAC"}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
|
|
2
|
+
import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
|
+
import { RationalConstructor } from "../../../../math/numbers/rationals/rational.js";
|
|
4
|
+
import { randint } from "../../../../math/utils/random/randint.js";
|
|
5
|
+
import { frac } from "../../../../tree/nodes/operators/fractionNode.js";
|
|
6
|
+
import { parseAlgebraic } from "../../../../tree/parsers/latexParser.js";
|
|
7
|
+
import { probaFlip } from "../../../../utils/alea/probaFlip.js";
|
|
8
|
+
import { handleVEAError } from "../../../../utils/errors/handleVEAError.js";
|
|
9
|
+
const getPropositions = (n, { answer, ...identifiers }) => {
|
|
10
|
+
const propositions = [];
|
|
11
|
+
addValidProp(propositions, answer);
|
|
12
|
+
const { target, values } = identifiers;
|
|
13
|
+
const nb = values.filter((v) => v === target).length;
|
|
14
|
+
tryToAddWrongProp(propositions, nb.frenchify());
|
|
15
|
+
while (propositions.length < n) {
|
|
16
|
+
tryToAddWrongProp(propositions, RationalConstructor.randomIrreductible().toTree().toTex());
|
|
17
|
+
}
|
|
18
|
+
return shuffleProps(propositions, n);
|
|
19
|
+
};
|
|
20
|
+
const getAnswer = (identifiers) => {
|
|
21
|
+
const { target, values } = identifiers;
|
|
22
|
+
const nb = values.filter((v) => v === target).length;
|
|
23
|
+
return frac(nb, values.length).simplify({ fractionsToDecimal: true }).toTex();
|
|
24
|
+
};
|
|
25
|
+
const getInstruction = (identifiers) => {
|
|
26
|
+
const { target, values } = identifiers;
|
|
27
|
+
const length = values.length;
|
|
28
|
+
return `Voici une liste de nombres :
|
|
29
|
+
|
|
30
|
+
$$
|
|
31
|
+
${values.slice(0, length / 2).join("\\ ; \\ ")} \\ ; \\
|
|
32
|
+
\\newline
|
|
33
|
+
${values.slice(length / 2, 20).join("\\ ; \\ ")}
|
|
34
|
+
$$
|
|
35
|
+
|
|
36
|
+
Quelle est la fréquence d'apparition du nombre $${target}$ dans cette liste ?
|
|
37
|
+
|
|
38
|
+
Donner la réponse sous forme de fraction, ou si possible de nombre décimal ou de pourcentage.`;
|
|
39
|
+
};
|
|
40
|
+
const getHint = (identifiers) => {
|
|
41
|
+
const { target, values } = identifiers;
|
|
42
|
+
return `La fréquence d'apparition du nombre $${target}$ est égale au nombre de fois qu'il apparait dans la liste divisé par le nombre total d'élements de la liste.`;
|
|
43
|
+
};
|
|
44
|
+
const getCorrection = (identifiers) => {
|
|
45
|
+
const { target, values } = identifiers;
|
|
46
|
+
const nb = values.filter((v) => v === target).length;
|
|
47
|
+
const rawFrac = frac(nb, values.length);
|
|
48
|
+
const answer = getAnswer(identifiers);
|
|
49
|
+
const hasSimp = rawFrac.toTex() !== answer;
|
|
50
|
+
return `Il y a $${values.length}$ nombres dans cette liste, dont $${nb}$ fois le nombre $${target}$.
|
|
51
|
+
|
|
52
|
+
La fréquence d'apparition de $${target}$ est donc :
|
|
53
|
+
|
|
54
|
+
$$
|
|
55
|
+
${hasSimp ? rawFrac.toTex() + "=" + answer : answer}
|
|
56
|
+
$$
|
|
57
|
+
`;
|
|
58
|
+
};
|
|
59
|
+
const getKeys = (identifiers) => {
|
|
60
|
+
return ["percent"];
|
|
61
|
+
};
|
|
62
|
+
const isAnswerValid = (ans, { answer }) => {
|
|
63
|
+
try {
|
|
64
|
+
if (ans.includes("%")) {
|
|
65
|
+
const formated = ans.replace("\\%", "");
|
|
66
|
+
const nb = formated.unfrenchify();
|
|
67
|
+
if (isNaN(nb))
|
|
68
|
+
return false;
|
|
69
|
+
return (frac(nb, 100).simplify({ fractionsToDecimal: true }).toTex() === answer);
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
const parsed = parseAlgebraic(ans);
|
|
73
|
+
return parsed.simplify({ fractionsToDecimal: true }).toTex() === answer;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
catch (err) {
|
|
77
|
+
return handleVEAError(err);
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
const getCalculateFrequencyInListQuestion = (ops) => {
|
|
81
|
+
const target = randint(1, 10);
|
|
82
|
+
const length = randint(6, 13);
|
|
83
|
+
const values = [];
|
|
84
|
+
for (let i = 0; i < length; i++) {
|
|
85
|
+
values.push(probaFlip(0.4) ? target : randint(1, 10));
|
|
86
|
+
}
|
|
87
|
+
const identifiers = {
|
|
88
|
+
target,
|
|
89
|
+
values,
|
|
90
|
+
};
|
|
91
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
92
|
+
};
|
|
93
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
94
|
+
return {
|
|
95
|
+
answer: getAnswer(identifiers),
|
|
96
|
+
instruction: getInstruction(identifiers),
|
|
97
|
+
keys: getKeys(identifiers),
|
|
98
|
+
answerFormat: "tex",
|
|
99
|
+
identifiers,
|
|
100
|
+
hint: getHint(identifiers),
|
|
101
|
+
correction: getCorrection(identifiers),
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
export const calculateFrequencyInList = {
|
|
105
|
+
id: "calculateFrequencyInList",
|
|
106
|
+
connector: "=",
|
|
107
|
+
label: "Calculer la fréquence d'apparition d'un nombre dans une liste",
|
|
108
|
+
isSingleStep: true,
|
|
109
|
+
generator: (nb, opts) => getDistinctQuestions(() => getCalculateFrequencyInListQuestion(opts), nb),
|
|
110
|
+
qcmTimer: 60,
|
|
111
|
+
freeTimer: 60,
|
|
112
|
+
getPropositions,
|
|
113
|
+
isAnswerValid,
|
|
114
|
+
subject: "Mathématiques",
|
|
115
|
+
getQuestionFromIdentifiers,
|
|
116
|
+
hasHintAndCorrection: true,
|
|
117
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/basicStats/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/basicStats/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,+BAA+B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"calculateProbaOfBinomialDistribution.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/binomial/calculateProbaOfBinomialDistribution.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"calculateProbaOfBinomialDistribution.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/binomial/calculateProbaOfBinomialDistribution.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAarC,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,YAAY,CAAC;CAC5B,CAAC;AAEF,KAAK,YAAY,GAAG;IAClB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA0IF,eAAO,MAAM,oCAAoC,EAAE,QAAQ,CAAC,WAAW,CAatE,CAAC"}
|
|
@@ -4,40 +4,81 @@ import { Rational } from "../../../../math/numbers/rationals/rational.js";
|
|
|
4
4
|
import { combinations } from "../../../../math/utils/combinatorics/combination.js";
|
|
5
5
|
import { randfloat } from "../../../../math/utils/random/randfloat.js";
|
|
6
6
|
import { randint } from "../../../../math/utils/random/randint.js";
|
|
7
|
+
import { round } from "../../../../math/utils/round.js";
|
|
7
8
|
import { NumberNode } from "../../../../tree/nodes/numbers/numberNode.js";
|
|
9
|
+
import { frac } from "../../../../tree/nodes/operators/fractionNode.js";
|
|
8
10
|
import { MultiplyNode } from "../../../../tree/nodes/operators/multiplyNode.js";
|
|
9
11
|
import { PowerNode } from "../../../../tree/nodes/operators/powerNode.js";
|
|
10
12
|
import { alignTex } from "../../../../utils/latex/alignTex.js";
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
13
|
+
const getInstruction = (identifiers) => {
|
|
14
|
+
const { exerciseVars } = identifiers;
|
|
15
|
+
const { n, k, a, b } = exerciseVars;
|
|
16
|
+
const p = frac(a, b).simplify().toTex();
|
|
17
|
+
return `Soit $X$ une variable aléatoire qui suit une loi binomiale de paramètres $n=${n}$ et $p=${p}$.
|
|
18
|
+
|
|
19
|
+
Donner une valeur arrondie au centième de $P(X=${k}).$`;
|
|
20
|
+
};
|
|
21
|
+
const getAnswer = (identifiers) => {
|
|
22
|
+
const { exerciseVars } = identifiers;
|
|
23
|
+
const { n, k, a, b } = exerciseVars;
|
|
24
|
+
const p = a / b;
|
|
25
|
+
const kChooseN = combinations(k, n);
|
|
26
|
+
return round(kChooseN * Math.pow(p, k) * Math.pow(1 - p, n - k), 2).frenchify();
|
|
27
|
+
};
|
|
28
|
+
const getHint = (identifiers) => {
|
|
29
|
+
return `Si $X$ est une variable aléatoire qui suit une loi binomiale de paramètres $n$ et $p$, alors on a :
|
|
24
30
|
|
|
25
|
-
|
|
26
|
-
|
|
31
|
+
$$
|
|
32
|
+
P(X=k) = \\binom{n}{k} p^k (1-p)^{n-k}
|
|
33
|
+
$$`;
|
|
34
|
+
};
|
|
35
|
+
const getCorrection = (identifiers) => {
|
|
36
|
+
const { exerciseVars } = identifiers;
|
|
37
|
+
const { n, k, a, b } = exerciseVars;
|
|
38
|
+
const p = frac(a, b).simplify();
|
|
39
|
+
const answer = getAnswer(identifiers);
|
|
40
|
+
return `Si $X$ est une variable aléatoire qui suit une loi binomiale de paramètres $n$ et $p$, alors on a :
|
|
27
41
|
|
|
28
|
-
|
|
42
|
+
$$
|
|
43
|
+
P(X=k) = \\binom{n}{k} p^k (1-p)^{n-k}
|
|
44
|
+
$$
|
|
29
45
|
|
|
30
46
|
Ici, on a donc :
|
|
31
47
|
|
|
32
48
|
${alignTex([
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
49
|
+
[
|
|
50
|
+
`P(X=${k})`,
|
|
51
|
+
"=",
|
|
52
|
+
`\\binom{${n}}{${k}} ${new MultiplyNode(new PowerNode(p, k.toTree()), new PowerNode(new Rational(b - a, b).toTree(), (n - k).toTree())).toTex()}`,
|
|
53
|
+
],
|
|
54
|
+
["", "\\approx", answer],
|
|
55
|
+
])}`;
|
|
56
|
+
};
|
|
57
|
+
const getCalculateProbaOfBinomialDistributionQuestion = () => {
|
|
58
|
+
let n;
|
|
59
|
+
let k;
|
|
60
|
+
let a;
|
|
61
|
+
let b;
|
|
62
|
+
let correctAns;
|
|
63
|
+
do {
|
|
64
|
+
n = randint(2, 9);
|
|
65
|
+
k = randint(1, n);
|
|
66
|
+
b = randint(2, 11);
|
|
67
|
+
a = randint(1, b);
|
|
68
|
+
correctAns = getCorrectAnswer(n, a / b, k);
|
|
69
|
+
} while (correctAns === 0);
|
|
70
|
+
const identifiers = { exerciseVars: { a, b, k, n } };
|
|
71
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
72
|
+
};
|
|
73
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
74
|
+
const question = {
|
|
75
|
+
answer: getAnswer(identifiers),
|
|
76
|
+
instruction: getInstruction(identifiers),
|
|
77
|
+
keys: [],
|
|
78
|
+
answerFormat: "tex",
|
|
79
|
+
hint: getHint(identifiers),
|
|
80
|
+
correction: getCorrection(identifiers),
|
|
81
|
+
identifiers,
|
|
41
82
|
};
|
|
42
83
|
return question;
|
|
43
84
|
};
|
|
@@ -72,27 +113,10 @@ const getCorrectAnswer = (n, p, k) => {
|
|
|
72
113
|
const kChooseN = combinations(k, n);
|
|
73
114
|
return +(kChooseN * Math.pow(p, k) * Math.pow(1 - p, n - k)).toFixed(2);
|
|
74
115
|
};
|
|
75
|
-
const generateExercise = () => {
|
|
76
|
-
let n;
|
|
77
|
-
let k;
|
|
78
|
-
let a;
|
|
79
|
-
let b;
|
|
80
|
-
let correctAns;
|
|
81
|
-
do {
|
|
82
|
-
n = randint(2, 9);
|
|
83
|
-
k = randint(1, n);
|
|
84
|
-
b = randint(2, 11);
|
|
85
|
-
a = randint(1, b);
|
|
86
|
-
correctAns = getCorrectAnswer(n, a / b, k);
|
|
87
|
-
} while (correctAns === 0);
|
|
88
|
-
return { n, k, a, b };
|
|
89
|
-
};
|
|
90
116
|
export const calculateProbaOfBinomialDistribution = {
|
|
91
117
|
id: "calculateProbaOfBinomialDistribution",
|
|
92
118
|
label: "Calculer une probabilité avec la loi binomiale",
|
|
93
|
-
levels: ["TermTech"],
|
|
94
119
|
isSingleStep: true,
|
|
95
|
-
sections: ["Probabilités"],
|
|
96
120
|
generator: (nb) => getDistinctQuestions(getCalculateProbaOfBinomialDistributionQuestion, nb),
|
|
97
121
|
qcmTimer: 60,
|
|
98
122
|
freeTimer: 60,
|
|
@@ -100,4 +124,5 @@ export const calculateProbaOfBinomialDistribution = {
|
|
|
100
124
|
isAnswerValid,
|
|
101
125
|
subject: "Mathématiques",
|
|
102
126
|
hasHintAndCorrection: true,
|
|
127
|
+
getQuestionFromIdentifiers,
|
|
103
128
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cardBasicProbas.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/probaStat/cardBasicProbas.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,
|
|
1
|
+
{"version":3,"file":"cardBasicProbas.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/probaStat/cardBasicProbas.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,EAWT,MAAM,6BAA6B,CAAC;AAQrC,OAAO,EAAE,UAAU,EAAe,MAAM,oCAAoC,CAAC;AAI7E,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,UAAU,CAAC;CACpB,CAAC;AA4GF,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,CAejD,CAAC"}
|
|
@@ -58,6 +58,9 @@ const getCardBasicProbasQuestion = () => {
|
|
|
58
58
|
break;
|
|
59
59
|
}
|
|
60
60
|
const identifiers = { questionType, value, color: color };
|
|
61
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
62
|
+
};
|
|
63
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
61
64
|
const question = {
|
|
62
65
|
answer: getAnswer(identifiers),
|
|
63
66
|
instruction: getInstruction(identifiers),
|
|
@@ -109,6 +112,5 @@ export const cardBasicProbas = {
|
|
|
109
112
|
getPropositions,
|
|
110
113
|
isAnswerValid,
|
|
111
114
|
subject: "Mathématiques",
|
|
112
|
-
|
|
113
|
-
getAnswer,
|
|
115
|
+
getQuestionFromIdentifiers,
|
|
114
116
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conditionalProbability.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/probaStat/conditionalProbability.ts"],"names":[],"mappings":"AACA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"conditionalProbability.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/probaStat/conditionalProbability.ts"],"names":[],"mappings":"AACA,OAAO,EACL,QAAQ,EAcT,MAAM,mBAAmB,CAAC;AAM3B,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AA8SF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,CAcxD,CAAC"}
|