math-exercises 1.3.41 → 1.3.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/exercises/calcul/addAndSub.d.ts.map +1 -1
- package/lib/exercises/calcul/addAndSub.js +3 -0
- package/lib/exercises/calcul/addAndSubWithoutRelatives.d.ts.map +1 -1
- package/lib/exercises/calcul/addAndSubWithoutRelatives.js +3 -0
- package/lib/exercises/calcul/arithmetics/euclideanDivision.d.ts +4 -0
- package/lib/exercises/calcul/arithmetics/euclideanDivision.d.ts.map +1 -0
- package/lib/exercises/calcul/arithmetics/euclideanDivision.js +70 -0
- package/lib/exercises/calcul/arithmetics/primeNumbers.d.ts.map +1 -1
- package/lib/exercises/calcul/arithmetics/primeNumbers.js +4 -1
- package/lib/exercises/calcul/fractions/fractionAndIntegerDivision.d.ts.map +1 -1
- package/lib/exercises/calcul/fractions/fractionAndIntegerDivision.js +3 -0
- package/lib/exercises/calcul/fractions/fractionAndIntegerProduct.d.ts.map +1 -1
- package/lib/exercises/calcul/fractions/fractionAndIntegerProduct.js +3 -0
- package/lib/exercises/calcul/fractions/fractionAndIntegerSum.d.ts.map +1 -1
- package/lib/exercises/calcul/fractions/fractionAndIntegerSum.js +3 -0
- package/lib/exercises/calcul/fractions/fractionToPercentToDecimal.d.ts.map +1 -1
- package/lib/exercises/calcul/fractions/fractionToPercentToDecimal.js +3 -0
- package/lib/exercises/calcul/fractions/fractionsDivision.d.ts.map +1 -1
- package/lib/exercises/calcul/fractions/fractionsDivision.js +3 -0
- package/lib/exercises/calcul/fractions/fractionsProduct.d.ts.map +1 -1
- package/lib/exercises/calcul/fractions/fractionsProduct.js +3 -0
- package/lib/exercises/calcul/fractions/fractionsSum.d.ts.map +1 -1
- package/lib/exercises/calcul/fractions/fractionsSum.js +3 -0
- package/lib/exercises/calcul/fractions/simplifyFraction.d.ts.map +1 -1
- package/lib/exercises/calcul/fractions/simplifyFraction.js +3 -0
- package/lib/exercises/calcul/mentalCaluls.ts/mentalAddAndSub.d.ts.map +1 -1
- package/lib/exercises/calcul/mentalCaluls.ts/mentalAddAndSub.js +3 -0
- package/lib/exercises/calcul/mentalCaluls.ts/mentalDivisions.d.ts.map +1 -1
- package/lib/exercises/calcul/mentalCaluls.ts/mentalDivisions.js +3 -0
- package/lib/exercises/calcul/mentalCaluls.ts/mentalMultiplications.d.ts.map +1 -1
- package/lib/exercises/calcul/mentalCaluls.ts/mentalMultiplications.js +3 -0
- package/lib/exercises/calcul/mentalCaluls.ts/mentalPercentage.d.ts.map +1 -1
- package/lib/exercises/calcul/mentalCaluls.ts/mentalPercentage.js +3 -0
- package/lib/exercises/calcul/operations/operationsPriorities.d.ts.map +1 -1
- package/lib/exercises/calcul/operations/operationsPriorities.js +3 -0
- package/lib/exercises/calcul/operations/operationsPrioritiesWithoutRelative.d.ts.map +1 -1
- package/lib/exercises/calcul/operations/operationsPrioritiesWithoutRelative.js +3 -0
- package/lib/exercises/calcul/proportionality/proportionalityTable.d.ts.map +1 -1
- package/lib/exercises/calcul/proportionality/proportionalityTable.js +3 -0
- package/lib/exercises/calcul/rounding/rounding.d.ts.map +1 -1
- package/lib/exercises/calcul/rounding/rounding.js +6 -0
- package/lib/exercises/calculLitteral/distributivity/doubleDistributivity.d.ts.map +1 -1
- package/lib/exercises/calculLitteral/distributivity/doubleDistributivity.js +5 -0
- package/lib/exercises/calculLitteral/distributivity/firstIdentity.d.ts.map +1 -1
- package/lib/exercises/calculLitteral/distributivity/firstIdentity.js +6 -0
- package/lib/exercises/calculLitteral/distributivity/secondIdentity.d.ts.map +1 -1
- package/lib/exercises/calculLitteral/distributivity/secondIdentity.js +6 -0
- package/lib/exercises/calculLitteral/distributivity/simpleDistributivity.d.ts.map +1 -1
- package/lib/exercises/calculLitteral/distributivity/simpleDistributivity.js +6 -0
- package/lib/exercises/calculLitteral/distributivity/thirdIdentity.d.ts.map +1 -1
- package/lib/exercises/calculLitteral/distributivity/thirdIdentity.js +6 -0
- package/lib/exercises/calculLitteral/equation/equationSimpleSquare.d.ts.map +1 -1
- package/lib/exercises/calculLitteral/equation/equationSimpleSquare.js +12 -0
- package/lib/exercises/calculLitteral/equation/equationType1Exercise.d.ts.map +1 -1
- package/lib/exercises/calculLitteral/equation/equationType1Exercise.js +3 -0
- package/lib/exercises/calculLitteral/equation/equationType2Exercise.d.ts.map +1 -1
- package/lib/exercises/calculLitteral/equation/equationType2Exercise.js +3 -0
- package/lib/exercises/calculLitteral/equation/equationType3Exercise.d.ts.map +1 -1
- package/lib/exercises/calculLitteral/equation/equationType3Exercise.js +3 -0
- package/lib/exercises/calculLitteral/equation/equationType4Exercise.d.ts.map +1 -1
- package/lib/exercises/calculLitteral/equation/equationType4Exercise.js +3 -0
- package/lib/exercises/calculLitteral/equation/expEquation.d.ts +4 -0
- package/lib/exercises/calculLitteral/equation/expEquation.d.ts.map +1 -0
- package/lib/exercises/calculLitteral/equation/expEquation.js +67 -0
- package/lib/exercises/calculLitteral/equation/firstDegreeEquation.d.ts.map +1 -1
- package/lib/exercises/calculLitteral/equation/firstDegreeEquation.js +3 -0
- package/lib/exercises/calculLitteral/equation/fractionEquation.d.ts.map +1 -1
- package/lib/exercises/calculLitteral/equation/fractionEquation.js +3 -0
- package/lib/exercises/calculLitteral/equation/logEquation.d.ts +4 -0
- package/lib/exercises/calculLitteral/equation/logEquation.d.ts.map +1 -0
- package/lib/exercises/calculLitteral/equation/logEquation.js +67 -0
- package/lib/exercises/calculLitteral/equation/multiplicationEquation.d.ts.map +1 -1
- package/lib/exercises/calculLitteral/equation/multiplicationEquation.js +3 -0
- package/lib/exercises/calculLitteral/factorisation/factoIdRmq1.d.ts.map +1 -1
- package/lib/exercises/calculLitteral/factorisation/factoIdRmq1.js +4 -0
- package/lib/exercises/calculLitteral/factorisation/factoIdRmq2.d.ts.map +1 -1
- package/lib/exercises/calculLitteral/factorisation/factoIdRmq2.js +5 -0
- package/lib/exercises/calculLitteral/factorisation/factoIdRmq3.d.ts.map +1 -1
- package/lib/exercises/calculLitteral/factorisation/factoIdRmq3.js +6 -0
- package/lib/exercises/calculLitteral/factorisation/factoType1Exercise.d.ts.map +1 -1
- package/lib/exercises/calculLitteral/factorisation/factoType1Exercise.js +6 -0
- package/lib/exercises/calculLitteral/simplifying/evaluateExpression.d.ts.map +1 -1
- package/lib/exercises/calculLitteral/simplifying/evaluateExpression.js +3 -0
- package/lib/exercises/calculLitteral/simplifying/expSimplifiying.d.ts +4 -0
- package/lib/exercises/calculLitteral/simplifying/expSimplifiying.d.ts.map +1 -0
- package/lib/exercises/calculLitteral/simplifying/expSimplifiying.js +96 -0
- package/lib/exercises/calculLitteral/simplifying/logSimplifiying.d.ts +4 -0
- package/lib/exercises/calculLitteral/simplifying/logSimplifiying.d.ts.map +1 -0
- package/lib/exercises/calculLitteral/simplifying/logSimplifiying.js +78 -0
- package/lib/exercises/calculLitteral/simplifying/reduceExpression.d.ts.map +1 -1
- package/lib/exercises/calculLitteral/simplifying/reduceExpression.js +3 -0
- package/lib/exercises/conversion/aeraConversion.d.ts.map +1 -1
- package/lib/exercises/conversion/aeraConversion.js +3 -0
- package/lib/exercises/conversion/capacityConversion.d.ts.map +1 -1
- package/lib/exercises/conversion/capacityConversion.js +3 -0
- package/lib/exercises/conversion/lengthConversion.d.ts.map +1 -1
- package/lib/exercises/conversion/lengthConversion.js +3 -0
- package/lib/exercises/conversion/massConversion.d.ts.map +1 -1
- package/lib/exercises/conversion/massConversion.js +3 -0
- package/lib/exercises/conversion/volumeCapacityConversion.d.ts.map +1 -1
- package/lib/exercises/conversion/volumeCapacityConversion.js +3 -0
- package/lib/exercises/conversion/volumeConversion.d.ts.map +1 -1
- package/lib/exercises/conversion/volumeConversion.js +3 -0
- package/lib/exercises/derivation/derivative/constanteDerivative.d.ts.map +1 -1
- package/lib/exercises/derivation/derivative/constanteDerivative.js +4 -1
- package/lib/exercises/derivation/derivative/expDerivativeOne.d.ts +4 -0
- package/lib/exercises/derivation/derivative/expDerivativeOne.d.ts.map +1 -0
- package/lib/exercises/derivation/derivative/expDerivativeOne.js +65 -0
- package/lib/exercises/derivation/derivative/expDerivativeThree.d.ts +4 -0
- package/lib/exercises/derivation/derivative/expDerivativeThree.d.ts.map +1 -0
- package/lib/exercises/derivation/derivative/expDerivativeThree.js +64 -0
- package/lib/exercises/derivation/derivative/expDerivativeTwo.d.ts +4 -0
- package/lib/exercises/derivation/derivative/expDerivativeTwo.d.ts.map +1 -0
- package/lib/exercises/derivation/derivative/expDerivativeTwo.js +65 -0
- package/lib/exercises/derivation/derivative/firstDegreeDerivative.d.ts.map +1 -1
- package/lib/exercises/derivation/derivative/firstDegreeDerivative.js +3 -0
- package/lib/exercises/derivation/derivative/inverseFunctionDerivative.d.ts.map +1 -1
- package/lib/exercises/derivation/derivative/inverseFunctionDerivative.js +3 -0
- package/lib/exercises/derivation/derivative/lnDerivativeOne.d.ts +4 -0
- package/lib/exercises/derivation/derivative/lnDerivativeOne.d.ts.map +1 -0
- package/lib/exercises/derivation/derivative/lnDerivativeOne.js +63 -0
- package/lib/exercises/derivation/derivative/lnDerivativeThree.d.ts +4 -0
- package/lib/exercises/derivation/derivative/lnDerivativeThree.d.ts.map +1 -0
- package/lib/exercises/derivation/derivative/lnDerivativeThree.js +68 -0
- package/lib/exercises/derivation/derivative/lnDerivativeTwo.d.ts +4 -0
- package/lib/exercises/derivation/derivative/lnDerivativeTwo.d.ts.map +1 -0
- package/lib/exercises/derivation/derivative/lnDerivativeTwo.js +66 -0
- package/lib/exercises/derivation/derivative/powerFunctionDerivative.d.ts.map +1 -1
- package/lib/exercises/derivation/derivative/powerFunctionDerivative.js +3 -0
- package/lib/exercises/derivation/derivative/rootFunctionDerivative.d.ts.map +1 -1
- package/lib/exercises/derivation/derivative/rootFunctionDerivative.js +4 -0
- package/lib/exercises/derivation/derivative/secondDegreeDerivative.d.ts.map +1 -1
- package/lib/exercises/derivation/derivative/secondDegreeDerivative.js +3 -0
- package/lib/exercises/derivation/derivative/thirdDegreeDerivative.d.ts.map +1 -1
- package/lib/exercises/derivation/derivative/thirdDegreeDerivative.js +3 -0
- package/lib/exercises/derivation/derivative/thirdDegreeFunctionVariation.d.ts +4 -0
- package/lib/exercises/derivation/derivative/thirdDegreeFunctionVariation.d.ts.map +1 -0
- package/lib/exercises/derivation/derivative/thirdDegreeFunctionVariation.js +101 -0
- package/lib/exercises/derivation/derivativeNumberReading.d.ts.map +1 -1
- package/lib/exercises/derivation/derivativeNumberReading.js +3 -0
- package/lib/exercises/equaDiff/equaDiffGeneralForme.d.ts +4 -0
- package/lib/exercises/equaDiff/equaDiffGeneralForme.d.ts.map +1 -0
- package/lib/exercises/equaDiff/equaDiffGeneralForme.js +66 -0
- package/lib/exercises/equaDiff/equaDiffGeneralFormeWithIC.d.ts +4 -0
- package/lib/exercises/equaDiff/equaDiffGeneralFormeWithIC.d.ts.map +1 -0
- package/lib/exercises/equaDiff/equaDiffGeneralFormeWithIC.js +80 -0
- package/lib/exercises/exercise.d.ts +2 -0
- package/lib/exercises/exercise.d.ts.map +1 -1
- package/lib/exercises/exercises.d.ts.map +1 -1
- package/lib/exercises/exercises.js +66 -4
- package/lib/exercises/geometry/cartesian/distanceBetweenTwoPoints.d.ts.map +1 -1
- package/lib/exercises/geometry/cartesian/distanceBetweenTwoPoints.js +6 -0
- package/lib/exercises/geometry/cartesian/imageFunction.d.ts +4 -0
- package/lib/exercises/geometry/cartesian/imageFunction.d.ts.map +1 -0
- package/lib/exercises/geometry/cartesian/imageFunction.js +65 -0
- package/lib/exercises/geometry/cartesian/imageFunctionGeogebra.d.ts +4 -0
- package/lib/exercises/geometry/cartesian/imageFunctionGeogebra.d.ts.map +1 -0
- package/lib/exercises/geometry/cartesian/imageFunctionGeogebra.js +89 -0
- package/lib/exercises/geometry/cartesian/inverseImageFunction.d.ts +4 -0
- package/lib/exercises/geometry/cartesian/inverseImageFunction.d.ts.map +1 -0
- package/lib/exercises/geometry/cartesian/inverseImageFunction.js +62 -0
- package/lib/exercises/geometry/cartesian/inverseImageFunctionGeogebra.d.ts +4 -0
- package/lib/exercises/geometry/cartesian/inverseImageFunctionGeogebra.d.ts.map +1 -0
- package/lib/exercises/geometry/cartesian/inverseImageFunctionGeogebra.js +154 -0
- package/lib/exercises/geometry/cartesian/leadingCoefficient.d.ts.map +1 -1
- package/lib/exercises/geometry/cartesian/leadingCoefficient.js +3 -0
- package/lib/exercises/geometry/cartesian/leadingCoefficientCalculV1.d.ts.map +1 -1
- package/lib/exercises/geometry/cartesian/leadingCoefficientCalculV1.js +3 -0
- package/lib/exercises/geometry/cartesian/leadingCoefficientCalculV2.d.ts.map +1 -1
- package/lib/exercises/geometry/cartesian/leadingCoefficientCalculV2.js +3 -0
- package/lib/exercises/geometry/cartesian/midpoint.d.ts.map +1 -1
- package/lib/exercises/geometry/cartesian/midpoint.js +3 -0
- package/lib/exercises/geometry/cartesian/signFunction.d.ts +4 -0
- package/lib/exercises/geometry/cartesian/signFunction.d.ts.map +1 -0
- package/lib/exercises/geometry/cartesian/signFunction.js +84 -0
- package/lib/exercises/geometry/euclidean/circleArea.d.ts.map +1 -1
- package/lib/exercises/geometry/euclidean/circleArea.js +3 -0
- package/lib/exercises/geometry/euclidean/circleCircumference.d.ts.map +1 -1
- package/lib/exercises/geometry/euclidean/circleCircumference.js +3 -0
- package/lib/exercises/geometry/euclidean/pythagore.d.ts.map +1 -1
- package/lib/exercises/geometry/euclidean/pythagore.js +8 -0
- package/lib/exercises/geometry/euclidean/pythagoreCalcul.d.ts.map +1 -1
- package/lib/exercises/geometry/euclidean/pythagoreCalcul.js +3 -0
- package/lib/exercises/geometry/euclidean/rectangleArea.d.ts.map +1 -1
- package/lib/exercises/geometry/euclidean/rectangleArea.js +3 -0
- package/lib/exercises/geometry/euclidean/rectanglePerimeter.d.ts.map +1 -1
- package/lib/exercises/geometry/euclidean/rectanglePerimeter.js +3 -0
- package/lib/exercises/geometry/euclidean/rightTriangleArea.d.ts.map +1 -1
- package/lib/exercises/geometry/euclidean/rightTriangleArea.js +3 -0
- package/lib/exercises/geometry/euclidean/squareArea.d.ts.map +1 -1
- package/lib/exercises/geometry/euclidean/squareArea.js +3 -0
- package/lib/exercises/geometry/euclidean/squarePerimeter.d.ts.map +1 -1
- package/lib/exercises/geometry/euclidean/squarePerimeter.js +3 -0
- package/lib/exercises/geometry/euclidean/thales.d.ts.map +1 -1
- package/lib/exercises/geometry/euclidean/thales.js +3 -0
- package/lib/exercises/geometry/euclidean/thalesCalcul.d.ts.map +1 -1
- package/lib/exercises/geometry/euclidean/thalesCalcul.js +3 -0
- package/lib/exercises/geometry/euclidean/triangleArea.d.ts.map +1 -1
- package/lib/exercises/geometry/euclidean/triangleArea.js +3 -0
- package/lib/exercises/geometry/euclidean/triangleAreaV2.d.ts.map +1 -1
- package/lib/exercises/geometry/euclidean/triangleAreaV2.js +4 -0
- package/lib/exercises/geometry/euclidean/trianglePerimeter.d.ts.map +1 -1
- package/lib/exercises/geometry/euclidean/trianglePerimeter.js +3 -0
- package/lib/exercises/geometry/euclidean/trigonometry.d.ts.map +1 -1
- package/lib/exercises/geometry/euclidean/trigonometry.js +3 -0
- package/lib/exercises/geometry/euclidean/trigonometryAngleCalcul.d.ts.map +1 -1
- package/lib/exercises/geometry/euclidean/trigonometryAngleCalcul.js +3 -0
- package/lib/exercises/geometry/euclidean/trigonometrySideCalcul.d.ts.map +1 -1
- package/lib/exercises/geometry/euclidean/trigonometrySideCalcul.js +3 -0
- package/lib/exercises/geometry/vectors/scalarProductViaCoords.d.ts.map +1 -1
- package/lib/exercises/geometry/vectors/scalarProductViaCoords.js +3 -0
- package/lib/exercises/limits/polynomeLimit.d.ts +4 -0
- package/lib/exercises/limits/polynomeLimit.d.ts.map +1 -0
- package/lib/exercises/limits/polynomeLimit.js +132 -0
- package/lib/exercises/percent/applyPercent.d.ts.map +1 -1
- package/lib/exercises/percent/applyPercent.js +3 -0
- package/lib/exercises/percent/averageEvolutionRate.d.ts.map +1 -1
- package/lib/exercises/percent/averageEvolutionRate.js +3 -0
- package/lib/exercises/percent/globalPercent.d.ts.map +1 -1
- package/lib/exercises/percent/globalPercent.js +3 -0
- package/lib/exercises/percent/reciprocalPercentage.d.ts.map +1 -1
- package/lib/exercises/percent/reciprocalPercentage.js +3 -0
- package/lib/exercises/powers/powersDivision.d.ts.map +1 -1
- package/lib/exercises/powers/powersDivision.js +3 -0
- package/lib/exercises/powers/powersOfTenToDecimal.d.ts.map +1 -1
- package/lib/exercises/powers/powersOfTenToDecimal.js +3 -0
- package/lib/exercises/powers/powersPower.d.ts.map +1 -1
- package/lib/exercises/powers/powersPower.js +3 -0
- package/lib/exercises/powers/powersProduct.d.ts.map +1 -1
- package/lib/exercises/powers/powersProduct.js +3 -0
- package/lib/exercises/powers/scientificToDecimal.d.ts.map +1 -1
- package/lib/exercises/powers/scientificToDecimal.js +3 -0
- package/lib/exercises/primitve/constantPrimitive.d.ts +4 -0
- package/lib/exercises/primitve/constantPrimitive.d.ts.map +1 -0
- package/lib/exercises/primitve/constantPrimitive.js +56 -0
- package/lib/exercises/primitve/exponentialPrimitive.d.ts +4 -0
- package/lib/exercises/primitve/exponentialPrimitive.d.ts.map +1 -0
- package/lib/exercises/primitve/exponentialPrimitive.js +103 -0
- package/lib/exercises/primitve/logarithmePrimitive.d.ts +4 -0
- package/lib/exercises/primitve/logarithmePrimitive.d.ts.map +1 -0
- package/lib/exercises/primitve/logarithmePrimitive.js +74 -0
- package/lib/exercises/primitve/polynomialPrimitive.d.ts +4 -0
- package/lib/exercises/primitve/polynomialPrimitive.d.ts.map +1 -0
- package/lib/exercises/primitve/polynomialPrimitive.js +80 -0
- package/lib/exercises/primitve/sinCosPrimitive.d.ts +4 -0
- package/lib/exercises/primitve/sinCosPrimitive.d.ts.map +1 -0
- package/lib/exercises/primitve/sinCosPrimitive.js +112 -0
- package/lib/exercises/primitve/usualPrimitives.d.ts +4 -0
- package/lib/exercises/primitve/usualPrimitives.d.ts.map +1 -0
- package/lib/exercises/primitve/usualPrimitives.js +39 -0
- package/lib/exercises/probaStat/conditionalProbability.d.ts +4 -0
- package/lib/exercises/probaStat/conditionalProbability.d.ts.map +1 -0
- package/lib/exercises/probaStat/conditionalProbability.js +102 -0
- package/lib/exercises/probaStat/frequencyTable.d.ts +4 -0
- package/lib/exercises/probaStat/frequencyTable.d.ts.map +1 -0
- package/lib/exercises/probaStat/frequencyTable.js +76 -0
- package/lib/exercises/probaStat/marginalAndConditionalFrequency.d.ts +4 -0
- package/lib/exercises/probaStat/marginalAndConditionalFrequency.d.ts.map +1 -0
- package/lib/exercises/probaStat/marginalAndConditionalFrequency.js +109 -0
- package/lib/exercises/probaStat/median.d.ts +4 -0
- package/lib/exercises/probaStat/median.d.ts.map +1 -0
- package/lib/exercises/probaStat/median.js +82 -0
- package/lib/exercises/probaStat/medianList.d.ts +4 -0
- package/lib/exercises/probaStat/medianList.d.ts.map +1 -0
- package/lib/exercises/probaStat/medianList.js +67 -0
- package/lib/exercises/probaStat/probabilityTree.d.ts +4 -0
- package/lib/exercises/probaStat/probabilityTree.d.ts.map +1 -0
- package/lib/exercises/probaStat/probabilityTree.js +135 -0
- package/lib/exercises/probaStat/quartiles.d.ts +4 -0
- package/lib/exercises/probaStat/quartiles.d.ts.map +1 -0
- package/lib/exercises/probaStat/quartiles.js +96 -0
- package/lib/exercises/probaStat/quartilesList.d.ts +4 -0
- package/lib/exercises/probaStat/quartilesList.d.ts.map +1 -0
- package/lib/exercises/probaStat/quartilesList.js +81 -0
- package/lib/exercises/sequences/arithmetic/arithmeticExplicitFormulaUsage.d.ts.map +1 -1
- package/lib/exercises/sequences/arithmetic/arithmeticExplicitFormulaUsage.js +3 -0
- package/lib/exercises/sequences/arithmetic/arithmeticFindExplicitFormula.d.ts.map +1 -1
- package/lib/exercises/sequences/arithmetic/arithmeticFindExplicitFormula.js +3 -0
- package/lib/exercises/sequences/arithmetic/arithmeticFindReason.d.ts.map +1 -1
- package/lib/exercises/sequences/arithmetic/arithmeticFindReason.js +3 -0
- package/lib/exercises/sequences/arithmetic/arithmeticReasonUsage.d.ts.map +1 -1
- package/lib/exercises/sequences/arithmetic/arithmeticReasonUsage.js +3 -0
- package/lib/exercises/sequences/arithmetic/arithmeticRecurrenceFormulaUsage.d.ts.map +1 -1
- package/lib/exercises/sequences/arithmetic/arithmeticRecurrenceFormulaUsage.js +3 -0
- package/lib/exercises/sequences/arithmetic/arithmeticThresholdFind.d.ts.map +1 -1
- package/lib/exercises/sequences/arithmetic/arithmeticThresholdFind.js +3 -0
- package/lib/exercises/sequences/geometric/geometricExplicitFormulaUsage.d.ts.map +1 -1
- package/lib/exercises/sequences/geometric/geometricExplicitFormulaUsage.js +3 -0
- package/lib/exercises/sequences/geometric/geometricFindExplicitFormula.d.ts.map +1 -1
- package/lib/exercises/sequences/geometric/geometricFindExplicitFormula.js +4 -0
- package/lib/exercises/sequences/geometric/geometricFindReason.d.ts.map +1 -1
- package/lib/exercises/sequences/geometric/geometricFindReason.js +4 -0
- package/lib/exercises/sequences/geometric/geometricReasonUsage.d.ts.map +1 -1
- package/lib/exercises/sequences/geometric/geometricReasonUsage.js +4 -0
- package/lib/exercises/sequences/geometric/geometricRecurrenceFormulaUsage.d.ts.map +1 -1
- package/lib/exercises/sequences/geometric/geometricRecurrenceFormulaUsage.js +4 -0
- package/lib/exercises/squareRoots/simpifySquareRoot.d.ts.map +1 -1
- package/lib/exercises/squareRoots/simpifySquareRoot.js +3 -0
- package/lib/index.d.ts +2 -2
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +3 -3
- package/lib/math/polynomials/polynomial.d.ts +3 -1
- package/lib/math/polynomials/polynomial.d.ts.map +1 -1
- package/lib/math/polynomials/polynomial.js +48 -2
- package/lib/tree/nodes/functions/expNode.d.ts +10 -0
- package/lib/tree/nodes/functions/expNode.d.ts.map +1 -0
- package/lib/tree/nodes/functions/expNode.js +21 -0
- package/lib/tree/nodes/functions/functionNode.d.ts +3 -1
- package/lib/tree/nodes/functions/functionNode.d.ts.map +1 -1
- package/lib/tree/nodes/functions/functionNode.js +2 -0
- package/lib/tree/nodes/functions/logNode.d.ts +10 -0
- package/lib/tree/nodes/functions/logNode.d.ts.map +1 -0
- package/lib/tree/nodes/functions/logNode.js +21 -0
- package/lib/tree/nodes/functions/sinNode.d.ts +9 -0
- package/lib/tree/nodes/functions/sinNode.d.ts.map +1 -1
- package/lib/tree/nodes/functions/sinNode.js +20 -0
- package/lib/tree/parsers/simplify.d.ts.map +1 -1
- package/lib/tree/parsers/simplify.js +12 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"median.d.ts","sourceRoot":"","sources":["../../../src/exercises/probaStat/median.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAe,QAAQ,EAAE,MAAM,aAAa,CAAC;AAI9D,eAAO,MAAM,MAAM,EAAE,QAUpB,CAAC;AAEF,wBAAgB,SAAS,IAAI,QAAQ,CA8EpC"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getMedian = exports.median = void 0;
|
|
4
|
+
const randint_1 = require("../../math/utils/random/randint");
|
|
5
|
+
const shuffle_1 = require("../../utils/shuffle");
|
|
6
|
+
const getDistinctQuestions_1 = require("../utils/getDistinctQuestions");
|
|
7
|
+
const uuid_1 = require("uuid");
|
|
8
|
+
exports.median = {
|
|
9
|
+
id: 'median',
|
|
10
|
+
connector: '=',
|
|
11
|
+
instruction: '',
|
|
12
|
+
label: "Calcul de la moyenne d'une série de valeurs",
|
|
13
|
+
levels: ['1', '0'],
|
|
14
|
+
isSingleStep: false,
|
|
15
|
+
section: 'Probabilités',
|
|
16
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getMedian, nb),
|
|
17
|
+
keys: [],
|
|
18
|
+
};
|
|
19
|
+
function getMedian() {
|
|
20
|
+
const getRandomUniqueValues = (count, min, max) => {
|
|
21
|
+
const uniqueValues = new Set();
|
|
22
|
+
while (uniqueValues.size < count) {
|
|
23
|
+
uniqueValues.add((0, randint_1.randint)(min, max));
|
|
24
|
+
}
|
|
25
|
+
return Array.from(uniqueValues).sort((a, b) => a - b);
|
|
26
|
+
};
|
|
27
|
+
const randomValeurs = getRandomUniqueValues(5, 1, 20);
|
|
28
|
+
const randomEffectives = [1, 2, 3, 4, 5].map((el) => (0, randint_1.randint)(1, 6));
|
|
29
|
+
let sortedValues = [];
|
|
30
|
+
for (let i = 0; i < randomEffectives.length; i++)
|
|
31
|
+
for (let j = 0; j < randomEffectives[i]; j++)
|
|
32
|
+
sortedValues.push(randomValeurs[i]);
|
|
33
|
+
const n = randomEffectives.reduce((sum, value) => sum + value, 0);
|
|
34
|
+
const middleIndex = Math.floor(n / 2);
|
|
35
|
+
let median;
|
|
36
|
+
if (n % 2 === 0) {
|
|
37
|
+
median = (sortedValues[middleIndex - 1] + sortedValues[middleIndex]) / 2;
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
median = sortedValues[middleIndex];
|
|
41
|
+
}
|
|
42
|
+
const getPropositions = (n) => {
|
|
43
|
+
const res = [];
|
|
44
|
+
res.push({
|
|
45
|
+
id: (0, uuid_1.v4)() + '',
|
|
46
|
+
statement: median + '',
|
|
47
|
+
isRightAnswer: true,
|
|
48
|
+
format: 'tex',
|
|
49
|
+
});
|
|
50
|
+
for (let i = 0; i < n - 1; i++) {
|
|
51
|
+
let isDuplicate;
|
|
52
|
+
let proposition;
|
|
53
|
+
do {
|
|
54
|
+
proposition = {
|
|
55
|
+
id: (0, uuid_1.v4)() + '',
|
|
56
|
+
statement: randomValeurs[(0, randint_1.randint)(0, randomValeurs.length)] + '',
|
|
57
|
+
isRightAnswer: false,
|
|
58
|
+
format: 'tex',
|
|
59
|
+
};
|
|
60
|
+
isDuplicate = res.some((p) => p.statement === proposition.statement);
|
|
61
|
+
} while (isDuplicate);
|
|
62
|
+
res.push(proposition);
|
|
63
|
+
}
|
|
64
|
+
return (0, shuffle_1.shuffle)(res);
|
|
65
|
+
};
|
|
66
|
+
const question = {
|
|
67
|
+
instruction: `On considère le tableau d'effectifs suivant :
|
|
68
|
+
|
|
69
|
+
| | | | | | |
|
|
70
|
+
|-|-|-|-|-|-|
|
|
71
|
+
|Valeur|${randomValeurs[0]}|${randomValeurs[1]}|${randomValeurs[2]}|${randomValeurs[3]}|${randomValeurs[4]}|
|
|
72
|
+
|Effectif|${randomEffectives[0]}|${randomEffectives[1]}|${randomEffectives[2]}|${randomEffectives[3]}|${randomEffectives[4]}|
|
|
73
|
+
|
|
74
|
+
Calculer la médiane de cette série de valeurs.`,
|
|
75
|
+
answer: median + '',
|
|
76
|
+
keys: [],
|
|
77
|
+
getPropositions,
|
|
78
|
+
answerFormat: 'tex',
|
|
79
|
+
};
|
|
80
|
+
return question;
|
|
81
|
+
}
|
|
82
|
+
exports.getMedian = getMedian;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"medianList.d.ts","sourceRoot":"","sources":["../../../src/exercises/probaStat/medianList.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAe,QAAQ,EAAE,MAAM,aAAa,CAAC;AAI9D,eAAO,MAAM,UAAU,EAAE,QAUxB,CAAC;AAEF,wBAAgB,SAAS,IAAI,QAAQ,CA4DpC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getMedian = exports.medianList = void 0;
|
|
4
|
+
const randint_1 = require("../../math/utils/random/randint");
|
|
5
|
+
const shuffle_1 = require("../../utils/shuffle");
|
|
6
|
+
const getDistinctQuestions_1 = require("../utils/getDistinctQuestions");
|
|
7
|
+
const uuid_1 = require("uuid");
|
|
8
|
+
exports.medianList = {
|
|
9
|
+
id: 'medianList',
|
|
10
|
+
connector: '=',
|
|
11
|
+
instruction: '',
|
|
12
|
+
label: "Calcul de la médiane d'une liste de valeurs",
|
|
13
|
+
levels: ['1', '0'],
|
|
14
|
+
isSingleStep: false,
|
|
15
|
+
section: 'Probabilités',
|
|
16
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getMedian, nb),
|
|
17
|
+
keys: ['f', 'cap', 'underscore'],
|
|
18
|
+
};
|
|
19
|
+
function getMedian() {
|
|
20
|
+
let randomValeurs = [];
|
|
21
|
+
const length = (0, randint_1.randint)(6, 10);
|
|
22
|
+
for (let i = 0; i < length; i++)
|
|
23
|
+
randomValeurs.push((0, randint_1.randint)(1, 20));
|
|
24
|
+
const sortedValues = randomValeurs.sort((a, b) => a - b);
|
|
25
|
+
const middleIndex = Math.floor(randomValeurs.length / 2);
|
|
26
|
+
let median;
|
|
27
|
+
if (randomValeurs.length % 2 === 0) {
|
|
28
|
+
median = (sortedValues[middleIndex - 1] + sortedValues[middleIndex]) / 2;
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
median = sortedValues[middleIndex];
|
|
32
|
+
}
|
|
33
|
+
const getPropositions = (n) => {
|
|
34
|
+
const res = [];
|
|
35
|
+
res.push({
|
|
36
|
+
id: (0, uuid_1.v4)() + '',
|
|
37
|
+
statement: median + '',
|
|
38
|
+
isRightAnswer: true,
|
|
39
|
+
format: 'tex',
|
|
40
|
+
});
|
|
41
|
+
for (let i = 0; i < n - 1; i++) {
|
|
42
|
+
let isDuplicate;
|
|
43
|
+
let proposition;
|
|
44
|
+
do {
|
|
45
|
+
proposition = {
|
|
46
|
+
id: (0, uuid_1.v4)() + '',
|
|
47
|
+
statement: randomValeurs[(0, randint_1.randint)(0, randomValeurs.length)] + '',
|
|
48
|
+
isRightAnswer: false,
|
|
49
|
+
format: 'tex',
|
|
50
|
+
};
|
|
51
|
+
isDuplicate = res.some((p) => p.statement === proposition.statement);
|
|
52
|
+
} while (isDuplicate);
|
|
53
|
+
res.push(proposition);
|
|
54
|
+
}
|
|
55
|
+
return (0, shuffle_1.shuffle)(res);
|
|
56
|
+
};
|
|
57
|
+
const question = {
|
|
58
|
+
instruction: `On considère la liste suivante : $${randomValeurs.join(';\\ ')}.$
|
|
59
|
+
$\\\\$Calculer la médiane de cette liste de valeurs.`,
|
|
60
|
+
answer: median + '',
|
|
61
|
+
keys: ['f', 'cap', 'underscore'],
|
|
62
|
+
getPropositions,
|
|
63
|
+
answerFormat: 'tex',
|
|
64
|
+
};
|
|
65
|
+
return question;
|
|
66
|
+
}
|
|
67
|
+
exports.getMedian = getMedian;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"probabilityTree.d.ts","sourceRoot":"","sources":["../../../src/exercises/probaStat/probabilityTree.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,QAAQ,EAAe,QAAQ,EAAE,MAAM,aAAa,CAAC;AAI9D,eAAO,MAAM,eAAe,EAAE,QAS7B,CAAC;AAOF,wBAAgB,kBAAkB,IAAI,QAAQ,CA2H7C"}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getProbabilityTree = exports.probabilityTree = void 0;
|
|
4
|
+
const randint_1 = require("../../math/utils/random/randint");
|
|
5
|
+
const numberNode_1 = require("../../tree/nodes/numbers/numberNode");
|
|
6
|
+
const multiplyNode_1 = require("../../tree/nodes/operators/multiplyNode");
|
|
7
|
+
const simplify_1 = require("../../tree/parsers/simplify");
|
|
8
|
+
const shuffle_1 = require("../../utils/shuffle");
|
|
9
|
+
const getDistinctQuestions_1 = require("../utils/getDistinctQuestions");
|
|
10
|
+
const uuid_1 = require("uuid");
|
|
11
|
+
exports.probabilityTree = {
|
|
12
|
+
id: 'probabilityTree',
|
|
13
|
+
connector: '=',
|
|
14
|
+
instruction: '',
|
|
15
|
+
label: "Calculs de probabilités à l'aide d'un arbre pondéré",
|
|
16
|
+
levels: ['1', '0'],
|
|
17
|
+
isSingleStep: false,
|
|
18
|
+
section: 'Probabilités',
|
|
19
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getProbabilityTree, nb),
|
|
20
|
+
};
|
|
21
|
+
function pgcd(a, b) {
|
|
22
|
+
while (b)
|
|
23
|
+
[a, b] = [b, a % b];
|
|
24
|
+
return a;
|
|
25
|
+
}
|
|
26
|
+
function getProbabilityTree() {
|
|
27
|
+
const A = (0, randint_1.randint)(2, 9);
|
|
28
|
+
const B = (0, randint_1.randint)(2, 10 - A);
|
|
29
|
+
const AC = (0, randint_1.randint)(2, 9);
|
|
30
|
+
const AD = (0, randint_1.randint)(2, 10 - AC);
|
|
31
|
+
const BC = (0, randint_1.randint)(2, 9);
|
|
32
|
+
const BD = (0, randint_1.randint)(2, 10 - BC);
|
|
33
|
+
const pA = (0, simplify_1.simplifyNode)(new numberNode_1.NumberNode(A / (A + B)));
|
|
34
|
+
const pB = (0, simplify_1.simplifyNode)(new numberNode_1.NumberNode(B / (A + B)));
|
|
35
|
+
const pA_C = (0, simplify_1.simplifyNode)(new numberNode_1.NumberNode(AC / (AC + AD)));
|
|
36
|
+
const pA_D = (0, simplify_1.simplifyNode)(new numberNode_1.NumberNode(AD / (AC + AD)));
|
|
37
|
+
const pB_C = (0, simplify_1.simplifyNode)(new numberNode_1.NumberNode(BC / (BC + BD)));
|
|
38
|
+
const pB_D = (0, simplify_1.simplifyNode)(new numberNode_1.NumberNode(BD / (BC + BD)));
|
|
39
|
+
let instruction = `En utilisant l'arbre de probabilité suivant, `;
|
|
40
|
+
let startStatement = '';
|
|
41
|
+
let answer;
|
|
42
|
+
const rand = (0, randint_1.randint)(1, 5);
|
|
43
|
+
switch (rand) {
|
|
44
|
+
case 1: {
|
|
45
|
+
instruction += `$\\\\$ Calculer $P(A \\cap C)$`;
|
|
46
|
+
startStatement = `P(A \\cap C)`;
|
|
47
|
+
answer = (0, simplify_1.simplifyNode)(new multiplyNode_1.MultiplyNode(pA, pA_C));
|
|
48
|
+
break;
|
|
49
|
+
}
|
|
50
|
+
case 2: {
|
|
51
|
+
instruction += `$\\\\$ Calculer $P(A \\cap D)$`;
|
|
52
|
+
startStatement = `P(A \\cap D)`;
|
|
53
|
+
answer = (0, simplify_1.simplifyNode)(new multiplyNode_1.MultiplyNode(pA, pA_D));
|
|
54
|
+
break;
|
|
55
|
+
}
|
|
56
|
+
case 3: {
|
|
57
|
+
instruction += `$\\\\$ Calculer $P(B \\cap C)$`;
|
|
58
|
+
startStatement = `P(B \\cap C)`;
|
|
59
|
+
answer = (0, simplify_1.simplifyNode)(new multiplyNode_1.MultiplyNode(pB, pB_C));
|
|
60
|
+
break;
|
|
61
|
+
}
|
|
62
|
+
case 4: {
|
|
63
|
+
instruction += `$\\\\$ Calculer $P(B \\cap D)$`;
|
|
64
|
+
startStatement = `P(B \\cap D)`;
|
|
65
|
+
answer = (0, simplify_1.simplifyNode)(new multiplyNode_1.MultiplyNode(pB, pB_D));
|
|
66
|
+
break;
|
|
67
|
+
}
|
|
68
|
+
default:
|
|
69
|
+
answer = (0, simplify_1.simplifyNode)(new multiplyNode_1.MultiplyNode(pB, pB_D)); // juste pour éviter l'erreur
|
|
70
|
+
}
|
|
71
|
+
let commands = [
|
|
72
|
+
'A = Point({2,2})',
|
|
73
|
+
'B = Point({2,-2})',
|
|
74
|
+
'AC = Point({5,3})',
|
|
75
|
+
'AD = Point({5,1})',
|
|
76
|
+
'BC = Point({5,-1})',
|
|
77
|
+
'BD = Point({5,-3})',
|
|
78
|
+
'Segment(Point({0,0}),A)',
|
|
79
|
+
'Segment(A,AC)',
|
|
80
|
+
'Segment(A,AD)',
|
|
81
|
+
'Segment(Point({0,0}),B)',
|
|
82
|
+
'Segment(B,BC)',
|
|
83
|
+
'Segment(B,BD)',
|
|
84
|
+
'ShowAxes(false)',
|
|
85
|
+
'ShowGrid(false)',
|
|
86
|
+
`Text("\\scriptsize${A / pgcd(A, A + B)}/${(A + B) / pgcd(A, A + B)}", (0.3, 2.1), true, true)`,
|
|
87
|
+
`Text("\\scriptsize${AC / pgcd(AC, AC + AD)}/${(AC + AD) / pgcd(AC, AC + AD)}", (2.8, 3.5), true, true)`,
|
|
88
|
+
`Text("\\scriptsize${AD / pgcd(AD, AC + AD)}/${(AC + AD) / pgcd(AD, AC + AD)}", (2.8, 1.4), true, true)`,
|
|
89
|
+
`Text("\\scriptsize${B / pgcd(B, A + B)}/${(A + B) / pgcd(B, A + B)}", (0.3, -1.2), true, true)`,
|
|
90
|
+
`Text("\\scriptsize${BC / pgcd(BC, BC + BD)}/${(BC + BD) / pgcd(BC, BC + BD)}", (2.8, -0.6), true, true)`,
|
|
91
|
+
`Text("\\scriptsize${BD / pgcd(BD, BC + BD)}/${(BC + BD) / pgcd(BD, BC + BD)}", (2.8, -2.5), true, true)`,
|
|
92
|
+
'Text("A", (1.85 , 2.5))',
|
|
93
|
+
'Text("B", (1.85 , -2.8))',
|
|
94
|
+
'Text("C", (5.5 , 2.85))',
|
|
95
|
+
'Text("D", (5.5 , 0.85))',
|
|
96
|
+
'Text("C", (5.5 , -1.1))',
|
|
97
|
+
'Text("D", (5.5 , -3.1))',
|
|
98
|
+
];
|
|
99
|
+
const getPropositions = (n) => {
|
|
100
|
+
const res = [];
|
|
101
|
+
res.push({
|
|
102
|
+
id: (0, uuid_1.v4)() + '',
|
|
103
|
+
statement: answer.toTex(),
|
|
104
|
+
isRightAnswer: true,
|
|
105
|
+
format: 'tex',
|
|
106
|
+
});
|
|
107
|
+
for (let i = 0; i < n - 1; i++) {
|
|
108
|
+
let isDuplicate;
|
|
109
|
+
let proposition;
|
|
110
|
+
do {
|
|
111
|
+
proposition = {
|
|
112
|
+
id: (0, uuid_1.v4)() + '',
|
|
113
|
+
statement: (0, simplify_1.simplifyNode)(new multiplyNode_1.MultiplyNode(answer, new numberNode_1.NumberNode((0, randint_1.randint)(2, 11)))).toTex(),
|
|
114
|
+
isRightAnswer: false,
|
|
115
|
+
format: 'tex',
|
|
116
|
+
};
|
|
117
|
+
isDuplicate = res.some((p) => p.statement === proposition.statement);
|
|
118
|
+
} while (isDuplicate);
|
|
119
|
+
res.push(proposition);
|
|
120
|
+
}
|
|
121
|
+
return (0, shuffle_1.shuffle)(res);
|
|
122
|
+
};
|
|
123
|
+
const question = {
|
|
124
|
+
instruction,
|
|
125
|
+
startStatement,
|
|
126
|
+
answer: answer.toTex(),
|
|
127
|
+
keys: [],
|
|
128
|
+
commands,
|
|
129
|
+
coords: [-2, 8, -5, 5],
|
|
130
|
+
getPropositions,
|
|
131
|
+
answerFormat: 'tex',
|
|
132
|
+
};
|
|
133
|
+
return question;
|
|
134
|
+
}
|
|
135
|
+
exports.getProbabilityTree = getProbabilityTree;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"quartiles.d.ts","sourceRoot":"","sources":["../../../src/exercises/probaStat/quartiles.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAe,QAAQ,EAAE,MAAM,aAAa,CAAC;AAI9D,eAAO,MAAM,SAAS,EAAE,QAUvB,CAAC;AAEF,wBAAgB,YAAY,IAAI,QAAQ,CAkGvC"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getQuartiles = exports.quartiles = void 0;
|
|
4
|
+
const randint_1 = require("../../math/utils/random/randint");
|
|
5
|
+
const shuffle_1 = require("../../utils/shuffle");
|
|
6
|
+
const getDistinctQuestions_1 = require("../utils/getDistinctQuestions");
|
|
7
|
+
const uuid_1 = require("uuid");
|
|
8
|
+
exports.quartiles = {
|
|
9
|
+
id: 'quartiles',
|
|
10
|
+
connector: '=',
|
|
11
|
+
instruction: '',
|
|
12
|
+
label: "Calcul des quartiles d'une série de valeurs",
|
|
13
|
+
levels: ['1', '0'],
|
|
14
|
+
isSingleStep: false,
|
|
15
|
+
section: 'Probabilités',
|
|
16
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getQuartiles, nb),
|
|
17
|
+
keys: ['cap', 'underscore'],
|
|
18
|
+
};
|
|
19
|
+
function getQuartiles() {
|
|
20
|
+
const getRandomUniqueValues = (count, min, max) => {
|
|
21
|
+
const uniqueValues = new Set();
|
|
22
|
+
while (uniqueValues.size < count) {
|
|
23
|
+
uniqueValues.add((0, randint_1.randint)(min, max));
|
|
24
|
+
}
|
|
25
|
+
return Array.from(uniqueValues).sort((a, b) => a - b);
|
|
26
|
+
};
|
|
27
|
+
const randomValeurs = getRandomUniqueValues(5, 1, 20);
|
|
28
|
+
const randomEffectives = [1, 2, 3, 4, 5].map((el) => (0, randint_1.randint)(1, 6));
|
|
29
|
+
let sortedValues = [];
|
|
30
|
+
for (let i = 0; i < randomEffectives.length; i++)
|
|
31
|
+
for (let j = 0; j < randomEffectives[i]; j++)
|
|
32
|
+
sortedValues.push(randomValeurs[i]);
|
|
33
|
+
const n = randomEffectives.reduce((sum, value) => sum + value, 0);
|
|
34
|
+
const firstQuartileIndex = Math.round(n / 4 + 0.49);
|
|
35
|
+
const thirdQuartileIndex = Math.round((3 * n) / 4 + 0.49);
|
|
36
|
+
console.log(thirdQuartileIndex + '///' + (3 * n) / 4);
|
|
37
|
+
const firstQuartile = sortedValues[firstQuartileIndex - 1];
|
|
38
|
+
const thirdQuartile = sortedValues[thirdQuartileIndex - 1];
|
|
39
|
+
const randomQuartile = (0, randint_1.randint)(0, 2);
|
|
40
|
+
let quartileToString;
|
|
41
|
+
let choosenQuartile;
|
|
42
|
+
switch (randomQuartile) {
|
|
43
|
+
case 0:
|
|
44
|
+
quartileToString = 'premier quartile';
|
|
45
|
+
choosenQuartile = firstQuartile;
|
|
46
|
+
break;
|
|
47
|
+
case 1:
|
|
48
|
+
quartileToString = 'troisième quartile';
|
|
49
|
+
choosenQuartile = thirdQuartile;
|
|
50
|
+
break;
|
|
51
|
+
default:
|
|
52
|
+
quartileToString = 'troisième quartile';
|
|
53
|
+
choosenQuartile = thirdQuartile;
|
|
54
|
+
break;
|
|
55
|
+
}
|
|
56
|
+
const getPropositions = (n) => {
|
|
57
|
+
const res = [];
|
|
58
|
+
res.push({
|
|
59
|
+
id: (0, uuid_1.v4)() + '',
|
|
60
|
+
statement: choosenQuartile + '',
|
|
61
|
+
isRightAnswer: true,
|
|
62
|
+
format: 'tex',
|
|
63
|
+
});
|
|
64
|
+
for (let i = 0; i < n - 1; i++) {
|
|
65
|
+
let isDuplicate;
|
|
66
|
+
let proposition;
|
|
67
|
+
do {
|
|
68
|
+
proposition = {
|
|
69
|
+
id: (0, uuid_1.v4)() + '',
|
|
70
|
+
statement: randomValeurs[(0, randint_1.randint)(0, randomValeurs.length)] + '',
|
|
71
|
+
isRightAnswer: false,
|
|
72
|
+
format: 'tex',
|
|
73
|
+
};
|
|
74
|
+
isDuplicate = res.some((p) => p.statement === proposition.statement);
|
|
75
|
+
} while (isDuplicate);
|
|
76
|
+
res.push(proposition);
|
|
77
|
+
}
|
|
78
|
+
return (0, shuffle_1.shuffle)(res);
|
|
79
|
+
};
|
|
80
|
+
const question = {
|
|
81
|
+
instruction: `On considère le tableau d'effectifs suivant :
|
|
82
|
+
|
|
83
|
+
| | | | | | |
|
|
84
|
+
|-|-|-|-|-|-|
|
|
85
|
+
|Valeur|${randomValeurs[0]}|${randomValeurs[1]}|${randomValeurs[2]}|${randomValeurs[3]}|${randomValeurs[4]}|
|
|
86
|
+
|Effectif|${randomEffectives[0]}|${randomEffectives[1]}|${randomEffectives[2]}|${randomEffectives[3]}|${randomEffectives[4]}|
|
|
87
|
+
|
|
88
|
+
Calculer le ${quartileToString} de cette série de valeurs.`,
|
|
89
|
+
answer: choosenQuartile + '',
|
|
90
|
+
keys: ['f', 'cap', 'underscore'],
|
|
91
|
+
getPropositions,
|
|
92
|
+
answerFormat: 'tex',
|
|
93
|
+
};
|
|
94
|
+
return question;
|
|
95
|
+
}
|
|
96
|
+
exports.getQuartiles = getQuartiles;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"quartilesList.d.ts","sourceRoot":"","sources":["../../../src/exercises/probaStat/quartilesList.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAe,QAAQ,EAAE,MAAM,aAAa,CAAC;AAI9D,eAAO,MAAM,aAAa,EAAE,QAU3B,CAAC;AAEF,wBAAgB,YAAY,IAAI,QAAQ,CAgFvC"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getQuartiles = exports.quartilesList = void 0;
|
|
4
|
+
const randint_1 = require("../../math/utils/random/randint");
|
|
5
|
+
const shuffle_1 = require("../../utils/shuffle");
|
|
6
|
+
const getDistinctQuestions_1 = require("../utils/getDistinctQuestions");
|
|
7
|
+
const uuid_1 = require("uuid");
|
|
8
|
+
exports.quartilesList = {
|
|
9
|
+
id: 'quartilesList',
|
|
10
|
+
connector: '=',
|
|
11
|
+
instruction: '',
|
|
12
|
+
label: "Calcul des quartiles d'une liste",
|
|
13
|
+
levels: ['1', '0'],
|
|
14
|
+
isSingleStep: false,
|
|
15
|
+
section: 'Statistiques',
|
|
16
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getQuartiles, nb),
|
|
17
|
+
keys: [],
|
|
18
|
+
};
|
|
19
|
+
function getQuartiles() {
|
|
20
|
+
let randomValeurs = [];
|
|
21
|
+
const length = (0, randint_1.randint)(5, 9);
|
|
22
|
+
for (let i = 0; i < length; i++)
|
|
23
|
+
randomValeurs.push((0, randint_1.randint)(1, 20));
|
|
24
|
+
const sortedValues = randomValeurs.sort((a, b) => a - b);
|
|
25
|
+
const firstQuartileIndex = Math.round(randomValeurs.length / 4 + 0.49);
|
|
26
|
+
const thirdQuartileIndex = Math.round((3 * randomValeurs.length) / 4 + 0.49);
|
|
27
|
+
const firstQuartile = sortedValues[firstQuartileIndex - 1];
|
|
28
|
+
const thirdQuartile = sortedValues[thirdQuartileIndex - 1];
|
|
29
|
+
const randomQuartile = (0, randint_1.randint)(0, 2);
|
|
30
|
+
let quartileToString;
|
|
31
|
+
let choosenQuartile;
|
|
32
|
+
switch (randomQuartile) {
|
|
33
|
+
case 0:
|
|
34
|
+
quartileToString = 'premier quartile';
|
|
35
|
+
choosenQuartile = firstQuartile;
|
|
36
|
+
break;
|
|
37
|
+
case 1:
|
|
38
|
+
quartileToString = 'troisième quartile';
|
|
39
|
+
choosenQuartile = thirdQuartile;
|
|
40
|
+
break;
|
|
41
|
+
default:
|
|
42
|
+
quartileToString = 'troisième quartile';
|
|
43
|
+
choosenQuartile = thirdQuartile;
|
|
44
|
+
break;
|
|
45
|
+
}
|
|
46
|
+
let stringList = '';
|
|
47
|
+
const getPropositions = (n) => {
|
|
48
|
+
const res = [];
|
|
49
|
+
res.push({
|
|
50
|
+
id: (0, uuid_1.v4)() + '',
|
|
51
|
+
statement: choosenQuartile + '',
|
|
52
|
+
isRightAnswer: true,
|
|
53
|
+
format: 'tex',
|
|
54
|
+
});
|
|
55
|
+
for (let i = 0; i < n - 1; i++) {
|
|
56
|
+
let isDuplicate;
|
|
57
|
+
let proposition;
|
|
58
|
+
do {
|
|
59
|
+
proposition = {
|
|
60
|
+
id: (0, uuid_1.v4)() + '',
|
|
61
|
+
statement: randomValeurs[(0, randint_1.randint)(0, randomValeurs.length)] + '',
|
|
62
|
+
isRightAnswer: false,
|
|
63
|
+
format: 'tex',
|
|
64
|
+
};
|
|
65
|
+
isDuplicate = res.some((p) => p.statement === proposition.statement);
|
|
66
|
+
} while (isDuplicate);
|
|
67
|
+
res.push(proposition);
|
|
68
|
+
}
|
|
69
|
+
return (0, shuffle_1.shuffle)(res);
|
|
70
|
+
};
|
|
71
|
+
const question = {
|
|
72
|
+
instruction: `On considère la liste suivante : $${randomValeurs.join(';\\ ')}.$
|
|
73
|
+
$\\\\$Calculer le ${quartileToString} de cette série de valeurs.`,
|
|
74
|
+
answer: choosenQuartile + '',
|
|
75
|
+
keys: [],
|
|
76
|
+
getPropositions,
|
|
77
|
+
answerFormat: 'tex',
|
|
78
|
+
};
|
|
79
|
+
return question;
|
|
80
|
+
}
|
|
81
|
+
exports.getQuartiles = getQuartiles;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"arithmeticExplicitFormulaUsage.d.ts","sourceRoot":"","sources":["../../../../src/exercises/sequences/arithmetic/arithmeticExplicitFormulaUsage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAe,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAO3E,eAAO,MAAM,8BAA8B,EAAE,QAU5C,CAAC;AAEF,wBAAgB,iCAAiC,IAAI,QAAQ,
|
|
1
|
+
{"version":3,"file":"arithmeticExplicitFormulaUsage.d.ts","sourceRoot":"","sources":["../../../../src/exercises/sequences/arithmetic/arithmeticExplicitFormulaUsage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAe,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAO3E,eAAO,MAAM,8BAA8B,EAAE,QAU5C,CAAC;AAEF,wBAAgB,iCAAiC,IAAI,QAAQ,CAgD5D"}
|
|
@@ -28,6 +28,7 @@ function getArithmeticExplicitFormulaUsage() {
|
|
|
28
28
|
id: (0, uuid_1.v4)() + '',
|
|
29
29
|
statement: (firstValue + askedRank * reason).toString(),
|
|
30
30
|
isRightAnswer: true,
|
|
31
|
+
format: 'tex',
|
|
31
32
|
});
|
|
32
33
|
for (let i = 0; i < n - 1; i++) {
|
|
33
34
|
let isDuplicate;
|
|
@@ -37,6 +38,7 @@ function getArithmeticExplicitFormulaUsage() {
|
|
|
37
38
|
id: (0, uuid_1.v4)() + '',
|
|
38
39
|
statement: ((0, randint_1.randint)(-5, 6, [firstValue]) + askedRank * reason).toString(),
|
|
39
40
|
isRightAnswer: false,
|
|
41
|
+
format: 'tex',
|
|
40
42
|
};
|
|
41
43
|
isDuplicate = res.some((p) => p.statement === proposition.statement);
|
|
42
44
|
} while (isDuplicate);
|
|
@@ -50,6 +52,7 @@ function getArithmeticExplicitFormulaUsage() {
|
|
|
50
52
|
answer: (firstValue + askedRank * reason).toString(),
|
|
51
53
|
keys: ['r', 'n', 'u', 'underscore'],
|
|
52
54
|
getPropositions,
|
|
55
|
+
answerFormat: 'tex',
|
|
53
56
|
};
|
|
54
57
|
return question;
|
|
55
58
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"arithmeticFindExplicitFormula.d.ts","sourceRoot":"","sources":["../../../../src/exercises/sequences/arithmetic/arithmeticFindExplicitFormula.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAe,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAO3E,eAAO,MAAM,6BAA6B,EAAE,QAU3C,CAAC;AAEF,wBAAgB,gCAAgC,IAAI,QAAQ,
|
|
1
|
+
{"version":3,"file":"arithmeticFindExplicitFormula.d.ts","sourceRoot":"","sources":["../../../../src/exercises/sequences/arithmetic/arithmeticFindExplicitFormula.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAe,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAO3E,eAAO,MAAM,6BAA6B,EAAE,QAU3C,CAAC;AAEF,wBAAgB,gCAAgC,IAAI,QAAQ,CAgD3D"}
|
|
@@ -28,6 +28,7 @@ function getArithmeticFindExplicitFormula() {
|
|
|
28
28
|
id: (0, uuid_1.v4)() + '',
|
|
29
29
|
statement: formula.toString(),
|
|
30
30
|
isRightAnswer: true,
|
|
31
|
+
format: 'tex',
|
|
31
32
|
});
|
|
32
33
|
for (let i = 0; i < n - 1; i++) {
|
|
33
34
|
let isDuplicate;
|
|
@@ -37,6 +38,7 @@ function getArithmeticFindExplicitFormula() {
|
|
|
37
38
|
id: (0, uuid_1.v4)() + '',
|
|
38
39
|
statement: new polynomial_1.Polynomial([firstValue + (0, randint_1.randint)(-3, 4), reason + (0, randint_1.randint)(-3, 4)], 'n').toString(),
|
|
39
40
|
isRightAnswer: false,
|
|
41
|
+
format: 'tex',
|
|
40
42
|
};
|
|
41
43
|
isDuplicate = res.some((p) => p.statement === proposition.statement);
|
|
42
44
|
} while (isDuplicate);
|
|
@@ -50,6 +52,7 @@ function getArithmeticFindExplicitFormula() {
|
|
|
50
52
|
answer: formula.toString(),
|
|
51
53
|
keys: ['r', 'n', 'u', 'underscore'],
|
|
52
54
|
getPropositions,
|
|
55
|
+
answerFormat: 'tex',
|
|
53
56
|
};
|
|
54
57
|
return question;
|
|
55
58
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"arithmeticFindReason.d.ts","sourceRoot":"","sources":["../../../../src/exercises/sequences/arithmetic/arithmeticFindReason.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAe,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAM3E,eAAO,MAAM,oBAAoB,EAAE,QAWlC,CAAC;AAEF,wBAAgB,uBAAuB,IAAI,QAAQ,
|
|
1
|
+
{"version":3,"file":"arithmeticFindReason.d.ts","sourceRoot":"","sources":["../../../../src/exercises/sequences/arithmetic/arithmeticFindReason.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAe,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAM3E,eAAO,MAAM,oBAAoB,EAAE,QAWlC,CAAC;AAEF,wBAAgB,uBAAuB,IAAI,QAAQ,CA+ClD"}
|
|
@@ -28,6 +28,7 @@ function getArithmeticFindReason() {
|
|
|
28
28
|
id: (0, uuid_1.v4)() + '',
|
|
29
29
|
statement: reason + '',
|
|
30
30
|
isRightAnswer: true,
|
|
31
|
+
format: 'tex',
|
|
31
32
|
});
|
|
32
33
|
for (let i = 0; i < n - 1; i++) {
|
|
33
34
|
let isDuplicate;
|
|
@@ -37,6 +38,7 @@ function getArithmeticFindReason() {
|
|
|
37
38
|
id: (0, uuid_1.v4)() + '',
|
|
38
39
|
statement: reason + (0, randint_1.randint)(-5, 6, [0]) + '',
|
|
39
40
|
isRightAnswer: false,
|
|
41
|
+
format: 'tex',
|
|
40
42
|
};
|
|
41
43
|
isDuplicate = res.some((p) => p.statement === proposition.statement);
|
|
42
44
|
} while (isDuplicate);
|
|
@@ -50,6 +52,7 @@ function getArithmeticFindReason() {
|
|
|
50
52
|
answer: reason.toString(),
|
|
51
53
|
keys: ['r', 'n', 'u', 'underscore'],
|
|
52
54
|
getPropositions,
|
|
55
|
+
answerFormat: 'tex',
|
|
53
56
|
};
|
|
54
57
|
return question;
|
|
55
58
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"arithmeticReasonUsage.d.ts","sourceRoot":"","sources":["../../../../src/exercises/sequences/arithmetic/arithmeticReasonUsage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAe,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAM3E,eAAO,MAAM,qBAAqB,EAAE,QAUnC,CAAC;AAEF,wBAAgB,wBAAwB,IAAI,QAAQ,
|
|
1
|
+
{"version":3,"file":"arithmeticReasonUsage.d.ts","sourceRoot":"","sources":["../../../../src/exercises/sequences/arithmetic/arithmeticReasonUsage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAe,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAM3E,eAAO,MAAM,qBAAqB,EAAE,QAUnC,CAAC;AAEF,wBAAgB,wBAAwB,IAAI,QAAQ,CA8CnD"}
|
|
@@ -27,6 +27,7 @@ function getArithmeticReasonUsage() {
|
|
|
27
27
|
id: (0, uuid_1.v4)() + '',
|
|
28
28
|
statement: (startValue + reason).toString(),
|
|
29
29
|
isRightAnswer: true,
|
|
30
|
+
format: 'tex',
|
|
30
31
|
});
|
|
31
32
|
for (let i = 0; i < n - 1; i++) {
|
|
32
33
|
let isDuplicate;
|
|
@@ -36,6 +37,7 @@ function getArithmeticReasonUsage() {
|
|
|
36
37
|
id: (0, uuid_1.v4)() + '',
|
|
37
38
|
statement: startValue + reason + (0, randint_1.randint)(-5, 6, [0]) + '',
|
|
38
39
|
isRightAnswer: false,
|
|
40
|
+
format: 'tex',
|
|
39
41
|
};
|
|
40
42
|
isDuplicate = res.some((p) => p.statement === proposition.statement);
|
|
41
43
|
} while (isDuplicate);
|
|
@@ -49,6 +51,7 @@ function getArithmeticReasonUsage() {
|
|
|
49
51
|
answer: (startValue + reason).toString(),
|
|
50
52
|
keys: ['r', 'n', 'u', 'underscore'],
|
|
51
53
|
getPropositions,
|
|
54
|
+
answerFormat: 'tex',
|
|
52
55
|
};
|
|
53
56
|
return question;
|
|
54
57
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"arithmeticRecurrenceFormulaUsage.d.ts","sourceRoot":"","sources":["../../../../src/exercises/sequences/arithmetic/arithmeticRecurrenceFormulaUsage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAiC,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAM7F,eAAO,MAAM,gCAAgC,EAAE,QAU9C,CAAC;AAEF,wBAAgB,mCAAmC,IAAI,QAAQ,
|
|
1
|
+
{"version":3,"file":"arithmeticRecurrenceFormulaUsage.d.ts","sourceRoot":"","sources":["../../../../src/exercises/sequences/arithmetic/arithmeticRecurrenceFormulaUsage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAiC,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAM7F,eAAO,MAAM,gCAAgC,EAAE,QAU9C,CAAC;AAEF,wBAAgB,mCAAmC,IAAI,QAAQ,CA8C9D"}
|
|
@@ -27,6 +27,7 @@ function getArithmeticRecurrenceFormulaUsage() {
|
|
|
27
27
|
id: (0, uuid_1.v4)() + '',
|
|
28
28
|
statement: (firstValue + reason).toString(),
|
|
29
29
|
isRightAnswer: true,
|
|
30
|
+
format: 'tex',
|
|
30
31
|
});
|
|
31
32
|
for (let i = 0; i < n - 1; i++) {
|
|
32
33
|
let isDuplicate;
|
|
@@ -36,6 +37,7 @@ function getArithmeticRecurrenceFormulaUsage() {
|
|
|
36
37
|
id: (0, uuid_1.v4)() + '',
|
|
37
38
|
statement: firstValue + reason + (0, randint_1.randint)(-5, 6, [0]) + '',
|
|
38
39
|
isRightAnswer: false,
|
|
40
|
+
format: 'tex',
|
|
39
41
|
};
|
|
40
42
|
isDuplicate = res.some((p) => p.statement === proposition.statement);
|
|
41
43
|
} while (isDuplicate);
|
|
@@ -49,6 +51,7 @@ function getArithmeticRecurrenceFormulaUsage() {
|
|
|
49
51
|
answer: (firstValue + reason).toString(),
|
|
50
52
|
keys: ['r', 'n', 'u', 'underscore'],
|
|
51
53
|
getPropositions,
|
|
54
|
+
answerFormat: 'tex',
|
|
52
55
|
};
|
|
53
56
|
return question;
|
|
54
57
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"arithmeticThresholdFind.d.ts","sourceRoot":"","sources":["../../../../src/exercises/sequences/arithmetic/arithmeticThresholdFind.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAe,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAIjE,eAAO,MAAM,uBAAuB,EAAE,QAUrC,CAAC;AAEF,wBAAgB,0BAA0B,IAAI,QAAQ,
|
|
1
|
+
{"version":3,"file":"arithmeticThresholdFind.d.ts","sourceRoot":"","sources":["../../../../src/exercises/sequences/arithmetic/arithmeticThresholdFind.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAe,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAIjE,eAAO,MAAM,uBAAuB,EAAE,QAUrC,CAAC;AAEF,wBAAgB,0BAA0B,IAAI,QAAQ,CA0DrD"}
|