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,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getImageFunction = exports.imageFunction = void 0;
|
|
4
|
+
const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
|
|
5
|
+
const polynomial_1 = require("../../../math/polynomials/polynomial");
|
|
6
|
+
const randint_1 = require("../../../math/utils/random/randint");
|
|
7
|
+
const coinFlip_1 = require("../../../utils/coinFlip");
|
|
8
|
+
const shuffle_1 = require("../../../utils/shuffle");
|
|
9
|
+
const uuid_1 = require("uuid");
|
|
10
|
+
exports.imageFunction = {
|
|
11
|
+
id: 'imageFunction',
|
|
12
|
+
connector: '=',
|
|
13
|
+
instruction: '',
|
|
14
|
+
label: "Image d'une fonction",
|
|
15
|
+
levels: ['4', '3', '2'],
|
|
16
|
+
section: 'Géométrie cartésienne',
|
|
17
|
+
isSingleStep: true,
|
|
18
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getImageFunction, nb),
|
|
19
|
+
keys: [],
|
|
20
|
+
};
|
|
21
|
+
function getImageFunction() {
|
|
22
|
+
const rand = (0, coinFlip_1.coinFlip)();
|
|
23
|
+
const polynome1 = new polynomial_1.Polynomial([(0, randint_1.randint)(-9, 10), (0, randint_1.randint)(-5, 6, [0])]);
|
|
24
|
+
const polynome2 = new polynomial_1.Polynomial([(0, randint_1.randint)(-9, 10), (0, randint_1.randint)(-9, 10), (0, randint_1.randint)(-4, 5, [0])]);
|
|
25
|
+
const xValue = (0, randint_1.randint)(-9, 10);
|
|
26
|
+
const statement = rand
|
|
27
|
+
? `Soit $f(x) = ${polynome1.toTree().toTex()}$. Calculer $f(${xValue})$.`
|
|
28
|
+
: `Soit $f(x) = ${polynome2.toTree().toTex()}$. Calculer $f(${xValue})$.`;
|
|
29
|
+
const answer = rand ? polynome1.calculate(xValue) : polynome2.calculate(xValue);
|
|
30
|
+
const getPropositions = (n) => {
|
|
31
|
+
const res = [];
|
|
32
|
+
res.push({
|
|
33
|
+
id: (0, uuid_1.v4)() + '',
|
|
34
|
+
statement: answer + '',
|
|
35
|
+
isRightAnswer: true,
|
|
36
|
+
format: 'tex',
|
|
37
|
+
});
|
|
38
|
+
for (let i = 0; i < n - 1; i++) {
|
|
39
|
+
let isDuplicate;
|
|
40
|
+
let proposition;
|
|
41
|
+
do {
|
|
42
|
+
const wrongAnswer = answer + (0, randint_1.randint)(-10, 11, [0]);
|
|
43
|
+
proposition = {
|
|
44
|
+
id: (0, uuid_1.v4)() + '',
|
|
45
|
+
statement: wrongAnswer + '',
|
|
46
|
+
isRightAnswer: false,
|
|
47
|
+
format: 'tex',
|
|
48
|
+
};
|
|
49
|
+
isDuplicate = res.some((p) => p.statement === proposition.statement);
|
|
50
|
+
} while (isDuplicate);
|
|
51
|
+
res.push(proposition);
|
|
52
|
+
}
|
|
53
|
+
return (0, shuffle_1.shuffle)(res);
|
|
54
|
+
};
|
|
55
|
+
const question = {
|
|
56
|
+
instruction: statement,
|
|
57
|
+
startStatement: `f(${xValue})`,
|
|
58
|
+
answer: answer + '',
|
|
59
|
+
keys: [],
|
|
60
|
+
getPropositions,
|
|
61
|
+
answerFormat: 'tex',
|
|
62
|
+
};
|
|
63
|
+
return question;
|
|
64
|
+
}
|
|
65
|
+
exports.getImageFunction = getImageFunction;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"imageFunctionGeogebra.d.ts","sourceRoot":"","sources":["../../../../src/exercises/geometry/cartesian/imageFunctionGeogebra.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAe,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAQ3E,eAAO,MAAM,qBAAqB,EAAE,QAUnC,CAAC;AAEF,wBAAgB,wBAAwB,IAAI,QAAQ,CAiFnD"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getImageFunctionGeogebra = exports.imageFunctionGeogebra = void 0;
|
|
4
|
+
const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
|
|
5
|
+
const polynomial_1 = require("../../../math/polynomials/polynomial");
|
|
6
|
+
const randint_1 = require("../../../math/utils/random/randint");
|
|
7
|
+
const coinFlip_1 = require("../../../utils/coinFlip");
|
|
8
|
+
const shuffle_1 = require("../../../utils/shuffle");
|
|
9
|
+
const uuid_1 = require("uuid");
|
|
10
|
+
exports.imageFunctionGeogebra = {
|
|
11
|
+
id: 'imageFunctionGeogebra',
|
|
12
|
+
connector: '=',
|
|
13
|
+
instruction: '',
|
|
14
|
+
label: "Lecture d'une image",
|
|
15
|
+
levels: ['4', '3', '2'],
|
|
16
|
+
section: 'Géométrie cartésienne',
|
|
17
|
+
isSingleStep: true,
|
|
18
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getImageFunctionGeogebra, nb),
|
|
19
|
+
keys: [],
|
|
20
|
+
};
|
|
21
|
+
function getImageFunctionGeogebra() {
|
|
22
|
+
const rand = (0, coinFlip_1.coinFlip)();
|
|
23
|
+
const xValue = (0, randint_1.randint)(-5, 6);
|
|
24
|
+
let polynome1;
|
|
25
|
+
do {
|
|
26
|
+
polynome1 = new polynomial_1.Polynomial([(0, randint_1.randint)(-9, 10), (0, randint_1.randint)(-5, 6, [0])]);
|
|
27
|
+
} while (polynome1.calculate(xValue) > 10 || polynome1.calculate(xValue) < -10);
|
|
28
|
+
let polynome2;
|
|
29
|
+
do {
|
|
30
|
+
polynome2 = new polynomial_1.Polynomial([(0, randint_1.randint)(-9, 10), (0, randint_1.randint)(-9, 10), (0, randint_1.randint)(-4, 5, [0])]);
|
|
31
|
+
} while (polynome2.calculate(xValue) > 10 || polynome2.calculate(xValue) < -10);
|
|
32
|
+
const statement = `Quelle est l'image de $${xValue}$ par la fonction $f$ représentée ci dessous ?`;
|
|
33
|
+
const answer = rand ? polynome1.calculate(xValue) : polynome2.calculate(xValue);
|
|
34
|
+
let xmin, xmax, ymin, ymax;
|
|
35
|
+
if (answer > 0) {
|
|
36
|
+
ymax = answer + 1;
|
|
37
|
+
ymin = -1;
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
ymin = answer - 1;
|
|
41
|
+
ymax = 1;
|
|
42
|
+
}
|
|
43
|
+
if (xValue > 0) {
|
|
44
|
+
xmax = xValue + 1;
|
|
45
|
+
xmin = -1;
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
xmin = xValue - 1;
|
|
49
|
+
xmax = 1;
|
|
50
|
+
}
|
|
51
|
+
const getPropositions = (n) => {
|
|
52
|
+
const res = [];
|
|
53
|
+
res.push({
|
|
54
|
+
id: (0, uuid_1.v4)() + '',
|
|
55
|
+
statement: answer + '',
|
|
56
|
+
isRightAnswer: true,
|
|
57
|
+
format: 'tex',
|
|
58
|
+
});
|
|
59
|
+
for (let i = 0; i < n - 1; i++) {
|
|
60
|
+
let isDuplicate;
|
|
61
|
+
let proposition;
|
|
62
|
+
do {
|
|
63
|
+
const wrongAnswer = answer + (0, randint_1.randint)(-10, 11, [0]);
|
|
64
|
+
proposition = {
|
|
65
|
+
id: (0, uuid_1.v4)() + '',
|
|
66
|
+
statement: wrongAnswer + '',
|
|
67
|
+
isRightAnswer: false,
|
|
68
|
+
format: 'tex',
|
|
69
|
+
};
|
|
70
|
+
isDuplicate = res.some((p) => p.statement === proposition.statement);
|
|
71
|
+
} while (isDuplicate);
|
|
72
|
+
res.push(proposition);
|
|
73
|
+
}
|
|
74
|
+
return (0, shuffle_1.shuffle)(res);
|
|
75
|
+
};
|
|
76
|
+
const commands = [rand ? polynome1.toString() : polynome2.toString()];
|
|
77
|
+
const question = {
|
|
78
|
+
instruction: statement,
|
|
79
|
+
startStatement: `f(${xValue})`,
|
|
80
|
+
answer: answer + '',
|
|
81
|
+
keys: [],
|
|
82
|
+
commands,
|
|
83
|
+
coords: [xmin, xmax, ymin, ymax],
|
|
84
|
+
getPropositions,
|
|
85
|
+
answerFormat: 'tex',
|
|
86
|
+
};
|
|
87
|
+
return question;
|
|
88
|
+
}
|
|
89
|
+
exports.getImageFunctionGeogebra = getImageFunctionGeogebra;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inverseImageFunction.d.ts","sourceRoot":"","sources":["../../../../src/exercises/geometry/cartesian/inverseImageFunction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAe,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAO3E,eAAO,MAAM,oBAAoB,EAAE,QAUlC,CAAC;AAEF,wBAAgB,uBAAuB,IAAI,QAAQ,CAkDlD"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getInverseImageFunction = exports.inverseImageFunction = void 0;
|
|
4
|
+
const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
|
|
5
|
+
const polynomial_1 = require("../../../math/polynomials/polynomial");
|
|
6
|
+
const randint_1 = require("../../../math/utils/random/randint");
|
|
7
|
+
const shuffle_1 = require("../../../utils/shuffle");
|
|
8
|
+
const uuid_1 = require("uuid");
|
|
9
|
+
exports.inverseImageFunction = {
|
|
10
|
+
id: 'inverseImageFunction',
|
|
11
|
+
connector: '\\iff',
|
|
12
|
+
instruction: '',
|
|
13
|
+
label: 'Calculer des antécédents',
|
|
14
|
+
levels: ['4', '3', '2'],
|
|
15
|
+
section: 'Géométrie cartésienne',
|
|
16
|
+
isSingleStep: true,
|
|
17
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getInverseImageFunction, nb),
|
|
18
|
+
keys: [],
|
|
19
|
+
};
|
|
20
|
+
function getInverseImageFunction() {
|
|
21
|
+
const polynome1 = new polynomial_1.Polynomial([(0, randint_1.randint)(-9, 10), (0, randint_1.randint)(-5, 6, [0])]);
|
|
22
|
+
const xValue = (0, randint_1.randint)(-9, 10);
|
|
23
|
+
const answer = polynome1.calculate(xValue);
|
|
24
|
+
const statement = `Soit $f(x) = ${polynome1
|
|
25
|
+
.toTree()
|
|
26
|
+
.toTex()}$. Déterminer le ou les antécédents de $${answer}$ par $f$.`;
|
|
27
|
+
const getPropositions = (n) => {
|
|
28
|
+
const res = [];
|
|
29
|
+
res.push({
|
|
30
|
+
id: (0, uuid_1.v4)() + '',
|
|
31
|
+
statement: xValue + '',
|
|
32
|
+
isRightAnswer: true,
|
|
33
|
+
format: 'tex',
|
|
34
|
+
});
|
|
35
|
+
for (let i = 0; i < n - 1; i++) {
|
|
36
|
+
let isDuplicate;
|
|
37
|
+
let proposition;
|
|
38
|
+
do {
|
|
39
|
+
const wrongAnswer = xValue + (0, randint_1.randint)(-10, 11, [0]);
|
|
40
|
+
proposition = {
|
|
41
|
+
id: (0, uuid_1.v4)() + '',
|
|
42
|
+
statement: wrongAnswer + '',
|
|
43
|
+
isRightAnswer: false,
|
|
44
|
+
format: 'tex',
|
|
45
|
+
};
|
|
46
|
+
isDuplicate = res.some((p) => p.statement === proposition.statement);
|
|
47
|
+
} while (isDuplicate);
|
|
48
|
+
res.push(proposition);
|
|
49
|
+
}
|
|
50
|
+
return (0, shuffle_1.shuffle)(res);
|
|
51
|
+
};
|
|
52
|
+
const question = {
|
|
53
|
+
instruction: statement,
|
|
54
|
+
startStatement: `f(x) = ${answer}`,
|
|
55
|
+
answer: xValue + '',
|
|
56
|
+
keys: ['x', 'equal'],
|
|
57
|
+
getPropositions,
|
|
58
|
+
answerFormat: 'tex',
|
|
59
|
+
};
|
|
60
|
+
return question;
|
|
61
|
+
}
|
|
62
|
+
exports.getInverseImageFunction = getInverseImageFunction;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inverseImageFunctionGeogebra.d.ts","sourceRoot":"","sources":["../../../../src/exercises/geometry/cartesian/inverseImageFunctionGeogebra.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAe,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAS3E,eAAO,MAAM,4BAA4B,EAAE,QAU1C,CAAC;AAEF,wBAAgB,+BAA+B,IAAI,QAAQ,CAsJ1D"}
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getInverseImageFunctionGeogebra = exports.inverseImageFunctionGeogebra = void 0;
|
|
4
|
+
const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
|
|
5
|
+
const polynomial_1 = require("../../../math/polynomials/polynomial");
|
|
6
|
+
const randint_1 = require("../../../math/utils/random/randint");
|
|
7
|
+
const round_1 = require("../../../math/utils/round");
|
|
8
|
+
const coinFlip_1 = require("../../../utils/coinFlip");
|
|
9
|
+
const shuffle_1 = require("../../../utils/shuffle");
|
|
10
|
+
const uuid_1 = require("uuid");
|
|
11
|
+
exports.inverseImageFunctionGeogebra = {
|
|
12
|
+
id: 'inverseImageFunctionGeogebra',
|
|
13
|
+
connector: '\\iff',
|
|
14
|
+
instruction: '',
|
|
15
|
+
label: "Lecture d'antécédents",
|
|
16
|
+
levels: ['3', '2', '1'],
|
|
17
|
+
section: 'Fonctions',
|
|
18
|
+
isSingleStep: true,
|
|
19
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getInverseImageFunctionGeogebra, nb),
|
|
20
|
+
keys: ['S', 'equal', 'lbrace', 'rbrace', 'semicolon', 'emptyset'],
|
|
21
|
+
};
|
|
22
|
+
function getInverseImageFunctionGeogebra() {
|
|
23
|
+
const rand = (0, coinFlip_1.coinFlip)();
|
|
24
|
+
const xValue = (0, randint_1.randint)(-5, 6);
|
|
25
|
+
const yValue = (0, randint_1.randint)(-5, 6);
|
|
26
|
+
let polynome1;
|
|
27
|
+
do {
|
|
28
|
+
polynome1 = new polynomial_1.Polynomial([(0, randint_1.randint)(-9, 10), (0, randint_1.randint)(-5, 6, [0])]);
|
|
29
|
+
} while (polynome1.calculate(xValue) > 10 || polynome1.calculate(xValue) < -10);
|
|
30
|
+
let polynome2 = new polynomial_1.Polynomial([(0, randint_1.randint)(-9, 10) - yValue, (0, randint_1.randint)(-9, 10), (0, randint_1.randint)(-4, 5, [0])]);
|
|
31
|
+
let roots = polynome2.getRoots();
|
|
32
|
+
if (roots.length === 2)
|
|
33
|
+
while (roots[0] > 10 || roots[0] < -10 || roots[1] > 10 || roots[1] < -10) {
|
|
34
|
+
polynome2 = new polynomial_1.Polynomial([(0, randint_1.randint)(-9, 10) - yValue, (0, randint_1.randint)(-9, 10), (0, randint_1.randint)(-4, 5, [0])]);
|
|
35
|
+
roots = polynome2.getRoots();
|
|
36
|
+
}
|
|
37
|
+
if (roots.length === 1)
|
|
38
|
+
while (roots[0] < -10 || roots[0] > 10) {
|
|
39
|
+
polynome2 = new polynomial_1.Polynomial([(0, randint_1.randint)(-9, 10) - yValue, (0, randint_1.randint)(-9, 10), (0, randint_1.randint)(-4, 5, [0])]);
|
|
40
|
+
roots = polynome2.getRoots();
|
|
41
|
+
}
|
|
42
|
+
const statement = rand
|
|
43
|
+
? `Déterminer le ou les antécédents de ${polynome1.calculate(xValue)}$ par la fonction $f$ représentée ci dessous.`
|
|
44
|
+
: `Déterminer le ou les antécédents de ${yValue}$ par la fonction $f$ représentée ci dessous.`;
|
|
45
|
+
const answer = rand
|
|
46
|
+
? xValue
|
|
47
|
+
: roots.length === 2
|
|
48
|
+
? `\\{${(0, round_1.round)(roots[0], 1)};${(0, round_1.round)(roots[1], 1)} \\}`
|
|
49
|
+
: roots.length === 1
|
|
50
|
+
? roots[0]
|
|
51
|
+
: `\\emptyset`;
|
|
52
|
+
const optimum = polynome2.derivate().getRoots()[0];
|
|
53
|
+
let xmin = 0, xmax = 0, ymin = 0, ymax = 0;
|
|
54
|
+
if (rand) {
|
|
55
|
+
if (polynome1.calculate(xValue) > 0) {
|
|
56
|
+
ymax = polynome1.calculate(xValue) + 1;
|
|
57
|
+
ymin = -1;
|
|
58
|
+
}
|
|
59
|
+
else {
|
|
60
|
+
ymin = polynome1.calculate(xValue) - 1;
|
|
61
|
+
ymax = 1;
|
|
62
|
+
}
|
|
63
|
+
if (xValue > 0) {
|
|
64
|
+
xmax = xValue + 1;
|
|
65
|
+
xmin = -1;
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
xmin = xValue - 1;
|
|
69
|
+
xmax = 1;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
else {
|
|
73
|
+
console.log(optimum);
|
|
74
|
+
if (roots.length === 2) {
|
|
75
|
+
if (yValue > polynome2.calculate(optimum) + yValue) {
|
|
76
|
+
ymax = yValue + 2;
|
|
77
|
+
ymin = polynome2.calculate(optimum) + yValue - 2;
|
|
78
|
+
}
|
|
79
|
+
else {
|
|
80
|
+
ymin = yValue - 2;
|
|
81
|
+
ymax = polynome2.calculate(optimum) + yValue + 2;
|
|
82
|
+
}
|
|
83
|
+
xmax = Math.max(roots[0], roots[1]) + 1;
|
|
84
|
+
xmin = Math.min(roots[0], roots[1]) - 1;
|
|
85
|
+
}
|
|
86
|
+
if (roots.length === 1) {
|
|
87
|
+
if (yValue > 0) {
|
|
88
|
+
ymax = yValue + 5;
|
|
89
|
+
ymin = yValue - 1;
|
|
90
|
+
}
|
|
91
|
+
else {
|
|
92
|
+
ymin = yValue - 5;
|
|
93
|
+
ymax = yValue + 1;
|
|
94
|
+
}
|
|
95
|
+
xmax = optimum + 5;
|
|
96
|
+
xmin = optimum - 5;
|
|
97
|
+
}
|
|
98
|
+
if (roots.length === 0) {
|
|
99
|
+
if (yValue > polynome2.calculate(optimum) + yValue) {
|
|
100
|
+
ymax = yValue + 1;
|
|
101
|
+
ymin = polynome2.calculate(optimum) + yValue - 3;
|
|
102
|
+
}
|
|
103
|
+
else {
|
|
104
|
+
ymin = yValue - 1;
|
|
105
|
+
ymax = polynome2.calculate(optimum) + yValue + 3;
|
|
106
|
+
}
|
|
107
|
+
xmax = optimum + 5;
|
|
108
|
+
xmin = optimum - 5;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
const getPropositions = (n) => {
|
|
112
|
+
const res = [];
|
|
113
|
+
res.push({
|
|
114
|
+
id: (0, uuid_1.v4)() + '',
|
|
115
|
+
statement: answer + '',
|
|
116
|
+
isRightAnswer: true,
|
|
117
|
+
format: 'tex',
|
|
118
|
+
});
|
|
119
|
+
for (let i = 0; i < n - 1; i++) {
|
|
120
|
+
let isDuplicate;
|
|
121
|
+
let proposition;
|
|
122
|
+
do {
|
|
123
|
+
const wrongAnswer = (0, coinFlip_1.coinFlip)()
|
|
124
|
+
? (0, randint_1.randint)(-9, 10, [polynome1.calculate(xValue)])
|
|
125
|
+
: roots.length === 2
|
|
126
|
+
? `\\{${(0, randint_1.randint)(-9, 10)};${(0, randint_1.randint)(-9, 10)} \\}`
|
|
127
|
+
: roots.length === 1
|
|
128
|
+
? (0, randint_1.randint)(-9, 10, [roots[0]])
|
|
129
|
+
: `\\emptyset`;
|
|
130
|
+
proposition = {
|
|
131
|
+
id: (0, uuid_1.v4)() + '',
|
|
132
|
+
statement: wrongAnswer + '',
|
|
133
|
+
isRightAnswer: false,
|
|
134
|
+
format: 'tex',
|
|
135
|
+
};
|
|
136
|
+
isDuplicate = res.some((p) => p.statement === proposition.statement);
|
|
137
|
+
} while (isDuplicate);
|
|
138
|
+
res.push(proposition);
|
|
139
|
+
}
|
|
140
|
+
return (0, shuffle_1.shuffle)(res);
|
|
141
|
+
};
|
|
142
|
+
const commands = [rand ? polynome1.toString() : polynome2.add(new polynomial_1.Polynomial([yValue])).toString()];
|
|
143
|
+
const question = {
|
|
144
|
+
instruction: statement,
|
|
145
|
+
answer: answer + '',
|
|
146
|
+
keys: ['S', 'equal', 'lbrace', 'rbrace', 'semicolon', 'emptyset'],
|
|
147
|
+
commands,
|
|
148
|
+
coords: [xmin, xmax, ymin, ymax],
|
|
149
|
+
getPropositions,
|
|
150
|
+
answerFormat: 'tex',
|
|
151
|
+
};
|
|
152
|
+
return question;
|
|
153
|
+
}
|
|
154
|
+
exports.getInverseImageFunctionGeogebra = getInverseImageFunctionGeogebra;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"leadingCoefficient.d.ts","sourceRoot":"","sources":["../../../../src/exercises/geometry/cartesian/leadingCoefficient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAe,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAY3E,eAAO,MAAM,kBAAkB,EAAE,QAShC,CAAC;AAEF,wBAAgB,6BAA6B,IAAI,QAAQ,
|
|
1
|
+
{"version":3,"file":"leadingCoefficient.d.ts","sourceRoot":"","sources":["../../../../src/exercises/geometry/cartesian/leadingCoefficient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAe,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAY3E,eAAO,MAAM,kBAAkB,EAAE,QAShC,CAAC;AAEF,wBAAgB,6BAA6B,IAAI,QAAQ,CAiFxD"}
|
|
@@ -59,6 +59,7 @@ function getLeadingCoefficientQuestion() {
|
|
|
59
59
|
id: (0, uuid_1.v4)() + '',
|
|
60
60
|
statement: droite.getLeadingCoefficient(),
|
|
61
61
|
isRightAnswer: true,
|
|
62
|
+
format: 'tex',
|
|
62
63
|
});
|
|
63
64
|
for (let i = 0; i < n - 1; i++) {
|
|
64
65
|
let isDuplicate;
|
|
@@ -71,6 +72,7 @@ function getLeadingCoefficientQuestion() {
|
|
|
71
72
|
id: (0, uuid_1.v4)() + '',
|
|
72
73
|
statement: wrongAnswer.toTex(),
|
|
73
74
|
isRightAnswer: false,
|
|
75
|
+
format: 'tex',
|
|
74
76
|
};
|
|
75
77
|
isDuplicate = res.some((p) => p.statement === proposition.statement);
|
|
76
78
|
} while (isDuplicate);
|
|
@@ -84,6 +86,7 @@ function getLeadingCoefficientQuestion() {
|
|
|
84
86
|
commands: [`f(x) = (${a}) * x + (${b})`],
|
|
85
87
|
coords: [xmin, xmax, ymin, ymax],
|
|
86
88
|
getPropositions,
|
|
89
|
+
answerFormat: 'tex',
|
|
87
90
|
};
|
|
88
91
|
return question;
|
|
89
92
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"leadingCoefficientCalculV1.d.ts","sourceRoot":"","sources":["../../../../src/exercises/geometry/cartesian/leadingCoefficientCalculV1.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAe,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAS3E,eAAO,MAAM,0BAA0B,EAAE,QASxC,CAAC;AAEF,wBAAgB,qCAAqC,IAAI,QAAQ,
|
|
1
|
+
{"version":3,"file":"leadingCoefficientCalculV1.d.ts","sourceRoot":"","sources":["../../../../src/exercises/geometry/cartesian/leadingCoefficientCalculV1.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAe,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAS3E,eAAO,MAAM,0BAA0B,EAAE,QASxC,CAAC;AAEF,wBAAgB,qCAAqC,IAAI,QAAQ,CAmDhE"}
|
|
@@ -28,6 +28,7 @@ function getLeadingCoefficientCalculV1Question() {
|
|
|
28
28
|
id: (0, uuid_1.v4)() + '',
|
|
29
29
|
statement: (0, simplify_1.simplifyNode)(new fractionNode_1.FractionNode(new numberNode_1.NumberNode(yB - yA), new numberNode_1.NumberNode(xB - xA))).toTex(),
|
|
30
30
|
isRightAnswer: true,
|
|
31
|
+
format: 'tex',
|
|
31
32
|
});
|
|
32
33
|
for (let i = 0; i < n - 1; i++) {
|
|
33
34
|
let isDuplicate;
|
|
@@ -38,6 +39,7 @@ function getLeadingCoefficientCalculV1Question() {
|
|
|
38
39
|
id: (0, uuid_1.v4)() + '',
|
|
39
40
|
statement: wrongAnswer,
|
|
40
41
|
isRightAnswer: false,
|
|
42
|
+
format: 'tex',
|
|
41
43
|
};
|
|
42
44
|
isDuplicate = res.some((p) => p.statement === proposition.statement);
|
|
43
45
|
} while (isDuplicate);
|
|
@@ -50,6 +52,7 @@ function getLeadingCoefficientCalculV1Question() {
|
|
|
50
52
|
startStatement: 'a',
|
|
51
53
|
answer: (0, simplify_1.simplifyNode)(new fractionNode_1.FractionNode(new numberNode_1.NumberNode(yB - yA), new numberNode_1.NumberNode(xB - xA))).toTex(),
|
|
52
54
|
getPropositions,
|
|
55
|
+
answerFormat: 'tex',
|
|
53
56
|
};
|
|
54
57
|
return question;
|
|
55
58
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"leadingCoefficientCalculV2.d.ts","sourceRoot":"","sources":["../../../../src/exercises/geometry/cartesian/leadingCoefficientCalculV2.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAe,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAS3E,eAAO,MAAM,0BAA0B,EAAE,QASxC,CAAC;AAEF,wBAAgB,qCAAqC,IAAI,QAAQ,
|
|
1
|
+
{"version":3,"file":"leadingCoefficientCalculV2.d.ts","sourceRoot":"","sources":["../../../../src/exercises/geometry/cartesian/leadingCoefficientCalculV2.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAe,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAS3E,eAAO,MAAM,0BAA0B,EAAE,QASxC,CAAC;AAEF,wBAAgB,qCAAqC,IAAI,QAAQ,CAkDhE"}
|
|
@@ -28,6 +28,7 @@ function getLeadingCoefficientCalculV1Question() {
|
|
|
28
28
|
id: (0, uuid_1.v4)() + '',
|
|
29
29
|
statement: (0, simplify_1.simplifyNode)(new fractionNode_1.FractionNode(new numberNode_1.NumberNode(yB - yA), new numberNode_1.NumberNode(xB - xA))).toTex(),
|
|
30
30
|
isRightAnswer: true,
|
|
31
|
+
format: 'tex',
|
|
31
32
|
});
|
|
32
33
|
for (let i = 0; i < n - 1; i++) {
|
|
33
34
|
let isDuplicate;
|
|
@@ -38,6 +39,7 @@ function getLeadingCoefficientCalculV1Question() {
|
|
|
38
39
|
id: (0, uuid_1.v4)() + '',
|
|
39
40
|
statement: wrongAnswer,
|
|
40
41
|
isRightAnswer: false,
|
|
42
|
+
format: 'tex',
|
|
41
43
|
};
|
|
42
44
|
isDuplicate = res.some((p) => p.statement === proposition.statement);
|
|
43
45
|
} while (isDuplicate);
|
|
@@ -49,6 +51,7 @@ function getLeadingCoefficientCalculV1Question() {
|
|
|
49
51
|
instruction: `Soit $d$ une droite passant par les points $A(${xA};${yA})$ et $B(${xB};${yB})$.$\\\\$Déterminer le coefficient directeur de $d$.`,
|
|
50
52
|
answer: (0, simplify_1.simplifyNode)(new fractionNode_1.FractionNode(new numberNode_1.NumberNode(yB - yA), new numberNode_1.NumberNode(xB - xA))).toTex(),
|
|
51
53
|
getPropositions,
|
|
54
|
+
answerFormat: 'tex',
|
|
52
55
|
};
|
|
53
56
|
return question;
|
|
54
57
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"midpoint.d.ts","sourceRoot":"","sources":["../../../../src/exercises/geometry/cartesian/midpoint.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAe,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAQ3E,eAAO,MAAM,QAAQ,EAAE,QAUtB,CAAC;AAEF,wBAAgB,mBAAmB,IAAI,QAAQ,
|
|
1
|
+
{"version":3,"file":"midpoint.d.ts","sourceRoot":"","sources":["../../../../src/exercises/geometry/cartesian/midpoint.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAe,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAQ3E,eAAO,MAAM,QAAQ,EAAE,QAUtB,CAAC;AAEF,wBAAgB,mBAAmB,IAAI,QAAQ,CAiD9C"}
|
|
@@ -28,6 +28,7 @@ function getMidpointQuestion() {
|
|
|
28
28
|
id: (0, uuid_1.v4)() + '',
|
|
29
29
|
statement: A.midpoint(B).toTexWithCoords(),
|
|
30
30
|
isRightAnswer: true,
|
|
31
|
+
format: 'tex',
|
|
31
32
|
});
|
|
32
33
|
for (let i = 0; i < n - 1; i++) {
|
|
33
34
|
let isDuplicate;
|
|
@@ -41,6 +42,7 @@ function getMidpointQuestion() {
|
|
|
41
42
|
id: (0, uuid_1.v4)() + '',
|
|
42
43
|
statement: wrongAnswer.toTexWithCoords(),
|
|
43
44
|
isRightAnswer: false,
|
|
45
|
+
format: 'tex',
|
|
44
46
|
};
|
|
45
47
|
isDuplicate = res.some((p) => p.statement === proposition.statement);
|
|
46
48
|
} while (isDuplicate);
|
|
@@ -54,6 +56,7 @@ function getMidpointQuestion() {
|
|
|
54
56
|
answer: A.midpoint(B).toTexWithCoords(),
|
|
55
57
|
keys: ['semicolon'],
|
|
56
58
|
getPropositions,
|
|
59
|
+
answerFormat: 'tex',
|
|
57
60
|
};
|
|
58
61
|
return question;
|
|
59
62
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signFunction.d.ts","sourceRoot":"","sources":["../../../../src/exercises/geometry/cartesian/signFunction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAe,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAU3E,eAAO,MAAM,YAAY,EAAE,QAU1B,CAAC;AAEF,wBAAgB,eAAe,IAAI,QAAQ,CAuE1C"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getSignFunction = exports.signFunction = void 0;
|
|
4
|
+
const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
|
|
5
|
+
const polynomial_1 = require("../../../math/polynomials/polynomial");
|
|
6
|
+
const randint_1 = require("../../../math/utils/random/randint");
|
|
7
|
+
const numberNode_1 = require("../../../tree/nodes/numbers/numberNode");
|
|
8
|
+
const simplify_1 = require("../../../tree/parsers/simplify");
|
|
9
|
+
const coinFlip_1 = require("../../../utils/coinFlip");
|
|
10
|
+
const shuffle_1 = require("../../../utils/shuffle");
|
|
11
|
+
const uuid_1 = require("uuid");
|
|
12
|
+
exports.signFunction = {
|
|
13
|
+
id: 'signFunction',
|
|
14
|
+
connector: '=',
|
|
15
|
+
instruction: '',
|
|
16
|
+
label: "Signe d'une fonction affine",
|
|
17
|
+
levels: ['4', '3', '2'],
|
|
18
|
+
section: 'Fonctions affines',
|
|
19
|
+
isSingleStep: true,
|
|
20
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getSignFunction, nb),
|
|
21
|
+
keys: ['S', 'equal', 'lbracket', 'rbracket', 'semicolon', 'infty'],
|
|
22
|
+
};
|
|
23
|
+
function getSignFunction() {
|
|
24
|
+
const a = (0, randint_1.randint)(-9, 10, [0]);
|
|
25
|
+
const b = (0, randint_1.randint)(-9, 10);
|
|
26
|
+
const affine = new polynomial_1.Polynomial([b, a]);
|
|
27
|
+
let instruction = `Soit $f$ la fonction définie par : $f(x) = ${affine.toTex()}$. Sur quel intervalle $f$ est-elle `;
|
|
28
|
+
let answer = '';
|
|
29
|
+
switch ((0, coinFlip_1.coinFlip)()) {
|
|
30
|
+
case true:
|
|
31
|
+
instruction += 'positive ?';
|
|
32
|
+
answer =
|
|
33
|
+
a > 0
|
|
34
|
+
? `\\left[${(0, simplify_1.simplifyNode)(new numberNode_1.NumberNode(-b / a)).toTex()};+\\infty\\right[`
|
|
35
|
+
: `\\left]-\\infty;${(0, simplify_1.simplifyNode)(new numberNode_1.NumberNode(-b / a)).toTex()}\\right]`;
|
|
36
|
+
break;
|
|
37
|
+
case false:
|
|
38
|
+
instruction += 'négative ?';
|
|
39
|
+
answer =
|
|
40
|
+
a > 0
|
|
41
|
+
? `\\left]-\\infty;${(0, simplify_1.simplifyNode)(new numberNode_1.NumberNode(-b / a)).toTex()}\\right]`
|
|
42
|
+
: `\\left[${(0, simplify_1.simplifyNode)(new numberNode_1.NumberNode(-b / a)).toTex()};+\\infty\\left[`;
|
|
43
|
+
break;
|
|
44
|
+
}
|
|
45
|
+
const getPropositions = (n) => {
|
|
46
|
+
const res = [];
|
|
47
|
+
res.push({
|
|
48
|
+
id: (0, uuid_1.v4)() + '',
|
|
49
|
+
statement: answer,
|
|
50
|
+
isRightAnswer: true,
|
|
51
|
+
format: 'tex',
|
|
52
|
+
});
|
|
53
|
+
for (let i = 0; i < n - 1; i++) {
|
|
54
|
+
let isDuplicate;
|
|
55
|
+
let proposition;
|
|
56
|
+
do {
|
|
57
|
+
const a = (0, randint_1.randint)(-9, 10, [0]);
|
|
58
|
+
const b = (0, randint_1.randint)(-9, 10);
|
|
59
|
+
const wrongAnswer = (0, coinFlip_1.coinFlip)()
|
|
60
|
+
? `\\left[${(0, simplify_1.simplifyNode)(new numberNode_1.NumberNode(-b / a)).toTex()};+\\infty\\right[`
|
|
61
|
+
: `\\left]-\\infty;${(0, simplify_1.simplifyNode)(new numberNode_1.NumberNode(-b / a)).toTex()}\\right]`;
|
|
62
|
+
proposition = {
|
|
63
|
+
id: (0, uuid_1.v4)() + '',
|
|
64
|
+
statement: wrongAnswer,
|
|
65
|
+
isRightAnswer: false,
|
|
66
|
+
format: 'tex',
|
|
67
|
+
};
|
|
68
|
+
isDuplicate = res.some((p) => p.statement === proposition.statement);
|
|
69
|
+
} while (isDuplicate);
|
|
70
|
+
res.push(proposition);
|
|
71
|
+
}
|
|
72
|
+
return (0, shuffle_1.shuffle)(res);
|
|
73
|
+
};
|
|
74
|
+
const question = {
|
|
75
|
+
instruction,
|
|
76
|
+
startStatement: 'S',
|
|
77
|
+
answer,
|
|
78
|
+
keys: ['S', 'equal', 'lbracket', 'rbracket', 'semicolon', 'infty'],
|
|
79
|
+
getPropositions,
|
|
80
|
+
answerFormat: 'tex',
|
|
81
|
+
};
|
|
82
|
+
return question;
|
|
83
|
+
}
|
|
84
|
+
exports.getSignFunction = getSignFunction;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"circleArea.d.ts","sourceRoot":"","sources":["../../../../src/exercises/geometry/euclidean/circleArea.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAe,MAAM,0BAA0B,CAAC;AAQ3E,eAAO,MAAM,UAAU,EAAE,QASxB,CAAC;AAEF,wBAAgB,aAAa,IAAI,QAAQ,
|
|
1
|
+
{"version":3,"file":"circleArea.d.ts","sourceRoot":"","sources":["../../../../src/exercises/geometry/euclidean/circleArea.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAe,MAAM,0BAA0B,CAAC;AAQ3E,eAAO,MAAM,UAAU,EAAE,QASxB,CAAC;AAEF,wBAAgB,aAAa,IAAI,QAAQ,CA+CxC"}
|
|
@@ -28,6 +28,7 @@ function getCircleArea() {
|
|
|
28
28
|
id: (0, uuid_1.v4)() + '',
|
|
29
29
|
statement: correctAnswer,
|
|
30
30
|
isRightAnswer: true,
|
|
31
|
+
format: 'tex',
|
|
31
32
|
});
|
|
32
33
|
for (let i = 0; i < n - 1; i++) {
|
|
33
34
|
let isDuplicate;
|
|
@@ -38,6 +39,7 @@ function getCircleArea() {
|
|
|
38
39
|
id: (0, uuid_1.v4)() + '',
|
|
39
40
|
statement: wrongAnswer,
|
|
40
41
|
isRightAnswer: false,
|
|
42
|
+
format: 'tex',
|
|
41
43
|
};
|
|
42
44
|
isDuplicate = res.some((p) => p.statement === proposition.statement);
|
|
43
45
|
} while (isDuplicate);
|
|
@@ -49,6 +51,7 @@ function getCircleArea() {
|
|
|
49
51
|
instruction: `Calculer l'aire d'un cercle de ${coin ? 'rayon ' + radius : 'diamètre ' + diametre} cm.`,
|
|
50
52
|
answer: correctAnswer,
|
|
51
53
|
getPropositions,
|
|
54
|
+
answerFormat: 'tex',
|
|
52
55
|
};
|
|
53
56
|
return question;
|
|
54
57
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"circleCircumference.d.ts","sourceRoot":"","sources":["../../../../src/exercises/geometry/euclidean/circleCircumference.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAe,MAAM,0BAA0B,CAAC;AAQ3E,eAAO,MAAM,mBAAmB,EAAE,QASjC,CAAC;AAEF,wBAAgB,sBAAsB,IAAI,QAAQ,
|
|
1
|
+
{"version":3,"file":"circleCircumference.d.ts","sourceRoot":"","sources":["../../../../src/exercises/geometry/euclidean/circleCircumference.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAe,MAAM,0BAA0B,CAAC;AAQ3E,eAAO,MAAM,mBAAmB,EAAE,QASjC,CAAC;AAEF,wBAAgB,sBAAsB,IAAI,QAAQ,CA+CjD"}
|